Showing posts with label mirrored. Show all posts
Showing posts with label mirrored. Show all posts

Saturday, February 25, 2012

ADODB and Mirrored SQL-Server

I did setup a Mirrored Database. Connecting from it using ADO.NET works well. It goes to the Mirror if the Principal fails.

But ADODB does not work. I get the error following error:

80004005 Invalid connection string attribute

When trying to connect to the DB in case the principal failed and the mirror is active. (MyProductiveDB is in failover state)

What do I do wrong?

Here is the code:

ADOConn = New ADODB.Connection

ADOConn.Open(CS)

CS is my Connections-String:

"Provider=SQLNCLI.1;Data Source=MyProductiveDB;Failover Partner=MyMirror;Initial Catalog=MyCat;Persist Security Info=True;User ID=MyUser;Password=xxxxxx;Pooling=True;Connect Timeout=5;Application Name=MyApplic"

Remark: When I try to add "Network Library=dbmssocn" to the connection String, I get the same error, even if the Principal is active.

Your help is very much appreciated.

Beat

I contacted the client team and they pointed out that Pooling is not supported in SQLNCLI.

Regards,

Matt Hollingsworth

Sr. Program Manager

Microsoft SQL Server

|||

Beat,

Do you mind if I ask for a sample of your ADO.NET code that works well if the principal fails?

Thank you very much.

|||?

ADODB and Mirrored SQL-Server

I did setup a Mirrored Database. Connecting from it using ADO.NET works well. It goes to the Mirror if the Principal fails.

But ADODB does not work. I get the error following error:

80004005 Invalid connection string attribute

When trying to connect to the DB in case the principal failed and the mirror is active. (MyProductiveDB is in failover state)

What do I do wrong?

Here is the code:

ADOConn = New ADODB.Connection

ADOConn.Open(CS)

CS is my Connections-String:

"Provider=SQLNCLI.1;Data Source=MyProductiveDB;Failover Partner=MyMirror;Initial Catalog=MyCat;Persist Security Info=True;User ID=MyUser;Password=xxxxxx;Pooling=True;Connect Timeout=5;Application Name=MyApplic"

Remark: When I try to add "Network Library=dbmssocn" to the connection String, I get the same error, even if the Principal is active.

Your help is very much appreciated.

Beat

I contacted the client team and they pointed out that Pooling is not supported in SQLNCLI.

Regards,

Matt Hollingsworth

Sr. Program Manager

Microsoft SQL Server

|||

Beat,

Do you mind if I ask for a sample of your ADO.NET code that works well if the principal fails?

Thank you very much.

|||?

Thursday, February 16, 2012

ADO Connection String Error for Mirrored Database

I am trying to connect to a failover partner using ADO (non .Net) and Visual C++. ADO is throwing the following exception:

Caught: Unspecified error - Invalid connection string attribute(Microsoft OLE DB Provider for SQL Server)

Connection String:
Provider=SQLOLEDB.1;Data Source=Edwardsville\SQLSERVER;Failover Partner=Mirror2\SQLSERVER;Initial Catalog=SomeCatalog;User Id=SomeId;Password=SomePassword

Any ideas?

As far as I know this is only supported in ADO.NET 2.0.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Hi, Im trying to do the same thing.

Could you get any answer to this? Its possible with ADODB ?

Thanks

ADO Connection String Error for Mirrored Database

I am trying to connect to a failover partner using ADO (non .Net) and Visual C++. ADO is throwing the following exception:

Caught: Unspecified error - Invalid connection string attribute(Microsoft OLE DB Provider for SQL Server)

Connection String:
Provider=SQLOLEDB.1;Data Source=Edwardsville\SQLSERVER;Failover Partner=Mirror2\SQLSERVER;Initial Catalog=SomeCatalog;User Id=SomeId;Password=SomePassword

Any ideas?

As far as I know this is only supported in ADO.NET 2.0.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Hi, Im trying to do the same thing.

Could you get any answer to this? Its possible with ADODB ?

Thanks