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

Change DB Name in SQL Server

Status
Not open for further replies.

frudd

Programmer
Mar 12, 2003
8
AU
Hi,
I have named a db in SQL server... freshweb.com.au but now when I try and set up a query through excel using a System DSN I have set-up on my local machine, I get an error saying:

"Could not find server 'freshweb' in sysservers. Execute sp_linkedaddserver to add the server to sysservers"

Is there a way to rename the db in SQL as the dots are clearly messing things up?

Thanks

 
could it be that the server isnt called freshweb.com.au - that is the name of the DB.Do you need to qualify the to

SERVERNAME.freshweb.com.au

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Having dots in a db name is a really bad idea (as you've discovered!).

Look up sp_renamedb in BOL for info on how to rename it.

--James
 
You cannot rename the Db as you rename other Databse Objects but all you need is to back it up and restore it under the new name which is quite simple.
 
Excellent. Didn't know that. You have to be a member of the Sysadmin or DBCreator groups but that's ok. Does it rename the data & log files as well ? I don't suppose it does...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top