Showing posts with label second. Show all posts
Showing posts with label second. Show all posts

Monday, March 19, 2012

Connecting to local cube created from AS 2000 and AS 2005 cubes using ADOMD.NET 9.0

Hello,

I created two local cubes, first one: from an AS 2000 cube and the second one from an AS 2005 cube. Then I tried to connect to them using the following code:

' AS 2000

Dim strDataSource As String = "MyFolderPath\AS2000LocalCube.cub"

Dim strDatabase As String = "AS2000LocalCubeName"

' AS 20005

'Dim strDataSource As String = "MyFolderPath\AS2005LocalCube.cub"

'Dim strDatabase As String = "AS2005LocalCubeName"

strConnectString ="Provider=MSOLAP;Data Source=" & strDataSource &";Catalog=" & strDatabase &";MDX Compatibility=2;"

Dim clConnectionAsNew AdomdConnection

clConnection.ConnectionString = strConnectString

clConnection.Open()

It works properly for AS 2000 local cube but for AS 20005 local cube, it return the following exception:

InnerException{"The 'MyFolderPath\AS2005LocalCube.cub' local cube file cannot be opened."}System.Exception

Message"A connection cannot be made. Ensure that the server is running."String

Source"Microsoft.AnalysisServices.AdomdClient"String

StackTrace"at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.ConnectXmla()

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()

Both local cubes were created using the same MDX query.

Abdel

Can you connect to the AS2005 local cube using OLEDB. Excel and the MDX Sample app both use OLEDB, so try one of these.

Try getting rid of MDX Compatibility=2... shouldn't matter.

How did you create the local cube?

|||

Yes I am able to connect using MDX Sample App and Excel 2003.

But for AS 2005 local cube and using Excel 2003, if you are already connected to the file using MDX Sample App, the following message is returned: “’AS2005LocalCube.cub’ cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding”.

I create the local cube with the following MDX query:

CREATE GLOBAL CUBE [AS2005LocalCube]

STORAGE 'MyFolderPath\AS2005LocalCube.cub'

FROM [2005SQLServerCube] (

MEASURE [2005SQLServerCube].[Value1],

MEASURE [2005SQLServerCube].[Value1_Footnote1] HIDDEN ,

MEASURE [2005SQLServerCube].[Value1_Footnote2] HIDDEN ,

MEASURE [2005SQLServerCube].[Value2],

DIMENSION [2005SQLServerCube].[GenderDim].[Genders] (

LEVEL [(All)], LEVEL [Genders]

),

DIMENSION [2005SQLServerCube].[ProductDim].[Products] (

LEVEL [(All)], LEVEL [Products]

)

)

|||In AS2005 only one process at a time can open local cube file. This is why if you are already connected in Excel - you won't be able to connect from MDX Sample App.

Connecting to local cube created from AS 2000 and AS 2005 cubes using ADOMD.NET 9.0

Hello,

I created two local cubes, first one: from an AS 2000 cube and the second one from an AS 2005 cube. Then I tried to connect to them using the following code:

' AS 2000

Dim strDataSource As String = "MyFolderPath\AS2000LocalCube.cub"

Dim strDatabase As String = "AS2000LocalCubeName"

' AS 20005

'Dim strDataSource As String = "MyFolderPath\AS2005LocalCube.cub"

'Dim strDatabase As String = "AS2005LocalCubeName"

strConnectString = "Provider=MSOLAP;Data Source=" & strDataSource & ";Catalog=" & strDatabase & ";MDX Compatibility=2;"

Dim clConnection As New AdomdConnection

clConnection.ConnectionString = strConnectString

clConnection.Open()

It works properly for AS 2000 local cube but for AS 20005 local cube, it return the following exception:

InnerException{"The 'MyFolderPath\AS2005LocalCube.cub' local cube file cannot be opened."}System.Exception

Message"A connection cannot be made. Ensure that the server is running."String

Source"Microsoft.AnalysisServices.AdomdClient"String

StackTrace"at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.ConnectXmla()

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()

Both local cubes were created using the same MDX query.

Abdel

Can you connect to the AS2005 local cube using OLEDB. Excel and the MDX Sample app both use OLEDB, so try one of these.

Try getting rid of MDX Compatibility=2... shouldn't matter.

How did you create the local cube?

|||

Yes I am able to connect using MDX Sample App and Excel 2003.

But for AS 2005 local cube and using Excel 2003, if you are already connected to the file using MDX Sample App, the following message is returned: “’AS2005LocalCube.cub’ cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding”.

I create the local cube with the following MDX query:

CREATE GLOBAL CUBE [AS2005LocalCube]

STORAGE 'MyFolderPath\AS2005LocalCube.cub'

FROM [2005SQLServerCube] (

MEASURE [2005SQLServerCube].[Value1],

MEASURE [2005SQLServerCube].[Value1_Footnote1] HIDDEN ,

MEASURE [2005SQLServerCube].[Value1_Footnote2] HIDDEN ,

MEASURE [2005SQLServerCube].[Value2],

DIMENSION [2005SQLServerCube].[GenderDim].[Genders] (

LEVEL [(All)], LEVEL [Genders]

),

DIMENSION [2005SQLServerCube].[ProductDim].[Products] (

LEVEL [(All)], LEVEL [Products]

)

)

|||In AS2005 only one process at a time can open local cube file. This is why if you are already connected in Excel - you won't be able to connect from MDX Sample App.

Wednesday, March 7, 2012

Connecting to a second instance via VPN

Hi,

I have two SQL SERVER Instances on the computer I am trying to connect to via VPN:
1) TEST
2. TEST/INST2

I can connect to the first with no problems.

When I am trying to connect to the second (with the Enterprise Manager/Query Analyzer and even with isql) - I get the following message:
"SQL SERVER does not exists or access denied".

I use the SQL SERVER user and password to connect (as login sa).

How can I connect to the second instance?

Thanks in advance.you have to make sure that tcp/it is enabled on the server. can you use remote desktop or some other remote access tool to connect to the box? check to see if the service for the named instance is running (this should have been the first suggestion)|||Sorry, I had the instance name wrong...

Thanks for your answer anyway!

Connecting to a second instance of SQL

When I try to connect to an external SQL Server via enterprise manager I
cannot seem to connect to a named instance. In the past this has worked with
no problem when I do ip\instance. However when I now try I am getting invali
d
instance name. The name I am using is correct. I am connecting from
Enterprise manager to a SQL2000 instance. Any ideas why it doesn`t connect ?
SiPlease paste in the exact error message
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
http://kevin3nf.blogspot.com
"Simon" <Simon@.discussions.microsoft.com> wrote in message
news:356739A9-573E-4D7D-AF9B-2B0DA95CEE2E@.microsoft.com...
> When I try to connect to an external SQL Server via enterprise manager I
> cannot seem to connect to a named instance. In the past this has worked
> with
> no problem when I do ip\instance. However when I now try I am getting
> invalid
> instance name. The name I am using is correct. I am connecting from
> Enterprise manager to a SQL2000 instance. Any ideas why it doesn`t connect
> ?
>
> Si|||Invalid connection.Connectioopen (Invalid Instance())
Cheers
"Kevin3NF" wrote:

> Please paste in the exact error message
>
> --
> Kevin Hill
> 3NF Consulting
> http://www.3nf-inc.com/NewsGroups.htm
> http://kevin3nf.blogspot.com
>
> "Simon" <Simon@.discussions.microsoft.com> wrote in message
> news:356739A9-573E-4D7D-AF9B-2B0DA95CEE2E@.microsoft.com...
>
>|||Does the Instance Name contain any invalid character, such as '-'?
Try enclosing the instance name in square brackets, e.g.,
[MyServer\MyInstance].
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Simon" <Simon@.discussions.microsoft.com> wrote in message
news:A5D1AFBD-54F6-4600-A7EA-215AEFD7A1C6@.microsoft.com...[vbcol=seagreen]
> Invalid connection.Connectioopen (Invalid Instance())
> Cheers
> "Kevin3NF" wrote:
>|||There are no invalid characters. Even so I tried enclosing in square bracket
s
and still no joy.
Its a puzzle !
Si
"Arnie Rowland" wrote:

> Does the Instance Name contain any invalid character, such as '-'?
> Try enclosing the instance name in square brackets, e.g.,
> [MyServer\MyInstance].
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to th
e
> top yourself.
> - H. Norman Schwarzkopf
>
> "Simon" <Simon@.discussions.microsoft.com> wrote in message
> news:A5D1AFBD-54F6-4600-A7EA-215AEFD7A1C6@.microsoft.com...
>
>|||Is UDP 1434 open between the SQL Server you are registering
on and the named instance you are trying to register? That
could be what's causing your problems.
You could try an alias and see if that works -
On the SQL Server box where you are trying to register the
named instance, use the Client Network Utility to create an
alias to the named instance and specify the port number
(check the listening port on the named instance).
In that scenario with the alias, you are specifying the port
so you would bypass the SQL Server Resolution Service and
going through UDP 1434.
-Sue
On Mon, 30 Oct 2006 01:20:02 -0800, Simon
<Simon@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>There are no invalid characters. Even so I tried enclosing in square bracke
ts
>and still no joy.
>Its a puzzle !
>Si
>"Arnie Rowland" wrote:
>

Connecting to a second instance of SQL

There are no invalid characters. Even so I tried enclosing in square brackets
and still no joy.
Its a puzzle !
Si
"Arnie Rowland" wrote:

> Does the Instance Name contain any invalid character, such as '-'?
> Try enclosing the instance name in square brackets, e.g.,
> [MyServer\MyInstance].
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to the
> top yourself.
> - H. Norman Schwarzkopf
>
> "Simon" <Simon@.discussions.microsoft.com> wrote in message
> news:A5D1AFBD-54F6-4600-A7EA-215AEFD7A1C6@.microsoft.com...
>
>
Is UDP 1434 open between the SQL Server you are registering
on and the named instance you are trying to register? That
could be what's causing your problems.
You could try an alias and see if that works -
On the SQL Server box where you are trying to register the
named instance, use the Client Network Utility to create an
alias to the named instance and specify the port number
(check the listening port on the named instance).
In that scenario with the alias, you are specifying the port
so you would bypass the SQL Server Resolution Service and
going through UDP 1434.
-Sue
On Mon, 30 Oct 2006 01:20:02 -0800, Simon
<Simon@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>There are no invalid characters. Even so I tried enclosing in square brackets
>and still no joy.
>Its a puzzle !
>Si
>"Arnie Rowland" wrote:

Saturday, February 25, 2012

CONNECTING SQL 2005 TO SYSTEM DNS ODBC?

Hi

I have a server with SQL 2005 and I have second server with spesial database program on it from IBM and I have installed a spesial ODBC DRIVER from IBM so I can make a connection in system dns.

On my server 1 where I have the sql 2005 I have made a connection in system dns.

HOW CAN I TELL SQL 2005 TO CONNECT TO MY CONNECTION AND GET DATA FROM DER?

It's DSN rather than DNS.

Please check this page for connection string using DSN: http://www.connectionstrings.com/?carrier=dsn

Friday, February 24, 2012

CONNECTING SQL 2005 TO SYSTEM DNS ODBC?

Hi

I have a server with SQL 2005 and I have second server with spesial database program on it from IBM and I have installed a spesial ODBC DRIVER from IBM so I can make a connection in system dns.

On my server 1 where I have the sql 2005 I have made a connection in system dns.

HOW CAN I TELL SQL 2005 TO CONNECT TO MY CONNECTION AND GET DATA FROM DER?

It's DSN rather than DNS.

Please check this page for connection string using DSN: http://www.connectionstrings.com/?carrier=dsn