Connect to the database using RMAN

Source: Internet
Author: User

1. Considerations for using RMAN

Resources: Shared Memory, more processes

Permission: grant sysdba permission and OS permission to access devices.

Remote Operation

Set Password File

Make sure the password file is backed up

Global Environment variable settings

Format the time parameter in the RMAN command line

2. Connection Type

Target Database

Restore the directory database. By default, RMAN runs in a non-recovered directory database.

Secondary Database

Standby Database

Duplicate Database

Tspitr instance

4. connect to the target database or restore the Directory

-- Start RMAN only if the database is not connected

[Oracle @ oradb ~] $ RMAN

-- Connect to the target database using operating system authentication

UNIX: $ oracle_sid = orcl; export oracle_sid

$ RMAN target/

Win: C:/> set oracle_sid = orcl

C:/> RMAN target/

-- Connect to the target database from the command line and restore the Directory

% RMAN target/catalog rman/CAT @ catdb -- use OS authentication. The second RMAN is the schema of the recovery directory.

% RMAN target sys/Oracle @ trgt catalog RMAN/CAT @ catdb -- use Oracle Net for authentication

-- Connect to the target database and restore the directory from the RMAN prompt

% RMAN

RMAN> connect target/-- use OS Authentication

RMAN> connect catalog RMAN/CAT @ catdb

% RMAN

RMAN> connect target sys/Oracle @ trgt -- use Oracle Net for authentication

RMAN> connect catalog RMAN/CAT @ catdb

-- Connect the command line to the secondary Database

% RMAN auxiliary sys/aux @ auxdb

% RMAN target sys/Oracle @ trgt auxiliary sys/aux @ auxdb catrman RMAN/CAT @ catdb

-- Connect to the secondary database from the RMAN prompt

% RMAN

RMAN> connect auxiliary sys/aux @ auxdb

% RMAN

RMAN> connect target sys/Oracle @ trgt

RMAN> connect catalog RMAN/CAT @ catdb

RMAN> connect auxiliary sys/aux @ auxdb

-- Others

Remote connection

RMAN target sys/Oracle @ trgt

RMAN target/nocatalog is equivalent to RMAN target/

-- RMAN command line parameters

Output to log file

$ RMAN target sys/Oracle

Log = $ oralce_home/oradata/log/RMAN. Log append

Execute the name file

$ RMAN target sys/Oracle

Export File = $ ORACLE_HOME/scirpts/my_rman_script.rcv

$ RMAN target sys/Oracle @ prod @ '$ ORACLE_HOME/scirpts/my_rman_script.rcv'

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.