Pular para o conteúdo

Como mover system e sysaux NO ASM

Como mover system e sysaux NO ASM

Nesse caso o ORACLE_SID=sbkp

. oraenv
sbkp

sqlplus /nolog
connect / as sysdba

FILE_NAME                                                                                            TABLESPACE_NAME
---------------------------------------------------------------------------------------------------- ------------------------------
+DG_SBKP_DADOS/sbkp/datafile/users.259.856878829                                                    USERS
+DG_SBKP_DADOS/sbkp/datafile/undotbs1.258.856878829                                               UNDOTBS1
+DG_SBKP_DADOS/sbkp/datafile/ts_128k_01d.266.857464319                                          TS_128K_01D

+DG_SBKP_FLASH/asm/datafile/sysaux.266.860497425                                                     SYSAUX
+DG_SBKP_FLASH/asm/datafile/system.265.860497491                                                     SYSTEM

shutdown immediate

.oraenv
+ASM

asmcmd cp +DG_SBKP_FLASH/asm/datafile/sysaux.266.860497425  +DG_SBKP_DADOS/sbkp/datafile/sysaux
copying +DG_SBKP_FLASH/asm/datafile/sysaux.266.860497425 -> +DG_SBKP_DADOS/sbkp/datafile/sysaux

asmcmd cp +DG_SBKP_FLASH/asm/datafile/system.265.860497491  +DG_SBKP_DADOS/sbkp/datafile/system
copying +DG_SBKP_FLASH/asm/datafile/system.265.860497491 -> +DG_SBKP_DADOS/sbkp/datafile/system

asmcmd ls -lt +DG_SBKP_DADOS/sbkp/datafile/sys*
Type      Redund  Striped  Time             Sys  Name
                                            N    system => +DG_SBKP_DADOS/ASM/DATAFILE/system.256.860506113
                                            N    sysaux => +DG_SBKP_DADOS/ASM/DATAFILE/sysaux.257.860506087

. oraenv
sbkp
sqlplus /nolog
connect / as sysdba
startup mount

SQL> alter database rename file '+DG_SBKP_FLASH/asm/datafile/sysaux.266.860497425' to '+DG_SBKP_DADOS/ASM/DATAFILE/sysaux.257.860506087';

Database altered.

SQL> alter database rename file '+DG_SBKP_FLASH/asm/datafile/system.265.860497491' to '+DG_SBKP_DADOS/ASM/DATAFILE/system.256.860506113';

Database altered.

SQL> alter database open;

Database altered.

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
+DG_SBKP_DADOS/sbkp/datafile/users.259.856878829
+DG_SBKP_DADOS/sbkp/datafile/undotbs1.258.856878829
+DG_SBKP_DADOS/sbkp/datafile/ts_128k_01d.266.857464319

+DG_SBKP_DADOS/asm/datafile/sysaux.257.860506087
+DG_SBKP_DADOS/asm/datafile/system.256.860506113

Bem simples!

eskinazi

eskinazi

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

plugins premium WordPress