摘自Orafaq
Follow these steps to rename a database:
- Start by making a full database backup of your database (in case you need to restore if this procedure is not working).
- Execute this command from sqlplus while connected to 'SYS AS SYSDBA':
ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS; - Locate the latest dump file in your USER_DUMP_DEST directory (show parameter USER_DUMP_DEST) - rename it to something like dbrename.sql.
- Edit dbrename.sql, remove all headers and comments, and change the database's name. Also change "CREATE CONTROLFILE REUSE ..." to "CREATE CONTROLFILE SET ...".
- Shutdown the database (use SHUTDOWN NORMAL or IMMEDIATE, don't ABORT!) and run dbrename.sql.
- Rename the database's global name:
ALTER DATABASE RENAME GLOBAL_NAME TO new_db_name;
[@more@]
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10599713/viewspace-979127/
,如需转载,请注明出处,否则将追究法律责任。