November 7, 2002 at 11:15 am
Quick easy question(s): When using the copy database wizard to upgrade from SQL7.0 to SQL2000 standard, does the wizard allow renaming the destination database? Please tell me yes. If not, what is the easiest way to rename a database? This is hot, so help is much appreciated.
Rob P
When the snows fall and the white winds blow,The lone wolf dies but the pack survives.
Once you've accepted your flaws, no one can use them against you.
November 7, 2002 at 12:50 pm
I don't remember but I am pretty sure the answer is no. However you can rename a database by using
sp_renamedb [ @dbname = ] 'old_name' ,
[ @newname = ] 'new_name'
just keep in mind thou, the underlining file names will not change. If the filenames need to change then the easiest way I know for small dbs is to backup to disk, create a new DB with the name you want and the filenames you want, then use restore with the WITH MOVE option to move the data to the new file names. I don't remember any other ways. But if you really don't need to do this it is just as easy to renamed the db only.
November 8, 2002 at 10:21 am
I think you try this too.
After renaming the database ,detach the database and attach it by changing the file names in sync. with database name.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply