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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 alias in the connection string

Author  Topic 

pithhelmet
Posting Yak Master

183 Posts

Posted - 2007-12-06 : 10:42:00
Hi everyone,

we have a VB application that is deployed, and we are talking about setting up a series of instances in the database.

i have created an alias for each instance, bt how does the connection string point to the alias???

thanks
tony

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-06 : 13:29:37
Instead of ServerName or ServerName\Instance, you use the alias name.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

pithhelmet
Posting Yak Master

183 Posts

Posted - 2007-12-06 : 16:33:12
Hi Tara,

the client connection string points to a www.XXXXXXX.com address

and the router routes the request to the server itself, since there is a single default instance at that IP address...

but now they want to go the instances route.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-06 : 16:37:33
I'm not sure how that matters. Just setup an alias with the exact same name as what is being used in the connection string. Then tell the alias exactly how the database server is setup.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

pithhelmet
Posting Yak Master

183 Posts

Posted - 2007-12-07 : 12:19:04

I'll try to re-explain....

Currently, there is one access point from the clients perspective.

http://www.XXXXXX.com

they connect to that, and since it is a single instance, it goes to the only instance (default).

NOW, mgmt wants to setup instances within the same machine, there will no longer be a default instance,
there will be state based instances (FL, TX, GA, CA....)

Each instance gets is own port, and I can setup an alias for each one.

but how do i tell the client connection string to use alias FL,
when the connection points to the same name (www.XXXXXX.com)?

i was thinking it might be www.XXXXXX.com/FL

thanks for the replies

take care
tony
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-07 : 12:59:44
You have to modify the connection string to use the new alias. The alias is what will point to your access point.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -