![]() ![]() ![]() If you don't specify this parameter, *.* is used as the default value. Wildcard characters ( * or ?) are supported. Specifies the file or files to be copied. Specifies the path to the destination directory. Specifies the path to the source directory. Syntax robocopy ] įor example, to copy a file named yearly-report.mov from c:\reports to a file share \\marketing\videos while enabling multi-threading for higher performance (with the /mt parameter) and the ability to restart the transfer in case it's interrupted (with the /z parameter), type: robocopy c:\reports '\\marketing\videos' yearly-report.mov /mt /z Rename:ĪLTER DATABASE MOVE DATAFILE ‘/u01/app/oracle/oradata/PSTG/datafile/test.dbf’ TO ‘/u01/app/oracle/oradata/PSTG/datafile/tester.dbf’ Relocate:ĪLTER DATABASE MOVE DATAFILE ‘/u01/app/oracle/oradata/PSTG/datafile/test.dbf’ TO ‘/u02/app/oracle/oradata/PSTG/datafile/test.dbf’ Copy:ĪLTER DATABASE MOVE DATAFILE ‘/u01/app/oracle/oradata/PSTG/datafile/test.dbf’ TO ‘/u01/app/oracle/oradata/PSTG/datafile/test.dbf’ KEEP Move to ASM:ĪLTER DATABASE MOVE DATAFILE ‘/u01/app/oracle/oradata/PSTG/datafile/test.dbf’ TO ‘ DATA/data/datafile/test.Copies file data from one location to another. Examples:īelow are examples of how the ALTER DATABASE MOVE DATAFILE command can be used to Rename, Relocate, Copy or Move data files to to ASM. Please consult the Oracle R12.2 Docs for further details. 1 oracle oinstall 11G Jun 2 11:49 tester.dbf 1 oracle oinstall 11G Jun 2 11:49 test.dbf SQL> ALTER DATABASE MOVE DATAFILE ‘/u01/app/oracle/oradata/PSTG/datafile/tester.dbf’ TO ‘/u01/app/oracle/oradata/PSTG/datafile/test.dbf’ KEEP If you specify the ‘KEEP’ parameter Oracle will copy the data file to the new location and retain the old datafile in the original location, it will be no longer be reference in the control files and can be removed when no longer required. #RAPIDCOPY COPY IF IDFFERENT SIZE DAT FREE#Please note before you begin make sure you have enough space on the source and target storage platforms as Oracle will allocate the required storage space on the target system and will not free any space up on the source until the move is complete. TEST /u01/app/oracle/oradata/PSTG/datafile/tester.dbf SQL> select tablespace_name, file_name from dba_data_files SQL> select to_char(start_time,’DD-MON-YY hh24:mi:ss’), timestamp, time_remaining, elapsed_seconds, message from V$SESSION_LONGOPS SQL> ALTER DATABASE MOVE DATAFILE ‘/u01/app/oracle/oradata/PSTG/datafile/test.dbf’ TO ‘/u01/app/oracle/oradata/PSTG/datafile/tester.dbf’ TEST /u01/app/oracle/oradata/PSTG/datafile/test.dbf SQL> select file_name, tablespace_name from dba_data_files The Oracle ALTER DATABASE MOVE DATAFILE feature provides a simple Online method of migrating data to a new storage platform performing all the heavy lifting for you including renaming or relocating of the data files at an operating system level and changing references in the Oracle Control Files.ĭuring a data file move, progress can be monitored via the V$SESSION_LONGOPS view, the reported bytes done will increment until the move is completed e.g. In the Post I will detail how the new ‘ALTER DATABASE MOVE DATAFILE’ feature can be used to move data files online to a different location, disk or storage system. ![]() Prior to Oracle 12c, moving non-ASM data files on or between storage arrays required taking data files ‘offline’ and negotiating an outage with the business, with Oracle 12c this is no longer the case. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |