Groups | Blog | Home
all groups > sql server clients > december 2003 >

sql server clients : ISQL, OSQL connects to different database!


Steve
12/19/2003 6:37:19 AM
Hello, we have a problem on one of our SQL servers.

When I execute the ISQL command on SERVER1

ISQL -S SERVER2-E -Q"select @@servername"

it returns not SERVER2, but SERVER3, the name of yet
another SQL server on our network!!! How on earth is this
happening?

The IP addresses of all SQL servers are different. PING
resolves to the correct server.

Any advice on how to troubleshoot is welcome. Thanks

rboyd NO[at]SPAM onlinemicrosoft.com
12/19/2003 4:35:10 PM
From Query Analyzer run the following query while the database context is
master.

Select * from sysservers

More than likely the server with srvid of 0 is SERVER3

If this is the case you can use the sp_dropserver and sp_addserver
procedures to change this. You can get the syntax from Books on Line. After
you run the procedures you will need to stop and start SQL Server for the
change to take place.

Rand
This posting is provided "as is" with no warranties and confers no rights.
AddThis Social Bookmark Button