September 28, 2005 at 5:01 pm
I have a backup from production database, and want restore it to the standby. For business reason, our standby has different name from the production. Using Enterprise Manager, the restoring processes OK.
When I check the restored standby database in Enterprise Manager tab Data Files, I find that while the physical file location is correc, but the Filename is still the name of the production, whose backup is used to restore.
Is there a way I can change the File Name to the the true database name ?
September 28, 2005 at 5:22 pm
you should have done that on your restore, with move option.
or in em in the options tab.
but for now, I think you can detach the existing db.
Rename the files, and reattach the file.
September 29, 2005 at 11:18 am
You can only change the PHYSICAL file name using restore with move option.
Use this to change the LOGICAL file name:
ALTER DATABASE <db_name> MODIFY FILE (NAME = current_name_Data, NEWNAME = new_name_Data)
September 29, 2005 at 1:59 pm
This works.
Thank you
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply