ORACLE之rman备份加密
ORACLE之rman备份加密
oracle@oracle:~> rman target /
恢复管理器: Release 11.1.0.6.0 - Production on 星期四 3月 28 20:33:52 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到目标数据库: ORCL (DBID=1307032085)
RMAN> show all;
使用目标数据库控制文件替代恢复目录
db_unique_name 为 ORCL 的数据库的 RMAN 配置参数为:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/opt/oracle/flash_recovery_area/ORCL/controlfile/c_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
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 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/10.2/db_1/dbs/snapcf_orcl.f'; # default
第一种方式:使用明文密码:测试如下:
RMAN> set encryption on identified by "root" only;
正在执行命令: SET encryption
RMAN> host;
soracle@oracle:~> sqlplus "/as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on 星期四 3月 28 20:34:26 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@orcl#select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
VPN_HUADAN
已选择6行。
SYS@orcl#!
oracle@oracle:~> exit
exit
SYS@orcl#exit
从 Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
oracle@oracle:~> exit
exit
主机命令完成
RMAN> backup datafile 6;
启动 backup 于 28-3月 -13
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=132 设备类型=DISK
通道 ORA_DISK_1: 正在启动全部数据文件备份集
通道 ORA_DISK_1: 正在指定备份集内的数据文件
输入数据文件: 文件号=00006 名称=/opt/oracle/oradata/sysaux_add.dbf
通道 ORA_DISK_1: 正在启动段 1 于 28-3月 -13
通道 ORA_DISK_1: 已完成段 1 于 28-3月 -13
段句柄=/opt/oracle/flash_recovery_area/ORCL/backupset/2013_03_28/o1_mf_nnndf_TAG20130328T203507_8o8g86q7_.bkp 标记=TAG20130328T203507 注释=NONE
通道 ORA_DISK_1: 备份集已完成, 经过时间:00:00:26
完成 backup 于 28-3月 -13
RMAN> exit
恢复管理器完成。
oracle@oracle:~> exit
exit
SYS@orcl#su - oracle
SP2-0734: 未知的命令开头 "su - oracl..." - 忽略了剩余的行。
SYS@orcl#exit
已断开连接
oracle@oracle:~> exit
logout
oracle:~ # su - oracle
sqlploracle@oracle:~> cd oradata
oracle@oracle:~/oradata> ls
ORCL/ ORCL01/ sysaux_add.dbf sysaux_add.dbf_bak system_add.dbf system_add.dbf_bak
oracle@oracle:~/oradata> rm sysaux_add.dbf
oracle@oracle:~/oradata> sqlplus "/as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on 星期四 3月 28 20:36:49 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@orcl#desc dba_tablespaces;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
TABLESPACE_NAME NOT NULL VARCHAR2(30)
BLOCK_SIZE NOT NULL NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NOT NULL NUMBER
MAX_EXTENTS NUMBER
MAX_SIZE NUMBER
PCT_INCREASE NUMBER
MIN_EXTLEN NUMBER
STATUS VARCHAR2(9)
CONTENTS VARCHAR2(9)
LOGGING VARCHAR2(9)
FORCE_LOGGING VARCHAR2(3)
EXTENT_MANAGEMENT VARCHAR2(10)
ALLOCATION_TYPE VARCHAR2(9)
PLUGGED_IN VARCHAR2(3)
SEGMENT_SPACE_MANAGEMENT VARCHAR2(6)
DEF_TAB_COMPRESSION VARCHAR2(8)
RETENTION VARCHAR2(11)
BIGFILE VARCHAR2(3)
PREDICATE_EVALUATION VARCHAR2(7)
ENCRYPTED VARCHAR2(3)
COMPRESS_FOR VARCHAR2(18)
SYS@orcl#select file_name,tablespace_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------------------------------------
/opt/oracle/oradata/ORCL/datafile/o1_mf_users_8no75m69_.dbf
USERS
/opt/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_8no736w0_.dbf
UNDOTBS1
/opt/oracle/oradata/ORCL/datafile/o1_mf_sysaux_8no736vh_.dbf
SYSAUX
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------------------------------------
/opt/oracle/oradata/ORCL/datafile/o1_mf_system_8no75lqw_.dbf
SYSTEM
/opt/oracle/oradata/ORCL/datafile/huadan
VPN_HUADAN
/opt/oracle/oradata/sysaux_add.dbf
SYSAUX
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------------------------------------
/opt/oracle/oradata/system_add.dbf
SYSTEM
已选择7行。
SYS@orcl#alter tablespace sysaux offline;
alter tablespace sysaux offline
*
第 1 行出现错误:
ORA-01116: 打开数据库文件 6 时出错
ORA-01110: 数据文件 6: '/opt/oracle/oradata/sysaux_add.dbf'
ORA-27041: 无法打开文件
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SYS@orcl#shutdown immediate
ORA-01116: 打开数据库文件 6 时出错
ORA-01110: 数据文件 6: '/opt/oracle/oradata/sysaux_add.dbf'
ORA-27041: 无法打开文件
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SYS@orcl#select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SYS@orcl#shutdown abort;
ORACLE 例程已经关闭。
SYS@orcl#
SYS@orcl#
SYS@orcl#exit
从 Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Tes
上一个:oracle之常用简单函数(ONE)
下一个:Oracle备份与恢复基础篇
- 更多Oracle疑问解答:
- 运行exp备份oracle数据库提示oracle-12154错误
- 有没有,生产Oracle Rman 备份脚本的工具啊!
- 初学orcle,希望有大大帮忙解说一下详细步骤,从登录oracle到创建表的过程
- oracle语句问题:一张user表,三个字段,id,name,time,插入记录比如:张三2007,李四2008,张三2011
- 如何写一个ORACLE触发器同步两个表中的数据?
- oracle 如何查看一个服务器上有多少个数据库.
- oracle 创建包的时候错误 求解
- oracle 重复列的问题
- oracle 中如何查处2星期前的数据
- 请教oracle数据库安装中的问题
- 请问谁能提供给我标准的oracle ERP的数据库表结构并详细说明各表主要的作用?
- 安装oracle遇到的问题 invalid entry CRC (expected 0x3e12e795 but got 0x9db0e9fd)
- 我的是ORACLE 10G,在RMAN中如何按指定的时间恢复数据文件啊?
- oracle为什么没有自动增长列
- oracle快捷键都有哪些啊?