Creating a global alias for a SQL Server Instance
2
votes
2
answers
415
views
Forgive me if this is an easy question, but I have tried finding an answer but I really don't know what to search (I'm a software dev, with only some limited DBA experience).
We have test SQL servers setup with 3 instances each:
TSTSQL01\Enterprise
TSTSQL01\Warehouse
TSTSQL01\Legacy
TSTSQL02\Enterprise
TSTSQL02\Warehouse
TSTSQL02\Legacy
TSTSQL03\Enterprise
...
In production we don't use instances, we have 3 separate servers:
PRDSQL01 --"Enterprise" server
PRDSQL02 --"Warehouse" server
PRDSQL03 --"Legacy" server
Due to limitations of our legacy COBOL application, I am in need of a connection string that has EXACTLY 8 characters to match the length of the production connection strings. What I am wanting to do is create an alias for each test sql server that allows this, using the tstsql01 example above would ideally look like:
TSQL1ENT --maps to TSTSQL01\Enterprise
TSQL1WAR --maps to TSTSQL01\Warehouse
TSQL1LEG --maps to TSTSQL01\Legacy
My current workaround is to use the SQL Configuration Manager to add an alias . This lets me connect to the database on that server, but not on local workstations. Our legacy COBOL app runs 75% of the code from the server, so it works for that. But the remaining 25% of the code runs locally on their workstations. That means I have to add that alias on every single tester's machine (I've scripted it out via powershell, but testers aren't admins so it requires a help desk request for every single person for every single test server).
Thanks in advance for the help!
Asked by Nerrickk
(23 rep)
Sep 10, 2024, 02:32 PM
Last activity: Sep 11, 2024, 04:06 PM
Last activity: Sep 11, 2024, 04:06 PM