Copying Open Files In Windows

Some times we need to copy datafiles, for example to create a secundary or trial database, with all or some datafiles but the database is always on (24×7). You can copy the files using the Oracle utility named “ocopy”. It is similar to windows command copy but copy can’t copy open files. Of course, you can use rman and make a image copy.

You can see in the next example the description of ocopy command;

 
C:\>ocopy
OCOPY v2.0 - Copyright 1989-1993 Oracle Corp.  All rights reserved.
Usage:
    ocopy from_file [to_file [a | size_1 [size_n]]]
    ocopy -b from_file to_drive
    ocopy -r from_drive to_dir

And a simple copy of datafile;

 
C:\>REM I selected system datafile because it is always open for some process

C:\>ocopy f:\database\system.dbf g:\backups\system.dbf
g:\backups\system.dbf

HTH – Antonio NAVARRO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s