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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Renaming a database 1

Status
Not open for further replies.

Sashanan

Programmer
Jan 19, 2001
235
NL
It feels like a silly question, but I need to ask: is there any way to rename an existing database in SQL Server 7? I've been unable to find an option for it. Can anybody tell me:

- if a database can be renamed;
- how I should do it;
- if this has consequences for the client computers using it (for instance, does it mean I need to reset all their ODBC configurations?)

Thanks in advance!
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
 

You can use sp_renamedb.

EXEC sp_renamedb 'accounting', 'financial'

Renaming a database will break any client connections that reference the database by name. You'll need to fix ODBC connections, ADO connections, Access linked tables, etc. Terry Broadbent


"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Okay. Will need to decide if it's worth fixing 40 ODBC connections for, then, and I bet the customer wants a say in that too. :) Thanks for your help.

"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top