Connect to Instance

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
PeterParker
Posts: 5
Joined: Mon 08 Jan 2007 00:14

Connect to Instance

Post by PeterParker » Tue 22 May 2007 18:13

I am having a problem connecting to a instance of MS-SQL which is not the default instance.

This test does not work:
osql -S SQL-SERVER -U uname -p password

while this does works:
osql -S SQL-SERVER\inst1 -U uname -p password

And as expected setting this does not work:
TMSConnection.ConnectString:='User ID=uname;Password=password;Server=SQL-SERVER';

But again, this does not work either::
TMSConnection.ConnectString:='User ID=uname;Password=password;Server=SQL-SERVER\inst1';

What is the proper syntax for the ConnectString to connect to a different instance?

ed

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Wed 23 May 2007 08:08

You use the correct sysntax of the ConnectString property.
What error message do you get, and when does it happen?

PeterParker
Posts: 5
Joined: Mon 08 Jan 2007 00:14

Failure message

Post by PeterParker » Wed 23 May 2007 12:22

I get a permission denied message.

Also, I have found that the same code works on a computer with the SQL Server Client and Tools installed. But not on a Windows XP sp2 computer.

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Thu 24 May 2007 07:05

Please make sure that the value of the TMSConnection.Authentification property is auServer, and your server instance is configured properly.

PeterParker
Posts: 5
Joined: Mon 08 Jan 2007 00:14

One Solution

Post by PeterParker » Tue 29 May 2007 18:45

I have one solution that was found, but I do not like it:

Install the prerequisites for SQL-2005, i.e. .NET and the MS-SQL 20056 drivers. Then it works. Even though I am connecting to a SQL-2000 server, while the same computers were connecting to a SQL-2000 server without a named instance.

Any thoughts as to why?

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Wed 30 May 2007 12:15

Please make sure that your firewall is configured properly.
Maybe the following resources will help you to solve the problem:
http://support.microsoft.com/?scid=kb;e ... 55&sid=332
http://support.microsoft.com/kb/841252/
http://support.microsoft.com/kb/841251/

Post Reply