|
- select * from v$backup_sync_io;
- select * from v$backup_async_io;
复制代码
调优RMAN控制multiplexing:
- RMAN> backup tag '10T_WHOLE_FULL' database;
- Starting backup at 2019-12-18:16:32:24
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=140 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=78 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:16:32:36
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:16:32:37
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:16:33:32
- piece handle=1dujoct4_1_1 tag=10T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:56
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-18:16:33:32
- piece handle=1eujoct4_1_1 tag=10T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:55
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- including current SPFILE in backup set
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:16:33:32
- including current control file in backup set
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:16:33:32
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:16:33:57
- piece handle=1fujocus_1_1 tag=10T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-18:16:33:57
- piece handle=1gujocus_1_1 tag=10T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
- Finished backup at 2019-12-18:16:33:57
复制代码
------
- RMAN> backup tag '11T_WHOLE_FULL' filesperset 1 database ;
- Starting backup at 2019-12-18:16:49:40
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:16:49:42
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:16:49:42
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-18:16:50:27
- piece handle=1iujodt6_1_1 tag=11T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:45
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:16:50:27
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:16:50:42
- piece handle=1hujodt6_1_1 tag=11T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:01
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- including current control file in backup set
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:16:50:44
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-18:16:50:44
- piece handle=1jujoduj_1_1 tag=11T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:17
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:16:50:44
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-18:16:51:09
- piece handle=1lujodv4_1_1 tag=11T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- including current SPFILE in backup set
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:16:51:10
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:16:51:17
- piece handle=1kujodv3_1_1 tag=11T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:33
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-18:16:51:35
- piece handle=1mujodvu_1_1 tag=11T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
- Finished backup at 2019-12-18:16:51:35
复制代码
------最佳:
- RMAN> run {
- 2> allocate channel c1 device type sbt maxopenfiles 3;
- 3> allocate channel c2 device type sbt maxopenfiles 3;
- 4> backup tag '12T_WHOLE_FULL' (datafile 1 channel c1 ) (datafile 2,3,4 channel c2);
- 5> release channel c1;
- 6> release channel c2;
- 7> }
- released channel: ORA_SBT_TAPE_1
- released channel: ORA_SBT_TAPE_2
- allocated channel: c1
- channel c1: SID=140 device type=SBT_TAPE
- channel c1: Oracle Secure Backup
- allocated channel: c2
- channel c2: SID=78 device type=SBT_TAPE
- channel c2: Oracle Secure Backup
- Starting backup at 2019-12-18:16:59:14
- channel c1: starting full datafile backup set
- channel c1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- channel c1: starting piece 1 at 2019-12-18:16:59:15
- channel c2: starting full datafile backup set
- channel c2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel c2: starting piece 1 at 2019-12-18:16:59:16
复制代码 -------------------------------- RMAN> backup tag '13T_USERS_FULL' tablespace users;
- Starting backup at 2019-12-18:17:02:28
- using target database control file instead of recovery catalog
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=195 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=68 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:17:02:39
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:17:03:04
- piece handle=1qujoelf_1_1 tag=13T_USERS_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
- Finished backup at 2019-12-18:17:03:04
复制代码 -----
- <blockquote>RMAN> backup tag '14T_USERS_FULL' duration 00:05 minimize load tablespace users;
复制代码
-----开片方法:- RMAN> run {
- 2> allocate channel c1 device type sbt maxpiecesize 100M;
- 3> backup tag '15T_SYSTEM_FULL' tablespace system ;
- 4> }
- allocated channel: c1
- channel c1: SID=20 device type=SBT_TAPE
- channel c1: Oracle Secure Backup
- Starting backup at 2019-12-18:17:12:37
- channel c1: starting full datafile backup set
- channel c1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- channel c1: starting piece 1 at 2019-12-18:17:12:38
- channel c1: finished piece 1 at 2019-12-18:17:13:13
- piece handle=1sujof86_1_1 tag=15T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel c1: starting piece 2 at 2019-12-18:17:13:13
- channel c1: finished piece 2 at 2019-12-18:17:13:38
- piece handle=1sujof86_2_1 tag=15T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel c1: starting piece 3 at 2019-12-18:17:13:38
- channel c1: finished piece 3 at 2019-12-18:17:14:03
- piece handle=1sujof86_3_1 tag=15T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel c1: starting piece 4 at 2019-12-18:17:14:03
- channel c1: finished piece 4 at 2019-12-18:17:14:38
- piece handle=1sujof86_4_1 tag=15T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel c1: starting piece 5 at 2019-12-18:17:14:38
- channel c1: finished piece 5 at 2019-12-18:17:15:13
- piece handle=1sujof86_5_1 tag=15T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel c1: starting piece 6 at 2019-12-18:17:15:13
- channel c1: finished piece 6 at 2019-12-18:17:15:58
- piece handle=1sujof86_6_1 tag=15T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel c1: starting piece 7 at 2019-12-18:17:15:58
- channel c1: finished piece 7 at 2019-12-18:17:16:23
- piece handle=1sujof86_7_1 tag=15T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel c1: backup set complete, elapsed time: 00:03:45
- channel c1: starting full datafile backup set
- channel c1: specifying datafile(s) in backup set
- including current control file in backup set
- including current SPFILE in backup set
- channel c1: starting piece 1 at 2019-12-18:17:16:24
- channel c1: finished piece 1 at 2019-12-18:17:16:49
- piece handle=1tujoff7_1_1 tag=15T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel c1: backup set complete, elapsed time: 00:00:25
- Finished backup at 2019-12-18:17:16:49
- released channel: c1
- RMAN>
复制代码- [oracle@station76 ~]$ rman target /
- Recovery Manager: Release 11.2.0.4.0 - Production on Wed Dec 18 17:22:42 2019
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1554722616)
- RMAN> backup tag '16T_SYSTEM_FULL' section size 100M tablespace system;
- Starting backup at 2019-12-18:17:22:49
- using target database control file instead of recovery catalog
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=143 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=20 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- backing up blocks 1 through 12800
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:17:23:03
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- including current control file in backup set
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:17:23:04
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:17:23:29
- piece handle=1uujofrn_1_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:26
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- backing up blocks 12801 through 25600
- channel ORA_SBT_TAPE_1: starting piece 2 at 2019-12-18:17:23:30
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-18:17:23:30
- piece handle=1vujofrn_1_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:26
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- backing up blocks 25601 through 38400
- channel ORA_SBT_TAPE_2: starting piece 3 at 2019-12-18:17:23:30
- channel ORA_SBT_TAPE_1: finished piece 2 at 2019-12-18:17:23:55
- piece handle=1uujofrn_2_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- backing up blocks 38401 through 51200
- channel ORA_SBT_TAPE_1: starting piece 4 at 2019-12-18:17:23:56
- channel ORA_SBT_TAPE_2: finished piece 3 at 2019-12-18:17:23:57
- piece handle=1uujofrn_3_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:27
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- backing up blocks 51201 through 64000
- channel ORA_SBT_TAPE_2: starting piece 5 at 2019-12-18:17:23:57
- channel ORA_SBT_TAPE_1: finished piece 4 at 2019-12-18:17:24:32
- piece handle=1uujofrn_4_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:36
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- backing up blocks 64001 through 76800
- channel ORA_SBT_TAPE_1: starting piece 6 at 2019-12-18:17:24:33
- channel ORA_SBT_TAPE_2: finished piece 5 at 2019-12-18:17:24:33
- piece handle=1uujofrn_5_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:36
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- backing up blocks 76801 through 89600
- channel ORA_SBT_TAPE_2: starting piece 7 at 2019-12-18:17:24:33
- channel ORA_SBT_TAPE_1: finished piece 6 at 2019-12-18:17:25:08
- piece handle=1uujofrn_6_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- backing up blocks 89601 through 96000
- channel ORA_SBT_TAPE_1: starting piece 8 at 2019-12-18:17:25:08
- channel ORA_SBT_TAPE_2: finished piece 7 at 2019-12-18:17:25:08
- piece handle=1uujofrn_7_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:36
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- including current SPFILE in backup set
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:17:25:09
- channel ORA_SBT_TAPE_1: finished piece 8 at 2019-12-18:17:25:34
- piece handle=1uujofrn_8_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:26
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-18:17:25:34
- piece handle=27ujofvl_1_1 tag=16T_SYSTEM_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
- Finished backup at 2019-12-18:17:25:34
- RMAN>
复制代码
主密钥默认路径:- select * from v$encryption_wallet;
复制代码 | WRL_TYPE | WRL_PARAMETER | STATUS | 1 | file | /u01/app/oracle/wallet/orcl/ | CLOSED |
建目录。
--------
(如果之前有创建过TDE,先删除之前所有的加密表,然后再:truncate table enc$;)
- SQL> alter system set encryption key authenticated by "oracleisgreate1";
- System altered.
- SQL>
复制代码
- SQL> alter system set encryption wallet open identified by "oracleisgreate1";
- System altered.
- SQL>
复制代码- SQL> conn hr/oracle_4U
- Connected.
- SQL> create table t05304( a number encrypt ) ;
- Table created.
- SQL> create table t05304_b ( a number encrypt using 'AES256') ;
- Table created.
- SQL> insert into t05304 values (1) ;
- 1 row created.
- SQL> commit;
- Commit complete.
- SQL> insert into t05304_b values (2) ;
- 1 row created.
- SQL> commit;
- Commit complete.
- SQL>
复制代码- select * from dba_encrypted_columns;
复制代码 | OWNER | TABLE_NAME | COLUMN_NAME | ENCRYPTION_ALG | SALT | INTEGRITY_ALG | 1 | HR | T05304 | A | AES 192 bits key | YES | SHA-1 | 2 | HR | T05304_B | A | AES 256 bits key | YES | SHA-1 |
同一张表,只有一个密钥:
- SQL> alter table t05304_b add ( b varchar2(10) encrypt using 'AES192') ;
- alter table t05304_b add ( b varchar2(10) encrypt using 'AES192')
- *
- ERROR at line 1:
- ORA-28340: a different encryption algorithm has been chosen for the table
- SQL> alter table t05304_b add ( b varchar2(10) encrypt);
- Table altered.
- SQL>
复制代码 测试:关闭主密钥:- SQL> alter system set encryption wallet close identified by "oracleisgreat1";
复制代码
改主密钥密码的时候用OWM:
|
|