The concept and architecture of Oracle Rman (ii) Start and run Rman

Source: Internet
Author: User
Tags command line backup

2.1 Operational Requirements

1. Process and memory requirements

The need for more processes

Allocation of large pools

2. Basic Environment variable Demand

Oracle_sid, Oracle_home, PATH, Nls_lang, if you use a time based backup and restore

Duplicate, need to set up additional Nls_date_format

3. Permission Requirements

Requires SYSDBA system permissions

If it is local, you can use the OS certification, remote need to use password file authentication

4, version requirements

The RMAN tool version must be the same version as the target database, and if the recovery directory is used, you need to be aware

More Wonderful content: http://www.bianceng.cn/database/Oracle/

• The script version that creates the Rman recovery directory must be equal to or greater than the version of the database where the recovery directory resides

• The script version that creates the Rman recovery directory must be equal to or greater than the version of the target database

2.2 Basic Operation method

9i default is Nocatalog, no recovery directory, use command Rman to enter the Rman command line interface, such as

[Oracle@db oracle]$ $ORACLE _home/bin/rman

Recovery Manager:release 9.2.0.4.0-production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

Rman>

To connect to the target database, you can use the following similar command

Rman>connect Target/

2.3 How to run the Rman command

1. Single execution

Rman>backup database;

2. Run a command block

Rman> Run {

2> copy DataFile to

3> '/oracle/prod/backup/prod_10.dbf ';

4>}

3. Run the script

$ Rman target/@backup_db. Rman

Rman> @backup_db. Rman

Rman> RUN {@backup_db. Rman}

Run a script stored in the recovery directory

Rman> RUN {EXECUTE SCRIPT backup_whole_db};

4, shell script, if executed in Cron, note set the correct environment variable in the script

[Oracle@db worksh]$ more rmanback.sh

#!/bin/ksh

#set env

Export oracle_home=/opt/oracle/product/9.2

Export Oracle_sid=test

Export nls_lang= "AMERICAN_AMERICA.ZHS16GBK"

Export path= $PATH: $ORACLE _home/bin

echo "-----------------------------start-----------------------------";d ate

#backup start

$ORACLE _home/bin/rman <<eof

Connect target

Delete NoPrompt obsolete;

Backup database format '/netappdata1/rmanback/tbdb2/%u_%s.bak ' Filesperset = 2;

Exit

Eof

echo "------------------------------end------------------------------";d ate

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.