LOG_FILE_NAME_CONVERT
Syntax LOG_FILE_NAME_CONVERT = 'string1' , 'string2' , 'string3' , 'string4' , ... Where: ■ string1 is the pattern of the primary database filename ■ string2 is the pattern of the standby database filename ■ string3 is the pattern of the primary database filename ■ string4 is the pattern of the standby database filename You can use as many pairs of primary and standby replacement
DB_FILE_NAME_CONVERT
Syntax DB_FILE_NAME_CONVERT = 'string1' , 'string2' , 'string3' , 'string4' , ... Where: ■ string1 is the pattern of the primary database filename ■ string2 is the pattern of the standby database filename ■ string3 is the pattern of the primary database filename ■ string4 is the pattern of the standby database filename You can use as many pairs of primary and standby replacement
Maintenance of Global Partitioned Indexes
By default, the following operations on partitions on a heap-organized table mark all global indexes as unusable:ADD (HASH) COALESCE (HASH) DROP EXCHANGE MERGE MOVE SPLIT TRUNCATE These indexes can be maintained by appending the clause UPDATE INDEXES to the SQL statements for the operation. The two advantages to maintaining global indexes:■ The index remains available and online throughout the operation. Hence no other applications are affected by this operation.■ The index doesn't have to be
Global Hash Partitioned Indexes
Global hash partitioned indexes improve performance by spreading out contention when the index is monotonically growing. In other words, most of the index insertions occur only on the right edge of an index.[@more@]
Global Range Partitioned Indexes
Global range partitioned indexes are flexible in that the degree of partitioning and the partitioning key are independent from the table's partitioning method. They are commonly used for OLTP environments and offer efficient access to any individual record.The highest partition of a global index must have a partition bound, all of whose values are MAXVALUE. This ensures that all rows in the underlying table can be represented in the index. Global prefixed indexes can be unique or nonunique.You c
Local Partitioned Indexes
Local partitioned indexes are easier to manage than other types of partitioned indexes. They also offer greater availability and are common in DSS environments. The reason for this is equipartitioning: each partition of a local index is associated with exactly one partition of the table. This enables Oracle to automatically keep the index partitions in sync with the table partitions, and makes each table-index pair independent. Any actions that make one partition's data invalid or unavailable on
DBA_FREE_SPACE_COALESCED
DBA_FREE_SPACE_COALESCED describes statistics on coalesced space in alltablespaces in the database.Columns ___________________________ TABLESPACE_NAME Name of Tablespace TOTAL_EXTENTS Total Number of Free Extents in Tablespace EXTENTS_COALESCED Total Number of Coalesced Free Extents in Tablespace PERCENT_EXTENTS_COALESCED Percentage of Coalesced Free Extents in Tablespace TOTAL_BYTES Total Number of Free Bytes in Tablespace BYTES_COALESCED Total Number
TABLE LOCK
Oracle Database permits DDL operations on a table only if the table can be lockedduring the operation. Such table locks are not required during DML operations. Note: Table locks are not acquired on temporary tables.ENABLE TABLELOCK Specify ENABLE TABLE LOCK to enable table locks, therebyallowing DDL operations on the table. All currently executing transactions mustcommit or roll back before Oracle Database enables the table lock. Caution: Oracle Database waits until active DML transactio
Data Warehouse vs OLTP Systems
Data warehouses and OLTP systems have very different requirements. Here are someexamples of differences between typical data warehouses and OLTP systems:WorkloadData warehouses are designed to accommodate ad hoc queries. You might not knowthe workload of your data warehouse in advance, so a data warehouse should beoptimized to perform well for a wide variety of possible query operations.OLTP systems support only predefined operations. Your applications might bespecifically tuned or designed to s
TRUNCATE TABLE STORAGE Clauses
The STORAGE clauses let you determine what happens to the space freed by thetruncated rows. The DROP STORAGE clause and REUSE STORAGE clause also apply tothe space freed by the data deleted from associated indexes.DROP STORAGE Specify DROP STORAGE to deallocate all space from the deletedrows from the table or cluster except the space allocated by the MINEXTENTSparameter of the table or cluster. This space can subsequently be used by other objectsin the tablespace. Oracle Database also sets the N
ALTER SYSTEM DISCONNECT SESSION Clause
Use the DISCONNECT SESSION clause to disconnect the current session by destroyingthe dedicated server process (or virtual circuit if the connection was made by way of aShared Sever). To use this clause, your instance must have the database open. Youmust identify the session with both of the following values from the V$SESSION view:■ For integer1, specify the value of the SID column.■ For integer2, specify the value of the SERIAL# column.If system parameters are appropriately configured, then a
Joseph C.Johnson以餐馆来做MTS形象的比喻
MTS(Multi-Threaded Server) 假设ORACLE是一家餐馆,当你走进一家餐馆时你感觉最舒服的服务方式就是有一个专门的waiter来为你服务,而不管餐馆中来了多少人,她只对你请求应答,这是DEDICTE的处理方式,也就是说每一个ORACLE客户端的连接都有一个专门的服务进程来为它服务。而大部的餐馆的服方式都不是一对一的,当你走进的时侯,你就被指定了一个waiter,她也可能为其它桌服着务,这对于餐馆来说是最有利的,因为他们可以服务更多的客人而不需要增加他们的员工。这样对你来说也可能是不错的,如果餐馆不是太忙,她服务的客人的请求都
利用dbms_support包查询当前会话的session_id
dbms_support包需要独立安装,目录 :$oracle_home/rdbms/admin文件名 :dbmssupp.sql以sys用户执行dbmssupp.sql脚本后 ,给用户赋予权限后 , 使用该包的函数mysid即返回当前会话的session_id.SQL> GRANT EXECUTE ON dbms_support TO PUBLIC;...SQL> CREATE PUBLIC SYNONYM dbms_support FOR dbms_support;...SQL> SELECT dbms_support.MYSID FROM dual; MYSID---------- 142[@more@]
When to Partition a Table
Here are some suggestions for when to partition a table:■ Tables greater than 2GB should always be considered for partitioning.■ Tables containing historical data, in which new data is added into the newestpartition. A typical example is a historical table where only the current month'sdata is updatable and the other 11 months are read only.[@more@]
Overview of Partitioned Indexes
Just like partitioned tables, partitioned indexes improve manageability, availability,performance, and scalability. They can either be partitioned independently (globalindexes) or automatically linked to a table's partitioning method (local indexes). Ingeneral, you should use global indexes for OLTP applications and local indexes fordata warehousing or DSS applications. Also, whenever possible, you should try to uselocal indexes because they are easier to manage. When deciding what kind ofpartit
Restrictions on Create Bitmap Indexes
Bitmap indexes are subject to the following restrictions:■ You cannot specify BITMAP when creating a global partitioned index.■ You cannot create a bitmap secondary index on an index-organized table unlessthe index-organized table has a mapping table associated with it.■ You cannot specify both UNIQUE and BITMAP.■ You cannot specify BITMAP for a domain index.[@more@]
CREATE BITMAP INDEX
Specify BITMAP to indicate that index is to be created with a bitmap for each distinctkey, rather than indexing each row separately. Bitmap indexes store the rowidsassociated with a key value as a bitmap. Each bit in the bitmap corresponds to apossible rowid. If the bit is set, then it means that the row with the correspondingrowid contains the key value. The internal representation of bitmaps is best suited forapplications with low levels of concurrent transactions, such as data warehousing.——
DB_BLOCK_CHECKING
Property DescriptionParameter type StringDefault value OFFModifiable ALTER SESSION, ALTER SYSTEMRange of values OFF | LOW | MEDIUM | FULLBasic NoDB_BLOCK_CHECKING controls whether or not Oracle performs block checking fordatabase blocks. The checking that is performed depends on the value you supply, as follows:■ OFF - no block checking is performed for blocks in the user tablespaces.However, semantic blo
ERROR:ORA-01555
The usual cause of this error is that long-running transactions/queries are occurring within the database at the same time as short online transactions. When the short transactions complete, the rollback segments they have used is up for grabs and can be overwritten. As soon as that area is overwritten, the long-running queries/transactions can no longer maintain a read consistent picture of the data, and they fail with an ORA-1555. It's a scheduling problem. Run batch and long-running jobs at o
OPTIMIZER_MODE Initialization Parameter
ALL_ROWS :The optimizer uses a cost-based approach for all SQL statements in the session regardless of the presence of statistics and optimizes with a goal of best throughput (minimum resource use to complete the entire statement). This is the default value. FIRST_ROWS_n :The optimizer uses a cost-based approach, regardless of the presence of statistics, and optimizes with a goal of best response ti