[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 506
  • Last Modified:

backup control file

I need to backup my control file in oracle and recover it back if any issues occur, can any one provide me with the commands required for backing up and control file and recovering it when necessary
0
saravanan_k
Asked:
saravanan_k
3 Solutions
 
tcs224694Commented:
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
the statement would be, with either sql plus or rman:
alter database backup controlfile to trace;

Open in new window

0
 
tcs224694Commented:
U can see the entire syntax in that url..

Hope this helps u...

Thanks,
TCS
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
woolmilkporcCommented:
RMAN considerations -
If you use RMAN, you should have set
CONFIGURE CONTROLFILE AUTOBACKUP ON;
This way the controlfile and spfile will be backed up automatically with each database/archivelog backup run.
Else issue
backup current controlfile;
to backup the controlfile and spfile. Add that statement to your standard RMAN backup procedure, if not already present.
angelIII's statement is needed in case you must have the controlfile in clear text, perhaps in order to modify it.
The appropriate RMAN commands to restore the controlfile/spfile [to a new location] would be -

restore spfile [TO 'filename'];  
restore controlfile [TO 'filename'];

wmp
 
0
 
schwertnerCommented:
To backup a control file simply copy the file on a backup device.
This device should not be placed on the computer and even be
in the same room where the Primary DB resides.
More interesting is when to backup the Control file.
One hint is: before and after major changes in the logical and physical structure of the DB
like - creating new tablespaces, dropping tablespaces, adding new files, dropping files, moving files (.dbf)
from one location to  other  disk location.
The reason is that the contol file keeps the location of all files of the data base.
So some recovery scenarous need old control files (example - lost or damaged database file)
or possible damage (lose) of the control files needs reestablising.
0
 
saravanan_kAuthor Commented:
Thanks, can i backup the pfile, spfile with the same way that is used for  control file. can i use the following command
backup current pfile
        or
backup current spfile
0
 
woolmilkporcCommented:
backup spfile;
sorry, i forgot to mention this above.

0
 
sventhanCommented:
saravanan -
Backing it up in a binary format:
alter database backup controlfile to '/some/arbitrary/path';
alter database backup controlfile to '/some/arbitrary/path' reuse;

Backing it up in a human readable format:
alter database backup controlfile to trace;
alter database backup controlfile to trace as '/some/arbitrary/path';
alter database backup controlfile to trace as '/some/arbitrary/path' reuse;
http://www.adp-gmbh.ch/ora/sql/alter_database.html 
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now