oracle:+操作手记--RMAN

 记录备用:

********************备份全部的归档日志****************************

RMAN> backup archivelog all format '/oracle/mercury/recovery/ar_%U' delete all input;

Starting backup at 09-OCT-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=31 RECID=1 STAMP=764075161
input archived log thread=1 sequence=32 RECID=2 STAMP=764075240
input archived log thread=1 sequence=33 RECID=3 STAMP=764075252
input archived log thread=1 sequence=34 RECID=4 STAMP=764075422
input archived log thread=1 sequence=35 RECID=5 STAMP=764075531
input archived log thread=1 sequence=36 RECID=6 STAMP=764075807
channel ORA_DISK_1: starting piece 1 at 09-OCT-11
channel ORA_DISK_1: finished piece 1 at 09-OCT-11
piece handle=/oracle/mercury/recovery/ar_06molnp0_1_1 tag=TAG20111009T111648 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/oracle/mercury/recovery/MERCURY/archivelog/2011_10_09/o1_mf_1_31_793g2hvm_.arc RECID=1 STAMP=764075161
archived log file name=/oracle/mercury/recovery/MERCURY/archivelog/2011_10_09/o1_mf_1_32_793g58pn_.arc RECID=2 STAMP=764075240
archived log file name=/oracle/mercury/recovery/MERCURY/archivelog/2011_10_09/o1_mf_1_33_793g5n05_.arc RECID=3 STAMP=764075252
archived log file name=/oracle/mercury/recovery/MERCURY/archivelog/2011_10_09/o1_mf_1_34_793gbyjp_.arc RECID=4 STAMP=764075422
archived log file name=/oracle/mercury/recovery/MERCURY/archivelog/2011_10_09/o1_mf_1_35_793ggc58_.arc RECID=5 STAMP=764075531
archived log file name=/oracle/mercury/recovery/MERCURY/archivelog/2011_10_09/o1_mf_1_36_793gpztm_.arc RECID=6 STAMP=764075807
Finished backup at 09-OCT-11

Starting Control File and SPFILE Autobackup at 09-OCT-11
piece handle=/oracle/mercury/recovery/md_c-552464912-20111009-01 comment=NONE
Finished Control File and SPFILE Autobackup at 09-OCT-11

 

*******************RMAN CATALOG**********************

[oracle@centos ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 10 06:05:17 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn / as sysdba;
Connected to an idle instance.
SQL> startup open;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area  801701888 bytes
Fixed Size                  2217632 bytes
Variable Size             503318880 bytes
Database Buffers          289406976 bytes
Redo Buffers                6758400 bytes
Database mounted.
Database opened.
SQL> create tablespace cata datafile '/oracle/catalog/catalog_01.dbf' size 500m segment space management auto extent management local uniform;

Tablespace created.

SQL> create user cata identified by lzx123 default tablespace cata quota unlimited on cata;

User created.

SQL> grant connect, resource to cata;

Grant succeeded.

SQL> grant recovery_catalog_owner to cata;

Grant succeeded.

 

--rman登录catalog数据库

[oracle@centos oracle]$ rman catalog cata/lzx123;

Recovery Manager: Release 11.2.0.1.0 - Production on Mon Oct 10 06:23:01 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog tablespace cata;

recovery catalog created

 

SQL> conn cata/lzx123;

SQL> show user;
USER is "CATA"

SQL> desc user_objects;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OBJECT_NAME                                        VARCHAR2(128)
 SUBOBJECT_NAME                                     VARCHAR2(30)
 OBJECT_ID                                          NUMBER
 DATA_OBJECT_ID                                     NUMBER
 OBJECT_TYPE                                        VARCHAR2(19)
 CREATED                                            DATE
 LAST_DDL_TIME                                      DATE
 TIMESTAMP                                          VARCHAR2(19)
 STATUS                                             VARCHAR2(7)
 TEMPORARY                                          VARCHAR2(1)
 GENERATED                                          VARCHAR2(1)
 SECONDARY                                          VARCHAR2(1)
 NAMESPACE                                          NUMBER
 EDITION_NAME                                       VARCHAR2(30)

SQL> col object_name format a40;
SQL> select object_name, object_type from user_objects;

OBJECT_NAME                              OBJECT_TYPE
---------------------------------------- -------------------
DB                                       TABLE
DB_P                                     INDEX
DB_U1                                    INDEX
RMAN_SEQ                                 SEQUENCE
NODE                                     TABLE
NODE_P                                   INDEX
NODE_U1                                  INDEX
CONF                                     TABLE
CONF_I_DB                                INDEX
DBINC                                    TABLE
DBINC_P                                  INDEX

 

RMAN> rman target / ;

RMAN-00571: ================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===
RMAN-00571: ================================================
RMAN-03002: failure of argument list command at 10/10/2011 06:33:10
RMAN-06014: command not implemented yet: argument list

RMAN> connect target / ;

connected to target database: MERCURY (DBID=552464912)

RMAN> connect catalog cata/lzx123;

RMAN-00571: ===================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ======
RMAN-00571: ===================================================
RMAN-06167: already connected

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN> list incarnation;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
2       4       MERCURY  552464912        CURRENT 1          23-SEP-11

RMAN>

你可能感兴趣的:(oracle与c++开发)