Saturday, February 25, 2012

Connecting SQL2000 problem

Hi All,

I have a sqlserver 2000 & 2005 both installed on same server with the instance name as servername\sql2000 and servername\sql2005.

When i try to connect the sql2000 database from dotnet2002 or 2003, It comes up with an error as sql server doesnot exist or access denied but when i tried with dotnet2005, i am able to connect it.

I guess it has to do with an dotnet framework 1.0 & 1.1 but i am not sure where to look for it.

Can someone please point me to right direction ?

Thanks

Shaik Nagul

on the client, check that the TCP protocols are enabled using the Client Network Utility (cliconfig.exe) and on the server there is the analog Server Network Utility (svrnetcn.exe)|||

Hi,

Thanks for the reply.

I have checked on both client and server, the tcp/ip protocol is enabled and the default port is set to 1433.

But I am still unable to connect to sqlserver.

Anymore any ideas.

Thanks

|||

for a sanity check. . .

look at services control panel applet connected to the server.

does it say:

MSSQL$SQL2000

or

MSSQLSERVER$SQL2000

?

|||

I need to look closer at these posts - I bet it does say one of the above.

ok, are you using SQLClient in 2003? or OleDB?

what does your connection string look like for the 2003 connection?

SQL Authentication or SSPI?

|||

i am using sqlclient to access the database from both 2002 and 2003. My connection string is as

objCon.ConnectionString = "server=devserver\sql2000;database=northwind;uid=sa;pwd=;"

and in the services it does say

MSSQL$SQL2000

Thanks

|||

first compare that connection string to the other connection string.

isnt it supposed to look like:

Data Source=devserver\sql2000;Initial Catalog=northwind;Password=12abc12;User ID=sa;

are you running sql server authentication?

I bet there is an sa password you need (especially if this is a sp3a or above)

Do you have a windows domain? If you do, add your windows account to SQL Server as a db admin (Or make yourself a local administrator on the machine) and use the following:

Integrated Security=SSPI;Initial Catalog=northwind;Data Source=devserver\sql2000;

|||

Please refer to

http://blogs.msdn.com/sql%5Fprotocols/

There are several very useful articles for connectivity trouble-shooting.

It is really bizarre that you can connect using net2.0, but not net1.0. Since you can connect using net2.0 with the same connection string, the problem should be on the client side. To isolate the problem,

0. Is this remote connection or local connection?

1. please verify which connection provider is used by net2.0 by issuing following query after connected, "select net_library from sysprocesses where spid=@.@.spid". I would expect it is either TCP( remote ) or LPC (local).

2. Either case, I would like you to try more explicit connection string by replacing "devserver\sql2000" with "tcp:devserver:tcpport", and try connectioin using dotnet1.0.

You should be able to find the tcp port number that ss2k is listening in either server ERRORLOG or server side registry. According to your post, I assume TCP is enabled on both server and client, especially dotnet1.0 client.

for example, in server ERRORLOG

2006-01-17 11:54:53.86 server SQL server listening on XXXXXXXX: 1433.
2006-01-17 11:54:53.89 server SQL server listening on XXXXXXXX: 1433.

The registry key of TCP port should be located under

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\sql2000\MSSQLServer\SuperSocketNetLib\Tcp.

If you can connect, then there is an issue translating connection string. We need to take further action to diagnose the issue.

Please post your test results.

|||

As far as i think, the problem exist on the server because from the same machine i am able to connect to another sqlserver which doesn't have sql2005.

Thanks guys for trying to help but i have formatted the machine and reinstall the sqlserver2000 and now everything works fine. I would have not done this if there is no time constraint but since we are working on deadlines i have to do that.

No comments:

Post a Comment