Oracle learning records-RMAN backup/recovery process

Source: Internet
Author: User

Oracle learning records: RMAN backup/recovery process oracle learning records, RMAN usage, backup and recovery. (1) create tablespace cata datafile 'cata01. dbf 'size 200 m; -- cata01.dbf is in/oracle/db11g/dbs by default (2) create user kata identified by oracle default tablespace cata; (3) grant user permissions to grant connect, resource, recovery_catalog_owner to kata; (4) Create an archive www.2cto.com $ ORACLE_SID = OCA $ sqlplus sys/oracle as sysdba;> shutdown immediate;> startup mount;> archive log list> alter d Atabase archivelog; -- Enabled. You can perform hot backup to enable automatic archiving.> host mkdir/oracle/archive;> alter system set log_archive_dest_1 = 'location =/oracle/archive ';> alter database open;> show parameter instance;> archive log list;> exit; www.2cto.com (5) destination and directory dual database login (two databases need to be started, tnsname. in the ora configuration, ocp (SERVER = dedicated). The following is the only place that does not use as sysdba during sys logon) $ lsnrctl start $ rman target sys/oracle @ OCA catalog kata/oracle @ OCP (6) create directory RMAN> create catalog; (7) register RMAN> register database; -- notify the target database to the directory database (8) backup database RMAN> backup database; RMAN> list backup; RMAN> report obsolete; RMAN> delete obsolete; test: in the directory database, $ ORACLE_SID = ocp $ sqlplus kata/oracleSQL> select table_name from user_tables; -- 44 After rows Rman recovers the backup, delete all files in the/oracle/oradata/oca (target database) Directory (equivalent to destroying all data files ). $ Su-oracle $ lsnrctl stop $ lsnrctl start $ ORACLE_SID = oca $ sqlplus sys/oracle as sysdba;> startup nomount # shutdown abort> exit $ ORACLE_SID = ocp $ sqlplus sys/oracle as sysdba;> startup; # shutdown immediate first;> exit $ rman target sys/oracle @ OCA catalog kata/oracle @ OCP error: all appropriate instances are blocking new connections, modify tnsnames. add :( UR = A) RMAN> list backup; # Check whether the backup is in RMAN> restore database; # restore RMAN> show all; RMAN> restore controlfile; to the CONNECT_DATA file of OCA; RMAN> alter database mount; RMAN> alter database open resetlogs

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.