Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
silas2
Yak Posting Veteran
65 Posts |
Posted - 2005-09-07 : 10:59:31
|
| I'm trying to connect to a local instance of SQL Server using an IP address and its not working. When I looked up the connect string, it shows only the IP address replacing the Server name, not the instance name, i.e. Server=127.0.0.1 - how does it know which instance to use?Can I use the 127.0.0.1 loopback address for the server (as its on a local machine)?Do I have to use 'Network Library = DBMSSOCN' to tell the client to use TCP/IP?(TCP/IP is showing as an enabled protocol in the Client Network Utility) |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-09-07 : 12:57:56
|
| Using 127.0.0.1 would use the default instance. Do you need to connect to a named instance? If so, just use HOSTNAME\INSTANCENAME.Tara |
 |
|
|
silas2
Yak Posting Veteran
65 Posts |
Posted - 2005-09-07 : 13:33:36
|
| Would that mean 'Server=127.0.0.1\InstanceName' which I've been trying. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-09-07 : 13:37:24
|
| Why can't you use the hostname instead of the IP address? Using an IP address is not recommended.Also, what error are you getting?Tara |
 |
|
|
silas2
Yak Posting Veteran
65 Posts |
Posted - 2005-09-07 : 14:34:08
|
| Actually, its from the M'soft ASP.Net Step by Step book, in the machine.config file, when setting the Session state to be saved into a SQL Server, the config file uses an IP address for the connectstr. The error message I'm getting is that the server can't be found. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-09-07 : 14:35:14
|
| Have you tried HOSTNAME\INSTANCENAME? Can you connect to it via Query Analyzer?Tara |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-07 : 22:48:31
|
| i think this will dodata source=local;--------------------keeping it simple... |
 |
|
|
|
|
|