x

Deploying SQL Server Alias to Clients

Hi all,

Does anyone have a tried and true method to push an alias for a SQL Server out to Clients in a non-domain environment?
more ▼

asked Sep 28, 2010 at 08:30 AM in Default

Blackhawk-17 gravatar image

Blackhawk-17
11.9k 28 31 36

(comments are locked)
10|1200 characters needed characters left

2 answers: sort newest

Looks like I found something...

One workaround is to try the following: Make a REG file that creates a REG_SZ value under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo. The name of the value is the alias and the value is a comma-separated string with the NET Library name, IP (or Server Name), and Port.

Assume we have applications connect to SQLTest as the dB server.

To point to the DEV instance the REG value of SQLTest might be: DBMSSOCN,192.168.1.13,1433 And for QA it might be: DBMSSOCN,192.168.1.13,2112

The name doesn’t change for the Client, they are always accessing SQLTest, but the request is sent to a different port on the same dB box.

The changes can be pushed via batch file, or PowerShell.

more ▼

answered Oct 04, 2010 at 06:42 AM

Blackhawk-17 gravatar image

Blackhawk-17
11.9k 28 31 36

+1, awesome research.
Oct 04, 2010 at 06:49 AM Matt Whitfield ♦♦
Greg, I added the backslashes to escape the backslashes in the reg path. Otherwise, it came out as one long word. Hope you don't mind :)
Oct 04, 2010 at 06:50 AM Oleg
Okay - this worked for us so I am going to accept it as my answer. I hope everyone is okay with that.
Oct 05, 2010 at 11:10 AM Blackhawk-17
Guess my Karma is lacking... oh well.
Oct 05, 2010 at 11:13 AM Blackhawk-17
@Blackhawk - got your back there mate.
Oct 05, 2010 at 11:28 AM Matt Whitfield ♦♦
(comments are locked)
10|1200 characters needed characters left
We just create DNS alias. If have our DNS team create them for us. We also have the ability to create VIP's (virtual ip addresses). Typically we just use a friendly name serverxyz.domain.com and have it resolve the IP address of the SQL Server. Works great. You still have to specify the named instance or port number for the named instance in the connection.
more ▼

answered Sep 28, 2010 at 08:33 AM

Tim gravatar image

Tim
36.4k 38 41 139

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x9
x5

asked: Sep 28, 2010 at 08:30 AM

Seen: 1774 times

Last Updated: Sep 28, 2010 at 08:30 AM