Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I create database alias?

Status
Not open for further replies.

vladibo

Programmer
Sep 14, 2003
161
CA
How can I create database alias?

I have database with name MYDB_ARCHIVE but I want to call it to MYDB_CLIENT_ARCHIVE (it is required by the software that uses database) but I don't want to rename my database. Can I create just another alias with name MYDB_CLIENT_ARCHIVE that points to MYDB_ARCHIVE?

Thank you
 
I believe there must be a way because their is an alias column in sysservers. You might read up on linked servers in BOL.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Ooops. I was thinking servers and you said database. And on top of it I was wrong there is no column for alias, but there is one for the servername.
Don't know of any way.
-Karl
 
Hmm. What about creating an ODBC DSN on the appropriate workstations?
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
I dont believe you can, I had a similar requirement a few years ago, albeit with SQL65 but never solved it - ended up changing the name.

donutman - the question is about databases not servers or am I missing something.
 
donutman apologies, too quick on the submit.

Your DSN solution made me stop and think, but my problem was a bit more complex - there were several databases with references to the names in views and SPs and lastly the CUSTOMER insisted the names comply with their standards.

such is life.
 
There are no aliases within MS SQL Server databases. (Except for the one mentioned with linked servers.)

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top