Edit D:\rfid\database\database\doc\win.112\e10845\vss.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Language" content="en" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta name="robots" content="all" scheme="http://www.robotstxt.org/" /> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = document) - Version 5.1" /> <meta name="Date" content="2010-03-05T15:45:36Z" /> <meta name="doctitle" content="Oracle® Database Platform Guide 11g Release 2 (11.2) for Microsoft Windows" /> <meta name="partno" content="E10845-01" /> <meta name="docid" content="NTQRF" /> <link rel="Start" href="../../index.htm" title="Home" type="text/html" /> <link rel="Copyright" href="../../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="Stylesheet" href="../../dcommon/css/blafdoc.css" title="Default" type="text/css" /> <script type="text/javascript" src="../../dcommon/js/doccd.js"> </script> <link rel="Contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="Index" href="index.htm" title="Index" type="text/html" /> <link rel="Glossary" href="glossary.htm" title="Glossary" type="text/html" /> <link rel="Prev" href="tuning.htm" title="Previous" type="text/html" /> <link rel="Next" href="authen.htm" title="Next" type="text/html" /> <link rel="alternate" href="../e10845.pdf" title="PDF version" type="application/pdf" /> <title>Performing Database Backup and Recovery with VSS</title> </head> <body> <div class="header"> <div class="zz-skip-header"><a name="top" id="top" href="#BEGIN">Skip Headers</a></div> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left" valign="top"><b>Oracle® Database Platform Guide<br /> 11<i>g</i> Release 2 (11.2) for Microsoft Windows</b><br /> Part Number E10845-01</td> <td valign="bottom" align="right"> <table class="icons oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="245"> <tr> <td align="center" valign="top"><a href="../../index.htm"><img width="24" height="24" src="../../dcommon/gifs/doclib.gif" alt="Go to Documentation Home" /><br /> <span class="icon">Home</span></a></td> <td align="center" valign="top"><a href="../../nav/portal_booklist.htm"><img width="24" height="24" src="../../dcommon/gifs/booklist.gif" alt="Go to Book List" /><br /> <span class="icon">Book List</span></a></td> <td align="center" valign="top"><a href="toc.htm"><img width="24" height="24" src="../../dcommon/gifs/toc.gif" alt="Go to Table of Contents" /><br /> <span class="icon">Contents</span></a></td> <td align="center" valign="top"><a href="index.htm"><img width="24" height="24" src="../../dcommon/gifs/index.gif" alt="Go to Index" /><br /> <span class="icon">Index</span></a></td> <td align="center" valign="top"><a href="../../dcommon/html/feedback.htm"><img width="24" height="24" src="../../dcommon/gifs/feedbck2.gif" alt="Go to Feedback page" /><br /> <span class="icon">Contact Us</span></a></td> </tr> </table> </td> </tr> </table> <hr /> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left" valign="top"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="98"> <tr> <td align="center" valign="top"><a href="tuning.htm"><img width="24" height="24" src="../../dcommon/gifs/leftnav.gif" alt="Go to previous page" /><br /> <span class="icon">Previous</span></a></td> <td align="center" valign="top"><a href="authen.htm"><img width="24" height="24" src="../../dcommon/gifs/rightnav.gif" alt="Go to next page" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </td> <td align="right" valign="top" style="font-size: 90%"><a href="../e10845.pdf">View PDF</a></td> </tr> </table> <a name="BEGIN" id="BEGIN"></a></div> <div class="IND"><!-- End Header --><a id="NTQRF280" name="NTQRF280"></a><a id="sthref345" name="sthref345"></a> <h1 class="chapter"><span class="secnum">8</span> Performing Database Backup and Recovery with VSS</h1> <p>This chapter explains how to use Volume Shadow Copy Service (VSS) applications to back up and recover an Oracle database. This chapter contains the following topics:</p> <ul> <li> <p><a href="#BABGGDCA">Overview of Database Backup and Recovery with VSS</a></p> </li> <li> <p><a href="#BABJEGCA">Installing and Uninstalling the Oracle VSS Writer Service</a></p> </li> <li> <p><a href="#BABFEIFJ">Backing Up a Database</a></p> </li> <li> <p><a href="#BABIGGCG">Restoring and Recovering a Database</a></p> </li> <li> <p><a href="#BEICDDBD">Integrating VSS with Third-Party Requester Applications</a></p> </li> <li> <p><a href="#BABEFBGH">Duplicating a Database</a></p> </li> </ul> <a id="BABGGDCA" name="BABGGDCA"></a><a id="NTQRF285" name="NTQRF285"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1"><a id="sthref346" name="sthref346"></a>Overview of Database Backup and Recovery with VSS</h2> <p>This section explains the basic concepts and tasks involved in backup and recovery with <a href="glossary.htm#CHDJIDEJ"><span class="xrefglossterm">component-based shadow copies</span></a>. The following topics are described:</p> <ul> <li> <p><a href="#BEIBGCEH">Purpose of Database Backup and Recovery with VSS</a></p> </li> <li> <p><a href="#BEIBJGJJ">Scope of This Chapter</a></p> </li> <li> <p><a href="#BEIJJCAE">Basic Concepts of Database Backup and Recovery with VSS</a></p> </li> <li> <p><a href="#BEICBEAE">Basic Steps of Backup and Recovery with VSS</a></p> </li> </ul> <a id="BEIBGCEH" name="BEIBGCEH"></a><a id="NTQRF286" name="NTQRF286"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Purpose of Database Backup and Recovery with VSS</h3> <p>VSS provides a Windows-specific interface that enables coordination between requesters that back up data, writers that update data on disk, and providers that manage storage. Oracle Database functions as a writer that is integrated with VSS-enabled applications.</p> <p>You can use VSS-enabled software and storage systems on Windows to back up and restore an Oracle database. A key benefit is the ability to use a VSS-enabled application to make an online backup of the whole database.</p> </div> <!-- class="sect2" --> <a id="BEIBJGJJ" name="BEIBJGJJ"></a><a id="NTQRF287" name="NTQRF287"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Scope of This Chapter</h3> <p>This chapter assumes that you are familiar both with VSS applications and the Oracle Database backup and recovery principles and techniques described in <a class="olink BRADV" href="http://www.oracle.com/pls/db112/lookup?id=BRADV"><span class="italic">Oracle Database Backup and Recovery User's Guide</span></a>. This chapter does not attempt to provide an introduction to backup and recovery: it only explains how to perform database backup and recovery in the VSS infrastructure.</p> </div> <!-- class="sect2" --> <a id="BEIJJCAE" name="BEIJJCAE"></a><a id="NTQRF288" name="NTQRF288"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Basic Concepts of Database Backup and Recovery with VSS</h3> <p>VSS is an infrastructure on Windows server platforms that enables applications to create shadow copies. A <a href="glossary.htm#CHDJIHHH"><span class="xrefglossterm">shadow copy</span></a> is a consistent snapshot of the data held on a volume or component at a well-defined point in time. A <a href="glossary.htm#CHDBEACJ"><span class="xrefglossterm">shadow copy set</span></a> is a collection of shadow copies that are all taken at the same time. VSS identifies each shadow copy and shadow copy set by a persistent Global Unique Identifier (GUID).</p> <p>VSS provides the following infrastructure for running VSS applications:</p> <ul> <li> <p>Coordinates activities of requesters, providers, and writers in the creation and use of shadow copies</p> </li> <li> <p>Furnishes the default system provider</p> </li> <li> <p>Implements low-level driver functionality necessary for any provider to work</p> </li> </ul> <p>A VSS <a href="glossary.htm#CHDCBECG"><span class="xrefglossterm">requester</span></a> is an application that requests VSS services to create shadow copies. Typically, VSS requesters are backup applications. Requesters communicate with writers to gather system data and signal writers to prepare data for backup.</p> <p>A VSS <a href="glossary.htm#CHDDEGFI"><span class="xrefglossterm">provider</span></a> manages storage volumes and creates shadow copies on demand. In response to a requester, a provider generates COM events to signal applications of an impending shadow copy and creates and maintains this copy until it is no longer needed. During the life cycle of the shadow copy, the provider effectively supports two independent copies: the disk that is actively updated and a fixed copy that is stable for backup.</p> <p>A VSS <a href="glossary.htm#CHDDEGHB"><span class="xrefglossterm">writer</span></a> is an application or service that writes data to disk and cooperates with VSS providers and requesters. During backups, writers ensure that data is in the proper state for a shadow copy.</p> <p>The <a href="glossary.htm#CHDIAJDB"><span class="xrefglossterm">Oracle VSS writer</span></a> is a Windows service that coordinates an Oracle database instance and other VSS components. The writer service, which is started under the user account with <code>SYSDBA</code> privileges, runs separately from the database instance. You must use third-party requesters to perform backup and recovery within the VSS infrastructure.</p> <p>As explained in the following sections, the Oracle VSS writer supports both volume-based and component-based shadow copies. You can use these shadow copies in a backup and recovery strategy or to create a copy of your original database. You can use the duplicate database for testing or as a standby database.</p> <a id="NTQRF289" name="NTQRF289"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --><a id="sthref347" name="sthref347"></a> <h4 class="sect3">Component-Based Shadow Copies</h4> <p>The Oracle VSS writer supports <a href="glossary.htm#CHDJIDEJ"><span class="xrefglossterm">component-based shadow copies</span></a>, which are sets of database files. The recommended technique for backing up an Oracle database with VSS writer is to create shadow copies of components. During a backup, the Oracle VSS writer saves the redo generated during snapshot creation in a metadata document. During a restore operation, the writer automatically extracts the redo from the metadata document and applies it to files restored from a snapshot.</p> </div> <!-- class="sect3" --> <a id="NTQRF290" name="NTQRF290"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --><a id="sthref348" name="sthref348"></a> <h4 class="sect3">Volume-Based Shadow Copies</h4> <p>The Oracle VSS writer supports <a href="glossary.htm#CHDJHIBC"><span class="xrefglossterm">volume-based shadow copies</span></a>, which are snapshots of complete drive or volumes. Oracle Database places the files that it manages in a state suitable to create shadow copies. For example, the datafiles are placed in hot backup mode and a new snapshot control file is created for a database in <code>ARCHIVELOG</code> mode. Oracle VSS writer excludes files such as the current control file and online redo logs from the shadow copies. The writer also returns an error if the snapshot cannot be taken. For example, if a <code>NOARCHIVELOG</code> database is open in read/write mode, then the writer returns an error indicating that the snapshot is not possible.</p> <div class="infoboxnote"> <p class="notep1">Note:</p> Automatic Storage Management files and raw files are not supported for Oracle VSS snapshots.</div> </div> <!-- class="sect3" --> <a id="NTQRF291" name="NTQRF291"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --><a id="sthref349" name="sthref349"></a> <h4 class="sect3">Oracle VSS Backup Types</h4> <p>Oracle VSS writer supports log, copy, full, differential, and incremental backups. The VSS writer uses time stamp mechanism for incremental and differential backups and stores a time stamp in the backup document using <code>SetBackupStamp()</code> API. This backup stamp is used by Oracle VSS writer during incremental or differential backups to specify changed files since the last full or incremental backup using <code>AddDifferencedFilesByLastModifyTime()</code> API.</p> <p>Oracle VSS writer also stores backup metadata and restore metadata, which must be available during restore operations so that the VSS writer can perform intelligent postrestore operations. In case of full or copy backup, the restore metadata contains important redo information to make the restored files consistent. Hence, it is imperative that Oracle VSS writer is called during restore operations to perform the recovery operations.</p> </div> <!-- class="sect3" --></div> <!-- class="sect2" --> <a id="BEICBEAE" name="BEICBEAE"></a><a id="NTQRF292" name="NTQRF292"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2"><a id="sthref350" name="sthref350"></a>Basic Steps of Backup and Recovery with VSS</h3> <p>The Oracle VSS writer is installed automatically as part of the database. If you must install or uninstall it manually, see <a href="#BABJEGCA">"Installing and Uninstalling the Oracle VSS Writer Service"</a>.</p> <p>In the most typical backup scenario, you select the <code>Oracle Database</code> component in your VSS-enabled application and create a shadow copy. The shadow copy contains the database files, control files, and server parameter file. If the database is in <code>ARCHIVELOG</code> mode, then you can create the shadow copy when the database is open or closed; otherwise, only when closed.</p> <p>In a typical recovery scenario, you select the <code>Oracle Database</code> component in your VSS-enabled application and restore it. Afterward, you can open the database either in read-only mode or with the <code>RESETLOGS</code> option. The Oracle VSS writer also supports applications that perform point-in-time recovery.</p> <p>To restore a subset of database files, you can select individual components and restore them. The Oracle VSS writer performs the appropriate actions automatically in the post-restore phase so that the file can be used (or brought online) at the end of restore operation. For example, if you select a datafile component for restore, then the writer automatically recovers the datafile by using RMAN.</p> <div class="infoboxnotealso"> <p class="notep1">See Also:</p> <ul> <li> <p><a href="#BABFEIFJ">"Backing Up a Database"</a> to learn about the components that you can back up and the procedures for making component-based and volume-based backups</p> </li> <li> <p><a href="#BABIGGCG">"Restoring and Recovering a Database"</a> to learn about the components that you can restore and the procedures for performing restore and recovery</p> </li> </ul> </div> </div> <!-- class="sect2" --></div> <!-- class="sect1" --> <a id="BABJEGCA" name="BABJEGCA"></a><a id="NTQRF293" name="NTQRF293"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1">Installing and Uninstalling the Oracle VSS Writer Service</h2> <p>The Oracle VSS writer runs separately from the Oracle database instance. From the perspective of the database, the VSS writer is simply an OCI client.</p> <p>The Oracle VSS writer provides command-line options to install and uninstall the writer service. During installation, you can specify the Windows account under which the service must be started. The writer uses operating system authentication when connecting to a database instance. Thus, the Windows user must be able to log in as <code>SYSDBA</code> to the Oracle database instances managed by the writer service.</p> <p>The command-line syntaxes for the Oracle VSS writer are as follows:</p> <pre xml:space="preserve" class="oac_no_warn">oravssw {/q [/start | /stop | /status]} oravssw <span class="italic">SID</span> [/tl <span class="codeinlineitalic">trace_level</span>] [/tf <span class="codeinlineitalic">trace_file</span>] oravssw <span class="italic">SID</span> [/i] [/d] </pre> <div class="infoboxnote"> <p class="notep1">Note:</p> You can change the userid and password using the Services snapin.</div> <p><a href="#BABEDFIB">Table 8-1</a> describes the options for the Oracle VSS writer.</p> <div class="tblruleformal"><a id="NTQRF294" name="NTQRF294"></a><a id="sthref351" name="sthref351"></a><a id="BABEDFIB" name="BABEDFIB"></a> <p class="titleintable">Table 8-1 Oracle VSS Writer Options</p> <table class="RuleFormal" title="Oracle VSS Writer Options" summary="Oracle VSS writer options" dir="ltr" border="1" width="100%" frame="border" rules="all" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t5">Option</th> <th align="left" valign="bottom" id="r1c2-t5">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t5" headers="r1c1-t5"> <p><code><span class="codeinlineitalic">SID</span></code></p> </td> <td align="left" headers="r2c1-t5 r1c2-t5"> <p><code><span class="codeinlineitalic">SID</span></code> of the Oracle instance to which the service connects.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t5" headers="r1c1-t5"> <p><code>/i</code></p> </td> <td align="left" headers="r3c1-t5 r1c2-t5"> <p>Installs the service for a specified <code><span class="codeinlineitalic">SID</span></code>.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t5" headers="r1c1-t5"> <p><code>/q</code></p> </td> <td align="left" headers="r4c1-t5 r1c2-t5"> <p>Queries the Oracle VSS writer services. But when not used with options like <code>/start</code> or <code>/status</code> or <code>/stop</code>, it just displays the list of Oracle VSS writer services.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t5" headers="r1c1-t5"> <p><code>/</code><code><span class="codeinlineitalic">status</span></code></p> </td> <td align="left" headers="r5c1-t5 r1c2-t5"> <p>Displays the current status of all Oracle writer services and can be used only with the <code>/q</code> option.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t5" headers="r1c1-t5"> <p><code>/start</code></p> </td> <td align="left" headers="r6c1-t5 r1c2-t5"> <p>Starts all Oracle VSS writer services and can be used only with the <code>/q</code> option.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t5" headers="r1c1-t5"> <p><code>/stop</code></p> </td> <td align="left" headers="r7c1-t5 r1c2-t5"> <p>Stops all Oracle VSS writer services and can be used only with the <code>/q</code> option.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t5" headers="r1c1-t5"> <p><code>/tl</code></p> </td> <td align="left" headers="r8c1-t5 r1c2-t5"> <p>Specifies the trace level for a Oracle VSS writer for a specified <code><span class="codeinlineitalic">SID</span></code>.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t5" headers="r1c1-t5"> <p><code>/tf</code></p> </td> <td align="left" headers="r9c1-t5 r1c2-t5"> <p>Specifies the trace file name for Oracle VSS writer for a specified <code><span class="codeinlineitalic">SID</span></code>.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t5" headers="r1c1-t5"> <p><code>/d</code></p> </td> <td align="left" headers="r10c1-t5 r1c2-t5"> <p>Uninstalls the service for a specified <code><span class="codeinlineitalic">SID</span></code>.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblruleformal" --> <p>In <a href="#BABHFEFC">Example 8-1</a>, you install the service so that it connects to the <code>prod1</code> instance.</p> <div class="example"><a id="BABHFEFC" name="BABHFEFC"></a><a id="NTQRF295" name="NTQRF295"></a> <p class="titleinexample">Example 8-1 Installing Oracle VSS Writer</p> <pre xml:space="preserve" class="oac_no_warn">oravssw prod1 /i </pre></div> <!-- class="example" --> <div class="infoboxnote"> <p class="notep1">Note:</p> <ul> <li> <p>Any errors during operation of the Oracle VSS writer are reported by means of Windows System Event logging APIs. You can view these errors with the Windows Event Viewer.</p> </li> <li> <p>Oracle Database 10<span class="italic">g</span> Release 2 (10.2.0.3) supports Oracle VSS snapshots only when Oracle VSS writer 11<span class="italic">g</span> is configured to manage the 10.2.0.3 database. See My Oracle Support (formerly Oracle<span class="italic">MetaLink)</span> <code><a href="https://support.oracle.com">https://support.oracle.com</a></code> Note 580558.1 for more information about installing Oracle VSS writer for use with 9<span class="italic">i</span> and 10<span class="italic">g</span> databases.</p> </li> </ul> </div> </div> <!-- class="sect1" --> <a id="BABFEIFJ" name="BABFEIFJ"></a><a id="NTQRF296" name="NTQRF296"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1"><a id="sthref352" name="sthref352"></a>Backing Up a Database</h2> <p>The technique for backing up a database depends on the archiving mode of the database and whether you are making a component-based or volume-based backup. Oracle recommends shadow copies taken in component mode for backing up the Oracle database using VSS writer. The Oracle VSS writer defines the components that include the set of database files. The Oracle VSS writer then saves the redo generated during hot backup mode when the snapshot was created in the backup writer metadata document.</p> <p>The component hierarchy defined by the Oracle VSS writer is illustrated in <a href="#BEIHAAJE">Figure 8-1</a>.</p> <div class="figure"><a id="BEIHAAJE" name="BEIHAAJE"></a> <p class="titleinfigure">Figure 8-1 Oracle VSS Writer Component Hierarchy</p> <img width="659" height="382" src="img/comp.gif" alt="Description of Figure 8-1 follows" title="Description of Figure 8-1 follows" longdesc="img_text/comp.htm" /><br /> <a id="sthref353" name="sthref353" href="img_text/comp.htm">Description of "Figure 8-1 Oracle VSS Writer Component Hierarchy"</a><br /> <br /></div> <!-- class="figure" --> <p><a href="#BABDFAJE">"About Component-Based Backups"</a> explains which components you can select when making component-based backups.</p> <a id="BABDFAJE" name="BABDFAJE"></a><a id="NTQRF297" name="NTQRF297"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">About Component-Based Backups</h3> <p>The components supported by the Oracle VSS writer are listed in <a href="#BEIFBJBC">Table 8-2</a>. The name of the component is the value returned by an <code>OnIdentify</code> VSS message. The Selectable for Backup column indicates whether a component is eligible to be selected in VSS shadow copies.</p> <div class="tblruleformal"><a id="NTQRF298" name="NTQRF298"></a><a id="sthref354" name="sthref354"></a><a id="BEIFBJBC" name="BEIFBJBC"></a> <p class="titleintable">Table 8-2 Components Backed Up by the Oracle VSS Writer</p> <table class="RuleFormal" title="Components Backed Up by the Oracle VSS Writer" summary="This table describes components defined by the Oracle VSS writer. The table has the following columns: Component, Excluded, and Description." dir="ltr" border="1" width="100%" frame="border" rules="all" cellpadding="3" cellspacing="0"> <col width="21%" /> <col width="*" /> <col width="17%" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t7">Component</th> <th align="left" valign="bottom" id="r1c2-t7">Description</th> <th align="left" valign="bottom" id="r1c3-t7">Selectable for Backup</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t7" headers="r1c1-t7"> <p>Oracle Database</p> </td> <td align="left" headers="r2c1-t7 r1c2-t7"> <p>Contains the database files, control files, and server parameter file.</p> </td> <td align="left" headers="r2c1-t7 r1c3-t7"> <p>Yes</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t7" headers="r1c1-t7"> <p>Control File</p> </td> <td align="left" headers="r3c1-t7 r1c2-t7"> <p>Contains the snapshot location of the control file for a database running in <code>ARCHIVELOG</code> mode, or the current control file locations when all database files are recovered to a consistent SCN.</p> <p><span class="bold">Note:</span> The files included in the Control File component determine whether current control files or snapshot control files are excluded. For example, if the database is opened in read-only mode, then the snapshot control file location is excluded from the snapshot.</p> </td> <td align="left" headers="r3c1-t7 r1c3-t7"> <p>No</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t7" headers="r1c1-t7"> <p>Server Parameter File</p> </td> <td align="left" headers="r4c1-t7 r1c2-t7"> <p>Contains the location of the server parameter file, if the instance is using one.</p> </td> <td align="left" headers="r4c1-t7 r1c3-t7"> <p>No</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t7" headers="r1c1-t7"> <p>All TableSpaces</p> </td> <td align="left" headers="r5c1-t7 r1c2-t7"> <p>Includes all tablespaces in a snapshot.</p> </td> <td align="left" headers="r5c1-t7 r1c3-t7"> <p>No</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t7" headers="r1c1-t7"> <p><span class="italic">tablespace_name</span>s</p> </td> <td align="left" headers="r6c1-t7 r1c2-t7"> <p>Selects individual TableSpaces.</p> </td> <td align="left" headers="r6c1-t7 r1c3-t7"> <p>No</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t7" headers="r1c1-t7"> <p>Datafile number=<span class="italic">n</span></p> </td> <td align="left" headers="r7c1-t7 r1c2-t7"> <p>Selects individual datafiles. The metadata will contain <code>RESETLOGS</code> information, tablespace number, tablespace name, and DBID.</p> </td> <td align="left" headers="r7c1-t7 r1c3-t7"> <p>No</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t7" headers="r1c1-t7"> <p>ArchiveLogDest_<span class="italic">n</span></p> </td> <td align="left" headers="r8c1-t7 r1c2-t7"> <p>Selects individual local archiving destinations other than the fast recovery area.</p> </td> <td align="left" headers="r8c1-t7 r1c3-t7"> <p>Yes</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t7" headers="r1c1-t7"> <p>Fast Recovery Area</p> </td> <td align="left" headers="r9c1-t7 r1c2-t7"> <p>Includes all backup files and archived logs in the Fast Recovery Area in the VSS snapshot.</p> <p>Files backed up by VSS from the Fast Recovery Area can be subjected to deletion under space constraints.</p> </td> <td align="left" headers="r9c1-t7 r1c3-t7"> <p>Yes</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t7" headers="r1c1-t7"> <p>Archived Logs</p> </td> <td align="left" headers="r10c1-t7 r1c2-t7"> <p>Logs in Fast Recovery Area</p> </td> <td align="left" headers="r10c1-t7 r1c3-t7"> <p>No</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r11c1-t7" headers="r1c1-t7"> <p>Backup Files</p> </td> <td align="left" headers="r11c1-t7 r1c2-t7"> <p>Backs up from Fast Recovery Area</p> </td> <td align="left" headers="r11c1-t7 r1c3-t7"> <p>No</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblruleformal" --> <p>You can select only <code>Oracle Database</code>, <code>ArchiveLogDest_</code><code><span class="codeinlineitalic">n</span></code>, and <code>Fast Recovery Area,</code> exposed by the Oracle VSS writer during a backup. The availability of the components in <a href="#BEIFBJBC">Table 8-2</a> may depend on the database state. For example, if the database is in <code>NOARCHIVELOG</code> mode, the <code>Archived Logs</code> component will not be returned. Likewise, if the instance is not started with a server parameter file, the <code>Server Parameter File</code> component will not be returned.</p> <div class="infoboxnote"> <p class="notep1">Note:</p> The components that are not marked as Selectable for Backup are implicitly included by components marked as Selectable for Backup.</div> <p>When you select <code>Oracle</code> <code>Database</code> component for backup or restore, all other components are implicitly selected for backup or restore. This implies that all files that are part of the selected component are candidates for backup or restore.</p> <p><code>ArchiveLogDest_n</code> and <code>Fast</code> <code>Recovery</code> <code>Area</code> components are defined to contain only log or incremental files. This means that the requester should backup files from these components only when creating a log for incremental or differential backup. Likewise, the requester should restore files from these components only when restoring from log or incremental or differential backups.</p> <p>The files in all other components other than <code>ArchiveLogDest_n</code> and <code>Fast</code> <code>Recovery</code> <code>Area</code> define database files. This means that the requester should backup files from these components only when creating a full or copy backup. Likewise, the requester should restore files from these components only when restoring from full or copy backup.</p> </div> <!-- class="sect2" --> <a id="NTQRF299" name="NTQRF299"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --><a id="sthref355" name="sthref355"></a> <h3 class="sect2">Backing Up a Database in ARCHIVELOG Mode</h3> <p>The procedures in this section assume that the database is open read/write. You can also make closed, consistent backups by following the procedures in <a href="#BABJIDCH">"Backing Up a Database in NOARCHIVELOG Mode"</a>.</p> <a id="BABJDGDA" name="BABJDGDA"></a><a id="NTQRF300" name="NTQRF300"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Making Component-Based Backups of an ARCHIVELOG Database</h4> <p>This section explains how to back up the whole database. You can back up only <code>Oracle Database,</code> <code>ArchiveLogDest_</code><code><span class="codeinlineitalic">n</span></code>, and <code>Fast Recovery Area</code>, listed in <a href="#BEIFBJBC">Table 8-2, "Components Backed Up by the Oracle VSS Writer"</a>.</p> <p>To back up the whole database:</p> <ol> <li> <p>Start a SQL*Plus session on the target database and make sure the database is open <code>READ WRITE</code>.</p> </li> <li> <p>Use a third-party VSS requester to select the <code>Oracle Database</code> component.</p> </li> <li> <p>Create a snapshot of the database.</p> <p>Oracle VSS writer includes the server parameter file, control file, and datafiles in the snapshot. The online redo logs will not be included in the snapshot.</p> </li> </ol> </div> <!-- class="sect3" --> <a id="BABCCHBG" name="BABCCHBG"></a><a id="NTQRF301" name="NTQRF301"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Making Volume-Based Backups of an ARCHIVELOG Database</h4> <p>To make volume-based shadow copies of Oracle database when the database is open in read/write mode, the archived redo logs must be physically located on a separate volume from the volume containing the oracle datafiles, control files, server parameter file, and online redo logs.</p> <p>To back up the database and archived redo logs by volume:</p> <ol> <li> <p>Start a SQL*Plus session on the target database and make sure the database is open <code>READ WRITE</code>.</p> </li> <li> <p>Use a third-party VSS requester to select the volumes where the datafiles, control files, and server parameter file are physically located.</p> </li> <li> <p>Create a snapshot of the database files.</p> <p>Oracle VSS writer includes the server parameter file, control file, and datafiles in the snapshot. The online redo logs will not be included in the snapshot. Note that you can restore the server parameter file individually, but the control files and datafiles must be always restored together.</p> </li> <li> <p>Use a third-party VSS requester to select the volumes where all of the archived redo logs (or the fast recovery area) are physically located.</p> </li> <li> <p>Create a snapshot of the archived redo logs.</p> </li> </ol> </div> <!-- class="sect3" --></div> <!-- class="sect2" --> <a id="BABJIDCH" name="BABJIDCH"></a><a id="NTQRF302" name="NTQRF302"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Backing Up a Database in NOARCHIVELOG Mode</h3> <p>For an Oracle database running in <code>NOARCHIVELOG</code> mode, the database must be in a consistent state when you create a VSS snapshot. Backups made while the database is open read/write are not supported.</p> <a id="BABIJHCC" name="BABIJHCC"></a><a id="NTQRF303" name="NTQRF303"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Making Component-Based Backups of a NOARCHIVELOG Database</h4> <p>For an Oracle database in <code>NOARCHIVELOG</code> mode, the only supported component-based VSS snapshot is of <code>Oracle Database</code> when the type is full, default, or copy.</p> <p>To back up the database by component:</p> <ol> <li> <p>Start a SQL*Plus session on the target database and place the database in a consistent state. For example, enter the following commands:</p> <pre xml:space="preserve" class="oac_no_warn">SHUTDOWN STARTUP MOUNT </pre></li> <li> <p>Use a third-party VSS requester to select the <code>Oracle Database</code> component.</p> </li> <li> <p>Create a volume-based VSS snapshot.</p> <p>Oracle VSS writer includes the server parameter file, control file, and datafiles in the snapshot. The online redo logs will not be included in the snapshot.</p> </li> </ol> </div> <!-- class="sect3" --> <a id="BABIHGGD" name="BABIHGGD"></a><a id="NTQRF304" name="NTQRF304"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Making Volume-Based Backups of a NOARCHIVELOG Database</h4> <p>To back up the database by volume:</p> <ol> <li> <p>Start a SQL*Plus session on the target database and place the database in a consistent state. For example, enter the following commands:</p> <pre xml:space="preserve" class="oac_no_warn">SHUTDOWN STARTUP MOUNT </pre></li> <li> <p>Use a third-party VSS requester to select the volumes where the datafiles, control files, and server parameter file are physically located.</p> </li> <li> <p>Create a volume-based VSS snapshot.</p> <p>Oracle VSS writer includes the server parameter file, control file, and datafiles in the snapshot. The online redo logs will not be included in the snapshot. Note that you can restore the server parameter file individually, but the control files and datafiles must be always restored together.</p> </li> </ol> </div> <!-- class="sect3" --></div> <!-- class="sect2" --></div> <!-- class="sect1" --> <a id="BABIGGCG" name="BABIGGCG"></a><a id="NTQRF305" name="NTQRF305"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1"><a id="sthref356" name="sthref356"></a>Restoring and Recovering a Database</h2> <p>This section explains how to restore and recover VSS snapshots. As in the case of backups, the procedure depends on the archiving mode of the database and the type of snapshot that you are restoring. The following topics are described:</p> <ul> <li> <p><a href="#BEIGCCJJ">Restoring and Recovering a Database in ARCHIVELOG Mode</a></p> </li> <li> <p><a href="#BEIHDAGF">Restoring a Database in NOARCHIVELOG Mode</a></p> </li> </ul> <a id="BEIGCCJJ" name="BEIGCCJJ"></a><a id="NTQRF306" name="NTQRF306"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Restoring and Recovering a Database in ARCHIVELOG Mode</h3> <p>You can select the components listed in <a href="#BABJDAJJ">Table 8-3, "Components Usable in a Restore Operation"</a> in a restore and recovery operation. The table describes the validations that Oracle VSS writer performs for the components during the pre-restore phase, and the actions that it performs after the restore completes.</p> <div class="tblruleformalwidemax"><a id="NTQRF307" name="NTQRF307"></a><a id="sthref357" name="sthref357"></a><a id="BABJDAJJ" name="BABJDAJJ"></a> <p class="titleintable">Table 8-3 Components Usable in a Restore Operation</p> <table class="RuleFormalWideMax" title="Components Usable in a Restore Operation" summary="This table describes components defined by the Oracle VSS writer. The table has the following columns: Component, Excluded, and Description." dir="ltr" border="1" width="100%" frame="border" rules="all" cellpadding="3" cellspacing="0"> <col width="15%" /> <col width="32%" /> <col width="*" /> <col width="21%" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t9">Component</th> <th align="left" valign="bottom" id="r1c2-t9">Pre-Restore Phase</th> <th align="left" valign="bottom" id="r1c3-t9">Post-Restore Phase</th> <th align="left" valign="bottom" id="r1c4-t9">Section</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t9" headers="r1c1-t9"> <p>Server Parameter File</p> </td> <td align="left" headers="r2c1-t9 r1c2-t9"> <p>Verifies that the database instance is not started. Otherwise, the writer returns a pre-restore failure.</p> </td> <td align="left" headers="r2c1-t9 r1c3-t9"> <p>Ensures that the database is started <code>NOMOUNT</code>. If the server parameter file is restored to the default location for the Oracle home, then the instance starts <code>NOMOUNT</code> automatically. Otherwise, you must set <code>ORA_</code><code><span class="codeinlineitalic">SID</span></code><code>_PFILE</code> to the location of the text-based initialization parameter file that points to the location of the server parameter file.</p> </td> <td align="left" headers="r2c1-t9 r1c4-t9"> <p><a href="#BABHEFAI">"Restoring the Server Parameter File"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t9" headers="r1c1-t9"> <p>Control File</p> </td> <td align="left" headers="r3c1-t9 r1c2-t9"> <p>Verifies that the instance is either started <code>NOMOUNT</code> or not started. If the instance is not started, the writer either starts the instance with the <code>ORA_</code><code><span class="codeinlineitalic">SID</span></code><code>_PFILE</code> instance parameter file, or uses the initialization parameter file or server parameter file in the default location.</p> </td> <td align="left" headers="r3c1-t9 r1c3-t9"> <p>Mounts control file after replicating control file to all the current control file locations pointed to by the instance.</p> </td> <td align="left" headers="r3c1-t9 r1c4-t9"> <p><a href="#BABICDED">"Recovering from the Loss of All Control Files"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t9" headers="r1c1-t9"> <p>Tablespace or datafile component</p> </td> <td align="left" headers="r4c1-t9 r1c2-t9"> <p>Verifies that the database must be mounted or the specified datafiles or tablespaces must be offline.</p> </td> <td align="left" headers="r4c1-t9 r1c3-t9"> <p>Performs complete recovery of these tablespaces or datafiles. The requester application can override the default recovery behavior.</p> </td> <td align="left" headers="r4c1-t9 r1c4-t9"> <p><a href="#BABDEAGD">"Recovering Tablespaces or Datafiles"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t9" headers="r1c1-t9"> <p>All Tablespaces</p> </td> <td align="left" headers="r5c1-t9 r1c2-t9"> <p>Verifies that the database is mounted.</p> </td> <td align="left" headers="r5c1-t9 r1c3-t9"> <p>Extracts redo from the backup writer metadata document and performs incomplete recovery on all the restored datafiles up to the time of snapshot creation. The requester application can override the default recovery behavior.</p> </td> <td align="left" headers="r5c1-t9 r1c4-t9"> <p><a href="#BABIAECC">"Recovering All Tablespaces"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t9" headers="r1c1-t9"> <p>Oracle Database</p> </td> <td align="left" headers="r6c1-t9 r1c2-t9"> <p>Verifies that the instance is not started.</p> </td> <td align="left" headers="r6c1-t9 r1c3-t9"> <p>Starts the database instance, mounts the control file, and performs recovery. See the descriptions of post-restore behavior for Server Parameter File, Control File, and All Tablespaces.</p> </td> <td align="left" headers="r6c1-t9 r1c4-t9"> <p><a href="#BABFBICH">"Performing Disaster Recovery"</a> and <a href="#BABJDFBD">"Restoring Component-Based Backups of a NOARCHIVELOG Database"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t9" headers="r1c1-t9"> <p>Archived redo log or fast recovery area</p> </td> <td align="left" headers="r7c1-t9 r1c2-t9"> <p>None.</p> </td> <td align="left" headers="r7c1-t9 r1c3-t9"> <p>Does not perform default recovery of this component. Nevertheless, the requester application can run required RMAN commands.</p> </td> <td align="left" headers="r7c1-t9 r1c4-t9"> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblruleformalwidemax" --> <a id="BABHEFAI" name="BABHEFAI"></a><a id="NTQRF308" name="NTQRF308"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Restoring the Server Parameter File</h4> <p>This section explains how to restore the server parameter file.</p> <p>To restore the server parameter file:</p> <ol> <li> <p>Select the component named <code>Server Parameter File</code> from a VSS snapshot.</p> </li> <li> <p>Restore the server parameter file.</p> <p>Oracle VSS writer restores the server parameter file to the original location from where it was copied. You can also restore it to a new location.</p> </li> </ol> </div> <!-- class="sect3" --> <a id="BABICDED" name="BABICDED"></a><a id="NTQRF309" name="NTQRF309"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Recovering from the Loss of All Control Files</h4> <p>This section explains how to recover from the loss of all multiplexed control files.</p> <p>To recover from the loss of all control files:</p> <ol> <li> <p>Ensure that the database is in <code>NOMOUNT</code> state or can be started in <code>NOMOUNT</code> state by the Oracle VSS writer.</p> </li> <li> <p>Select the component named <code>Control File</code> from a VSS snapshot.</p> </li> <li> <p>Restore the component containing the lost control file.</p> <p>The Oracle VSS writer automatically mounts the database with the restored control files. If only the control file needs to be recovered, then the VSS requester application can ask the Oracle writer to perform complete recovery.</p> </li> <li> <p>Restore and recover other database components if necessary.</p> </li> <li> <p>Open the database with the <code>RESETLOGS</code> option.</p> </li> </ol> </div> <!-- class="sect3" --> <a id="BABDEAGD" name="BABDEAGD"></a><a id="NTQRF310" name="NTQRF310"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Recovering Tablespaces or Datafiles</h4> <p>This section explains how to recover from the loss of one or more tablespaces or datafiles. This procedure assumes that not all datafiles are lost.</p> <p>To recover from the loss of all tablespaces or datafiles:</p> <ol> <li> <p>Ensure that the database is either mounted or open. If the database is open, then take the datafiles or tablespaces needing recovery offline with the <code>ALTER DATABASE ... OFFLINE</code> statement.</p> </li> <li> <p>If the archived redo logs are required for recovery of the datafiles or tablespaces, then restore the archived redo logs.</p> </li> <li> <p>Select the components from the VSS snapshot that contains the lost datafiles, or all datafiles in the lost tablespaces.</p> </li> <li> <p>Restore the component containing the lost datafiles.</p> <p>The Oracle VSS writer automatically recovers the restored datafiles. If some archived logs are missing, then you can restore the logs and recover the datafiles with SQL*Plus or RMAN.</p> </li> <li> <p>Bring the offline datafiles or tablespaces back online.</p> </li> </ol> </div> <!-- class="sect3" --> <a id="BABIAECC" name="BABIAECC"></a><a id="NTQRF311" name="NTQRF311"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Recovering All Tablespaces</h4> <p>This section explains how to recover from the loss of all tablespaces.</p> <p>To recover all datafiles:</p> <ol> <li> <p>Ensure that the database is mounted.</p> </li> <li> <p>If the archived redo logs are required for recovery of the datafiles or tablespaces, then restore the archived redo logs.</p> </li> <li> <p>Select the component named <code>All Tablespaces</code> from a VSS snapshot.</p> </li> <li> <p>Restore the tablespaces.</p> <p>The Oracle VSS writer automatically recovers the restored datafiles. If some archived logs are missing, then you can restore the logs and recover the datafiles with SQL*Plus or RMAN.</p> </li> <li> <p>Open the database.</p> </li> </ol> </div> <!-- class="sect3" --> <a id="BABFBICH" name="BABFBICH"></a><a id="NTQRF312" name="NTQRF312"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Performing Disaster Recovery</h4> <p>This section explains how to recover from the loss of the server parameter file, control file, and all datafiles.</p> <p>To perform disaster recovery:</p> <ol> <li> <p>Ensure that the instance is not started.</p> </li> <li> <p>If the archived redo logs are required for recovery of the datafiles or tablespaces, then restore the archived redo logs.</p> </li> <li> <p>Select the component named <code>Oracle Database</code> from a VSS snapshot.</p> </li> <li> <p>Restore the database.</p> <p>The Oracle VSS writer automatically starts the instance, mount the database, and recovers the restored datafiles. If some archived logs are missing, then you can restore the logs and recover the datafiles with SQL*Plus or RMAN.</p> </li> <li> <p>Open the database with the <code>RESETLOGS</code> option.</p> </li> </ol> </div> <!-- class="sect3" --></div> <!-- class="sect2" --> <a id="BEIHDAGF" name="BEIHDAGF"></a><a id="NTQRF313" name="NTQRF313"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Restoring a Database in NOARCHIVELOG Mode</h3> <p>For an Oracle database running in <code>NOARCHIVELOG</code> mode, no archived redo logs have been generated so no media recovery is possible. The database files must be in consistent state and require no additional recovery.</p> <a id="BABJDFBD" name="BABJDFBD"></a><a id="NTQRF314" name="NTQRF314"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Restoring Component-Based Backups of a NOARCHIVELOG Database</h4> <p>To restore a component-based backup:</p> <ol> <li> <p>Use a third-party VSS requester to select the <code>Oracle Database</code> component.</p> <p>The Oracle VSS writer automatically restores the datafiles and mounts the database.</p> </li> <li> <p>Open the database with the <code>RESETLOGS</code> option.</p> </li> </ol> </div> <!-- class="sect3" --> <a id="BABHEGGD" name="BABHEGGD"></a><a id="NTQRF315" name="NTQRF315"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h4 class="sect3">Restoring Volume-Based Backups of a NOARCHIVELOG Database</h4> <p>To restore a volume-based backup:</p> <ol> <li> <p>Use a third-party VSS requester to select the volumes where the datafiles, control files, and server parameter file are physically located.</p> </li> <li> <p>Restore all volumes where datafiles and logs are located.</p> </li> <li> <p>Open the database with the <code>RESETLOGS</code> option.</p> </li> </ol> </div> <!-- class="sect3" --></div> <!-- class="sect2" --></div> <!-- class="sect1" --> <a id="BEICDDBD" name="BEICDDBD"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1">Integrating VSS with Third-Party Requester Applications</h2> <p>Oracle VSS writer allows third-party requester applications to control the behavior of recovery and backup sessions. Third-party requester applications use VSS API <code>setBackupOptions</code> or <code>setRestoreOptions</code> to pass an appropriate string to the writer. The writer uses <code>getBackupOptions</code> or <code>getRestoreOptions</code> to get the string set from the requester to perform the pre or post backup and restore actions.</p> <p>The following are the protocols to follow to exploit the flexibility of recovery operations provided by the writer:</p> <ul> <li> <p><a href="#BEIDJAFB">Writer Control Commands</a></p> </li> <li> <p><a href="#BEIGFDIE">Control Commands for Database or All Tablespaces Component</a></p> </li> </ul> <a id="BEIDJAFB" name="BEIDJAFB"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Writer Control Commands</h3> <p>The writer control commands are applicable to all the restored components during the postrestore phase. The format is as follows:</p> <pre xml:space="preserve" class="oac_no_warn">OP1=CMD1, OP2=CMD2, . . . </pre> <p>Run the commands in the following sequence:</p> <ol> <li> <p><code>POST_WTRCMD=NORECOVER</code></p> <p>This command instructs the writer to not perform any post-restore recovery activities defined in the default post-restore recovery operations for the restored component. Otherwise, the post-restore phase default actions are performed.</p> </li> <li> <p><code>POST_RMANCMD=</code><code><span class="codeinlineitalic">cmdstr</span></code></p> <p>This command instructs the writer to run specific RMAN commands, instead of the default operations, after the current operation.</p> </li> <li> <p><code>PRE_SQLCMD=</code><code><span class="codeinlineitalic">cmdstr</span></code></p> <p>This command instructs the writer to run specific SQL commands in <code>OnPrepareBackup</code> or <code>OnPreRestore</code> callback, before performing any other validations. The command is used to stop MRP on a standby database before VSS snapshot is created or to shut down database instance creating a cold backup of the database.</p> </li> <li> <p><code>POST_SQLCMD=</code><code><span class="codeinlineitalic">cmdstr</span></code></p> <p>This command instructs the writer to run specific SQL commands in PostSnapshot or PostRestore callback. This command is used to restart MRP on standby database after VSS snapshot is created or to restart the database instance after the cold backup of the database is performed.</p> </li> </ol> </div> <!-- class="sect2" --> <a id="BEIGFDIE" name="BEIGFDIE"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Control Commands for Database or All Tablespaces Component</h3> <p>Run the following command:</p> <p><code>POST_WTRCMD=UNTIL_SNAPSHOT</code></p> <p>This command instructs the writer to perform recovery to the snapshot creation time. The writer extracts the system change number of the redo logs stored in the database component and performs recovery until the system change number.</p> </div> <!-- class="sect2" --></div> <!-- class="sect1" --> <a id="BABEFBGH" name="BABEFBGH"></a><a id="NTQRF316" name="NTQRF316"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1"><a id="sthref358" name="sthref358"></a>Duplicating a Database</h2> <p>If your VSS shadow copies are transportable, then you can use these shadow copies to duplicate the primary database. In this context of this chapter, duplication refers to the creation of a new database out of the shadow copies for a different database. A duplicate database created from shadow copies can either be a nonstandby database or a standby database for use in a Data Guard environment. Note that RMAN duplication, which makes use of the <code>DUPLICATE</code> command, is a different procedure.</p> <p>This section covers the following topics:</p> <ul> <li> <p><a href="#BEICHAFE">Creating a Nonstandby Database from Shadow Copies</a></p> </li> <li> <p><a href="#BEICJFCD">Creating a Standby Database From Shadow Copies</a></p> </li> </ul> <a id="BEICHAFE" name="BEICHAFE"></a><a id="NTQRF317" name="NTQRF317"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Creating a Nonstandby Database from Shadow Copies</h3> <p>This section assumes that you are duplicating the database on a host with the same file system structure as the primary database.</p> <p>To create a nonstandby database from shadow copies:</p> <ol> <li> <p>Restore the database on the new host by following the procedure in <a href="#BABFBICH">"Performing Disaster Recovery"</a>.</p> </li> <li> <p>Start a SQL*Plus session on the duplicate database and obtain the DBID. You can query the DBID as follows:</p> <pre xml:space="preserve" class="oac_no_warn">SELECT DBID FROM V$DATABASE; </pre></li> <li> <p>Shut down the database consistently. You can shut down the database as follows:</p> <pre xml:space="preserve" class="oac_no_warn">SHUTDOWN; </pre></li> <li> <p>Use the DBNEWID utility to change the DBID.</p> <p><a class="olink SUTIL014" href="http://www.oracle.com/pls/db112/lookup?id=SUTIL014"><span class="italic">Oracle Database Utilities</span></a> explains how to use DBNEWID.</p> </li> <li> <p>Open the database.</p> </li> <li> <p>Start a SQL*Plus session on the duplicate database and query the DBID. You can query the DBID as follows:</p> <pre xml:space="preserve" class="oac_no_warn">SELECT DBID FROM V$DATABASE; </pre></li> </ol> </div> <!-- class="sect2" --> <a id="BEICJFCD" name="BEICJFCD"></a><a id="NTQRF318" name="NTQRF318"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Creating a Standby Database From Shadow Copies</h3> <p>This section assumes that you are create a standby database on a host with the same file system structure as the primary database. This section also assumes that you have read <a class="olink SBYDB" href="http://www.oracle.com/pls/db112/lookup?id=SBYDB"><span class="italic">Oracle Data Guard Concepts and Administration</span></a> and are familiar with standby database creation and maintenance.</p> <p>To create a standby database from shadow copies:</p> <ol> <li> <p>Restore the database on the standby host by following the procedure in <a href="#BABFBICH">"Performing Disaster Recovery"</a>.</p> </li> <li> <p>Start a SQL*Plus session on the new database and a new standby control file must be obtained from primary database. You can create the control file with the SQL statement <code>ALTER DATABASE CREATE STANDBY CONTROLFILE</code>.</p> </li> <li> <p>Start the instance and mount the standby control file.</p> </li> </ol> </div> <!-- class="sect2" --></div> <!-- class="sect1" --></div> <!-- class="ind" --> <div class="footer"> <hr /> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="33%" /> <col width="*" /> <col width="33%" /> <tr> <td align="left"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="98"> <tr> <td align="center" valign="top"><a href="tuning.htm"><img width="24" height="24" src="../../dcommon/gifs/leftnav.gif" alt="Go to previous page" /><br /> <span class="icon">Previous</span></a></td> <td align="center" valign="top"><a href="authen.htm"><img width="24" height="24" src="../../dcommon/gifs/rightnav.gif" alt="Go to next page" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </td> <td style="font-size: 90%" align="center" class="copyrightlogo"><img width="144" height="18" src="../../dcommon/gifs/oracle.gif" alt="Oracle" /><br /> Copyright © 1996, 2010, Oracle and/or its affiliates. All rights reserved.<br /> <a href="../../dcommon/html/cpyr.htm">Legal Notices</a></td> <td align="right"> <table class="icons oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="245"> <tr> <td align="center" valign="top"><a href="../../index.htm"><img width="24" height="24" src="../../dcommon/gifs/doclib.gif" alt="Go to Documentation Home" /><br /> <span class="icon">Home</span></a></td> <td align="center" valign="top"><a href="../../nav/portal_booklist.htm"><img width="24" height="24" src="../../dcommon/gifs/booklist.gif" alt="Go to Book List" /><br /> <span class="icon">Book List</span></a></td> <td align="center" valign="top"><a href="toc.htm"><img width="24" height="24" src="../../dcommon/gifs/toc.gif" alt="Go to Table of Contents" /><br /> <span class="icon">Contents</span></a></td> <td align="center" valign="top"><a href="index.htm"><img width="24" height="24" src="../../dcommon/gifs/index.gif" alt="Go to Index" /><br /> <span class="icon">Index</span></a></td> <td align="center" valign="top"><a href="../../dcommon/html/feedback.htm"><img width="24" height="24" src="../../dcommon/gifs/feedbck2.gif" alt="Go to Feedback page" /><br /> <span class="icon">Contact Us</span></a></td> </tr> </table> </td> </tr> </table> </div> <noscript> <p>Scripting on this page enhances content navigation, but does not change the content in any way.</p> </noscript> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de