Bear with me, I'm a newbie to SQL. I have a database that I want to duplicate for testing/training. I have performed a backup of the db through Enterprise Manager. I want to restore the db with the same name, EXCEPT for adding _TEST at the end. For example, say the db is named DATABASE_DATABASE, I want to restore as DATABASE_DATABASE_TEST. I want to be 100% sure that will NOT overwrite the existing db. It shouldn't, am I correct? Thanks!!
when restoring a database, changing the name is really the last step and there are a few tricks with backup control files to properly rename and place the datafiles to a different area on disk so as to not overwrite the existing database.
i am not too sure how OEM works, but would venture to say if you did a backup of a database and tried to restore this database with OEM it WOULD try and overwrite the existing.
if you want to use OEM, you should look to see if it supports cloneing as this is Oracle's method of doing just what you mentioned.
--Backuping a database
backup database dicaf to disk ='d:\dicaf_may25.bak' with init
--restoring it in a different name
use master
go
restore database Dicaf2222 from Disk = 'd:\dicaf_may25.bak' with replace,
move 'DiCaf_Data' to 'd:\dicaf\DiCaf2222_Data.mdf',
move 'DiCaf_Log' to 'd:\dicaf\DiCaf2222_log.ldf'