【oracle】rman 基本命令

Posted on 2012-12-19 15:53  雅飞士  阅读(665)  评论(0编辑  收藏  举报

连接:

[oracle@yfs ~]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Dec 14 11:42:03 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1325071312)
RMAN>

[oracle@yfs ~]$ rman
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Dec 14 11:42:23 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
RMAN> connect target /
connected to target database: ORCL (DBID=1325071312)

RMAN>

两种方式。

退出:exit 即可。

关闭和启动数据库:

RMAN> shutdown immediate
using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down
RMAN> startup
connected to target database (not started)
Oracle instance started
database mounted
database opened
Total System Global Area     313159680 bytes
Fixed Size                     2227944 bytes
Variable Size                281018648 bytes
Database Buffers              25165824 bytes
Redo Buffers                   4747264 bytes
RMAN>

跟在sqlplus里面一模一样。

显示默认配置:

RMAN> show all
2> /
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signaled during parse
RMAN-02001: unrecognized punctuation symbol "/"
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/s01/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default
RMAN>

并不能像sqlplus里面使用 / 。

还可以针对上面列出的配置单独显示:

RMAN> show device type;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
RMAN> show channel;
RMAN configuration parameters for database with db_unique_name ORCL are:
RMAN configuration has no stored or default parameters
RMAN>

可以通过configure 对默认值进行更改:

RMAN> configure controlfile autobackup on;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

 

——EOF

原文地址:http://blog.yafeishi.net/2012/12/oracle-rman-basic-cmd.html

Copyright © 2024 雅飞士
Powered by .NET 8.0 on Kubernetes