你好,游客 登录 注册 搜索
背景:
阅读新闻

ORA-18008: cannot find OUTLN schema

[日期:2013-01-22] 来源:Linux社区  作者:xionglang [字体:大 中 小]

另外为啥会要这个outln用户呢?不要为啥就不可以呢!

What is the OUTLN user?
=======================
 
This document will address these topics:

1. Why is the user OUTLN created by Oracle?
2. What are stored outlines and what are they good for?
3. What does OUTLN user own?
4. If it is dropped by accident, can it be created on the fly?


1. Why is the user OUTLN created by Oracle?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The OUTLN user is created automatically during installation of Oracle.
The create user outln statement appears in SQL.BSQ that is run at database
creation time to initiate the datadictionary, as such the OUTLN user is an
integral part of the database. This user is granted connect, resource, and
execute any procedure privileges. It is also set to locked and expired
since no end-user connections should be made to this acount except for
maintenance. The database administrator should change the password for
the OUTLN schema just as for the SYS and SYSTEM schemas, also make sure the
account is locked and only unlock it in case a DBA needs access to it for
maintenance operations.


2. What are stored outlines and what are they good for?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Stored outlines support a very usefull feature: Optimizer Plan Stability

After carefully tuning an application, you might want to ensure that the
optimizer generates the same execution plan whenever the same SQL statements
are executed. Plan stability allows you to maintain the same execution plans
for the same SQL statements, regardless of changes to the database such as
re-analyzing tables, adding or deleting data, modifying a table's columns,
constraints, or indexes, changing the system configuration, or even upgrading
to a new version of the optimizer.

The CREATE OUTLINE statement creates a stored outline, which contains a set of
attributes that the optimizer uses to create an execution plan. Stored outlines
can also be created automatically by setting the system parameter
CREATE_STORED_OUTLINES to TRUE.

The system parameter USE_STORED_OUTLINES can be set to TRUE, FALSE, or a
category name to indicate whether to make use of existing stored outlines for
queries that are being executed. The OUTLN_PKG package provides procedures used
for managing stored outlines.
 
Oracle adds the OUTLN user schema to support Plan Stability. The OUTLN user
acts as a place to centrally manage metadata associated with stored outlines.
 
You cannot create this user on the fly. The user OUTLN makes use of the package
OUTLN_PKG which is used to manage stored outlines and their outline categories.

The package sys.outln_pkg is created by script. "dbmsol.sql" in the
$ORACLE_HOME/rdbms/admin directory. The "dbmsol.sql" script. is called from
"catproc.sql". "prvtol.plb" creates the body of "outln_pkg"; it is also called
from catproc.sql.


3. What does OUTLN user own?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The outline user ows some tables that are the stored outlines metadata
repository, typically these are OL$, OL$HINTS and OL$NODES and some indexes.

In case of an upgrade or migration, the upgrade or migration scripts will take
care of any changes to the OUTLN respository tables and associated package.

4. If it is dropped by accident, can it be created on the fly?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

First of all: you should never try to drop the OUTLN user (in the same way as you
should not drop the SYSTEM user) but if you accidently did you can recreate
it by running the same commands from the file sql.bsq again to create the outln
user (do NOT run sql.bsq directly!), issue grants, create tables and indexes,
note that "M_IDEN" stands for the length of an identifier which is 30 for current
releases, "M_CSIZ" is 2000. For some versions support has created an automated
script. to restore the outln schema and its contents.

Naturally you will have lost all stored outlines when you drop the OUTLN schema,
also, since the kernel makes implicit assumptions on its existence , you will get
the error ORA-18009 "one or more outline system tables do not exist" when you try
to issue outline related sql statements when the OUTLN schema is not there.

linux
相关资讯       ORA-18008 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款