SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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)
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

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