September 29, 2005 at 9:46 am
I recently installed Toad for SQL Server Freeware Beta. I am trying to connect to a SQL 2000 NOT on the network. I am trying to connect via IP address. Can anyone explain to me how to connect via IP address to SQL Server 2000 through Toad? Any help is appreciated.
Thank you.
Alex
September 29, 2005 at 10:08 am
There should be no difference. Name resolves to an ip address, you should be able to put the ip address in with no problems.
i'll try to dl toad and see if I see any probs
September 29, 2005 at 10:21 am
I still cannot connect to the SQL server. Here are my settings.
Provider/Group: SQL Server [which is the default]
Server Name: (local) [which I changed to my IP address]
Authentication: SQL Server Authentication
Database: (default) [which is the defualt and cannot change]
September 29, 2005 at 11:16 am
What iz your error message?
Do you see anything in the application logs?
September 29, 2005 at 12:01 pm
The only error message I receive is "SQL Server does not exist or access denied."
September 29, 2005 at 3:37 pm
This is a generic error a few things could be wrong.
Just check that IP is correct, and server is set to "Mixed Mode" (Right click on server in enterprise manager, select properties, security tab, authentication section sql server and windows should be selected). And username password your using is correct
September 30, 2005 at 6:16 am
are you trying to connect to a named instance of SQl server, rather than a default instance?
for example, my machine has a SQL7 instance and a SQL2000 instance.
connecting to the named instances of LOWELL or LOWELL\SQL2000 presents no problem; but from within the network, connecting by IP address requires a port number to get to the named instance, ie 192.168.1.40,1205; the default instances listens at port 1433.
see this post for more details if you think that is the case:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=9&messageid=184041#bm185404
Lowell
October 3, 2005 at 10:15 am
The IP address is correct and there is only one instance of SQL 2000 running on the server. I have been troubleshooting the issue and installed Query Analyzer on my local machine and tried to connect via the same connection route. I received the exact same error message. So both Toad and Query Analyzer cannot connect via IP address through the method I am using or at least the connection parameters I am using. There is something that I am missing, forgetting, not configuring correctly, or something. I am sure connecting through an IP is a standard or at least approved protocol. Can anyone else think of a way to connect via IP? Thanks.
October 3, 2005 at 10:25 am
connect via instance name and run the script below. this will identify what port your instance is listening to.
if it is anything other than 1433, you will need to include the port in your connection string, ie "192.168.0.40,1207":
CREATE TABLE #GetPort
(
token varchar(100),
value varchar(20))
go
DECLARE @inst varchar(200)
DECLARE @inst1 varchar(100)
--Determine registry path and key
IF(charindex('\',@@servername) > 0)
BEGIN
SELECT @inst = substring(@@servername,charindex('\',@@servername) ,50)
SELECT @inst = 'SOFTWARE\Microsoft\Microsoft SQL Server'+@inst+'\MSSQLServer\SuperSocketNetLib\Tcp'
--SELECT @inst1 = 'TcpDynamicPorts'
SELECT @inst1 = 'TcpPort'
END
ELSE
BEGIN
if SUBSTRING(@@VERSION,23,1) = '7'
begin
SELECT @inst = 'SOFTWARE\Microsoft\MSSQLServer\Client\SuperSocketNetLib\VIA'
SELECT @inst1 = 'DefaultServerPort'
end
else
begin
SELECT @inst = 'SOFTWARE\Microsoft\MSSQLServer\Client\SuperSocketNetLib\Tcp'
SELECT @inst1 = 'DefaultPort'
end
END
print @inst + '\\\\////'+ @inst1
INSERT #GetPort
EXEC master..xp_regread 'HKEY_LOCAL_MACHINE', @inst, @inst1
SELECT substring(@@servername,1,25) as ServerName, value as port FROM #GetPort
DROP TABLE #GetPort
Lowell
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply