"Oracle" WIN2008R2 modify Oracle DB instance Name

Source: Internet
Author: User

Requirement Description: Requires that the Windows the database instance name of the platform is determined by ORCL Change to haha

Reference:

Https://www.cnblogs.com/junnor/archive/2013/03/05/2945245.html

Https://www.cnblogs.com/tomatoes-/p/6130615.html

http://blog.itpub.net/114562/viewspace-820776/

First, view the current DB instance name

II. Create a trace file of the control file

Find the trace file that was just produced

Trace files in the E:\app\administrator\diag\rdbms\orcl\orcl\trace directory

Trace file is e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_2668.trc.

View E:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_2668.trc, keying out the control file creation script for backup.

STARTUP Nomount

CREATE controlfile Reuse DATABASE "ORCL" Noresetlogs Noarchivelog

Maxlogfiles 16

Maxlogmembers 3

Maxdatafiles 100

Maxinstances 8

Maxloghistory 292

LOGFILE

GROUP 1 ' E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO01. LOG ' SIZE 50M BLOCKSIZE 512,

GROUP 2 ' E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02. LOG ' SIZE 50M BLOCKSIZE 512,

GROUP 3 ' E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO03. LOG ' SIZE 50M BLOCKSIZE 512

--STANDBY LOGFILE

DataFile

' E:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01. DBF ',

' E:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01. DBF ',

' E:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01. DBF ',

' E:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01. DBF '

CHARACTER SET ZHS16GBK

;

Third, modify the dbname

Close the database

Start database to Mount state

Modify DBName

Iv. Modification of Db_name

Start database to Mount state

Modify Db_name

Generate Pfile from current SPFile

Close the database

Modify the generated pfile file, replace all ORCL with Haha, and after saving, copy the file to the E:\app\Administrator\product\11.2.0\dbhome_1\database directory

Create the Haha folder in the E:\app\Administrator\admin file directory

Modify the Orcl folder under E:\app\Administrator\oradata\ to haha

V. Create a ORAPWD file

Six, open the database to view the current database name

Vii. Modification of instance_name

Delete the old instance name

Create a new instance name

Viii. modification of Tnsname.ora and Listener.ora

Tnsname.ora file

Listener.ora file

Restart monitoring and view the listening status

Ix. Modify the Oracle_sid of the registration form

Registry path: Hkey_local_machine/software/oracle/key_oradb11g_home1/oracle_sid

Ten, from the previously modified pfile generation SPFile

Xi. reconstruction of control files

Reset the control file to rename or delete the previous control file

ORCL changed to Haha, reuse changed to set, Noresetlogs to Resetlogs

CREATE controlfile Set DATABASE "HAHA" Resetlogs Noarchivelog

Maxlogfiles 16

Maxlogmembers 3

Maxdatafiles 100

Maxinstances 8

Maxloghistory 292

LOGFILE

GROUP 1 ' E:\APP\ADMINISTRATOR\ORADATA\HAHA\REDO01. LOG ' SIZE 50M BLOCKSIZE 512,

GROUP 2 ' E:\APP\ADMINISTRATOR\ORADATA\HAHA\REDO02. LOG ' SIZE 50M BLOCKSIZE 512,

GROUP 3 ' E:\APP\ADMINISTRATOR\ORADATA\HAHA\REDO03. LOG ' SIZE 50M BLOCKSIZE 512

--STANDBY LOGFILE

DataFile

' E:\APP\ADMINISTRATOR\ORADATA\HAHA\SYSTEM01. DBF ',

' E:\APP\ADMINISTRATOR\ORADATA\HAHA\SYSAUX01. DBF ',

' E:\APP\ADMINISTRATOR\ORADATA\HAHA\UNDOTBS01. DBF ',

' E:\APP\ADMINISTRATOR\ORADATA\HAHA\USERS01. DBF '

CHARACTER SET ZHS16GBK

;

12. Start the database and view the current instance name

"Oracle" WIN2008R2 modify Oracle DB instance Name

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.