DATA GUARD 中alter database 命令
15 SQL Statements Relevant to Data Guard
This chapter summarizes the SQL and SQL*Plus statements that are useful for performing operations on standby databases in a Data Guard environment. This chapter includes the following topics:
This chapter contains only the syntax and a brief summary of particular SQL statements. You must refer to the. for complete syntax and descriptions about these and other SQL statements
See for a list of initialization parameters that you can set and dynamically update using the ALTER SYSTEM SET statement.
15.1 ALTER DATABASE Statements
describes ALTER DATABASE statements that are relevant to Data Guard.
Table 15-1 ALTER DATABASE Statements Used in Data Guard Environments
ALTER DATABASE Statement | Description |
---|---|
ADD [STANDBY] LOGFILE [THREAD integer] [GROUP integer] filespec |
Adds one or more online redo log file groups or standby redo log file groups to the specified thread, making the log files available to the instance to which the thread is assigned. See for an example of this statement. |
ADD [STANDBY] LOGFILE MEMBER 'filename' [REUSE] TO logfile-descriptor |
Adds new members to existing online redo log file groups or standby redo log file groups. See for an example of this statement. |
[ADD|DROP] SUPPLEMENTAL LOG DATA {PRIMARY KEY|UNIQUE INDEX} COLUMNS |
This statement is for logical standby databases only. Use it to enable full supplemental logging before you create a logical standby database. This is necessary because supplemental logging is the source of change to a logical standby database. To implement full supplemental logging, you must specify either the PRIMARY KEY COLUMNS or the UNIQUE INDEX COLUMNS keyword on this statement. See for more information. |
COMMIT TO SWITCHOVER TO [[PRIMARY] | [[PHYSICAL|LOGICAL] [STANDBY]][WITH | WITHOUT] SESSION SHUTDOWN] [WAIT | NOWAIT] |
Performs a switchover to:
Note: On logical standby databases, you issue the ALTER DATABASE PREPARE TO SWITCHOVER statement to prepare the database for the switchover before you issue the ALTER DATABASE COMMIT TO SWITCHOVER statement. See and for examples of this statement. |
CREATE [PHYSICAL|LOGICAL] STANDBY CONTROLFILE AS 'filename' [REUSE] |
Creates a control file to be used to maintain a physical or a logical standby database. Issue this statement on the primary database. See for an example of this statement. |
DROP [STANDBY] LOGFILE logfile_descriptor |
Drops all members of an online redo log file group or standby redo log file group. See for an example of this statement. |
DROP [STANDBY] LOGFILE MEMBER 'filename' |
Drops one or more online redo log file members or standby redo log file members. |
[NO]FORCE LOGGING |
Controls whether or not the Oracle database logs all changes in the database except for changes to temporary tablespaces and temporary segments. The [NO]FORCE LOGGING clause is required to prevent inconsistent standby databases.: The primary database must be mounted but not open when you issue this statement. See for an example of this statement. |
MOUNT [STANDBY DATABASE] |
Mounts a standby database, allowing the standby instance to receive redo data from the primary instance. |
OPEN |
Opens a previously started and mounted database:
See Section x.x for an example of this statement. |
PREPARE TO SWITCHOVER TO[PRIMARY] | [[PHYSICAL|LOGICAL] [STANDBY]][WITH | WITHOUT] SESSION SHUTDOWN] [WAIT | NOWAIT] |
This statement is for logical standby databases only. It prepares the primary database and the logical standby database for a switchover by building the LogMiner dictionary before the switchover takes place. After the dictionary build has completed, issue the ALTER DATABASE COMMIT TO SWITCHOVER statement to switch the roles of the primary and logical standby databases. See for examples of this statements. |
RECOVER MANAGED STANDBY DATABASE [[NODELAY][DISCONNECT [FROM SESSION]][NOPARALLEL|PARALLEL [integer]][UNTIL CHANGE scn][USING CURRENT LOGFILE] ] |
This statement starts and controls Redo Apply on physical standby databases. You can use the RECOVER MANAGED STANDBY DATABASE clause on a physical standby database that is mounted, open, or closed. See Step in and for examples. Note: Several clauses and keywords were deprecated and are supported for backward compatibility only. See for more information about these clauses. |
RECOVER MANAGED STANDBY DATABASE CANCEL [[NOWAIT]|[WAIT][IMMEDIATE] ] |
The CANCEL clause cancels Redo Apply on a physical standby database after applying the current archived redo log file. |
RECOVER MANAGED STANDBY DATABASE FINISH [FORCE][NOWAIT|WAIT] ] |
The FINISH clause initiates failover on the target physical standby database and recovers the current standby redo log files. Use the FINISH clause only in the event of the failure of the primary database. This clause overrides any delay intervals specified. Include FORCE to terminate the RFS processes and allow the failover to occur immediately, without waiting for the RFS process to exit. Specify NOWAIT to have control returned immediately, rather than after the recovery process is complete. See Step 4 in for examples. |
REGISTER [OR REPLACE] [PHYSICAL|LOGICAL] LOGFILE filespec |
Allows the registration of manually archived redo log files. See for an example of this statement. |
RECOVER TO LOGICAL STANDBY new_database_name |
Instructs log apply services to continue applying changes to the physical standby database until you issue the command to convert the database to a logical standby database. See for more information. |
RESET DATABASE TO INCARNATION integer |
Resets the target recovery incarnation for the database from the current incarnation to a different incarnation. |
SET STANDBY DATABASE TO MAXIMIZE {PROTECTION|AVAILABILITY|PERFORMANCE} |
Use this clause to specify the level of protection for the data in your Data Guard configuration. You specify this clause from the primary database, which must be mounted but not open. |
START LOGICAL STANDBY APPLY INITIAL [scn-value] ] [NEW PRIMARY dblink] |
This statement is for logical standby databases only.It starts SQL Apply on a logical standby database. See for examples of this statement. |
{STOP|ABORT} LOGICAL STANDBY APPLY |
This statement is for logical standby databases only.Use the STOP clause to stop SQL Apply on a logical standby database in an orderly fashion. Use the ABORT clause to stop SQL Apply abruptly. See for an example of this statement. |
ACTIVATE [PHYSICAL|LOGICAL] STANDBY DATABASE FINISH APPLY] |
Performs a failover. The standby database must be mounted before it can be activated with this statement. Note: Do not use the ALTER DATABASE ACTIVATE STANDBY DATABASE statement to failover because it causes data loss. Instead, use the following best practices:
|
15.2 ALTER SESSION Statements
describes an ALTER SESSION statement that is relevant to Data Guard.
Table 15-2 ALTER SESSION Statement Used in Data Guard Environments
ALTER SESSION Statement | Description |
---|---|
ALTER SESSION [ENABLE|DISABLE] GUARD |
This statement is for logical standby databases only. This statement allows privileged users to turn the database guard on and off for the current session. See for an example of this statement. |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-692851/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- flashback database 結合 data guardDatabase
- Data Guard - Snapshot Standby Database配置Database
- Oracle DBA命令參考——alter databaseOracleDatabase
- 建立Data guard logical standby database須知Database
- ORA-01555 on Active Data Guard Standby DatabaseDatabase
- Oracle 11g Data Guard 使用 duplicate from active database 建立 standby databaseOracleDatabase
- Oracle 11g Data Guard 使用duplicate from active database 建立 standby databaseOracleDatabase
- Oracle 11g Data Guard 使用duplicate from active databaseOracleDatabase
- 搭建11g data guard(duplicate from active database方式)Database
- oracle10g data guard(dg)__flashback_physical databaseOracleDatabase
- alter database in OracleDatabaseOracle
- Oracle data guard常用維護操作命令(轉)Oracle
- Oracle設定日誌引數-ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;OracleDatabase
- DATA GUARD部署模式——DATA GUARD概念和管理模式
- alter database datafile offline and alter database tablespace ...offlineDatabase
- alter database create datafileDatabase
- alter database create datafile '' as ''Database
- 介紹ORACLE DATA GUARD——DATA GUARD概念和管理Oracle
- Oracle 11gR2 Database和Active Data Guard遷移案例OracleDatabase
- alter database和alter system和alter session的區別DatabaseSession
- Data guard搭建
- oracle data guard!!Oracle
- Standby (Data guard) 常用維護命令及相關概念
- alter database open resetlogs;Database
- Data Guard Broker系列之二:Data Guard Broker配置實戰
- alter database offline 與 alter database offline drop效果比對Database
- DATA GUARD 簡介
- Data Guard 建立(ASM)ASM
- Oracle Data Guard配置Oracle
- 11gR2 Active Data Guard 閃回 - flashback database / snapshot standby - 3Database
- 11gR2 Active Data Guard 閃回 - flashback database / snapshot standby - 2Database
- oracle9i(9204)dg(data guard)_ place the standby database in manual recovery modeOracleDatabase
- Oracle 11g Data Guard Enabling Active Data GuardOracle
- [Data Guard]Oracle10g Data Guard學習筆記(一)Oracle筆記
- [Data Guard]Oracle10g Data Guard學習筆記(二)Oracle筆記
- [Data Guard]Oracle10g Data Guard學習筆記(三)Oracle筆記
- alter database disable thread 2Databasethread
- ALTER DATABASE RESETLOGS 的作用Database