What is the difference between restoring and recovering
摘自orafaqRestoring involves copying backup files from secondary storage (backup media) to disk. This can be done to replace damaged files or to copy/move a database to a new location.Recovery is the process of applying redo logs to the database to roll it forward. One can roll-forward until a specific point-in-time (before the disaster occurred), or roll-forward until the last transaction recorded in the log files.SQL> connect SYS as SYSDBASQL> RECOVER DATABASE UNTIL TIME '2001-03-06:16:0
What is the difference between online and offline backups
摘自orafaqA hot (or on-line) backup is a backup performed while the database is open and available for use (read and write activity). Except for Oracle exports, one can only do on-line backups when the database is ARCHIVELOG mode.A cold (or off-line) backup is a backup performed while the database is off-line and unavailable to its users. Cold backups can be taken regardless if the database is in ARCHIVELOG or NOARCHIVELOG mode. It is easier to restore from off-line backups as no recovery (from
V$SGA && V$SGA_DYNAMIC_FREE_MEMORY (99)
V$SGA V$SGA displays summary information about the system global area (SGA). Column Datatype Description NAME VARCHAR2(20) SGA component group VALUE NUMBER Memory size (in bytes) V$SGA_DYNAMIC_FREE_MEMORY V$SGA_DYNAMIC_FREE_MEMORY displays information about the amount of SGA memory available for future dynamic SGA resize operations. Column Datatype Description CURRENT_
Enabling Automatic Shared Memory Management (98)
To enable automatic shared memory management:1. If you are migrating from a manual management scheme, execute the followingquery on the instance running in manual mode to get a value for SGA_TARGET:SELECT ( (SELECT SUM(value) FROM V$SGA) - (SELECT CURRENT_SIZE FROM V$SGA_DYNAMIC_FREE_MEMORY) ) "SGA_TARGET"FROM DUAL;2. Set the value of SGA_TARGET, either by editing the text initialization parameterfile and restarting the database, or by issuing the following statement:ALTER SYSTEM
Using Automatic Shared Memory Management (97)
You enable the automatic shared memory management feature by setting the SGA_TARGET parameter to a non-zero value. This parameter in effect replaces the parameters that control the memory allocated for a specific set of individual components, which are now automatically and dynamically resized (tuned) as needed.Note: The STATISTICS_LEVEL initialization parameter must be set to TYPICAL (the default) or ALL for automatic shared memory management to function.The SGA_TARGET initialization parameter
Limiting the Size of the SGA (96)
The SGA_MAX_SIZE initialization parameter specifies the maximum size of the System Global Area for the lifetime of the instance. You can dynamically alter the initialization parameters affecting the size of the buffer caches, shared pool, large pool, Java pool, and streams pool but only to the extent that the sum of these sizes and the sizes of the other components of the SGA (fixed SGA, variable SGA, and redo log buffers) does not exceed the value specified by SGA_MAX_SIZE.If you do not specify
Components and Granules in the SGA (95)
The SGA comprises a number of memory components, which are pools of memory used to satisfy a particular class of memory allocation requests. Examples of memory components include the shared pool (used to allocate memory for SQL and PL/SQL execution), the java pool (used for java objects and other java execution memory), and the buffer cache (used for caching disk blocks). All SGA components allocate and deallocate space in units of granules. Oracle Database tracks SGA memory use in internal numb
Managing the System Global Area (SGA) (94)
This section discusses the initialization parameters that affect the amount of memory allocated to the System Global Area (SGA). Except for the SGA_MAX_SIZE initialization parameter, they are dynamic parameters whose values can be changed by the ALTER SYSTEM statement. The size of the SGA is dynamic, and can grow or shrink by dynamically altering these parameters.管理SGA1. SGA_MAX_SIZE 是静态参数2. 其他都是动态参数, 可以使用ALTER SYSTEM 语句动态修改的参数.[@more@]
Nonstandard Block Sizes (93)
Tablespaces of nonstandard block sizes can be created using the CREATE TABLESPACE statement and specifying the BLOCKSIZE clause. These nonstandard block sizes can have any of the following power-of-two values: 2K, 4K, 8K, 16K or 32K. Platform-specific restrictions regarding the maximum block size apply, so some of these sizes may not be allowed on some platforms.To use nonstandard block sizes, you must configure subcaches within the buffer cache area of the SGA memory for all of the nonstandard
DB_BLOCK_SIZE Initialization Parameter (92)
The most commonly used block size should be picked as the standard block size. In many cases, this is the only block size that you need to specify. Typically, DB_BLOCK_SIZE is set to either 4K or 8K. If you do not set a value for this parameter, the default data block size is operating system specific, which is generally adequate. You cannot change the block size after database creation except by re-creating the database. If the database block size is different from the operating system block si
Specifying Database Block Sizes (91)
The DB_BLOCK_SIZE initialization parameter specifies the standard block size for thedatabase. This block size is used for the SYSTEM tablespace and by default in other tablespaces. Oracle Database can support up to four additional nonstandard block sizes.指定数据块大小1. DB_BLOCK_SIZE指定标准块大小2. 指定了system表空间和其他默认表空间的块大小[@more@]
Specifying Control Files (90)
The CONTROL_FILES initialization parameter specifies one or more control filenames for the database. When you execute the CREATE DATABASE statement, the control files listed in the CONTROL_FILES parameter are created.If you do not include CONTROL_FILES in the initialization parameter file, then Oracle Database creates a control file using a default operating system dependent filename or, if you have enabled Oracle-managed files, creates Oracle-managed control files.If you want the database to cr
Specifying a Flash Recovery Area (89)
A flash recovery area is a location in which Oracle Database can store and manage files related to backup and recovery. It is distinct from the database area, which is a location for the Oracle-managed current database files (datafiles, control files, and online redo logs).You specify a flash recovery area with the following initialization parameters:■ DB_RECOVERY_FILE_DEST: Location of the flash recovery area. This can be a directory, file system, or Automatic Storage Management (ASM) disk gro
DB_DOMAIN Initialization Parameter (88)
DB_DOMAIN is a text string that specifies the network domain where the database is created. This is typically the name of the organization that owns the database. If the database you are about to create will ever be part of a distributed database system, give special attention to this initialization parameter before database creation.初始化参数 : DB_DOMAIN1. 该参数指定创建的数据库的网络域名2. 如果该数据库有可能是一个分布式数据库系统的一部分 , 对于该参数需要给与特定的关注[@more@]
DB_NAME Initialization Parameter (87)
DB_NAME must be set to a text string of no more than eight characters. During database creation, the name provided for DB_NAME is recorded in the datafiles, redo log files, and control file of the database. If during database instance startup the value of the DB_NAME parameter (in the parameter file) and the database name in the control file are not the same, the database does not start.初始化参数 : DB_NAME1. 需要是少于8个字符的文本串2. 该参数记录在数据文件, 重做日志文件 和控制文件中3.
Determining the Global Database Name (86)
The global database name consists of the user-specified local database name and the location of the database within a network structure. The DB_NAME initialization parameter determines the local name component of the database name, and the DB_DOMAIN parameter indicates the domain (logical location) within a network structure. The combination of the settings for these two parameters must form a database name that is unique within a network.For example, to create a database with a global database
Understanding Initialization Parameters (85)
When an Oracle instance starts, it reads initialization parameters from an initialization parameter file. This file can be either a read-only text file, or a read/write binary file. The binary file is called a server parameter file, and it always resides on the server. A server parameter file enables you to change initialization parameters with ALTER SYSTEM commands and to persist the changes across a shutdown and startup. It also provides a basis for self-tuning by the Oracle Database server. F
Performance Considerations of FORCE LOGGING Mode (84)
FORCE LOGGING mode results in some performance degradation. If the primary reason for specifying FORCE LOGGING is to ensure complete media recovery, and there is no standby database active, then consider the following:■ How many media failures are likely to happen?■ How serious is the damage if unlogged direct writes cannot be recovered?■ Is the performance degradation caused by forced logging tolerable?If the database is running in NOARCHIVELOG mode, then generally there is no benefit to pla
Using the FORCE LOGGING Clause (83)
To put the database into FORCE LOGGING mode, use the FORCE LOGGING clause in the CREATE DATABASE statement. If you do not specify this clause, the database is not placed into FORCE LOGGING mode. Use the ALTER DATABASE statement to place the database into FORCE LOGGING mode after database creation. This statement can take a considerable time for completion, because it waits for all unlogged direct writes to complete.You can cancel FORCE LOGGING mode using the following SQL statement:ALTER DATABAS
Specifying FORCE LOGGING Mode (82)
Some data definition language statements (such as CREATE TABLE) allow the NOLOGGING clause, which causes some database operations not to generate redo records in the database redo log. The NOLOGGING setting can speed up operations that can be easily recovered outside of the database recovery mechanisms, but it can negatively affect media recovery and standby databases.Oracle Database lets you force the writing of redo records even when NOLOGGING has been specified in DDL statements. The database