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
236 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql update 2 36
Help needed in sql query 4 26
How come this XML node is not read? 3 26
Split string into 3 separate fields 5 18
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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

713 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