Script for cold backup using RMAN

Dear all,
db_version:-10.2.0.4
os_version:- Windows 2003 server
I wish to schedule a script that will take cold backup of my database using RMAN.
Any help is appreciated ..
Edited by: user12000301 on May 18, 2011 5:02 AM

Dear All,
Thanks a lot for your valuable time :
However i have managed to do it as follows :
1. First i have configure the parameter of RMAN ( Since it is my UAT in Noarchive log mode), I have never tried RMAN cold backup on the same.
Following is the out put of SHOW ALL;
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\DB\RMAN_BKP\BACKUPS%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'D:\DB\RMAN_BKP\BACKUPS\DB_%U.%r';
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\DB\RMAN_BKP\BACKUPS\SNCFDB.ORA';
2. I have created a rman_cold_bkp.bat file which has following entry :
cd c:\oracle10g\bin
set oracle_sid=DB
rman target system/*** @D:\DB\RMAN_BKP\SCRIPT\rman_cold_bkp.rcv log=D:\DB\RMAN_BKP\SCRIPT\rman_cold_bkp.log
exit
3. Whereas rman_cold_bkp.rcv file contains following contents:
run
allocate channel C1 device type disk;
shutdown immediate;
startup mount;
backup database;
alter database open;
release channel C1;
exit
I did checked it and it;s working fine for me :-)
Regards,
Girish

Similar Messages

  • Cold backup using RMAN

    Dear All,
    db_version :10.2.0.4
    os_version:Window 2003 server
    Environment:Test
    I wish to perform cold backup using RMAN for the same i want to know following :
    1. What is the script / command ?
    2. How to restore cold backup completely ( ex:- if i lost all my data,redo and archives )
    3. Is it mandatory to open the database in RESETLOG mode after recovery ( since i have a cold backup ) ?
    Thanks in advance

    A "Cold" Backup is called a "Consistent" Backup.
    See http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup003.htm#sthref297
    Backup :
    From the RMAN command line :
    SHUTDOWN IMMEDIATE
    STARTUP MOUNT
    BACKUP DATABASE
    BACKUP CURRENT CONTROLFILE  -- to get the controlfile in a separate backupsetRestore :
    STARTUP MOUNT
    RESTORE DATABASE
    ALTER DATABASE OPENIf you use an SPFILE, you can have an SPFILE backup included automatically with the controlfile backupset with CONFIGURE CONTROLFILE AUTOBACKUP ON and CONFIGURE CONTROLFILE AUTOBACKUP FORMAT ...
    Read the documentation.
    Hemant K Chitale

  • Script for cold backup on windows

    looking for a script that can be scheduled nightly to perform
    a cold backup to disk of a 8.1.7 database on windows.
    while i've seen many, i'm looking for one that will keep 3 days worth
    of backups... then write over the oldest etc...
    thanks
    dg

    set term off
    set head off
    set feedback off
    set verify off
    spool c:\coldbackup.bat
    select 'copy '||name||' c:\DBBACKUP' from v$datafile;
    select 'copy '||name||' c:\DBBACKUP' from v$controlfile;
    select 'copy '||name||' c:\DBBACKUP' from v$tempfile;
    select 'copy '||member||' c:\DBBACKUP' from v$logfile;
    spool off
    shutdown IMMEDIATE
    host c:\coldbackup.bat
    startup
    host del c:\coldbackup.bat
    set term on
    set head on
    set feedback on
    set verify on

  • Script for cold backup

    Hello friends;
    I'm trying to run following script which I copied from somewhere using .sh file but the same is not running and showing errors:
    Script:
    #!/bin/sh
    dy=`date +%D`
    bk='/backup/test'
    cm_oracle='tar -czhf '$bk'/'$dy'_db_bkp.tar.gz /TEST/oracle'
    [oracle@visionerp ]$ sh cold_bkp.sh
    : command not found:
    : command not found:
    : command not found:
    OS Linux 5.8.
    Regards
    Aneel Ahmed

    Hi ,
    I see this : ^M: bad interpreter. Can you vi your file and see if you have ^M character ?
    you may need to remove this. Dont do it manually.
    follow any of the links below :
    https://www.google.co.in/search?q=remove+%5Em+linux&oq=remove+%5EM+&aqs=chrome.1.69i57j0l5.7360j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8

  • Shell script for DB backup

    HI,
    i have written some java code Database backup but there are some problems with that so now i need to write shell script for db backup.
    what i was doing in java code i was running command like that
    /usr/local/bin/tar cvzf /export/home/monitor/FILE_20091005.tar.gz FILES/*20091005.*which compress the all *20091005* files (myisam table files)
    but after compression file doesn't extract
    so i have to write shell script for that ..... can any body guide me how can i write that kind of script and put it in cron job.
    thanks

    soundar wrote:
    Hi all,
    I have migrated database from 8i to 10gr2.For Backup in 8i, we used a RMAN shell script (scheduled uding cron tab) to backup the database to Tape.(VERITAS BACKUP).
    I am new to 10G.I checked out the options to backup the database using Oracle Enterprise manager DB console.
    http://www.oracle.com/technology/obe/10gr2_db_single/ha/rman/rman_otn.htm#t1d
    I am planning to take a test backup using the steps mentioned inthe above url.Could any one suggest whcih is the best option for database backup,eiether to use Oracle Enterprise manager DB console or thru RMAN shell script for backup..?
    Edited by: soundar on Mar 9, 2010 10:53 PMDear soudar
    I woudn't suggest you to work with EM if you want to be a professional DBA. Start learning RMAN and use CLI instead of GUI
    Those who live by the GUI, die by the GUI

  • Getting error while running script for online backup

    Hi,
    I am running a script for online backup but ended up with an the below error.
    *ERROR* [Backup Worker Thread] com.day.crx.core.backup.Backup Failed to create temporary directory
    Please help out in resolving this.
    Thanks in Advnace.
    Maheswar

    Hi mahesh,
    If you are using backup feature from crx console, I mean http://localhost:4502/crx/config/backup.jsp  I can say that we had also some problems with this functionalities.
    First off all what you need to check are the permissions, because when you check a source code there is line which creates a File object using a path specified by you to make a backup of repository.
    File targetDir = new File(req.getParameter("targetDir", listDir.getParentFile().getAbsolutePath()));
    You need to have sure that the proper read write access has been granted for this path.
    Another issue is that maybe there was already prepared some hotfix if you are using CQ5.4. Please refer to the following link:
    http://dev.day.com/content/kb/home/Crx/CrxSystemAdministration/CRXOnlineBackup.html
    and also to this one:
    http://dev.day.com/content/docs/en/crx/current/release_notes/overview.html which contains a hotfix number #34797 which was applied to backup.jsp file.
    Regards,
    kasq

  • Re: does the full cold backup of rman include onlinde redologs?

    Hi,
    does the full cold backup of rman include onlinde redologs?
    So that at the time of recovery when i restore the database the online redologs also restored to that point?
    Please kindly add your suggestions. I read in 10g database in mount state while taking RMAN Cold backup as the all the oracle processes are down we cant copy the online redologs.
    Am I Correct if not please any one answer me why the online redologs are not copied.
    Thanks in Advance
    Sai

    976630 wrote:
    Hi,
    does the full cold backup of rman include onlinde redologs?No.
    So that at the time of recovery when i restore the database the online redologs also restored to that point?No.
    >
    Please kindly add your suggestions. I read in 10g database in mount state while taking RMAN Cold backup as the all the oracle processes are down we cant copy the online redologs.
    Am I Correct if not please any one answer me why the online redologs are not copied.No. They are not needed because the only valid backup for a cold (or noarchivelog mode database) backup is a consistent backup. Since the backup is already consistent there are no changes to apply.
    The online redo logs are (re)created/reset by the "resetlogs" clause when the database is opened.
    >
    Thanks in Advance
    SaiEdited by: Mark Williams on Jan 7, 2013 10:32 PM - Looks like Hemant replied whilst I was typing in my response.

  • Error in Database backup using RMAN.

    Hi
    While taking full online backup using RMAN i got the following error.
    ORA-19566: exceeded limit of 0 corrupt blocks for file /oracle/DEV/sapdata2/dev640_6/dev640.data6
    Please help me how to resolve this issue.

    Hi,
    Please perform DBverify Job and Also analyze the alert<SID>.log file for your Database to get more information about such logical or physical corruption.  You may require Block level recovery for the complained DB Files. Please refer this useful document " [Early Detection and Correction of Data Block Corruptions Using RMAN |http://www.ioug.org/client_files/members/select_pdf/04q4/RMAN.pdf]" and share the same with your Oracle DBA.
    You can execute the following commands to get information about corrupted block(s), if its there.
    select * from v$backup_corruption;
    select * from v$database_block_corruption;
    Regads,
    Bhavik G. Shroff

  • Can u we take online redo log backups using RMAN......can any one guide me

    can u we take online redo log backups using RMAN.....in 1og

    'Backup' solution for online redo logs is multiplexing (members of a group on different independent drives).
    Werner

  • How to I find out if rman backup that was done is Rman Cold backup or Rman

    Hi,please help me I have backup set ,that is backupset that have rman data backup and autobackup that have control file,I want to restore this backup but I don't know how the backup was done .please advice me how to check if this was Rman cold backup or rman hot backup.I have pfile that is extracted from database before backup was taken.

    Hi Thanks for the update,I checked the v$backup_set on the other database ,but it does not tell me whether ithe backup was Rman cold backup in which database was mounted or Rman hot backup ,now I have to do the restore but I don't know what type of backup do I have please assist.
    Edited by: user1022397 on 2010/11/11 4:40 AM

  • Test scripts for oracle applications using qtp testing tool

    hi
    i want some test scripts for oracle applications using qtp testing tool
    regards

    You will need to create separate scripts for Load testing. The functional scripts cannot be used in OLT. The exceptions to this would be the "General" items (Java Code Script & Web Services) which can also be used in OLT.
    e.g. Instead of selecting "Functional Testing - Oracle EBS/Forms"
    select "Load Testing (Protocol Automation) - Oracle EBS/Forms"
    Once you get into load testing you'll realise that you want to create very specific scripts and won't want to try re-using functional scripts. I know a lot of such tools are 'sold' on the fact that functional scripts can be re-used for load, but when it comes down to it you'll want to design your load scripts seperately anyway!

  • Backup using RMAN

    Hi,
    I want to perform the first backup with RMAN and I used this command and I got error:
    RMAN> BACKUP AS COPY DATABASE;
    can not backup or copy active file in noarchivelog mode.
    But in order to turn on the log_mode to ARCHIVELOG, first I need to do shutdown the db and perform the backup. Right?
    So how can I get my first backup using RMAN if the log mode is in NOARCHIVELOG mode?
    I also performed controlfile autobackup on but I'm not sure the controlfiles are being backed up. How can I verify this and where I can find the controlfile backup file?
    Thanks,

    Hi
    Yes, you must shutdown the database and set it to start in ARCHIVELOG mode.
    After that you can connect to the rman catalog and the target database and execute a backup.
    eg. RMAN> backup database;
    You can search other example posted by me:
    eg.
    - Re: Backup with RMAN
    - Re: How do i set up this backup strategy?
    To be sure that you backed up your control file you can issue the rman-command:
    RMAN> list backup of controlfile summary;
    Bye, Aron

  • PERFORMING A TEST BACKUP (VALIDATE BACKUP) USING RMAN

    제품 : RMAN
    작성날짜 : 2002-05-30
    PERFORMING A TEST BACKUP (VALIDATE BACKUP) USING RMAN
    =====================================================
    PURPOSE
    RMAN을 이용하여 Test Backup을 수행하기 위한 정보를 제공한다.
    EXPLANATION
    8.1.7 부터 RMAN에서 BACKUP command에 VALIDATE keyword를 사용할 수 있게 되었다
    이 명령의 수행은 다음과 같은 작업을 수행한다.
    - Datafile의 physical and logical corruption을 check한다.
    - 모든 database file들이 존재하는지, 그리고 올바른 위치에 있는지를 검증한다.
    RMAN은 실제적으로 backupset을 생성하지 않는다 그러나 그것들이 backup될 수
    있는지 없는지를 결정하기 위해서 기술된 file들을 scan한다.
    BACKUP VALIDATE 는 backup job을 수행시 수행되는 것을 제외하고는
    RESTORE VALIDATE와 거의 비슷하다.
    EXAMPLE
    아래와 같은 command들을 수행하여 backup하고자 하는 database file과 archived redo
    log들이 실제로 backup될 수 있는지를 검증할 수 있다.
    RUN {
    ALLOCATE CHANNEL ch1 TYPE 'sbt_tape';
    BACKUP VALIDATE
    DATABASE
    ARCHIVELOG ALL;
    Note: MAXCORRUPT or PROXY parameter는 VALIDATE option과 함께 사용할 수 없다.
    REFERENCE DOCUMENTS
    NOTE:121109.1

    Clint,
    I ran the command lines you wrote me after i placed the database in Startup MOUNT state, RMAN gave error messages that the database needs to be open:
    RMAN> SQL 'ALTER TABLESPACE USERTB2 OFFLINE IMMEDIATE';
    sql statement: ALTER TABLESPACE USERTB2 OFFLINE IMMEDIATE
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 11/04/2005 15:31:33
    RMAN-11003: failure during parse/execution of SQL statement: ALTER TABLESPACE US
    ERTB2 OFFLINE IMMEDIATE
    ORA-01109: database not open
    Then I ran the same command lines after I opened the database, RMAN gave error messages that "offline immediate disallowed unless media recovery enabled":
    RMAN> SQL 'ALTER TABLESPACE USERTBS2 OFFLINE IMMEDIATE';
    sql statement: ALTER TABLESPACE USERTBS2 OFFLINE IMMEDIATE
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 11/04/2005 15:48:17
    RMAN-11003: failure during parse/execution of SQL statement: ALTER TABLESPACE US
    ERTBS2 OFFLINE IMMEDIATE
    ORA-01145: offline immediate disallowed unless media recovery enabled
    I am stuck again and need your help!
    Thank you,
    Mitra

  • Prerequisite script for Exadata Discovery using wrong domainname command?

    Does the Prerequisite script for Exadata Discovery use the Wrong domainname command? It uses domainname, should it be using dnsdomainname?
    The script is found in this MOS note: Prerequisite script for Exadata Discovery in Oracle Enterprise Manager Cloud Control 12c [ID 1473912.1]
    My System administrator wrote "what the precheck script says it is watching out for, is NOT what it’s checking, and what it is checking is NOT needed.
    They say they need the “domain name” to be set, but what they’re checking is the NIS domain name. This is echoed in the man page for “domainname” …
    The man page even has a warning NOT to use “domainname” to check the DNS domain"
    So is the pre-check script wrong, or is the running OEM/agents/discoverer going to look for the apparently doaminname set value within a NIS construct?
    The sysadmins are trying to avoid having anything set with NIS, for fear it confuses a new admin or consultant.
    Thanks in advance for your thoughts. -- Shaun
    PS, if it is wrong, how do we get it corrected with Oracle?

    This answer came in from the Oracle Support Community via an Oracle employee:
    According to a remark that is attached to the note that you mention, your concerns are correct:
    "domainname" command does indeed return NIS domainname.
    The DNS domain name that we actually want to use should be checked by "dnsdomainname" command.
    [root@hostname ~]# dnsdomainname
    hostname.example.com
    [root@hostname ~]# domainname
    (none)
    [root@hostname ~]# domainname -h
    Usage: hostname [-v] hostname set hostname (from file)
    domainname [-v] nisdomain set NIS domainname (from file)
    hostname [-v] [-d|-f|-s|-a|-i|-y|-n] display formatted name
    hostname [-v] display hostname
    The response to the remark explains that we are testing this in our internal environment. We have found one issue with this check. The NOTE authors plan to upload the new version of the script when the updated script is fully tested.
    At your service,
    Dave M.

  • How to find out the script for the table using SQL

    Hi,
    Could any one tell me that how to find out the script for the table using SQL.
    Thanks,
    kamal

    Kamal,
    You can find the SQL query in Advanced tab of Answers
    Thanks,
    Balaa...

Maybe you are looking for