set lines 200
set pages 50
set feed off
set head off
spool /tmp/move_dbfiles.sql
select 'ALTER DATABASE MOVE DATAFILE '''||name||''' TO ''+DATA'';' from v$datafile order by con_id;
set lines 200
set pages 50
set feed off
set head off
spool /tmp/move_dbfiles.sql
select 'ALTER DATABASE MOVE DATAFILE '''||name||''' TO ''+DATA'';' from v$datafile order by con_id;
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/system01.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_biplatform02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/sysaux01.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/undotbs01.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_mds.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/users01.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_dwstage.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_odi.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_dwindex.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_dwdata.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_biacomp.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/system02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/sysaux02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_mds02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_dwdata02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_biacomp02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_dwstage02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_odi02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_biplatform.dbf' TO '+DATA';
SQL>
SQL> select count(*) from dba_data_files;
19
SQL>
SQL> select count(member) from v$logfile;
3
SQL>
SQL> select count(name) from v$controlfile;
1
SQL>
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/oracle/oradata/BIDEV/system01.dbf
/u01/oracle/oradata/BIDEV/DEV_biplatform.dbf
/u01/oracle/oradata/BIDEV/sysaux01.dbf
/u01/oracle/oradata/BIDEV/undotbs01.dbf
/u01/oracle/oradata/BIDEV/DEV_mds.dbf
/u01/oracle/oradata/BIDEV/users01.dbf
/u01/oracle/oradata/BIDEV/DEV_dwstage.dbf
/u01/oracle/oradata/BIDEV/DEV_odi.dbf
/u01/oracle/oradata/BIDEV/DEV_dwindex.dbf
/u02/oracle/oradata/BIDEV/DEV_dwdata.dbf
/u01/oracle/oradata/BIDEV/DEV_biacomp.dbf
NAME
--------------------------------------------------------------------------------
/u02/oracle/oradata/BIDEV/system02.dbf
/u02/oracle/oradata/BIDEV/sysaux02.dbf
/u02/oracle/oradata/BIDEV/DEV_mds02.dbf
/u02/oracle/oradata/BIDEV/DEV_dwdata02.dbf
/u02/oracle/oradata/BIDEV/DEV_biacomp02.dbf
/u02/oracle/oradata/BIDEV/DEV_dwstage02.dbf
/u02/oracle/oradata/BIDEV/DEV_odi02.dbf
/u02/oracle/oradata/BIDEV/DEV_biplatform02.dbf
19 rows selected.
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/oracle/oradata/BIDEV/redo03.log
/u01/oracle/oradata/BIDEV/redo02.log
/u01/oracle/oradata/BIDEV/redo01.log
SQL>
set pages 50
set feed off
set head off
spool /tmp/move_dbfiles.sql
select 'ALTER DATABASE MOVE DATAFILE '''||name||''' TO ''+DATA'';' from v$datafile order by con_id;
set lines 200
set pages 50
set feed off
set head off
spool /tmp/move_dbfiles.sql
select 'ALTER DATABASE MOVE DATAFILE '''||name||''' TO ''+DATA'';' from v$datafile order by con_id;
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/system01.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_biplatform02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/sysaux01.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/undotbs01.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_mds.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/users01.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_dwstage.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_odi.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_dwindex.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_dwdata.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_biacomp.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/system02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/sysaux02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_mds02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_dwdata02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_biacomp02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_dwstage02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u02/oracle/oradata/BIDEV/DEV_odi02.dbf' TO '+DATA';
ALTER DATABASE MOVE DATAFILE '/u01/oracle/oradata/BIDEV/DEV_biplatform.dbf' TO '+DATA';
SQL>
SQL> select count(*) from dba_data_files;
19
SQL>
SQL> select count(member) from v$logfile;
3
SQL>
SQL> select count(name) from v$controlfile;
1
SQL>
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/oracle/oradata/BIDEV/system01.dbf
/u01/oracle/oradata/BIDEV/DEV_biplatform.dbf
/u01/oracle/oradata/BIDEV/sysaux01.dbf
/u01/oracle/oradata/BIDEV/undotbs01.dbf
/u01/oracle/oradata/BIDEV/DEV_mds.dbf
/u01/oracle/oradata/BIDEV/users01.dbf
/u01/oracle/oradata/BIDEV/DEV_dwstage.dbf
/u01/oracle/oradata/BIDEV/DEV_odi.dbf
/u01/oracle/oradata/BIDEV/DEV_dwindex.dbf
/u02/oracle/oradata/BIDEV/DEV_dwdata.dbf
/u01/oracle/oradata/BIDEV/DEV_biacomp.dbf
NAME
--------------------------------------------------------------------------------
/u02/oracle/oradata/BIDEV/system02.dbf
/u02/oracle/oradata/BIDEV/sysaux02.dbf
/u02/oracle/oradata/BIDEV/DEV_mds02.dbf
/u02/oracle/oradata/BIDEV/DEV_dwdata02.dbf
/u02/oracle/oradata/BIDEV/DEV_biacomp02.dbf
/u02/oracle/oradata/BIDEV/DEV_dwstage02.dbf
/u02/oracle/oradata/BIDEV/DEV_odi02.dbf
/u02/oracle/oradata/BIDEV/DEV_biplatform02.dbf
19 rows selected.
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/oracle/oradata/BIDEV/redo03.log
/u01/oracle/oradata/BIDEV/redo02.log
/u01/oracle/oradata/BIDEV/redo01.log
SQL>
No comments:
Post a Comment