SlideShare a Scribd company logo
1 of 4
Anar Godjaev

Change DB name.
Step by Step:
SQL> startup mount
ORACLE instance started.
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted.
SQL>

595591168
1220748
209719156
377487360
7163904

bytes
bytes
bytes
bytes
bytes

[oracle@anar ~]$nid
DBNEWID: Release 10.2.0.1.0 - Production on Thu Jul 21 11:52:54 2011
Copyright (c) 1982, 2005, Oracle.

All rights reserved.

Keyword
Description
(Default)
---------------------------------------------------TARGET
Username/Password
(NONE)
DBNAME
New database name
(NONE)
LOGFILE
Output Log
(NONE)
REVERT
Revert failed change
NO
SETNAME
Set a new database name only
NO
APPEND
Append to output log
NO
HELP
Displays these messages
NO
[oracle@anar ~]$ nid target=sys/oracle@anar_f as sysdbadbname=anar_f1
DBNEWID: Release 10.2.0.1.0 - Production on Thu Jul 21 12:19:19 2011
Copyright (c) 1982, 2005, Oracle.

All rights reserved.

Password:
Connected to database ANAR_F (DBID=604182317)
Connected to server version 10.2.0
Control Files in database:
/u01/app/oracle/anar_f/controlfile/control01.ctl
Anar Godjaev
/u01/app/oracle/anar_f/controlfile/control02.ctl
/u01/app/oracle/anar_f/controlfile/control03.ctl
Change database ID and database name ANAR_F to ANAR_F1? (Y/[N]) => y
Proceeding with operation
Changing database ID from 604182317 to 3902868108
Changing database name from ANAR_F to ANAR_F1
Control File /u01/app/oracle/anar_f/controlfile/control01.ctl modified
Control File /u01/app/oracle/anar_f/controlfile/control02.ctl modified
Control File /u01/app/oracle/anar_f/controlfile/control03.ctl modified
Datafile /u01/app/oracle/anar_f/system100.dbf - dbid changed, wrote
new name
Datafile /u01/app/oracle/anar_f/myundo.dbf - dbid changed, wrote new
name
Datafile /u01/app/oracle/anar_f/sysaux100.dbf - dbid changed, wrote
new name
Datafile /u01/app/oracle/anar_f/tsanar01.dbf - dbid changed, wrote new
name
Datafile /u01/app/oracle/anar_f/tsanar02.dbf - dbid changed, wrote new
name
Datafile /u01/app/oracle/anar_f/users01.dbf - dbid changed, wrote new
name
Datafile /u01/app/oracle/anar_f/users02.dbf - dbid changed, wrote new
name
Datafile /u01/ivants.dbf - dbid changed, wrote new name
Datafile /u01/app/oracle/pri_rman.dbf - dbid changed, wrote new name
Datafile /u01/app/oracle/rman_moni.dbf - dbid changed, wrote new name
Datafile /u01/app/oracle/anar_f/temp01.dbf - dbid changed, wrote new
name
Control File /u01/app/oracle/anar_f/controlfile/control01.ctl - dbid
changed, wrote new name
Control File /u01/app/oracle/anar_f/controlfile/control02.ctl - dbid
changed, wrote new name
Control File /u01/app/oracle/anar_f/controlfile/control03.ctl - dbid
changed, wrote new name
Instance shut down
Database name changed to ANAR_F1.
Modify parameter file and generate a new password file before restarting.
Database ID for database ANAR_F1 changed to 3902868108.
All previous backups and archived redo logs for this database are
Anar Godjaev
unusable.
Database is not aware of previous backups and archived logs in Recovery
Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed succesfully.
Now we need to change our parameter file:
[oracle@anar ~]$ cd $ORACLE_HOME/dbs
[oracle@anardbs]$ mv initanar_f.ora initanar_f1.ora
[oracle@anardbs]$ vi initanar_f1.ora
Alter the parameter DB_NAME=<newdbname>
[oracle@anardbs]$ export ORACLE_SID=anar_f1
[oracle@anardbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 21 12:24:15 2011
Copyright (c) 1982, 2005, Oracle.

All rights reserved.

Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 595591168 bytes
Fixed Size
1220748 bytes
Variable Size
163581812 bytes
Database Buffers
423624704 bytes
Redo Buffers
7163904 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> alter database open resetlogs;
Database altered.
SQL> create spfile from pfile;
File created.
Just to check if is everything ok in the initialization:
Anar Godjaev
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted.
Database opened.
SQL>

595591168
1220748
163581812
423624704
7163904

bytes
bytes
bytes
bytes
bytes

More Related Content

What's hot

Oracle Database 11g Product Family
Oracle Database 11g Product FamilyOracle Database 11g Product Family
Oracle Database 11g Product Family
N/A
 
FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11G
N/A
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
Deepti Singh
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
Deepti Singh
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition Presentation
N/A
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
Jorge Batista
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
Anar Godjaev
 

What's hot (17)

Oracle Database 11g Product Family
Oracle Database 11g Product FamilyOracle Database 11g Product Family
Oracle Database 11g Product Family
 
Oracle ORA Errors
Oracle ORA ErrorsOracle ORA Errors
Oracle ORA Errors
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windows
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guide
 
Db health check
Db health checkDb health check
Db health check
 
FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
Beginbackup
BeginbackupBeginbackup
Beginbackup
 
Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition Presentation
 
Database administration commands
Database administration commands Database administration commands
Database administration commands
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4
 
Oracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard SetupOracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard Setup
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
 
Test Dml With Nologging
Test Dml With NologgingTest Dml With Nologging
Test Dml With Nologging
 

Viewers also liked

Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
Anar Godjaev
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
praveen_01236
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
Anar Godjaev
 
La base de données Oracle
La base de données OracleLa base de données Oracle
La base de données Oracle
Bruno Delb
 

Viewers also liked (17)

Tuning SGA
Tuning SGATuning SGA
Tuning SGA
 
Introduction to Oracle RMAN, backup and recovery tool.
Introduction to Oracle RMAN, backup and recovery tool.Introduction to Oracle RMAN, backup and recovery tool.
Introduction to Oracle RMAN, backup and recovery tool.
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
oracle dba
oracle dbaoracle dba
oracle dba
 
Oracle RAC - Standard Edition, Enterprise Edition &amp; One Node
Oracle RAC - Standard Edition, Enterprise Edition &amp; One NodeOracle RAC - Standard Edition, Enterprise Edition &amp; One Node
Oracle RAC - Standard Edition, Enterprise Edition &amp; One Node
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
La base de données Oracle
La base de données OracleLa base de données Oracle
La base de données Oracle
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 
Data Guard Architecture & Setup
Data Guard Architecture & SetupData Guard Architecture & Setup
Data Guard Architecture & Setup
 
Backup & recovery with rman
Backup & recovery with rmanBackup & recovery with rman
Backup & recovery with rman
 
Backup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RACBackup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RAC
 
10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaper10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaper
 
RMAN best practices for RAC
RMAN best practices for RACRMAN best practices for RAC
RMAN best practices for RAC
 
Oracle 11g R2 RAC implementation and concept
Oracle 11g R2 RAC implementation and conceptOracle 11g R2 RAC implementation and concept
Oracle 11g R2 RAC implementation and concept
 
Oracle Cluster Rac
Oracle Cluster RacOracle Cluster Rac
Oracle Cluster Rac
 
alphorm.com - Formation Oracle Database 11g DBA 1 (1Z0-052)
alphorm.com - Formation Oracle Database 11g DBA 1 (1Z0-052)alphorm.com - Formation Oracle Database 11g DBA 1 (1Z0-052)
alphorm.com - Formation Oracle Database 11g DBA 1 (1Z0-052)
 

Similar to Change DB Name

Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
nesmaddy
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
maclean liu
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
Enkitec
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
Anar Godjaev
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in Dataguard
Jason Arneil
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
Vinay Thota
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
Moeen_uddin
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
influxbob
 

Similar to Change DB Name (20)

br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.doc
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
Less04 Instance
Less04 InstanceLess04 Instance
Less04 Instance
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby database
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
 
Migrate from database file system to asm
Migrate from database file system to asmMigrate from database file system to asm
Migrate from database file system to asm
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in Dataguard
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demo
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
 
Pluggable database tutorial 2
Pluggable database tutorial 2Pluggable database tutorial 2
Pluggable database tutorial 2
 
Oracle 12cR2 RAC Database Software Installation and Create Database
Oracle 12cR2 RAC Database Software Installation and Create DatabaseOracle 12cR2 RAC Database Software Installation and Create Database
Oracle 12cR2 RAC Database Software Installation and Create Database
 
Rman backup and recovery 11g new features
Rman backup and recovery 11g new featuresRman backup and recovery 11g new features
Rman backup and recovery 11g new features
 

More from Anar Godjaev

More from Anar Godjaev (20)

Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vault
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin Güvenliği
 
Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server Kurulum
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇
 
Contraints
ContraintsContraints
Contraints
 
Oracle SQL
Oracle SQLOracle SQL
Oracle SQL
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını Inceleme
 
Conditional Control
Conditional ControlConditional Control
Conditional Control
 
PL/SQL Blocks
PL/SQL BlocksPL/SQL Blocks
PL/SQL Blocks
 
Wait Interface
Wait InterfaceWait Interface
Wait Interface
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasi
 
Parallel Server
Parallel ServerParallel Server
Parallel Server
 
Table Partitions
Table PartitionsTable Partitions
Table Partitions
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
LogMiner
LogMinerLogMiner
LogMiner
 
Undo Management
Undo ManagementUndo Management
Undo Management
 

Recently uploaded

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 

Recently uploaded (20)

Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 

Change DB Name

  • 1. Anar Godjaev Change DB name. Step by Step: SQL> startup mount ORACLE instance started. Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers Database mounted. SQL> 595591168 1220748 209719156 377487360 7163904 bytes bytes bytes bytes bytes [oracle@anar ~]$nid DBNEWID: Release 10.2.0.1.0 - Production on Thu Jul 21 11:52:54 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. Keyword Description (Default) ---------------------------------------------------TARGET Username/Password (NONE) DBNAME New database name (NONE) LOGFILE Output Log (NONE) REVERT Revert failed change NO SETNAME Set a new database name only NO APPEND Append to output log NO HELP Displays these messages NO [oracle@anar ~]$ nid target=sys/oracle@anar_f as sysdbadbname=anar_f1 DBNEWID: Release 10.2.0.1.0 - Production on Thu Jul 21 12:19:19 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. Password: Connected to database ANAR_F (DBID=604182317) Connected to server version 10.2.0 Control Files in database: /u01/app/oracle/anar_f/controlfile/control01.ctl
  • 2. Anar Godjaev /u01/app/oracle/anar_f/controlfile/control02.ctl /u01/app/oracle/anar_f/controlfile/control03.ctl Change database ID and database name ANAR_F to ANAR_F1? (Y/[N]) => y Proceeding with operation Changing database ID from 604182317 to 3902868108 Changing database name from ANAR_F to ANAR_F1 Control File /u01/app/oracle/anar_f/controlfile/control01.ctl modified Control File /u01/app/oracle/anar_f/controlfile/control02.ctl modified Control File /u01/app/oracle/anar_f/controlfile/control03.ctl modified Datafile /u01/app/oracle/anar_f/system100.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/anar_f/myundo.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/anar_f/sysaux100.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/anar_f/tsanar01.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/anar_f/tsanar02.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/anar_f/users01.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/anar_f/users02.dbf - dbid changed, wrote new name Datafile /u01/ivants.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/pri_rman.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/rman_moni.dbf - dbid changed, wrote new name Datafile /u01/app/oracle/anar_f/temp01.dbf - dbid changed, wrote new name Control File /u01/app/oracle/anar_f/controlfile/control01.ctl - dbid changed, wrote new name Control File /u01/app/oracle/anar_f/controlfile/control02.ctl - dbid changed, wrote new name Control File /u01/app/oracle/anar_f/controlfile/control03.ctl - dbid changed, wrote new name Instance shut down Database name changed to ANAR_F1. Modify parameter file and generate a new password file before restarting. Database ID for database ANAR_F1 changed to 3902868108. All previous backups and archived redo logs for this database are
  • 3. Anar Godjaev unusable. Database is not aware of previous backups and archived logs in Recovery Area. Database has been shutdown, open database with RESETLOGS option. Succesfully changed database name and ID. DBNEWID - Completed succesfully. Now we need to change our parameter file: [oracle@anar ~]$ cd $ORACLE_HOME/dbs [oracle@anardbs]$ mv initanar_f.ora initanar_f1.ora [oracle@anardbs]$ vi initanar_f1.ora Alter the parameter DB_NAME=<newdbname> [oracle@anardbs]$ export ORACLE_SID=anar_f1 [oracle@anardbs]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 21 12:24:15 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 595591168 bytes Fixed Size 1220748 bytes Variable Size 163581812 bytes Database Buffers 423624704 bytes Redo Buffers 7163904 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open SQL> alter database open resetlogs; Database altered. SQL> create spfile from pfile; File created. Just to check if is everything ok in the initialization:
  • 4. Anar Godjaev SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers Database mounted. Database opened. SQL> 595591168 1220748 163581812 423624704 7163904 bytes bytes bytes bytes bytes