Tuesday, March 27, 2012

Alias name for addressing SQL databases

I have a number of MS Access apps that link to SQL Sever tables. If
the SQL Sever database is moved to another server, or the server is
replaced, the unc address to the database changes as the server name
has changed. All my apps fall over as the linked tables are addressed
using the server name.

Is there a way to set up an alias name for an SQL database so that you
can link to the tables through an ODBC connection without using the
server name.

Thanks in advanceYou can setup an alias for the server using the SQL Server Client Network
Utility. You can also do this while setting up an ODBC DSN.

I'm not sure I fully understand your situation, though. If you've linked
SQL Server tables using an ODBC DSN, only the DSN is stored in your
connection string. Moving/renaming the server shouldn't require changes to
your app but you'll still need to change the server name on each client
using the Client Network Utility or ODBC DSN Administrator.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Grant Hammond" <techworks@.clear.net.nz> wrote in message
news:5e784f92.0405111506.2672be22@.posting.google.c om...
> I have a number of MS Access apps that link to SQL Sever tables. If
> the SQL Sever database is moved to another server, or the server is
> replaced, the unc address to the database changes as the server name
> has changed. All my apps fall over as the linked tables are addressed
> using the server name.
> Is there a way to set up an alias name for an SQL database so that you
> can link to the tables through an ODBC connection without using the
> server name.
> Thanks in advance

No comments:

Post a Comment