|
上完1Z0-063多租户部分第6章
1Z0-063多租户部分共9章(上完6章)
总共上完全部49章中的46章
不管是对象权限还是系统权限都不分通用还是本地:
- select * from system_privilege_map order by 1;
- select * from table_privilege_map order by 1;
复制代码 在根容器上的非SYS用户,看别的容器里的信息:
- select * from cdb_sys_privs sp
- where sp.GRANTEE in('C##_USER','LOCAL_USER_PDB2')
- order by con_id;
-
- ---
- grant create table , unlimited tablespace to c##_user
- container=all;
-
- select * from cdb_sys_privs sp
- where sp.GRANTEE in('C##_USER')
- order by con_id,2;
- ----
- grant create sequence to c##_user container=current;
- ---
- select * from cdb_sys_privs sp
- where sp.GRANTEE in('C##_USER')
- order by con_id,2;
-
- ----
-
- SELECT USERNAME, DEFAULT_ATTR, OWNER, OBJECT_NAME,
- ALL_CONTAINERS, CONTAINER_NAME, CON_ID
- FROM CDB_CONTAINER_DATA
- WHERE username NOT IN
- ('GSMADMIN_INTERNAL', 'APPQOSSYS', 'DBSNMP')
- ORDER BY OBJECT_NAME;
- ------
- CREATE USER c##jfv IDENTIFIED BY oracle_4U;
- GRANT CREATE SESSION, SET CONTAINER TO c##jfv
- CONTAINER=ALL;
- ----------
- select *
- from cdb_sys_privs where grantee='C##JFV'
- order by con_id;
- -----
- grant select on sys.v_$session to c##jfv ;
- select *
- from cdb_tab_privs where grantee='C##JFV'
- order by con_id;
-
- revoke select on sys.v_$session from c##jfv ;
-
- grant select on sys.v_$session to c##jfv container=all ;
-
- select *
- from cdb_tab_privs where grantee='C##JFV'
- order by con_id;
- -------------------------
-
- SELECT username, con_id FROM v_$session
- WHERE username IS NOT NULL AND username <> 'DBSNMP';
- -------------------------
- alter user c##jfv
- set container_data=(cdb$root,pdb1_1,pdb2_2)
- for v_$session
- container=current;
- ---------------------
- SELECT USERNAME, DEFAULT_ATTR, OWNER, OBJECT_NAME,
- ALL_CONTAINERS, CONTAINER_NAME, CON_ID
- FROM CDB_CONTAINER_DATA
- WHERE username NOT IN
- ('GSMADMIN_INTERNAL', 'APPQOSSYS', 'DBSNMP')
- ORDER BY OBJECT_NAME;
复制代码
回收空间,准备下面的实验(与CDB/PDB内容无关):
- SQL> drop diskgroup fra including contents;
- Diskgroup dropped.
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Automatic Storage Management option
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Thu Aug 10 20:28:54 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> desc v$asm_disk;
- Name Null? Type
- ----------------------------------------- -------- ----------------------------
- GROUP_NUMBER NUMBER
- DISK_NUMBER NUMBER
- COMPOUND_INDEX NUMBER
- INCARNATION NUMBER
- MOUNT_STATUS VARCHAR2(7)
- HEADER_STATUS VARCHAR2(12)
- MODE_STATUS VARCHAR2(7)
- STATE VARCHAR2(8)
- REDUNDANCY VARCHAR2(7)
- LIBRARY VARCHAR2(64)
- OS_MB NUMBER
- TOTAL_MB NUMBER
- FREE_MB NUMBER
- HOT_USED_MB NUMBER
- COLD_USED_MB NUMBER
- NAME VARCHAR2(30)
- FAILGROUP VARCHAR2(30)
- LABEL VARCHAR2(31)
- PATH VARCHAR2(256)
- UDID VARCHAR2(64)
- PRODUCT VARCHAR2(32)
- CREATE_DATE DATE
- MOUNT_DATE DATE
- REPAIR_TIMER NUMBER
- READS NUMBER
- WRITES NUMBER
- READ_ERRS NUMBER
- WRITE_ERRS NUMBER
- READ_TIMEOUT NUMBER
- WRITE_TIMEOUT NUMBER
- READ_TIME NUMBER
- WRITE_TIME NUMBER
- BYTES_READ NUMBER
- BYTES_WRITTEN NUMBER
- PREFERRED_READ VARCHAR2(1)
- HASH_VALUE NUMBER
- HOT_READS NUMBER
- HOT_WRITES NUMBER
- HOT_BYTES_READ NUMBER
- HOT_BYTES_WRITTEN NUMBER
- COLD_READS NUMBER
- COLD_WRITES NUMBER
- COLD_BYTES_READ NUMBER
- COLD_BYTES_WRITTEN NUMBER
- VOTING_FILE VARCHAR2(1)
- SECTOR_SIZE NUMBER
- FAILGROUP_TYPE VARCHAR2(7)
- CON_ID NUMBER
- SQL> select GROUP_NUMBER , group_name from v$asm_diskgroup;
- select GROUP_NUMBER , group_name from v$asm_diskgroup
- *
- ERROR at line 1:
- ORA-00904: "GROUP_NAME": invalid identifier
- SQL> desc v$asm_diskgroup
- Name Null? Type
- ----------------------------------------- -------- ----------------------------
- GROUP_NUMBER NUMBER
- NAME VARCHAR2(30)
- SECTOR_SIZE NUMBER
- BLOCK_SIZE NUMBER
- ALLOCATION_UNIT_SIZE NUMBER
- STATE VARCHAR2(11)
- TYPE VARCHAR2(6)
- TOTAL_MB NUMBER
- FREE_MB NUMBER
- HOT_USED_MB NUMBER
- COLD_USED_MB NUMBER
- REQUIRED_MIRROR_FREE_MB NUMBER
- USABLE_FILE_MB NUMBER
- OFFLINE_DISKS NUMBER
- COMPATIBILITY VARCHAR2(60)
- DATABASE_COMPATIBILITY VARCHAR2(60)
- VOTING_FILES VARCHAR2(1)
- CON_ID NUMBER
- SQL> select GROUP_NUMBER , name from v$asm_diskgroup;
- GROUP_NUMBER
- ------------
- NAME
- --------------------------------------------------------------------------------
- 1
- DATA
- SQL> select parth from v$asm_disk where group_number <> 1 ;
- select parth from v$asm_disk where group_number <> 1
- *
- ERROR at line 1:
- ORA-00904: "PARTH": invalid identifier
- SQL> select path from v$asm_disk where group_number <> 1 ;
- PATH
- --------------------------------------------------------------------------------
- ORCL:ASMDISK05
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Automatic Storage Management option
- [oracle@station26 ~]$ exit
- logout
- [root@station26 oracle]# oracleasm-discover
- Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
- [ASM Library - Generic Linux, version 2.0.4 (KABI_V2)]
- Discovered disk: ORCL:ASMDISK01 [14336000 blocks (7340032000 bytes), maxio 512]
- Discovered disk: ORCL:ASMDISK02 [14336000 blocks (7340032000 bytes), maxio 512]
- Discovered disk: ORCL:ASMDISK03 [14336000 blocks (7340032000 bytes), maxio 512]
- Discovered disk: ORCL:ASMDISK04 [14336000 blocks (7340032000 bytes), maxio 512]
- Discovered disk: ORCL:ASMDISK05 [20480000 blocks (10485760000 bytes), maxio 512]
- [root@station26 oracle]# oracleasm -h
- Usage: oracleasm [--exec-path=<exec_path>] <command> [ <args> ]
- oracleasm --exec-path
- oracleasm -h
- oracleasm -V
- The basic oracleasm commands are:
- configure Configure the Oracle Linux ASMLib driver
- init Load and initialize the ASMLib driver
- exit Stop the ASMLib driver
- scandisks Scan the system for Oracle ASMLib disks
- status Display the status of the Oracle ASMLib driver
- listdisks List known Oracle ASMLib disks
- querydisk Determine if a disk belongs to Oracle ASMlib
- createdisk Allocate a device for Oracle ASMLib use
- deletedisk Return a device to the operating system
- renamedisk Change the label of an Oracle ASMlib disk
- update-driver Download the latest ASMLib driver
- [root@station26 oracle]# oracleasm listdisks
- ASMDISK01
- ASMDISK02
- ASMDISK03
- ASMDISK04
- ASMDISK05
- [root@station26 oracle]# oracleasm deletedisk ASMDISK05
- Clearing disk header: done
- Dropping disk: done
- [root@station26 oracle]# cd /dev/oracleasm/disks/
- [root@station26 disks]# ls
- ASMDISK01 ASMDISK02 ASMDISK03 ASMDISK04
- [root@station26 disks]# ls -l
- 总用量 0
- brw-rw----. 1 oracle asmadmin 250, 5 8月 8 11:48 ASMDISK01
- brw-rw----. 1 oracle asmadmin 250, 6 8月 8 11:48 ASMDISK02
- brw-rw----. 1 oracle asmadmin 250, 7 8月 8 11:48 ASMDISK03
- brw-rw----. 1 oracle asmadmin 250, 8 8月 8 11:48 ASMDISK04
- [root@station26 disks]# fdisk -l
- Disk /dev/ram0: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram1: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram2: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram3: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram4: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram5: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram6: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram7: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram8: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram9: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram10: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram11: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram12: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram13: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram14: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram15: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/vda: 96.6 GB, 96636764160 bytes
- 16 heads, 63 sectors/track, 187245 cylinders
- Units = cylinders of 1008 * 512 = 516096 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x000e4c21
- Device Boot Start End Blocks Id System
- /dev/vda1 * 3 612 307200 83 Linux
- Partition 1 does not end on cylinder boundary.
- /dev/vda2 612 93666 46899200 8e Linux LVM
- Partition 2 does not end on cylinder boundary.
- /dev/vda3 93666 113983 10240000 8e Linux LVM
- Partition 3 does not end on cylinder boundary.
- /dev/vda4 113983 187246 36924416 5 Extended
- Partition 4 does not end on cylinder boundary.
- /dev/vda5 113988 128210 7168000 8e Linux LVM
- /dev/vda6 128212 142434 7168000 8e Linux LVM
- /dev/vda7 142436 156658 7168000 8e Linux LVM
- /dev/vda8 156660 170883 7168000 8e Linux LVM
- /dev/vda9 170885 179207 4194304 82 Linux swap / Solaris
- Disk /dev/mapper/RAC12crhel6-root: 47.9 GB, 47949283328 bytes
- 255 heads, 63 sectors/track, 5829 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00000000
- [root@station26 disks]# fdisk -l
- Disk /dev/ram0: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram1: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram2: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram3: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram4: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram5: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram6: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram7: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram8: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram9: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram10: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram11: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram12: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram13: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram14: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/ram15: 16 MB, 16777216 bytes
- 255 heads, 63 sectors/track, 2 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk identifier: 0x00000000
- Disk /dev/vda: 96.6 GB, 96636764160 bytes
- 16 heads, 63 sectors/track, 187245 cylinders
- Units = cylinders of 1008 * 512 = 516096 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x000e4c21
- Device Boot Start End Blocks Id System
- /dev/vda1 * 3 612 307200 83 Linux
- Partition 1 does not end on cylinder boundary.
- /dev/vda2 612 93666 46899200 8e Linux LVM
- Partition 2 does not end on cylinder boundary.
- /dev/vda3 93666 113983 10240000 8e Linux LVM
- Partition 3 does not end on cylinder boundary.
- /dev/vda4 113983 187246 36924416 5 Extended
- Partition 4 does not end on cylinder boundary.
- /dev/vda5 113988 128210 7168000 8e Linux LVM
- /dev/vda6 128212 142434 7168000 8e Linux LVM
- /dev/vda7 142436 156658 7168000 8e Linux LVM
- /dev/vda8 156660 170883 7168000 8e Linux LVM
- /dev/vda9 170885 179207 4194304 82 Linux swap / Solaris
- Disk /dev/mapper/RAC12crhel6-root: 47.9 GB, 47949283328 bytes
- 255 heads, 63 sectors/track, 5829 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00000000
- [root@station26 disks]# su - oracle
- [oracle@station26 ~]$ exit
- logout
- [root@station26 disks]# ls -l
- 总用量 0
- brw-rw----. 1 oracle asmadmin 250, 5 8月 8 11:48 ASMDISK01
- brw-rw----. 1 oracle asmadmin 250, 6 8月 8 11:48 ASMDISK02
- brw-rw----. 1 oracle asmadmin 250, 7 8月 8 11:48 ASMDISK03
- brw-rw----. 1 oracle asmadmin 250, 8 8月 8 11:48 ASMDISK04
- [root@station26 disks]# ls -l /dev/vda8
- brw-rw----. 1 root disk 250, 8 8月 8 11:48 /dev/vda8
- [root@station26 disks]# ls -l /dev/vda*
- brw-rw----. 1 root disk 250, 0 8月 8 11:48 /dev/vda
- brw-rw----. 1 root disk 250, 1 8月 8 11:48 /dev/vda1
- brw-rw----. 1 root disk 250, 2 8月 8 11:48 /dev/vda2
- brw-rw----. 1 root disk 250, 3 8月 8 11:48 /dev/vda3
- brw-rw----. 1 root disk 250, 4 8月 8 11:48 /dev/vda4
- brw-rw----. 1 root disk 250, 5 8月 8 11:48 /dev/vda5
- brw-rw----. 1 root disk 250, 6 8月 8 11:48 /dev/vda6
- brw-rw----. 1 root disk 250, 7 8月 8 11:48 /dev/vda7
- brw-rw----. 1 root disk 250, 8 8月 8 11:48 /dev/vda8
- brw-rw----. 1 root disk 250, 9 8月 8 11:48 /dev/vda9
- [root@station26 disks]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/RAC12crhel6-root
- 44G 41G 1.5G 97% /
- tmpfs 9.5G 2.0G 7.6G 21% /dev/shm
- /dev/vda1 283M 114M 150M 44% /boot
- [root@station26 disks]# pvs
- PV VG Fmt Attr PSize PFree
- /dev/vda2 RAC12crhel6 lvm2 a--u 44.72g 64.00m
- [root@station26 disks]# pvcreate /dev/vda3
- Physical volume "/dev/vda3" successfully created
- [root@station26 disks]# vgs
- VG #PV #LV #SN Attr VSize VFree
- RAC12crhel6 1 1 0 wz--n- 44.72g 64.00m
- [root@station26 disks]# vgextend RAC12crhel6 /dev/vda3
- Volume group "RAC12crhel6" successfully extended
- [root@station26 disks]# vgdisplay
- --- Volume group ---
- VG Name RAC12crhel6
- System ID
- Format lvm2
- Metadata Areas 2
- Metadata Sequence No 3
- VG Access read/write
- VG Status resizable
- MAX LV 0
- Cur LV 1
- Open LV 1
- Max PV 0
- Cur PV 2
- Act PV 2
- VG Size 54.47 GiB
- PE Size 32.00 MiB
- Total PE 1743
- Alloc PE / Size 1429 / 44.66 GiB
- Free PE / Size 314 / 9.81 GiB
- VG UUID qH5HhK-rJL0-j7ar-1Xhz-CN0x-nMVU-1j9MAk
-
- [root@station26 disks]# lvextend -l +314 /dev/RAC12crhel6/root
- Size of logical volume RAC12crhel6/root changed from 44.66 GiB (1429 extents) to 54.47 GiB (1743 extents).
- Logical volume root successfully resized.
- [root@station26 disks]# resize2fs /dev/RAC12crhel6/root
- resize2fs 1.43-WIP (20-Jun-2013)
- Filesystem at /dev/RAC12crhel6/root is mounted on /; on-line resizing required
- old_desc_blocks = 3, new_desc_blocks = 4
- The filesystem on /dev/RAC12crhel6/root is now 14278656 blocks long.
- [root@station26 disks]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/RAC12crhel6-root
- 54G 41G 11G 79% /
- tmpfs 9.5G 2.0G 7.6G 21% /dev/shm
- /dev/vda1 283M 114M 150M 44% /boot
- [root@station26 disks]#
复制代码 CDB和PDB的备份和恢复:
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Thu Aug 10 20:50:29 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> archive log list
- Database log mode No Archive Mode
- Automatic archival Disabled
- Archive destination USE_DB_RECOVERY_FILE_DEST
- Oldest online log sequence 143
- Current log sequence 145
- SQL> shutdown immediate
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL> startup mount
- ORACLE instance started.
- Total System Global Area 4060086272 bytes
- Fixed Size 3718384 bytes
- Variable Size 956302096 bytes
- Database Buffers 3087007744 bytes
- Redo Buffers 13058048 bytes
- Database mounted.
- SQL> alter database archivelog;
- Database altered.
- SQL> alter database open
- 2 ;
- Database altered.
- SQL> alter system switch logfile;
- System altered.
- SQL> /
- System altered.
- SQL> set linesize 1000
- SQL> select name from v$datafile;
- NAME
- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- /u01/app/oracle/oradata/cdb2/system01.dbf
- /u01/app/oracle/oradata/cdb2/sysaux01.dbf
- /u01/app/oracle/oradata/cdb2/undotbs01.dbf
- /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
- /u01/app/oracle/oradata/cdb2/users01.dbf
- /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
- /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_system_dqqy6v0z_.dbf
- /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_sysaux_dqqy6v12_.dbf
- /u01/app/oracle/oradata/cdb2/cdata_01.dbf
- NAME
- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- 12 rows selected.
- SQL> shutdown immediate
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
- [oracle@station26 ~]$ cd /u01/app/oracle/
- [oracle@station26 oracle]$ ls
- admin audit cfgtoollogs checkpoints crsdata diag fast_recovery_area log oradata product station26
- [oracle@station26 oracle]$ cd oradata/
- [oracle@station26 oradata]$ ls
- cdb2 orcl ORCL
- [oracle@station26 oradata]$ tar zcvf /home/oracle/Safe_Database_Files/cdb2/cdb2-under-u01_app_oracle_oradata.tgz cdb2
- cdb2/
- cdb2/sysaux01.dbf
- cdb2/redo02.log
- cdb2/pdbseed/
- cdb2/pdbseed/sysaux01.dbf
- cdb2/pdbseed/system01.dbf
- cdb2/pdbseed/pdbseed_temp012017-07-27_09-39-39-PM.dbf
- cdb2/cdata_01.dbf
- cdb2/pdb2_2/
- cdb2/pdb2_2/CDB2/
- cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/
- cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/
- cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_system_dqqy6v0z_.dbf
- cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_temp_dqqy6v13_.dbf
- cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_sysaux_dqqy6v12_.dbf
- cdb2/users01.dbf
- cdb2/control01.ctl
- cdb2/pdb2_1/
- cdb2/pdb2_1/sysaux01.dbf
- cdb2/pdb2_1/temppdb2_01.dbf
- cdb2/pdb2_1/ldata_01.dbf
- cdb2/pdb2_1/my_temp_pdb2_01.dbf
- cdb2/pdb2_1/system01.dbf
- cdb2/pdb2_1/pdbseed_temp012017-07-27_09-39-39-PM.dbf
- cdb2/redo03.log
- cdb2/temproot_01.dbf
- cdb2/temp01.dbf
- cdb2/undotbs01.dbf
- cdb2/system01.dbf
- cdb2/redo01.log
- [oracle@station26 oradata]$ cd
- [oracle@station26 ~]$ ls
- afiedt.buf ccb.ctl.ori demo.zip gl.sql myfile Public update2_t04209_uname.sql
- ap.sql ccb.dis Desktop icbc.ctl oradiag_oracle RMasmcmd.sh update_t04209_uname.sql
- bank.sql ccb.log dir1 icbc.dat orcl2.xml Safe_Database_Files Videos
- ccb.bad ccb.sql dir2 icbc.dis parfile.ora select2_t04209_uname.sql
- ccb.ctl create_t04209_uname.sql Documents icbc.log pdb1_1.xml select_t04209_uname.sql
- ccb.CTL demo Downloads Music Pictures Templates
- [oracle@station26 ~]$ vim .bash_profile
- [oracle@station26 ~]$ . .bash_profile
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Thu Aug 10 21:01:54 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected to an idle instance.
- SQL> startup
- ORACLE instance started.
- Total System Global Area 4060086272 bytes
- Fixed Size 3718384 bytes
- Variable Size 956302096 bytes
- Database Buffers 3087007744 bytes
- Redo Buffers 13058048 bytes
- Database mounted.
- Database opened.
- SQL> select con_id , name , open_mode from v$pdbs;
- CON_ID NAME OPEN_MODE
- ---------- ------------------------------ ----------
- 2 PDB$SEED READ ONLY
- 3 PDB2 READ WRITE
- 4 PDB2_2 READ WRITE
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
- [oracle@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Thu Aug 10 21:04:15 2017
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=697524940)
- RMAN> backup tag 'lab7-2' database including current controlfile plus archivelog delete all input ;
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-00558: error encountered while parsing input commands
- RMAN-01009: syntax error: found "including": expecting one of: "archivelog, auxiliary, backuppiece, backupset, backup, channel, controlfilecopy, copy, current, database, database root, datafilecopy, datafile, datapump, db_recovery_file_dest, delete, diskratio, filesperset, force, format, from, include, keep, maxsetsize, noexclude, nokeep, not, plus, pluggable, pool, recovery, reuse, root, section, skip readonly, skip, spfile, tablespace, tag, to, double-quoted-string, identifier, single-quoted-string, (, ;"
- RMAN-01007: at line 1 column 30 file: standard input
- RMAN> backup tag 'lab7-2' database include current controlfile plus archivelog delete all input ;
- Starting backup at 10-08-2017 09:05:26
- current log archived
- using target database control file instead of recovery catalog
- configuration for SBT_TAPE channel 2 is ignored
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=368 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting archived log backup set
- channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
- input archived log thread=1 sequence=145 RECID=1 STAMP=951684762
- input archived log thread=1 sequence=146 RECID=2 STAMP=951684763
- input archived log thread=1 sequence=147 RECID=3 STAMP=951685527
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:05:28
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:05:53
- piece handle=01sbj4co_1_1 tag=LAB7-2 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
- ^C
- user interrupt received
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of backup plus archivelog command at 08/10/2017 21:05:54
- ORA-01013: user requested cancel of current operation
- RMAN> ^C
- user interrupt received
- ^C
- user interrupt received
- ^C
- user interrupt received
- RMAN>
- RMAN>
- RMAN>
- RMAN> show all;
- RMAN configuration parameters for database with db_unique_name CDB2 are:
- CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
- CONFIGURE BACKUP OPTIMIZATION ON;
- CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
- CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
- CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station26)';
- CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station26)';
- 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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
- CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
- CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_cdb2.f'; # default
- RMAN> CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- new RMAN configuration parameters:
- CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- new RMAN configuration parameters are successfully stored
- PSDRPC returns significant error 1013.
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of configure command at 08/10/2017 21:06:17
- ORA-01013: user requested cancel of current operation
- RMAN> show all;
- RMAN configuration parameters for database with db_unique_name CDB2 are:
- CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
- CONFIGURE BACKUP OPTIMIZATION ON;
- CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
- CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
- CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station26)';
- CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station26)';
- 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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
- CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
- CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_cdb2.f'; # default
- RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
- old RMAN configuration parameters:
- CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- new RMAN configuration parameters:
- CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
- new RMAN configuration parameters are successfully stored
- released channel: ORA_SBT_TAPE_1
- RMAN> exit
- Recovery Manager complete.
- [oracle@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Thu Aug 10 21:07:03 2017
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=697524940)
- RMAN> backup tag 'lab7-2' database include current controlfile plus archivelog delete all input ;
- Starting backup at 10-08-2017 09:07:06
- current log archived
- using target database control file instead of recovery catalog
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=368 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=128 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- skipping archived logs of thread 1 from sequence 145 to 147; already backed up
- channel ORA_SBT_TAPE_1: starting archived log backup set
- channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
- input archived log thread=1 sequence=148 RECID=4 STAMP=951685626
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:07:08
- channel ORA_SBT_TAPE_2: deleting archived log(s)
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_08_10/o1_mf_1_145_drrort3o_.arc RECID=1 STAMP=951684762
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_08_10/o1_mf_1_146_drrorvt4_.arc RECID=2 STAMP=951684763
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_08_10/o1_mf_1_147_drrpjpwz_.arc RECID=3 STAMP=951685527
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:07:34
- piece handle=02sbj4fs_1_1 tag=LAB7-2 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: deleting archived log(s)
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_08_10/o1_mf_1_148_drrpmt9t_.arc RECID=4 STAMP=951685626
- Finished backup at 10-08-2017 09:07:34
- Starting backup at 10-08-2017 09:07:34
- 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=00003 name=/u01/app/oracle/oradata/cdb2/sysaux01.dbf
- input datafile file number=00004 name=/u01/app/oracle/oradata/cdb2/undotbs01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:07:35
- 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=/u01/app/oracle/oradata/cdb2/system01.dbf
- input datafile file number=00028 name=/u01/app/oracle/oradata/cdb2/cdata_01.dbf
- input datafile file number=00006 name=/u01/app/oracle/oradata/cdb2/users01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 10-08-2017 09:07:35
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:08:10
- piece handle=03sbj4gn_1_1 tag=LAB7-2 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=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:08:10
- channel ORA_SBT_TAPE_2: finished piece 1 at 10-08-2017 09:08:10
- piece handle=04sbj4gn_1_1 tag=LAB7-2 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:35
- 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=00015 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_sysaux_dqqy6v12_.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 10-08-2017 09:08:10
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:08:35
- piece handle=05sbj4hq_1_1 tag=LAB7-2 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=00007 name=/u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:08:35
- channel ORA_SBT_TAPE_2: finished piece 1 at 10-08-2017 09:08:42
- piece handle=06sbj4hq_1_1 tag=LAB7-2 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:32
- 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=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- input datafile file number=00029 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 10-08-2017 09:08:43
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:09:08
- piece handle=07sbj4ij_1_1 tag=LAB7-2 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_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00014 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_system_dqqy6v0z_.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:09:08
- channel ORA_SBT_TAPE_2: finished piece 1 at 10-08-2017 09:09:11
- piece handle=08sbj4ir_1_1 tag=LAB7-2 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:28
- 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=00005 name=/u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 10-08-2017 09:09:11
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:09:46
- piece handle=09sbj4jk_1_1 tag=LAB7-2 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:38
- 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 10-08-2017 09:09:48
- channel ORA_SBT_TAPE_2: finished piece 1 at 10-08-2017 09:09:55
- piece handle=0asbj4jn_1_1 tag=LAB7-2 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:44
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:10:03
- piece handle=0bsbj4kr_1_1 tag=LAB7-2 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:15
- Finished backup at 10-08-2017 09:10:03
- Starting backup at 10-08-2017 09:10:03
- current log archived
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting archived log backup set
- channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
- input archived log thread=1 sequence=149 RECID=5 STAMP=951685803
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:10:03
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:10:28
- piece handle=0csbj4lb_1_1 tag=LAB7-2 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: deleting archived log(s)
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_08_10/o1_mf_1_149_drrpscdv_.arc RECID=5 STAMP=951685803
- Finished backup at 10-08-2017 09:10:28
- Starting Control File and SPFILE Autobackup at 10-08-2017 09:10:29
- piece handle=c-697524940-20170810-00 comment=API Version 2.0,MMS Version 10.4.0.4
- Finished Control File and SPFILE Autobackup at 10-08-2017 09:11:04
- RMAN> list backup;
- List of Backup Sets
- ===================
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 1 11.25M SBT_TAPE 00:00:08 10-08-2017 09:05:36
- BP Key: 1 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 01sbj4co_1_1 Media: station26-000001
- List of Archived Logs in backup set 1
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 145 6682101 10-08-2017 07:00:45 6690728 10-08-2017 08:52:42
- 1 146 6690728 10-08-2017 08:52:42 6690849 10-08-2017 08:52:43
- 1 147 6690849 10-08-2017 08:52:43 6693450 10-08-2017 09:05:26
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 2 64.00K SBT_TAPE 00:00:16 10-08-2017 09:07:24
- BP Key: 2 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 02sbj4fs_1_1 Media: station26-000001
- List of Archived Logs in backup set 2
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 148 6693450 10-08-2017 09:05:26 6693546 10-08-2017 09:07:06
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 3 Full 802.06M SBT_TAPE 00:00:21 10-08-2017 09:07:56
- BP Key: 3 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 03sbj4gn_1_1 Media: station26-000001
- List of Datafiles in backup set 3
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 3 Full 6693580 10-08-2017 09:07:35 /u01/app/oracle/oradata/cdb2/sysaux01.dbf
- 4 Full 6693580 10-08-2017 09:07:35 /u01/app/oracle/oradata/cdb2/undotbs01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 4 Full 687.00M SBT_TAPE 00:00:23 10-08-2017 09:07:58
- BP Key: 4 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 04sbj4gn_1_1 Media: station26-000002
- List of Datafiles in backup set 4
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 1 Full 6693581 10-08-2017 09:07:35 /u01/app/oracle/oradata/cdb2/system01.dbf
- 6 Full 6693581 10-08-2017 09:07:35 /u01/app/oracle/oradata/cdb2/users01.dbf
- 28 Full 6693581 10-08-2017 09:07:35 /u01/app/oracle/oradata/cdb2/cdata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 5 Full 472.44M SBT_TAPE 00:00:15 10-08-2017 09:08:25
- BP Key: 5 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 05sbj4hq_1_1 Media: station26-000001
- List of Datafiles in backup set 5
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 11 Full 6693597 10-08-2017 09:08:10 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 6 Full 472.13M SBT_TAPE 00:00:24 10-08-2017 09:08:34
- BP Key: 6 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 06sbj4hq_1_1 Media: station26-000002
- List of Datafiles in backup set 6
- Container ID: 4, PDB Name: PDB2_2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 15 Full 6693598 10-08-2017 09:08:10 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_sysaux_dqqy6v12_.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 7 Full 455.88M SBT_TAPE 00:00:15 10-08-2017 09:08:50
- BP Key: 7 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 07sbj4ij_1_1 Media: station26-000001
- List of Datafiles in backup set 7
- Container ID: 2, PDB Name: PDB$SEED
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 7 Full 1748058 27-07-2017 09:53:17 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 8 Full 210.56M SBT_TAPE 00:00:19 10-08-2017 09:09:02
- BP Key: 8 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 08sbj4ir_1_1 Media: station26-000002
- List of Datafiles in backup set 8
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 Full 6693613 10-08-2017 09:08:43 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- 29 Full 6693613 10-08-2017 09:08:43 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 9 Full 209.56M SBT_TAPE 00:00:26 10-08-2017 09:09:34
- BP Key: 9 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 09sbj4jk_1_1 Media: station26-000001,station26-000003
- List of Datafiles in backup set 9
- Container ID: 4, PDB Name: PDB2_2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 14 Full 6693632 10-08-2017 09:09:08 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/556CA1053FA30662E0531A00A8C08765/datafile/o1_mf_system_dqqy6v0z_.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 10 Full 204.75M SBT_TAPE 00:00:35 10-08-2017 09:09:46
- BP Key: 10 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 0asbj4jn_1_1 Media: station26-000002,station26-000004
- List of Datafiles in backup set 10
- Container ID: 2, PDB Name: PDB$SEED
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 5 Full 1748058 27-07-2017 09:53:17 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 11 Full 17.19M SBT_TAPE 00:00:08 10-08-2017 09:09:55
- BP Key: 11 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 0bsbj4kr_1_1 Media: station26-000003
- Control File Included: Ckp SCN: 6693652 Ckp time: 10-08-2017 09:09:47
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 12 64.00K SBT_TAPE 00:00:16 10-08-2017 09:10:19
- BP Key: 12 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 0csbj4lb_1_1 Media: station26-000003
- List of Archived Logs in backup set 12
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 149 6693546 10-08-2017 09:07:06 6693680 10-08-2017 09:10:03
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 13 Full 17.25M SBT_TAPE 00:00:16 10-08-2017 09:10:45
- BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20170810T211029
- Handle: c-697524940-20170810-00 Media: station26-000003
- SPFILE Included: Modification time: 10-08-2017 09:03:02
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6693701 Ckp time: 10-08-2017 09:10:29
- RMAN> list copy;
- specification does not match any datafile copy in the repository
- specification does not match any control file copy in the repository
- specification does not match any archived log in the repository
- RMAN> exit
- Recovery Manager complete.
- [oracle@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Thu Aug 10 21:14:42 2017
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=697524940)
- RMAN> backup tag 'lab7-3' pluggable database pdb2 ;
- Starting backup at 10-08-2017 09:15:26
- using target database control file instead of recovery catalog
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=368 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=419 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=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:15:29
- 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=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- input datafile file number=00029 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 10-08-2017 09:15:29
- channel ORA_SBT_TAPE_2: finished piece 1 at 10-08-2017 09:16:05
- piece handle=0fsbj4vh_1_1 tag=LAB7-3 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_1: finished piece 1 at 10-08-2017 09:16:15
- piece handle=0esbj4vh_1_1 tag=LAB7-3 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:46
- Finished backup at 10-08-2017 09:16:15
- Starting Control File and SPFILE Autobackup at 10-08-2017 09:16:15
- piece handle=c-697524940-20170810-01 comment=API Version 2.0,MMS Version 10.4.0.4
- Finished Control File and SPFILE Autobackup at 10-08-2017 09:16:40
- RMAN> !df -h
- 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> exit
- Recovery Manager complete.
- [oracle@station26 ~]$ df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/RAC12crhel6-root
- 54G 43G 8.6G 84% /
- tmpfs 9.5G 2.0G 7.6G 21% /dev/shm
- /dev/vda1 283M 114M 150M 44% /boot
- [oracle@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Thu Aug 10 21:17:45 2017
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=697524940)
- RMAN> exit
- Recovery Manager complete.
- [oracle@station26 ~]$ . oraenv
- ORACLE_SID = [cdb2] ? +ASM
- The Oracle base remains unchanged with value /u01/app/oracle
- [oracle@station26 ~]$ asmcmd
- ASMCMD> ls
- DATA/
- ASMCMD> cd data
- ASMCMD> ls
- ASM/
- orapwasm
- ASMCMD> exit
- [oracle@station26 ~]$ . oraenv
- ORACLE_SID = [+ASM] ? cdb2
- The Oracle base remains unchanged with value /u01/app/oracle
- [oracle@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Thu Aug 10 21:18:21 2017
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=697524940)
- RMAN> run {
- 2> allocate channel c1 device type disk format '+DATA' ;
- 3> backup tablespace sysaux;
- 4> }
- using target database control file instead of recovery catalog
- allocated channel: c1
- channel c1: SID=182 device type=DISK
- Starting backup at 10-08-2017 09:18:53
- channel c1: starting full datafile backup set
- channel c1: specifying datafile(s) in backup set
- input datafile file number=00003 name=/u01/app/oracle/oradata/cdb2/sysaux01.dbf
- channel c1: starting piece 1 at 10-08-2017 09:18:53
- channel c1: finished piece 1 at 10-08-2017 09:19:28
- piece handle=+DATA/CDB2/BACKUPSET/2017_08_10/nnndf0_tag20170810t211853_0.276.951686337 tag=TAG20170810T211853 comment=NONE
- channel c1: backup set complete, elapsed time: 00:00:35
- Finished backup at 10-08-2017 09:19:28
- Starting Control File and SPFILE Autobackup at 10-08-2017 09:19:28
- piece handle=/u01/app/oracle/fast_recovery_area/CDB2/autobackup/2017_08_10/o1_mf_s_951686368_drrqc1ns_.bkp comment=NONE
- Finished Control File and SPFILE Autobackup at 10-08-2017 09:19:31
- released channel: c1
- RMAN> run {
- 2> allocate channel c1 device type disk format '+DATA' ;
- 3> backup tablespace pdb2:sysaux;
- 4> }
- allocated channel: c1
- channel c1: SID=182 device type=DISK
- Starting backup at 10-08-2017 09:19:56
- channel c1: starting full datafile backup set
- channel c1: specifying datafile(s) in backup set
- input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- channel c1: starting piece 1 at 10-08-2017 09:19:57
- channel c1: finished piece 1 at 10-08-2017 09:20:22
- piece handle=+DATA/CDB2/556CA1053FA20662E0531A00A8C08765/BACKUPSET/2017_08_10/nnndf0_tag20170810t211956_0.275.951686397 tag=TAG20170810T211956 comment=NONE
- channel c1: backup set complete, elapsed time: 00:00:25
- Finished backup at 10-08-2017 09:20:22
- Starting Control File and SPFILE Autobackup at 10-08-2017 09:20:22
- piece handle=/u01/app/oracle/fast_recovery_area/CDB2/autobackup/2017_08_10/o1_mf_s_951686422_drrqdq0o_.bkp comment=NONE
- Finished Control File and SPFILE Autobackup at 10-08-2017 09:20:25
- released channel: c1
- RMAN> backup tag 'lab7-3-ldata' tablespace pdb2:ldata ;
- Starting backup at 10-08-2017 09:20:45
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=182 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=421 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=00029 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 10-08-2017 09:20:46
- channel ORA_SBT_TAPE_1: finished piece 1 at 10-08-2017 09:21:11
- piece handle=0lsbj59e_1_1 tag=LAB7-3-LDATA 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 10-08-2017 09:21:11
- Starting Control File and SPFILE Autobackup at 10-08-2017 09:21:12
- piece handle=c-697524940-20170810-04 comment=API Version 2.0,MMS Version 10.4.0.4
- Finished Control File and SPFILE Autobackup at 10-08-2017 09:21:37
- RMAN> exit
- Recovery Manager complete.
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Thu Aug 10 21:25:12 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> select con_id, name , open_mode from v$pdbs;
- CON_ID NAME OPEN_MODE
- ---------- ------------------------------ ----------
- 2 PDB$SEED READ ONLY
- 3 PDB2 READ WRITE
- 4 PDB2_2 READ WRITE
- SQL> select con_id, name , open_mode from v$pdbs;
- CON_ID NAME OPEN_MODE
- ---------- ------------------------------ ----------
- 2 PDB$SEED READ ONLY
- 3 PDB2 READ WRITE
- 4 PDB2_2 READ WRITE
- SQL> conn sys/oracle_4U@pdb2 as sysdba
- Connected.
- SQL> alter system checkpoint;
- System altered.
- SQL> alter system switch logfile;
- alter system switch logfile
- *
- ERROR at line 1:
- ORA-65040: operation not allowed from within a pluggable database
- SQL> create table t1( a number ) tablespace system ;
- create table t1( a number ) tablespace system
- *
- ERROR at line 1:
- ORA-00604: error occurred at recursive SQL level 1
- ORA-01116: error in opening database file 10
- ORA-01110: data file 10: '/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf'
- ORA-27041: unable to open file
- Linux-x86_64 Error: 2: No such file or directory
- Additional information: 3
- SQL> alter puggable database close ;
- alter puggable database close
- *
- ERROR at line 1:
- ORA-00940: invalid ALTER command
- SQL> alter pluggable database close ;
- Pluggable database altered.
- SQL> select open_mode from v$database;
- OPEN_MODE
- --------------------
- MOUNTED
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
- and Real Application Testing options
- [oracle@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Thu Aug 10 21:28:54 2017
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=697524940)
- RMAN> list backup of tablespace pdb2:system;
- using target database control file instead of recovery catalog
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 8 Full 210.56M SBT_TAPE 00:00:19 10-08-2017 09:09:02
- BP Key: 8 Status: AVAILABLE Compressed: NO Tag: LAB7-2
- Handle: 08sbj4ir_1_1 Media: station26-000002
- List of Datafiles in backup set 8
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 Full 6693613 10-08-2017 09:08:43 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 14 Full 210.56M SBT_TAPE 00:00:20 10-08-2017 09:15:49
- BP Key: 14 Status: AVAILABLE Compressed: NO Tag: LAB7-3
- Handle: 0fsbj4vh_1_1 Media: station26-000003
- List of Datafiles in backup set 14
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 Full 6694330 10-08-2017 09:15:30 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- RMAN> restore tablespace pdb2:system;
- Starting restore at 10-08-2017 09:29:29
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=361 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=420 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=366 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=67 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=310 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=414 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=10 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=71 device type=DISK
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=127 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=182 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
- channel ORA_SBT_TAPE_1: restoring datafile 00010 to /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- channel ORA_SBT_TAPE_1: reading from backup piece 0fsbj4vh_1_1
- channel ORA_SBT_TAPE_1: piece handle=0fsbj4vh_1_1 tag=LAB7-3
- channel ORA_SBT_TAPE_1: restored backup piece 1
- channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:35
- Finished restore at 10-08-2017 09:30:11
- RMAN> recover tablespace pdb2:system ;
- Starting recover at 10-08-2017 09:31:05
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- starting media recovery
- media recovery complete, elapsed time: 00:00:00
- Finished recover at 10-08-2017 09:31:06
- RMAN> alter pluggables database pdb2 open ;
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of sql statement command at 08/10/2017 21:31:26
- ORA-00940: invalid ALTER command
- RMAN> recover tablespace pdb2:ldata;
- Starting recover at 10-08-2017 09:32:15
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- starting media recovery
- media recovery complete, elapsed time: 00:00:00
- Finished recover at 10-08-2017 09:32:16
- RMAN> recover pluggable database pdb2 ;
- Starting recover at 10-08-2017 09:32:40
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- starting media recovery
- media recovery complete, elapsed time: 00:00:00
- Finished recover at 10-08-2017 09:32:41
- RMAN>
复制代码
|
|