Databases Reference
In-Depth Information
How It Works
In Figure 21-18 , the dialog box shows all the Oracle Homes in that server. The order in which they are displayed
determines the order in which the commands will be searched. For instance, in this example the Oracle Home named
OraDb12c_home1 will be the first to be searched. That means when you give a command called sqlplus.exe, it will be
searched in the bin directory of that Oracle Home first and then in the other home, called OraDb11g_home1.
If you want to change the order in which the Oracle Homes are searched for executables, click on the Up or Down
arrows toward the right hand of the window to move the Oracle Homes.
Copying Open Files in Windows
Problem
You want to copy a file already opened by Windows.
Solution
If you want to copy an “open” file, such as a data file already opened by the Oracle Database, you should use the ocopy
utility instead of the regular copy or xcopy utilities. Here is the basic syntax of ocopy :
C:\> ocopy <SourceFile> <DestinationFile>
How It Works
On Windows, the file copy utilities are copy and xcopy , both similar to the cp utility in Unix. Although you can use
copy or xcopy for many occasions, you can't use them to copy files that are held open by a process. The copy created
in that case is considered to be “fuzzy” by the operating system, and may not be completely readable. For instance,
while performing hot backups, when you place tablespaces into backup mode, Oracle Database is aware of the fuzzy
nature of the files, but not the Windows operating system. Windows sees that the files are still used by Oracle and
hence it marks the copies created by the copy and xcopy commands as useless.You may not use copy or xcopy to copy
those files to a backup destination.
To avoid this issue, Oracle provides a utility called ocopy available in ORACLE_HOME\bin folder. You can use
ocopy to copy any file, not just Oracle data files, but it's especially useful when making hot backups. The utility can be
used for copying raw devices as well. Here is an example of copying a raw device:
C:\>ocopy \\.\lun1 c:\lun1.dbf
C:\LUN1.DBF
In addition to copying files for hot backup, you can also use ocopy for other open file copies, such as copying the
Oracle Cluster Ready Services voting and quorum disks.
 
Search WWH ::




Custom Search