Nid modify Oracle 11g R2 database name

Source: Internet
Author: User
Tags sqlplus

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/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.