Sunteți pe pagina 1din 11

V$LOG V$LOG displays log file information from the control file.

Column Datatype GROUP# NUMBER THREAD# NUMBER SEQUENCE# NUMBER BYTES NUMBER MEMBERS NUMBER ARCHIVED VARCHAR2(3) STATUS VARCHAR2(16) en to. This is the state of a redo log that was just added, or just after a RESETLOGS, when it i s not the current redo log. CURRENT - Current redo log. This implies that the redo log is active. The redo log could be open or close d. ACTIVE - Log is active but is not the current log. It is needed for crash recovery. It may be in use for block recovery. It may or may not be archived. CLEARING - Log is being re-created as an empt y log after an ALTER DATABASE CLEAR LOGFILE sta tement. After the log is cleared, the st atus changes to UNUSED. CLEARING_CURRENT - Current log is being clear ed of a closed thread. The log can stay in this sta tus if there is some failure in the switch such as an I/O error writin g the new log header. INACTIVE - Log is no longer needed for instan ce recovery. It may be in use for media recovery . It might or might not be archived. INVALIDATED - Archived the current redo log w ithout a log switch. FIRST_CHANGE# NUMBER Lowest system change number (SCN) in the log FIRST_TIME DATE Time of the first SCN in the log ================================================================================ ========================================================== 11:37:55 SQL> 11:46:01 SQL> select * from v$log; Description Log group number Log thread number Log sequence number Size of the log (in bytes) Number of members in the log group Archive status (YES or NO) Log status: UNUSED - Online redo log has never been writt

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRS T_CHANGE# FIRST_TIME ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------ ---------------------1 1 65 52428800 1 NO INACTIVE 2250035 14-DEC-2011 , 10:24:39 2 1 66 52428800 1 NO CURRENT 2252734 14-DEC-2011 , 11:32:22 3 1 64 52428800 1 NO INACTIVE 2246633 14-DEC-2011 , 09:05:56 ================================================================================ =========================================================== V$LOGFILE This view contains information about redo log files. Column Datatype GROUP# NUMBER STATUS VARCHAR2(7) Description Redo log group identifier number Status of the log member: INVALID - File is inaccessible STALE - File's contents are inc omplete DELETED - File is no longer use d null - File is in use TYPE VARCHAR2(7) Type of the logfile: ONLINE STANDBY MEMBER VARCHAR2(513) Redo log member name IS_RECOVERY_DEST_FILE Indicates whether the file was created in the flash reco very area (YES) or not (NO) ================================================================================ ============================================================ 11:46:10 SQL> select * from v$logfile; GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE ---------- ------- ------- ---------------------------------------------------------------------3 ONLINE J:\ORACLE\PRODUCT\10.2.0\ORADATA\DATA1\REDO03.LOG NO 2 NO 1 NO ================================================================================ ============================================================= V$LOG_HISTORY ONLINE J:\ORACLE\PRODUCT\10.2.0\ORADATA\DATA1\REDO01.LOG ONLINE J:\ORACLE\PRODUCT\10.2.0\ORADATA\DATA1\REDO02.LOG

V$LOG_HISTORY displays log history information from the control file. Column Datatype Description RECID NUMBER Control file record ID STAMP NUMBER Control file record stamp THREAD# NUMBER Thread number of the archived log SEQUENCE# NUMBER Sequence number of the archived log FIRST_CHANGE# NUMBER Lowest system change number (SCN) in the log FIRST_TIME DATE Time of the first entry (lowest SCN) in the log NEXT_CHANGE# NUMBER Highest SCN in the log RESETLOGS_CHANGE# NUMBER Resetlogs change number of the database when the log was written RESETLOGS_TIME DATE Resetlogs time of the database when the log was written ================================================================================ ============================================================== 11:51:07 SQL> select * from v$log_history; RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# RESETLOGS_CHANGE# RESETLOGS_TIME ---------- ---------- ---------- ---------- ------------- --------------------------------- ----------------- ----------------56 769533117 1 56 2025131 10-DEC-2011 , 10:12:11 2049401 534907 19-NOV-2011 , 22: 57 769547290 1 57 2049401 10-DEC-2011 , 15:11:57 2073919 534907 19-NOV-2011 , 22: 58 769560286 1 58 2073919 10-DEC-2011 , 19:08:09 2097315 534907 19-NOV-2011 , 22: 59 769636947 1 59 2097315 10-DEC-2011 , 22:44:45 2122704 534907 19-NOV-2011 , 22: 60 769723921 1 60 2122704 11-DEC-2011 , 20:02:27 2147552 534907 19-NOV-2011 , 22: 61 769771486 1 61 2147552 12-DEC-2011 , 20:12:01 2177110 534907 19-NOV-2011 , 22: 62 769794654 1 62 2177110 13-DEC-2011 , 09:24:46 2206229 534907 19-NOV-2011 , 22: 63 769856756 1 63 2206229 13-DEC-2011 , 15:50:53 2246633 534907 19-NOV-2011 , 22: 64 769861479 1 64 2246633 14-DEC-2011 , 09:05:56 2250035 534907 19-NOV-2011 , 22: 65 769865542 1 65 2250035 14-DEC-2011 , 10:24:39 2252734 534907 19-NOV-2011 , 22: ================================================================================ =============================================================== 19:11:10 SQL> select current_scn from v$database; CURRENT_SCN ----------668335 ================================================================================ =============================================================== 19:11:27 SQL> select current_scn,CHECKPOINT_CHANGE# from v$database; CURRENT_SCN ----------668592 CHECKPOINT_CHANGE#(Last SCN checkpointed) -----------------661972

================================================================================

=============================================================== V$CONTROLFILE This view lists the names of the control files. Column Description STATUS INVALID if the name cannot be determined (which should not occur); NULL if the name can be determined NAME Name of the control file IS_RECOVERY_DEST_FILE Indicates whether the file was created in the flash rec overy area (YES) or not (NO) BLOCK_SIZE Control file block size FILE_SIZE_BLKS Control file size (in blocks) ================================================================================ =============================================================== 11:54:09 SQL> select * from v$controlfile; STATUS _FILE -----------NAME IS_RECOVERY_DEST BLOCK_SIZE FILE_SIZE_BLKS ------------------------------------------------------- ------------------------- -------------J:\ORACLE\PRODUCT\10.2.0\ORADATA\DATA1\CONTROL01.CTL NO 16384 430 J:\ORACLE\PRODUCT\10.2.0\ORADATA\DATA1\CONTROL02.CTL NO 16384 430 J:\ORACLE\PRODUCT\10.2.0\ORADATA\DATA1\CONTROL03.CTL NO 16384 430 ================================================================================ =============================================================== V$CONTROLFILE_RECORD_SECTION V$CONTROLFILE_RECORD_SECTION displays information about the control file record sections. Column Datatype TYPE VARCHAR2(28) Description Identifies the type of record section: DATABASE CKPT PROGRESS REDO THREAD REDO LOG DATAFILE FILENAME TABLESPACE TEMPORARY FILENAME RMAN CONFIGURATION LOG HISTORY OFFLINE RANGE ARCHIVED LOG

BACKUP SET BACKUP PIECE BACKUP DATAFILE BACKUP REDOLOG DATAFILE COPY BACKUP CORRUPTION COPY CORRUPTION DELETED OBJECT PROXY COPY BACKUP SPFILE DATABASE INCARNATION FLASHBACK LOG RECOVERY DESTINATION INSTANCE SPACE RESERVAT ION REMOVABLE RECOVERY FILE S RMAN STATUS THREAD INSTANCE NAME MA PPING MTTR DATAFILE HISTORY RECORD_SIZE NUMBER Record size in bytes RECORDS_TOTAL NUMBER Number of records allocated for the section RECORDS_USED NUMBER Number of records used in the section FIRST_INDEX NUMBER Index (position) of the first record LAST_INDEX NUMBER Index of the last record LAST_RECID NUMBER Record ID of the last record ================================================================================ =============================================== 12:01:11 SQL> select * from v$controlfile_record_section; TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED FIRST_INDEX LAST_INDEX LAST_RECID ---------------------------- ----------- ------------- ------------ -------------------- --------DATABASE 316 1 1 0 0 0 CKPT PROGRESS 8180 11 0 0 0 0

REDO THREAD 0 REDO LOG 0 DATAFILE 0 FILENAME 0 TABLESPACE 0 TEMPORARY FILENAME 0 RMAN CONFIGURATION 0 LOG HISTORY 65 OFFLINE RANGE 0

256 0 72 3 428 13 524 0 68 2 56 1 1108 0 56 65 200 0

8 16 100 2298 100 100 50 292 163

1 3 5 9 6 1 0 65 0

0 0 0 0 0 0 0 1 0

TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED FIRST_INDEX LAST_INDEX LAST_RECID ---------------------------- ----------- ------------- ------------ -------------------- --------ARCHIVED LOG 584 28 0 0 0 0 BACKUP SET 40 409 0 0 0 0 BACKUP PIECE 736 200 0 0 0 0 BACKUP DATAFILE 116 282 0 0 0 0 BACKUP REDOLOG 76 215 0 0 0 0 DATAFILE COPY 660 223 1 1 1 1 BACKUP CORRUPTION 44 371 0 0 0 0 COPY CORRUPTION 40 409 0 0 0 0 DELETED OBJECT 20 818 1 1 1 1 PROXY COPY 852 249 0 0 0 0 BACKUP SPFILE 36 454 0 0 0 0 TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED FIRST_INDEX LAST_INDEX LAST_RECID ---------------------------- ----------- ------------- ------------ -------------------- --------DATABASE INCARNATION 56 292 2 1 2 2 FLASHBACK LOG 84 2048 0 0 0 0 RECOVERY DESTINATION 180 1 1 0 0 0 INSTANCE SPACE RESERVATION 28 1055 1 0 0 0 REMOVABLE RECOVERY FILES 32 1000 0 0 0 0

RMAN STATUS 0 0 THREAD INSTANCE NAME MAPPING 0 0 MTTR 0 0 DATAFILE HISTORY 0 0 STANDBY DATABASE MATRIX 0 0 GUARANTEED RESTORE POINT 0 0

116 80 100 568 400 212

141 8 8 57 10 2048

0 8 1 0 10 0

0 0 0 0 0 0

TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED FIRST_INDEX LAST_INDEX LAST_RECID ---------------------------- ----------- ------------- ------------ -------------------- --------RESTORE POINT 212 2083 0 0 0 0 34 rows selected. ================================================================================ ============================================== V$PARAMETER V$PARAMETER displays information about the initialization parameters that are cu rrently in effect for the session. A new session inherits parameter values from the instance-wide values displayed by the V$SYSTEM_PARAMETER view. Column NUM NAME TYPE Description Parameter number Name of the parameter Parameter type: 1 - Boolean 2 - String 3 - Integer 4 - Parameter file 5 - Reserved 6 - Big integer VALUE VARCHAR2(512) Parameter value for the session (if modi fied within the session); otherwise, the instance-wide parameter value DISPLAY_VALUE VARCHAR2(512) Parameter value in a user-friendly forma t. For example, if the VALUE column shows the value 262144 for a big integer par ameter, then the DISPLAY_VALUE column will show the value 256K. ISDEFAULT VARCHAR2(9) Indicates whether the parameter is set t o the default value (TRUE) or the parameter value was specified in the parameter file (FALSE) ISSES_MODIFIABLE VARCHAR2(5) Indicates whether the parameter can be c hanged with ALTER SESSION (TRUE) or not (FALSE) ISSYS_MODIFIABLE VARCHAR2(9) Indicates whether the parameter can be c hanged with ALTER SYSTEM and when the change takes effect: IMMEDIATE - Parameter can be chan ged with ALTER SYSTEM regardless of the type of parameter file used to start the instanc e. The change takes effect immediately. DEFERRED - Parameter can be chang ed with ALTER SYSTEM regardless of the type of parameter file used Datatype NUMBER VARCHAR2(80) NUMBER

to start the instance. The change takes effect in subsequent sessions. FALSE - Parameter cannot be chang ed with ALTER SYSTEM unless a server parameter file was used to start the instan ce. The change takes effect i n subsequent instances. ISINSTANCE_MODIFIABLE VARCHAR2(5) For parameters that can be changed with ALTER SYSTEm, indicates whether the value of the parameter can be different for every instance (TRUE) or wh ether the parameter must have the same value for all Real Application Clusters i nstances (FALSE). If the ISSYS_MODIFIABLE column is FALSE, then this column is always FALS E. ISMODIFIED VARCHAR2(10) Indicates whether the parameter has been modified after instance startup: M ODIFIED - Parameter has been modified with ALTER SESSION S YSTEM_MOD - Parameter has been modified with ALTER SYSTEM (which causes all the currently logged in sessions' values to be modi fied) F ALSE - Parameter has not been modified after instance startup ISADJUSTED VARCHAR2(5) Indicates whether Oracle adjusted the in put value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the n ext prime number) ISDEPRECATED VARCHAR2(5) Indicates whether the parameter has been deprecated (TRUE) or not (FALSE) DESCRIPTION VARCHAR2(255) Description of the parameter UPDATE_COMMENT VARCHAR2(255) Comments associated with the most recent update HASH NUMBER Hash value for the parameter name ================================================================================ ================================================================================ ====== select name,type,value ,display_value,isdefault,isses_modifiable,issys_modifiabl e,isinstance_modifiable from v$parameter where name like '%sga%' / NAME TYPE VALUE DISPLAY_VALUE ISDEFA ULT ISSES ISSYS_MOD ISINS -------------------- ---------- -------------------- -------------------- -------- ----- --------sga_max_size 6 293601280 280M TRUE FALSE FALSE FALSE pre_page_sga 1 FALSE FALSE TRUE FALSE FALSE FALSE lock_sga 1 FALSE FALSE TRUE FALSE FALSE FALSE sga_target 6 293601280 280M FALSE FALSE IMMEDIATE TRUE ================================================================================ ================================================================================

====== select name,display_value,isses_modifiable,issys_modifiable,isdeprecated,descrip tion from v$parameter where name like '%sga%'; NAME DISPLAY_VALUE ISSES ISSYS_MOD ISDEP DESCRIPTION -------------------- -------------------- ----- --------- ----- ----------------------------------sga_max_size 280M FALSE FALSE FALSE max total SGA si ze pre_page_sga FALSE FALSE FALSE FALSE pre-page sga for process lock_sga FALSE FALSE FALSE FALSE Lock entire SGA in physical memory sga_target 280M FALSE IMMEDIATE FALSE Target size of S GA ================================================================================ ================================================================================ ======

Parameter type String Syntax LOG_ARCHIVE_DEST_[1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10] = { null_string} | { LOCATION=path_name | SERVICE=service_name } [ { MANDATORY | OPTIONAL } ] [ REOPEN[=seconds] | NOREOPEN ] [ DELAY[=minutes] | NODELAY ] [ REGISTER[=template] | NOREGISTER ] [ TEMPLATE=template] | NOTEMPLATE ] [ ALTERNATE=destination | NOALTERNATE ] [ DEPENDENCY=destination | NODEPENDENCY ] [ MAX_FAILURE=count | NOMAX_FAILURE ] [ QUOTA_SIZE=blocks | NOQUOTA_SIZE ] [ QUOTA_USED=blocks | NOQUOTA_USED ] [ ARCH | LGWR ] [ SYNC[=PARALLEL|NOPARALLEL] | ASYNC[=blocks] ] [ AFFIRM | NOAFFIRM ] [ NET_TIMEOUT=seconds | NONET_TIMEOUT ] } Default value There is no default value. Parameter class Dynamic: ALTER SESSION, ALTER SYSTEM Note: This parameter is valid only if you have installed Oracle Enterprise Edition. Yo u may continue to use LOG_ARCHIVE_DEST if you have installed Oracle Enterprise E dition. However, you cannot use both LOG_ARCHIVE_DEST_n and LOG_ARCHIVE_DEST, as they are not compatible.

The LOG_ARCHIVE_DEST_n parameters (where n = 1, 2, 3, ... 10) define up to ten a rchive log destinations. The parameter integer suffix is defined as the handle displayed by the V$ARCHIVE_DEST dynamic performance view. Values: SERVICE Specifies a standby destination. Oracle Net (IPC or TCP) transmits the archivelo g. A standby instance must be associated with the destination. The value represented by tnsnames_service corresponds to an appropriate service name in tnsnames.ora. LOCATION Specifies a local file system destination. You must specify this parameter for a t least one destination. MANDATORY Specifies that archiving to the destination must succeed before the redo log fil e can be made available for reuse. OPTIONAL Specifies that successful archiving to the destination is not required before th e redo log file can be made available for reuse. If the "must succeed count," set with LOG_ARCHIVE_MIN_SUCCEED_DES T, is met, the redo logfile is marked for reuse. This is the default. REOPEN Specifies the minimum number of seconds before the archiver process (ARCn, foreg round, or log writer process) should try again to access a previously failed destination. Future attempts are made when the next redo log file is arch ived. If a destination is MANDATORY, Oracle Corporation recommends that you specify a REOPEN time that reduces the possibility of primary database shutdown due to lack of available online redo log files. If you do not specify seconds, the default value is 300 seconds. ================================================================================ ================================================================================ ======= Parameter type String Syntax LOG_ARCHIVE_DEST_STATE_n = {alternate | reset | defer | enable} Default value enable Parameter class Dynamic: ALTER SESSION, ALTER SYSTEM

The LOG_ARCHIVE_DEST_STATE_n parameters (wheren = 1, 2, 3, ... 10) specify the a vailability state of the corresponding destination. The parameter suffix (1 through 10) specifies one of the ten corresponding LOG_A RCHIVE_DEST_n destination parameters. Values: enabled Specifies that a valid log archive destination can be used for a subsequent arch iving operation (automatic or manual). This is the default. defer Specifies that valid destination information and attributes are preserved, but t he destination is excluded from archiving operations until re-enabled. alternate Specifies that a log archive destination is not enabled but will become enabled if communications to another destination fail. The LOG_ARCHIVE_DEST_STATE_n parameters have no effect on the ENABLE state for t he LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST parameters. The V$ARCHIVE_DEST dynamic performance view shows values in use for the current session. The DEST_ID column of that view corresponds to the archive destination suffix n. ================================================================================ ================================================================================ =====

S-ar putea să vă placă și