rac asm 환경에서 파일을 일반 파일시스템으로 잘못 만들었을 때 ASM으로 이동
SQL> select tablespace_name,file_name,bytes/1024/1024 from dba_data_files;
TABLESPACE_NAME FILE_NAME BYTES/1024/1024
------------------------------ -------------------------------------------------- ---------------
SYSTEM +DATA/RACDB/DATAFILE/system.257.1093539089 910
SYSAUX +DATA/RACDB/DATAFILE/sysaux.258.1093539113 640
UNDOTBS1 +DATA/RACDB/DATAFILE/undotbs1.259.1093539129 345
USERS +DATA/RACDB/DATAFILE/users.260.1093539129 5
UNDOTBS2 +DATA/RACDB/DATAFILE/undotbs2.270.1093539589 25
IMSI /u01/app/oracle/product/19c/db_1/dbs/data1
ASMTBS +ASMDATA/RACDB/DATAFILE/asmtbs.256.1139007429 14
7 rows selected.
SQL> alter tablespace imsi offline;
Tablespace altered.
rman 접속 후 copy
RMAN> copy datafile '/u01/app/oracle/product/19c/db_1/dbs/data1' to '+DATA'
2> ;
Starting backup at 23/12/18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=214 instance=racdb1 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00015 name=/u01/app/oracle/product/19c/db_1/dbs/data1
output file name=+DATA/RACDB/DATAFILE/imsi.281.1155917741 tag=TAG20231218T161539 RECID=4 STAMP=1155918015
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
Finished backup at 23/12/18
Starting Control File and SPFILE Autobackup at 23/12/18
piece handle=/share/backup/rman/db_ctl_c-1091155962-20231218-00 comment=NONE
Finished Control File and SPFILE Autobackup at 23/12/18
RMAN>
# asm위치로 변경(rename)
SQL> alter database rename file '/u01/app/oracle/product/19c/db_1/dbs/data1' to '+DATA/RACDB/DATAFILE/imsi.281.1155917741' ;
Database altered.
SQL> recover datafile '+DATA/RACDB/DATAFILE/imsi.281.1155917741';
Media recovery complete.
SQL> alter tablespace imsi online;
Tablespace altered.
'ORACLE > ADMIN' 카테고리의 다른 글
오라클 ASM 에서 filesystem으로 복사 하는 3가지 방법 (0) | 2024.01.25 |
---|---|
오라클 동적 리스너 설정 (0) | 2024.01.18 |
oracle 리두로그(redo log) 관리(member,group 추가 삭제 변경) (0) | 2023.09.21 |
ORACLE datafile 이동 방법 2 가지 (0) | 2023.09.21 |
오라클 11.2.0.4 RAC GIPSU 설치 (0) | 2023.09.20 |