Oracle9i Data Guard Concepts and Administration
Release 1 (9.0.1)

Part Number A88808-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

9
SQL Statements

Several different SQL statements and SQL*Plus commands use a STANDBY keyword to specify operations on a standby database. Other SQL statements do not include standby-specific syntax, but are useful for performing operations on a standby database. Table 9-1 describes relevant statements.

Table 9-1  Standby Database Statements
Statement  Description 
ALTER DATABASE ACTIVATE [PHYSICAL] 
STANDBY DATABASE [SKIP [STANDBY 
LOGFILE]]
 

Changes the state of a standby database to an active database and prepares it to become the primary database. See Section 5.4

ALTER DATABASE ADD [STANDBY] LOGFILE 
[THREAD integer] [GROUP integer] 
filespec
 

Adds one or more redo log file groups to the specified thread, making them available to the instance assigned the thread. The STANDBY keyword indicates that the redo log file is for use by standby databases only. 

ALTER DATABASE ADD [STANDBY] LOGFILE 
MEMBER 'filename' [REUSE] TO 
logfile-descriptor
 

Adds new members to existing redo log file groups. The STANDBY keyword is not required. If GROUP integer (of the logfile-descriptor clause) was added for standby use, all of its members will be used only for standby databases as well. 

ALTER DATABASE CREATE STANDBY 
CONTROLFILE AS 'filename'
 

Creates a standby control file. Issue this statement at the primary database. See Section 2.3.3

ALTER DATABASE DROP [STANDBY] LOGFILE 
logfile_descriptor
 

Use the DROP STANDBY LOGFILE clause to drop all members of a standby redo log group. See Oracle9i SQL Reference. 

ALTER DATABASE DROP [STANDBY] LOGFILE 
MEMBER ' filename '
 

Use the DROP STANDBY LOGFILE MEMBER clause to drop one or more standby redo log members.

Each 'filename' must fully specify a member using the conventions for filenames on your operating system. See Oracle9i SQL Reference. 

ALTER DATABASE MOUNT STANDBY DATABASE
 

Mounts a standby database. 

ALTER DATABASE OPEN READ ONLY
 

Opens the standby database in read-only mode. See Section 4.7.2

ALTER DATABASE COMMIT TO SWITCHOVER TO 
[PHYSICAL] {PRIMARY | STANDBY} 
[[NO]WAIT]
 

Prepares the current primary database for switchover to standby status or prepares the current standby database for switchover to primary status. 

ALTER DATABASE REGISTER [PHYSICAL] 
LOGFILE filespec
 

Allows the registration of manually archived logs. 

ALTER DATABASE SET STANDBY DATABASE 
{PROTECTED | UNPROTECTED}
 

Lets you specify whether your database environment is in no-data-loss mode. In this mode, the primary database is protected against data loss and divergence. See Section 3.6.3.5

ALTER DATABASE RECOVER [FROM '/dir'] 
STANDBY DATABASE
 

Initiates manual recovery of the standby database. You can specify a nondefault directory for the archived redo logs. See Section B.2.1

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE
 

Initiates managed recovery of the standby database. See Section 4.3.2

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE [TIMEOUT integer]
 

The TIMEOUT option allows integer minutes of inactivity while the recovery waits for the next archived redo log to arrive from the primary database. If integer minutes go by without receiving another log to process, managed recovery automatically terminates.

The TIMEOUT option can only be used when starting a foreground recovery.

See Section 4.4.9

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE CANCEL [NOWAIT]
 

Causes log apply services to wait for managed recovery to finish writing the current log before canceling recovery.

NOWAIT indicates that log apply services should not wait for the redo apply operation to complete before returning control to the user.

See Section 4.4.1

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE CANCEL [IMMEDIATE] [NOWAIT]
 

The CANCEL option terminates managed recovery. By default, the recovery process will finish processing the log it is currently working on before terminating. If IMMEDIATE is used, the recovery process will terminate after it finishes processing the redo block it is currently working on.

When NOWAIT is used, control is returned to the process that issued the CANCEL statement without waiting for the recovery process to terminate.

See Section 4.4.1

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE DELAY integer;
 

The DELAY option specifies an absolute apply delay interval to the managed recovery operation. The managed recovery operation waits the specified number of minutes before applying the archived redo logs. See Section 4.4.2

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE EXPIRE integer;
 

The EXPIRE option specifies the number of minutes after which the managed recovery operation automatically terminates, relative to the current time. The managed recovery operation terminates at the end of the current archived redo log that is being processed. See Section 4.4.4

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE DISCONNECT [FROM SESSION] 
[NODELAY] [PARALLEL integer]  
 

The DISCONNECT option starts managed recovery in background mode. A managed recovery process (MRP) is created to perform the recovery in the background while the foreground process that issued the RECOVER statement can continue performing other tasks. See Section 4.4.3.

The NODELAY option bypasses the specified delay interval and causes the archived redo logs to be applied to the standby database without delay. See Section 4.4.7.

The PARALLEL option starts a parallel recovery using 'integer' child processes that run in the background. A parallel recovery uses the child processes to spread the workload of the recovery across several processes. See Section 4.4.8

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE FINISH [NOWAIT]
 

The FINISH option is used to complete managed recovery in preparation for a failover from the primary to the standby database. A managed recovery in FINISH mode first applies all available archived redo logs and then continues to recover available standby redo logs, while a recovery that is not in FINISH mode only applies the archived redo logs.

Specifying the FINISH option causes the standby database to be up-to-date with the last committed transaction on the primary database.

The FINISH option can be used when starting a managed recovery or when altering the mode of an ongoing managed recovery. If the FINISH option is used to alter the mode of an ongoing managed recovery, the NOWAIT option allows control to be returned to the foreground process before the recovery completes. See Section 4.4.5

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE NEXT integer;
 

The NEXT option directs the managed recovery operation to apply a specified number of archived redo logs as soon as possible after the log transport services have archived them. See Section 4.4.6

ALTER DATABASE RECOVER MANAGED STANDBY 
DATABASE [NODELAY] [PARALLEL integer]  
 

The NODELAY option bypasses the specified delay interval and causes the archived redo logs to be applied to the standby database without delay. See Section 4.4.7.

The PARALLEL option starts a parallel recovery using 'integer' child processes that run in the background. A parallel recovery uses the child processes to spread the workload of the recovery across several processes. See Section 4.4.8

STARTUP NOMOUNT pfile='initSID.ora'
 

Starts the standby instance without mounting the control file. You must execute this statement before mounting the standby database. See Section 4.3.1 and Section 4.7.2

See Also:

Oracle9i SQL Reference and SQL*Plus User's Guide and Reference for detailed information on these SQL statements 


Go to previous page Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback