|
Notice: This blog is written by Bo Tang.
2019-06-10
- create tablespace rcat datafile '/u01/app/oracle/oradata/rcat/rcat.dbf' size 100M autoextend on ;
- create user u80 identified by oracle_4U default tablespace rcat quota unlimited on rcat;
- grant recovery_catalog_owner to u90;
复制代码- . oraenv
- orcl
- ......
- rman target / catalog u80/oracle_4U@rcat
- rman> create catalog;
- rman> register database;
复制代码
- select * from v$asm_template where group_number=1;
- select * from v$asm_file
- where group_number=1 and file_number=268;
- select * from v$asm_alias
- where group_number=1 and file_number=268;
- where lower(name) ='tbs2.dbf';
- --SYSTEM.256.1008007421
- alter diskgroup data add template template1 attribute (unprotected fine);
- -------------------------------------
复制代码- select * from v$logfile;
- select * from v$datafile;
- create tablespace tbs1 datafile '+data(template1)' size 10M ;
- create tablespace tbs2 datafile '+data(template1)/orcl/datafile/tbs2.dbf' size 10M ;
复制代码
--------------------------------------------------
关于
- [oracle@station80 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 10 20:22:08 2019
- Copyright (c) 1982, 2013, Oracle. All rights reserved.
- SQL> conn / as sysasm
- Connected.
- SQL> ALTER DISKGROUP HIGHDATA ADD TEMPLATE TEMPLATE1 ATTRIBUTES (mirror FINE);
- Diskgroup altered.
- SQL> ALTER DISKGROUP HIGHDATA ADD TEMPLATE TEMPLATE2 ATTRIBUTES ( unprotected fine ) ;
- ALTER DISKGROUP HIGHDATA ADD TEMPLATE TEMPLATE2 ATTRIBUTES ( unprotected fine )
- *
- ERROR at line 1:
- ORA-15067: command or option incompatible with diskgroup redundancy
- SQL> ALTER DISKGROUP fra ADD TEMPLATE TEMPLATE1 ATTRIBUTES ( unprotected fine ) ;
- Diskgroup altered.
- SQL> ALTER DISKGROUP fra ADD TEMPLATE TEMPLATE2 ATTRIBUTES ( mirror fine ) ;
- ALTER DISKGROUP fra ADD TEMPLATE TEMPLATE2 ATTRIBUTES ( mirror fine )
- *
- ERROR at line 1:
- ORA-15067: command or option incompatible with diskgroup redundancy
- SQL> ALTER DISKGROUP fra ADD TEMPLATE TEMPLATE2 ATTRIBUTES ( high fine ) ;
- ALTER DISKGROUP fra ADD TEMPLATE TEMPLATE2 ATTRIBUTES ( high fine )
- *
- ERROR at line 1:
- ORA-15067: command or option incompatible with diskgroup redundancy
- SQL>
复制代码 删除磁盘组,有client时候是删除不掉的:
- SQL> drop diskgroup highdata including contents;
- drop diskgroup highdata including contents
- *
- ERROR at line 1:
- ORA-15039: diskgroup not dropped
- ORA-15027: active use of diskgroup "HIGHDATA" precludes its dismount
复制代码
---------------------
非下线,非只读,alter database open时要检查:
添加磁盘到磁盘组:
- ALTER DISKGROUP DATA ADD FAILGROUP FG2 DISK 'ORCL:ASMLOOP2' SIZE 7000 M FAILGROUP FG1 DISK 'ORCL:ASMLOOP1' SIZE 7000 M REBALANCE POWER 11
复制代码
|
|