问题
I had issues where my installation of Oracle Enterprise Edition 11gR2 corrupted in some way, so I have had to reinstall Oracle fEnterprise Edition 11gR2 from scratch.
What I wish to know is .... Is there any way to "re-attach" my Db instances ?
i.e I have a folder "DB5" , Which contains the various .CTL, .DBF and a couple of .ORA files. I would like to re create DB5 using these files as I dont have a backup to restore from.
Thanks
回答1:
Then you need "only" initDB5.ora file (or spfile.ora). This text config file contains dbname, some memory related parameters and and also path to control file(s).
This initDB5.ora file should be put into $ORACLE_HOME/dbs.
If it won't start on the first try you have to use SHUTDOWN ABORT
after each try.
回答2:
Yeah, you can alter the file path locations, and mount the database.
You can try something like this:
STARTUP MOUNT;
ALTER SYSTEM
SET CONTROL_FILE='/.../.../whateverpath.dbf'...;
ALTER DATABASE MOUNT....
To move/rename physical files you can do ALTER DATABASE RENAME FILE
For more info on all the commands, and examples look/read here.
来源:https://stackoverflow.com/questions/26081353/recreate-oracle-databse-from-dbf-files-after-re-installation-of-oracle-enterpri