Showing posts with label objects. Show all posts
Showing posts with label objects. Show all posts

Sunday, March 25, 2012

Connectivity Issues in AMO

Hi,

I am using AMO to connect to SSAS 2005 and programmatically create objects. currently I am specifying only the ServerName in the connection string. Please see the code below:

<code>

Server SSASServer = new Microsoft.AnalysisServices.Server();
SSASServer.Connect("DataSource=" + ServerName);

</code>

The above code works fine and I am able to connect. Now I want to provide the instance name of the server and also the server name. because tomorrow we will have multiple instances of Analysis server running on the same server. I read somewhere that we need to specify ServerName\InstanceName.

SSASServer.Connect(ServerName + "\\" + InstanceName);

So I tried the above, with both the serverName and InstanceName being the same for now. (currently only one instance is running). but that is not working, whenever I do that I get the error: I also removed the string "DataSoruce=", still I get the same error.

{"A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running."}

1. How to identify the ServerName and the InstanceName?

2. How to specify them in the connection string?

3. Currently I am using Windows Integrated Authentication, how do i specify username and password to connect to SSAS 2005.

Please do provide any information possible.

Thanks and Regards

Vijay R

Connection to the default instance could only be made by using ServerName.

Anything you specify after the '\' will be considered as an instance name. meaning client will try to find an AS named instance with such name.

In your experiment above, it will try to find a named instance and will fail because you dont have it installed.

Get your named instance installed and connect to it using ServerName\InstanceName where InstanceName you provide during setup of Analysis Server.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thanks a lot Melomed,

That certainly helped me.

But what about specfying the Username and password for connection.

That is if I do not want to use Windows Integrated Authentication for SSAS in AMO.

Regards

Vijay R

|||

When using TCP/IP to connect to Analysis Server , Windows authentication is your only choice.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi Melomed,

I was succesful in implementing and executing teh AMO based app that creates Cubes, Dimensions, MeasureGroups, Measures and Partitions.

but I still have the problem of connecting to an named instance of the SSAS server. I now have a named instance of SSAS.

I am also able to conect to it using the BI studio /Visual Studio 2005. After connecting the summary/properties display ServerName\InstanceName.

but when i try this programmatically using AMO, it throws the below error. (the same one!)

{"A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running."}

Here is the code:

string tempConnstring = "DataSource=" + SSASServerName + @."\" + SSASInstanceName;

SSASServer.Connect(tempConnstring);

-

Please do help me as to how I should be doing this?

Thanks and Regards

Vijay R

|||

It is not "DataSource="

But rather "Data Source="

You are missing a space there.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

sqlsql

Connectivity Issues - Bizzare

I am trying to connect to a default instance of SQL Server 2000 Enterprise on
a remote network server using ADO.NET objects through ASP.NET Web Application.
The SQL SERVER is on a Windows XP machine (no firewall enabled) with TCP/IP
and Named Pipes enabled
For the test purposes, I created a new Web Form, created a new SqlConnection
in the Server Explorer to the remote database. I test the connection is VS
IDE and everything is fine. I create a SqlDataAdapter on the web form,
generate a dataset, test the dataset and the results are valid. I bind the
SqlDataAdapter to a datagrid and run the webform. I now get the following
error.
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DBConnTest.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\dbconntest\webform1.aspx.cs:lin e 39
Hmph! I take the same connection string from the web app, create a win app.
Place a datagrid on the form, do the binding and load the app. Hey Presto! it
works.
I used TCPView (systeminternals.com) and I can see aspnet_wp trying to
create a connection, but its at though SQL Server is rejecting the
connection, although I see no failures in SQL Server.
Any thoughts would be much appreciated.
Andy
Sounds like firewall to me.
As a quick test to see if firewall is blocking port, try this from command
prompt on client machine ->
telnet mysqlmachine 1433
If you can't telnet to 1433, then you have firewall issue.
Matt Neerincx [MSFT]
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Andy Furnival" <AndyFurnival@.discussions.microsoft.com> wrote in message
news:40AC00C0-0402-452B-AAC8-F25D97E94ACD@.microsoft.com...
>I am trying to connect to a default instance of SQL Server 2000 Enterprise
>on
> a remote network server using ADO.NET objects through ASP.NET Web
> Application.
> The SQL SERVER is on a Windows XP machine (no firewall enabled) with
> TCP/IP
> and Named Pipes enabled
> For the test purposes, I created a new Web Form, created a new
> SqlConnection
> in the Server Explorer to the remote database. I test the connection is VS
> IDE and everything is fine. I create a SqlDataAdapter on the web form,
> generate a dataset, test the dataset and the results are valid. I bind the
> SqlDataAdapter to a datagrid and run the webform. I now get the following
> error.
> System.Data.SqlClient.SqlException: SQL Server does not exist or access
> denied.
> at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
> isInTransaction)
> at
> System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString
> options, Boolean& isInTransaction)
> at System.Data.SqlClient.SqlConnection.Open()
> at DBConnTest.WebForm1.Page_Load(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\dbconntest\webform1.aspx.cs:lin e 39
> Hmph! I take the same connection string from the web app, create a win
> app.
> Place a datagrid on the form, do the binding and load the app. Hey Presto!
> it
> works.
> I used TCPView (systeminternals.com) and I can see aspnet_wp trying to
> create a connection, but its at though SQL Server is rejecting the
> connection, although I see no failures in SQL Server.
> Any thoughts would be much appreciated.
> Andy

Thursday, March 22, 2012

Connectivity Issues - Bizzare

I am trying to connect to a default instance of SQL Server 2000 Enterprise o
n
a remote network server using ADO.NET objects through ASP.NET Web Applicatio
n.
The SQL SERVER is on a Windows XP machine (no firewall enabled) with TCP/IP
and Named Pipes enabled
For the test purposes, I created a new Web Form, created a new SqlConnection
in the Server Explorer to the remote database. I test the connection is VS
IDE and everything is fine. I create a SqlDataAdapter on the web form,
generate a dataset, test the dataset and the results are valid. I bind the
SqlDataAdapter to a datagrid and run the webform. I now get the following
error.
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DBConnTest.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\dbconntest\webform1.aspx.cs:line 39
Hmph! I take the same connection string from the web app, create a win app.
Place a datagrid on the form, do the binding and load the app. Hey Presto! i
t
works.
I used TCPView (systeminternals.com) and I can see aspnet_wp trying to
create a connection, but its at though SQL Server is rejecting the
connection, although I see no failures in SQL Server.
Any thoughts would be much appreciated.
AndySounds like firewall to me.
As a quick test to see if firewall is blocking port, try this from command
prompt on client machine ->
telnet mysqlmachine 1433
If you can't telnet to 1433, then you have firewall issue.
Matt Neerincx [MSFT]
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Andy Furnival" <AndyFurnival@.discussions.microsoft.com> wrote in message
news:40AC00C0-0402-452B-AAC8-F25D97E94ACD@.microsoft.com...
>I am trying to connect to a default instance of SQL Server 2000 Enterprise
>on
> a remote network server using ADO.NET objects through ASP.NET Web
> Application.
> The SQL SERVER is on a Windows XP machine (no firewall enabled) with
> TCP/IP
> and Named Pipes enabled
> For the test purposes, I created a new Web Form, created a new
> SqlConnection
> in the Server Explorer to the remote database. I test the connection is VS
> IDE and everything is fine. I create a SqlDataAdapter on the web form,
> generate a dataset, test the dataset and the results are valid. I bind the
> SqlDataAdapter to a datagrid and run the webform. I now get the following
> error.
> System.Data.SqlClient.SqlException: SQL Server does not exist or access
> denied.
> at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
> isInTransaction)
> at
> System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConn
ectionString
> options, Boolean& isInTransaction)
> at System.Data.SqlClient.SqlConnection.Open()
> at DBConnTest.WebForm1.Page_Load(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\dbconntest\webform1.aspx.cs:line 39
> Hmph! I take the same connection string from the web app, create a win
> app.
> Place a datagrid on the form, do the binding and load the app. Hey Presto!
> it
> works.
> I used TCPView (systeminternals.com) and I can see aspnet_wp trying to
> create a connection, but its at though SQL Server is rejecting the
> connection, although I see no failures in SQL Server.
> Any thoughts would be much appreciated.
> Andy

Connectivity Book

Hi,

Can someone please guide for a book that speaks in depth about connectivity issues and bugs related to SQL server connection objects.

I am also looking for a good getting started(and in depth) guide/resourse for following components....

MDAC Architecture & Installation

SQL Server Profiler.................................................................................................. 5

SQL Server Security................................................................................................. 7

Indexes..................................................................................................................... 8

Network Libraries and Connectivity........................................................................... 9

Linked Servers........................................................................................................ 11


Microsoft JET Basics........................................................................................................ 1

Access and Jet.................................................................................................................. 2

JET Provider 3.51 vs. 4.0.................................................................................................. 2

Unrecognized Database Format with Data Control............................................................. 3

Access ODBC driver and ASP – Just say No!.................................................................. 3

JET Installation.................................................................................................................. 3

............................................................................................................................. 1

Cursors; Location and Type.............................................................................................. 2

Objectives................................................................................................................. 2

What is a cursor?...................................................................................................... 2

Simple ADO Code.................................................................................................... 3

Default Values........................................................................................................... 3

FireHose Cursor....................................................................................................... 4

CursorType Property Values..................................................................................... 4

Static Cursor............................................................................................................. 5

Keyset Cursor........................................................................................................... 5

Dynamic Cursor........................................................................................................ 6

Limitations of CursorType......................................................................................... 6

CursorLocation......................................................................................................... 7

Server Side Recordsets............................................................................................. 7

Client Side Recordsets.............................................................................................. 8

Questions to ask........................................................................................................ 9

Guidelines............................................................................................................... 10

Knowledge Base Articles........................................................................................ 10

Resources............................................................................................................... 10


COM Basics....................................................................................................................... 1

COM – A Binary Component Architecture........................................................................ 4

COM Defined....................................................................................................... 4

Summary of the limitations of traditional object oriented techniques......................... 4

How COM Works............................................................................................................ 5

Using COM Objects............................................................................................. 5

Objects and classes................................................................................................... 7

Objects and interfaces............................................................................................... 7

Interface – a Contract................................................................................................ 7

Interfaces.......................................................................................................................... 8

An Array of Function Pointers................................................................................... 8

Identifying an Interface............................................................................................... 8

Interface Types......................................................................................................... 8

IUnknown................................................................................................................. 9

The COM Activation Process.......................................................................................... 10

Activation Steps for in-process COM component................................................ 10

Activation Steps for local COM component......................................................... 11

Creating a COM Client................................................................................................... 12

Declaring your COM object Variables............................................................................. 13

Creating COM Objects................................................................................................... 13

Destroying COM Objects............................................................................................... 15

Ensuring the “correct” COM Object is Created................................................................ 15

Lab - Creating a COM Client in Visual Basic............................................................... 15

Creating an In-Process COM Component....................................................................... 17

Creating Properties.......................................................................................................... 18

Creating Methods............................................................................................................ 19

The Instancing Property for ActiveX DLL’s..................................................................... 20

MTSTransactionMode Property...................................................................................... 22

Creating a Local Server COM Component...................................................................... 24

Component Versioning in Visual Basic............................................................................. 25

Components in COM+.................................................................................................... 29

COM+ Surrogate.................................................................................................... 29

COM+ Object context............................................................................................ 29

Just In Time (JIT) activation............................................................................................. 29

JIT Activation and state................................................................................................... 31

Demonstration: JIT Deactivation.................................................................................. 31

Demonstration: JIT Activation...................................................................................... 32

Active X Dlls created in Visual Basic that are enlisted in MTS / COM+ Applications34


ADO Basics – COM Automation object model................................................................ 1

COM Automation object model........................................................................................ 2

ADO Basics...................................................................................................................... 3

ADO Objects................................................................................................................... 4

ADO – Command Object................................................................................................. 9

ADO –Recordset Object................................................................................................ 10

ADO Recordsets – ways of obtaining.............................................................................. 13

ADO Objects – Data Access Summary........................................................................... 15

ADO Collections –.......................................................................................................... 16

ADO – Updating & Locking........................................................................................... 22

ADO – Using Stored Procedures.................................................................................... 23

This is just a list of things i would like to learn!!

Thankyou

Jay

Book online and KB have good info. I am not aware of any book dedicated to sql connectivity issue yet.|||

Thanks Nan,

I am trying to go inside the working of couple of things like database connection process and connection object behaviour in distributed systems in general.

I do appriciate your reply.

Thankyou,

Jay