SlideShare una empresa de Scribd logo
1 de 4
Control file management
Every oracle database has a control file. A control file contains information about the associated
database that is required for access by an instance, both at startup and during normal operation.
Control file information can be modified only by oracle; no database administrator or user can edit a
control file.
Among other things, a control file contains information such as:--
• The database name.
• The timestamp of database creation.
• The names and locations of associated data files and redo log files.
• Table space information.
• Data file offline ranges.
• The log history.
• Archived log information.
• Backup set and backup piece information.
• Backup data file and redo log information.
• Data file copy information.
• The current log sequence number.
• Checkpoint information.
The database name and timestamp originate at database creation. The database name is taken from
either the name specified by the db_name initialization parameter or the name used in the create
database statement.
Each time that a data file or a redo log file is added to, renamed in, or dropped from the database, the
control file is updated to reflect this physical structure change.
These changes are recorded so that:
Oracle can identify the data files and redo log files to open during database startup. Oracle can identify
files that are required or available in case database recovery is necessary.
View: desc v$controlfile;
To see the location of control files:
Select name from v$controlfile;
To add a control file:
Sql>create pfile from spfile;
1. Shutdown the database gracefully.
2. Edit the init<sid>.ora file
3 Modify the control file parameter and add the location of the new file.
4. Copy the control file physically using ‘cp’ command.
$cd dev/control/
$cp control.ctl control2.ctl
Sql>create spfile from pfile;
Sql>startup
Cloning:
To backup control file:
Sql>Alter database backup controlfile to trace;
Sql>show parameter user_dump_dest
Sql>shutdown immediate
Sql>exit
$cd prod/udump
$ls –ltr
$vi “latest updated file.trc” #here file name is not latest updated file.
Copy the create controlfile script up to character set.
:q
$mkdir clone
$cd clone
$mkdir data log control udump cdump bdump adump arch
$cd
$vi createcontrol.ctl
Click on I to enter INSERT mode and then write click on your mouse.
Change the directory path from prod to clone.
Create controlfile set database “newsid” resetlogs archivelog
Logfile
Group 1’/data/oracle/clone/redolog01.log’ size 50M;
Group 2’/path’ size 50M;
Datafile
‘/data/oracle/clone/system.dbf’
‘/path/sysaux.dbf’
‘/path/undotbs.dbf’
‘/path/users.dbf’
:1,$s/prod/clone/gc
:wq
$cd
Copy the datafiles from prod/data to /home/oracle/clone/data
$cd prod/data
$cp -v *.dbf /home/oracle/clone/data/
Go to parameters file location $ORACLE_HOME/dbs
$cd $ORACLE_HOME/dbs
Copy the init parameter file to clone.
$cp initprod.ora initclone.ora
$vi initclone.ora
:1,$s/prod/clone/gc
:wq
$env |grep ORA
$export ORACLE_SID=clone
$env |grep ORA
$cd
$sqlplus / as sysdba
Sql>startup nomount;
Sql>@createcontrol.ctl
Sql>alter database open resetlogs;
Sql>recover database using backup controlfile; (online)

Más contenido relacionado

La actualidad más candente

Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
Anar Godjaev
 
Move spfile from asm to file system
Move spfile from asm to file systemMove spfile from asm to file system
Move spfile from asm to file system
raviranchi02
 
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
 

La actualidad más candente (20)

12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage
 
Les 11 Fb Queries
Les 11 Fb QueriesLes 11 Fb Queries
Les 11 Fb Queries
 
Whitepaper To Study Filestream Option In Sql Server
Whitepaper To Study Filestream Option In Sql ServerWhitepaper To Study Filestream Option In Sql Server
Whitepaper To Study Filestream Option In Sql Server
 
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
 
ACLs
ACLsACLs
ACLs
 
Move spfile from asm to file system
Move spfile from asm to file systemMove spfile from asm to file system
Move spfile from asm to file system
 
Introduction to scoop and its functions
Introduction to scoop and its functionsIntroduction to scoop and its functions
Introduction to scoop and its functions
 
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهمآموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
 
eZ Publish cluster unleashed revisited
eZ Publish cluster unleashed revisitedeZ Publish cluster unleashed revisited
eZ Publish cluster unleashed revisited
 
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
 
Coffee at DBG- Solr introduction
Coffee at DBG- Solr introduction Coffee at DBG- Solr introduction
Coffee at DBG- Solr introduction
 
Wso2 Scenarios Esb Webinar July 1st
Wso2 Scenarios Esb Webinar July 1stWso2 Scenarios Esb Webinar July 1st
Wso2 Scenarios Esb Webinar July 1st
 
Enable archivelod mode in oracle rac12cR1 with asm location
Enable archivelod mode  in oracle rac12cR1 with asm locationEnable archivelod mode  in oracle rac12cR1 with asm location
Enable archivelod mode in oracle rac12cR1 with asm location
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission process
 
Pluggable database 3
Pluggable database 3Pluggable database 3
Pluggable database 3
 
Hive commands
Hive commandsHive commands
Hive commands
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export
 
Exadata - BULK DATA LOAD Testing on Database Machine
Exadata - BULK DATA LOAD Testing on Database Machine Exadata - BULK DATA LOAD Testing on Database Machine
Exadata - BULK DATA LOAD Testing on Database Machine
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 

Destacado

Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
Vinay Thota
 
Startupandshutdown
StartupandshutdownStartupandshutdown
Startupandshutdown
Vinay Thota
 

Destacado (8)

Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
 
Curso basicoseguridadweb slideshare9
Curso basicoseguridadweb slideshare9Curso basicoseguridadweb slideshare9
Curso basicoseguridadweb slideshare9
 
Startupandshutdown
StartupandshutdownStartupandshutdown
Startupandshutdown
 
Tablespaces
TablespacesTablespaces
Tablespaces
 
Basic commands
Basic commandsBasic commands
Basic commands
 
Backup&recovery
Backup&recoveryBackup&recovery
Backup&recovery
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar a Controlfilemanagement

Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
subhani shaik
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
maclean liu
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
Moeen_uddin
 
Administration and Management of Users in Oracle / Oracle Database Storage st...
Administration and Management of Users in Oracle / Oracle Database Storage st...Administration and Management of Users in Oracle / Oracle Database Storage st...
Administration and Management of Users in Oracle / Oracle Database Storage st...
rajeshkumarcse2001
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
praveen_01236
 
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
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
vivaankumar
 

Similar a Controlfilemanagement (20)

Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
control_file.pdf
control_file.pdfcontrol_file.pdf
control_file.pdf
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan user
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productions
 
Administration and Management of Users in Oracle / Oracle Database Storage st...
Administration and Management of Users in Oracle / Oracle Database Storage st...Administration and Management of Users in Oracle / Oracle Database Storage st...
Administration and Management of Users in Oracle / Oracle Database Storage st...
 
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
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
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
 
Les 07 rman_rec
Les 07 rman_recLes 07 rman_rec
Les 07 rman_rec
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
 
Createclone
CreatecloneCreateclone
Createclone
 
Mid term &amp; final- preparation- student-review(Oracle)
Mid term &amp; final- preparation- student-review(Oracle)Mid term &amp; final- preparation- student-review(Oracle)
Mid term &amp; final- preparation- student-review(Oracle)
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
 
Oracle11g notes
Oracle11g notesOracle11g notes
Oracle11g notes
 

Último

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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
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
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
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...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Controlfilemanagement

  • 1. Control file management Every oracle database has a control file. A control file contains information about the associated database that is required for access by an instance, both at startup and during normal operation. Control file information can be modified only by oracle; no database administrator or user can edit a control file. Among other things, a control file contains information such as:-- • The database name. • The timestamp of database creation. • The names and locations of associated data files and redo log files. • Table space information. • Data file offline ranges. • The log history. • Archived log information. • Backup set and backup piece information. • Backup data file and redo log information. • Data file copy information. • The current log sequence number. • Checkpoint information. The database name and timestamp originate at database creation. The database name is taken from either the name specified by the db_name initialization parameter or the name used in the create database statement. Each time that a data file or a redo log file is added to, renamed in, or dropped from the database, the control file is updated to reflect this physical structure change. These changes are recorded so that: Oracle can identify the data files and redo log files to open during database startup. Oracle can identify files that are required or available in case database recovery is necessary. View: desc v$controlfile;
  • 2. To see the location of control files: Select name from v$controlfile; To add a control file: Sql>create pfile from spfile; 1. Shutdown the database gracefully. 2. Edit the init<sid>.ora file 3 Modify the control file parameter and add the location of the new file. 4. Copy the control file physically using ‘cp’ command. $cd dev/control/ $cp control.ctl control2.ctl Sql>create spfile from pfile; Sql>startup Cloning: To backup control file: Sql>Alter database backup controlfile to trace; Sql>show parameter user_dump_dest Sql>shutdown immediate Sql>exit $cd prod/udump $ls –ltr $vi “latest updated file.trc” #here file name is not latest updated file. Copy the create controlfile script up to character set. :q $mkdir clone $cd clone
  • 3. $mkdir data log control udump cdump bdump adump arch $cd $vi createcontrol.ctl Click on I to enter INSERT mode and then write click on your mouse. Change the directory path from prod to clone. Create controlfile set database “newsid” resetlogs archivelog Logfile Group 1’/data/oracle/clone/redolog01.log’ size 50M; Group 2’/path’ size 50M; Datafile ‘/data/oracle/clone/system.dbf’ ‘/path/sysaux.dbf’ ‘/path/undotbs.dbf’ ‘/path/users.dbf’ :1,$s/prod/clone/gc :wq $cd Copy the datafiles from prod/data to /home/oracle/clone/data $cd prod/data $cp -v *.dbf /home/oracle/clone/data/ Go to parameters file location $ORACLE_HOME/dbs $cd $ORACLE_HOME/dbs Copy the init parameter file to clone. $cp initprod.ora initclone.ora $vi initclone.ora
  • 4. :1,$s/prod/clone/gc :wq $env |grep ORA $export ORACLE_SID=clone $env |grep ORA $cd $sqlplus / as sysdba Sql>startup nomount; Sql>@createcontrol.ctl Sql>alter database open resetlogs; Sql>recover database using backup controlfile; (online)