Solved

How do I centralize Hostname/IP address so they can be changed in one place for all stored procedures?

Posted on 2014-04-10
2
233 Views
Last Modified: 2014-04-10
Historically, our development team hard coded the IP address or hostname into each stored procedure. I want to point all of the stored procedures to a centralized location so that I can change these values once, make a server change, and still have all of the stored procedures function correctly. Can anyone give me some insight as to how this can be accomplished? We have over 300 stored procedures and it appears that they will have to be updated manually.
0
Comment
Question by:dpwhite
2 Comments
 
LVL 35

Accepted Solution

by:
Bembi earned 500 total points
ID: 39992677
A common upgrade problem. I guess the best solution is to use an alias name for our solution and register the alias name in your DNS as CNme (or use local Alias names for SQL server.). This way the name is neutral and when the target changes, you either cahnge just the DNS or local alias.

The decision, if local alias or DNS name depends, if it is a server to server (SQL alias) or client to server (DNS) connection. SQL Alias has to be changed on each clients,which accesses the server, For IIS to SQL connections ok, but for clients, which has to find the SQL server better via DNS
0
 

Author Closing Comment

by:dpwhite
ID: 39992801
Thanks for the solution. This gives me the ability to migrate quickly and change the stored procedures at a slower pace.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question