1. View database Information
Show parameter instance_name
Show parameter Db_name
Show Parameter Service_Name
Select dbid from V$database;
2. Normal Shutdown database
Sqlplus/as SYSDBA
Sql>shutdown Immediate
3. Start database to mount mode
Sql>startup Mount
4. Confirm that the listener is activated.
Lsnrctl status
5. Modify Database name
Host nid Target=sys/password DBNAME=OCP setname=y
# Change Database ID and database name Oratest to TEST? (Y/[n]) => Y
6. Modify parameter file
Shutdown immediate
Startup Nomount;
Create pfile= ' E:\app\Administrator\admin\test\pfile\initocp.ora ' from SPFile;
The parameter file:
In E:\app\Administrator\admin\test\pfile\initocp.ora:
Db_domain= ""
Db_name=ocp
Shutdown immediate
7. Reset Password file
Host Orapwd file=e:\app\administrator\product\11.2.0\dbhome_1 \database\pwdocp.ora Password=password entries=5
-----Windows platform requires two or 8.9 steps-----
8. Re-create the service
Change instance_name
net stop Oracleservicetest
Oradim-delete-sid Test
Oradim-new-sid Ocp-startmode Auto-srvcstart System
9. Modify Registry Sid
Hkey_local_machine\software\oracle\key_oradb11g_home1 \oracle_sid
Value modified to OCP
10. Start the database
Sqlplus/as YSDBA
Startup pfile= ' E:\app\Administrator\admin\test\pfile\initocp.ora '
Select Dbid,name from V$database;
11. New SPFile
Create SPFile from pfile= ' E:\app\Administrator\admin\test\pfile\initocp.ora ';
12. Reload the Listening file
Lsnrctl Reload
See more Highlights: http://www.bianceng.cn/database/Oracle/