Management of Remote Dependencies (252)
Oracle also manages application-to-database and distributed database dependencies.For example, an Oracle Forms application might contain a trigger that references atable, or a local stored procedure might call a remote procedure in a distributeddatabase system. The database system must account for dependencies among suchobjects. Oracle uses different mechanisms to manage remote dependencies, dependingon the objects involved.远程依赖性管理[@more@]
Management of Local Dependencies (251)
Oracle manages all local dependencies using the database’s internal dependency table,which keeps track of each schema object’s dependent objects. When a referenced objectis modified, Oracle uses the depends-on table to identify dependent objects, which arethen invalidated.For example, assume a stored procedure UPDATE_SAL references the tableJWARD.employees. If the definition of the table is altered in any way, the status ofevery object that references JWARD.employees is changed to INVALID, inc
Local and Remote Dependency Management (250)
Tracking dependencies and completing necessary recompilations are performedautomatically by Oracle. Local dependency management occurs when Oraclemanages dependencies among the objects in a single database. For example, astatement in a procedure can reference a table in the same database.Remote dependency management occurs when Oracle manages dependencies indistributed environments across a network. For example, an Oracle Forms trigger candepend on a schema object in the database. In a distribut
Shared SQL Dependency Management (249)
In addition to managing dependencies among schema objects, Oracle also managesdependencies of each shared SQL area in the shared pool. If a table, view, synonym, orsequence is created, altered, or dropped, or a procedure or package specification isrecompiled, all dependent shared SQL areas are invalidated. At a subsequentexecution of the cursor that corresponds to an invalidated shared SQL area, Oraclereparses the SQL statement to regenerate the shared SQL area.共享SQL的依赖性管理1. Oracle不
Object Name Resolution (248)
Object names referenced in SQL statements can consist of several pieces, separated byperiods. The following describes how Oracle resolves an object name.1. Oracle attempts to qualify the first piece of the name referenced in the SQLstatement. For example, in hr.employees, hr is the first piece. If there is only onepiece, then the one piece is considered the first piece. a. In the current schema, Oracle searches for an object whose name matches the first piece of the object name. If it
Security Authorizations (247)
Oracle notices when a DML object or system privilege is granted to or revoked from auser or PUBLIC and automatically invalidates all the owner’s dependent objects.Oracle invalidates the dependent objects to verify that an owner of a dependent objectcontinues to have the necessary privileges for all referenced objects. Internally, Oraclenotes that such objects do not have to be recompiled. Only security authorizationsneed to be validated, not the structure of any objects. This optimization elimi
Session State and Referenced Packages (246)
Each session that references a package construct has its own instance of that package,including a persistent state of any public and private variables, cursors, and constants.All of a session’s package instantiations including state can be lost if any of thesession’s instantiated packages are subsequently invalidated and recompiled.[@more@]
Data Warehousing Considerations (245)
Some data warehouses drop indexes on tables at night to facilitate faster loads.However, all views dependent on the table whose index is dropped get invalidated.This means that subsequently running any package that reference these droppedviews will invalidate the package.Remember that whenever you create a table, index, and view, and then drop the index,all objects dependent on that table are invalidated, including views, packages, packagebodies, functions, and procedures. This protects updatabl
Program Units and Referenced Objects (244)
Oracle automatically invalidates a program unit when the definition of a referencedobject is altered. For example, assume that a standalone procedure includes severalstatements that reference a table, a view, another standalone procedure, and a publicpackage procedure. In that case, the following conditions hold:■ If the referenced table is altered, then the dependent procedure is invalidated.■ If the base table of the referenced view is altered, then the view and the dependentprocedure are in
Views and Base Tables (243)
A view depends on the base tables or views referenced in its defining query. If thedefining query of a view is not explicit about which columns are referenced, forexample, SELECT * FROM table, then the defining query is expanded when storedin the data dictionary to include all columns in the referenced base table at that time.If a base table or view of a view is altered, renamed, or dropped, then the view isinvalidated, but its definition remains in the data dictionary along with the privileges,
Resolution of Schema Object Dependencies (241)
When a schema object is referenced directly in a SQL statement or indirectly through areference to a dependent object, Oracle checks the status of the object explicitlyspecified in the SQL statement and any referenced objects, as necessary. Oracle’s actiondepends on the status of the objects that are directly and indirectly referenced in a SQLstatement:■ If every referenced object is valid, then Oracle runs the SQL statementimmediately without any additional work.■ If any referenced view or P
Compilation of Views and PL/SQL Program Units (242)
A view or PL/SQL program unit can be compiled and made valid if the followingconditions are satisfied:■ The definition of the view or program unit must be correct. All of the SQL andPL/SQL statements must be proper constructs.■ All referenced objects must be present and of the expected structure. For example,if the defining query of a view includes a column, the column must be present inthe base table.■ The owner of the view or program unit must have the necessary privileges for thereferenced
Introduction to Dependency Issues (240)
Some types of schema objects can reference other objects as part of their definition. Forexample, a view is defined by a query that references tables or other views. Aprocedure’s body can include SQL statements that reference other objects of adatabase. An object that references another object as part of its definition is called adependent object, while the object being referenced is a referenced object.If you alter the definition of a referenced object, dependent objects may or may notcontinue
解决TOAD中执行计划显示报错的问题
全文摘自:http://amamn125.itpub.net/post/30871/306380如果是默认安装TOAD,在查看执行计划时会报一个错:ORA-02404: 未找到指定的计划表稍微研究了一下,解决这个问题基本上有3个方案:1、最直接的解决方案:直接创建TOAD所需要的计划表,脚本如下:CREATE TABLE TOAD_PLAN_TABLE ( STATEMENT_ID VARCHAR2 (32), TIMESTAMP DATE, REMARKS VARCHAR2 (80), OPERATION VARCHAR2 (30), OPTIONS VARCHAR2 (30), OBJECT_NODE VARCHAR2 (128), OBJECT_OWNER VARCHAR2 (30), OBJECT_NAME VARCHAR2 (30), OBJECT_INSTANCE NUMBER, OBJECT_TYPE V
page cache与buffer cache的关系
1. page cache是VFS的一部分,buffer cache是块设备驱动的一部分2. page cache是面向用户IO的cache,buffer cache是面向块设备IO的cache,3. page cache按照文件的逻辑页进行缓冲,buffer cache按照文件的物理块进行缓冲.4. page cache与buffer cache并不相互独立而是相互融合的,同一文件的cache页即可存在于page cache中,又可存在于buffer cache中,它们在物理内存中只有一份拷贝.文件系统接口就处于page cache和buffer cache之间,它完成page cache的逻辑页与buffercache的物理块之间的相互转换,再交给统一的块设备IO进行调度处理
Page cache vs Buffer cache
Page cache is used to hold pages that contain the data read/written from disk.Whenever a file is read from disk, the data is first copied in page in PageCache and then to user space buffer.Similarly , while writing the data is first written to page in page cache and thento the disk(deferred write).Buffer cache is now implemented through Page Cache(there is no separate BufferCache now)...those pages that are used as buffer cache in the Page cache are called as "bufferpages"[@more@]
The difference between buffers and cache
Buffers are allocated by various processes to use as input queues, etc. Most of the time, buffers are some processes' output, and they are file buffers. A simplistic explanation of buffers is that they allow processes to temporarily store input in memory until the process can deal with it.Cache is typically frequently requested disk I/O. If multiple processes areaccessing the same files, much of those files will be cached to improve performance (RAM being so much faster than hard drives), it's
The Difference Between Cache Memory And A Buffer Area
In computing, a buffer is a region of memory used to temporarily hold output orinput data, comparable to buffers in telecommunication. The data can be output to or inputfrom devices outside the computer or processes within a computer. Buffers can be implemented ineither hardware or software, but the vast majority of buffers are implemented in software. Buffersare used when thereis a difference between the rate at which data is received and the rate at whichit can be processed, or in the case tha
10gR2 Transport AWR Data
全文摘自http://xzh2000.itpub.net/post/96/42411Let's say you are tying to resolve some performance issues in the production databases. As you saw elsewhere in this article, the AWR data is vital for the analysis. However, analyzing AWR data during a normal production run may not be desirable or even feasible. Rather, you may want to load the data in some central location for comparative analysis. How can you do that? A new package DBMS_SWRF_INTERNAL has been provided in Oracle Database 10g Releas
10g awr与statspack区别
全文摘自http://xzh2000.itpub.net/post/96/66492Oracle Database 10 genhances the data collection mechanism with the introduction of the Automatic Workload Repository and Active Session History, which replace the previous performance data gathering tools such as Statspack and utlbstat/utlestat. The major differences between the current repositories from previous such tools include the following:■ Earlier tools had no automated way of interpreting the collected data and results produced by supplied