Installing and Configuring StatsPack Package (文档 ID 149113.1)

PURPOSE
-------
This note is intended to provide configuring and installing information about 
the StatsPack package.


SCOPE & APPLICATION
-------------------
This note is applicable for Oracle RDBMS releases 8.1.6 and greater, and is 
related to the task of gathering database and session level performance 
information.


Configuration and Installation of the StatsPack Package.
--------------------------------------------------------

- StatsPack Database Space Requirements
  
  Oracle does not recommend installing the package in the SYSTEM tablespace.  A 
  more appropriate tablespace (if it exists) would be a "TOOLS" tablespace.  If 
  you install the package in a locally-managed tablespace, storage clauses are 
  not required, as the storage characteristics are automatically managed.  If you 
  install the package in a dictionary-managed tablespace, Oracle suggests you 
  monitor the space used by the objects created, and adjust the storage clauses 
  of the segments, if required.

  The default initial and next extent size is 1MB for all tables and indexes 
  which contain changeable data.  The minimum default space requirement is 
  approximately 35MB.

  The amount of database space required by the package will vary considerably 
  based on the frequency of snapshots, the size of the database and instance, and 
  the amount of data collected (which is configurable).  It is therefore 
  difficult to provide general storage clauses and space utilization predictions 
  which will be accurate at each site.


- Installing the StatsPack package

  Interactive Installation: 
  ========================

  During the installation process, the user PERFSTAT will be created, default 
  password PERFSTAT.  This user will own all PL/SQL code and database objects 
  created (including the STATSPACK tables, constraints and STATSPACK package).  
  The installation SQL script will prompt for the PERFSTAT user's default and 
  temporary tablespaces and also for the tablespace in which the tables and 
  indexes will be created

      NOTE:
      o  Do not specify the SYSTEM tablespace for the PERFSTAT users
         DEFAULT or TEMPORARY tablespaces; if SYSTEM is specified the
         installation will abort with an error indicating this is the
         problem.  This is enforced as Oracle do not recommend using 
         the SYSTEM tablespace to store statistics data, nor for sorting.
         Use a TOOLS tablespace to store the data, and your instance's
         TEMPORARY tablespace for sorting.

      o  During the installation, the dbms_shared_pool and dbms_job 
         PL/SQL packages are created.  dbms_shared_pool is used to 
         pin the Statspack package in the shared pool; dbms_job 
         is created on the assumption the DBA will want to schedule 
         periodic snapshots automatically using dbms_job.

      o  The installation grants SELECT privilege to PUBLIC for all 
         of the Statspack owned tables (prefixed by STATS$).

  Even though SVRMGRL is available with Oracle8i releases 8.1.6 and 8.1.7, 
  installation of StatsPack can only be done with SQL*Plus do to special 
  formatting commands that are used in the scripts.  Oracle9i releases do not
  include SVRMGRL.

FYI:
====
 
  1)Note:105692.1: "Installation of statspack fails from Server Manager",  
                      discusses this matter further.

  2)BUG 2673074 Abstract: SPCREATE.SQL HANGS BUSY SYSTEM
                This may cause the database to hang while running the 
                SPCREATE.SQL script.

      Workaround:
       Make sure all DBMS_* packages are compiled
       or manually comment out the creation of dbmsjob.sql from spcusr.sql
      
  To install the package, using SQL*Plus and based on the correct platform and 
  RDBMS version, do the following:
        Oracle 8.1.6:
            on Unix:
              SQL>  connect / as sysdba
                SQL>  @?/rdbms/admin/statscre

            on NT:
              SQL>  connect / as sysdba
                SQL>  @%ORACLE_HOME%\rdbms\admin\statscre

            on VMS
              SQL>  connect / as sysdba
                SQL>  @ora_rdbms_admin:statscre


        Oracle8i 8.1.7 and Oracle9i 9.x
            on Unix:
              SQL>  connect / as sysdba
                SQL>  @?/rdbms/admin/spcreate

            on NT:
              SQL>  connect / as sysdba
                SQL>  @%ORACLE_HOME%\rdbms\admin\spcreate

            on VMS
                        SQL>  connect / as sysdba
                        SQL>  @ora_rdbms_admin:spcreate

         Oracle10g and 11g
 
                        SQL>  connect / as sysdba
                        SQL>  @?/rdbms/admin/spcreate

            on NT:
                        SQL>  connect / as sysdba
                        SQL>  @%ORACLE_HOME%\rdbms\admin\spcreate

            on VMS
                        SQL>  connect / as sysdba
                        SQL>  @ora_rdbms_admin:spcreate

Although new tools are available for 10g and 11g such as AWR and ADDM, Statspack can also be used for 10g and 11g.



  Batch mode installation
  =======================
  To install in batch mode, you must assign values to the SQL*Plus
  variables which specify the default and temporary tablespaces before 
  running spcreate.

  The variables are:
    default_tablespace   -> for the default tablespace
    temporary_tablespace -> for the temporary tablespace

    e.g.
     on Unix:
       SQL>  connect / as sysdba
       SQL>  define default_tablespace='tools'
       SQL>  define temporary_tablespace='temp'
       SQL>  @?/rdbms/admin/spcreate

      spcreate will no longer prompt for the above information.


- Log files created during installation

  The StatsPack installation script runs 3 other scripts - you do not need 
  to run these - the scripts are called automatically:
  
      Oracle8i 8.1.6
              1.  statscusr  ->  creates the user and grants privileges
              2.  statsctab  ->  creates the tables
              3.  statspack  ->  creates the package
        Oracle8i 8.1.7 or Oracle9i 9.x
              1.  spcusr  ->  creates the user and grants privileges
              2.  spctab  ->  creates the tables
              3.  spcpkg  ->  creates the package

  The installation script will generate spooled output file based on the name of 
  the script being run and end with a 'lis' extension.  Check each of the three 
  output files produced by the installation to ensure no errors were encountered, 
  before continuing on to the next step.    For example, on Oracle8i 8.1.6, a 
  output file called statcusr.lis will be created.  Under Oracle8i 8.1.7 or 
  Oracle9i 9.x, a output file spcusr.lis will be created.


- Errors found during installation process

  If the scripts were incorrectly run while in SVRMGRL, an ORA-1012 error 
  indicating that the session is not logged in or a PLS-00201 error indicating 
  that stats$statspack_parameter must be declared may be generated.  To correct 
  this problem, first use SQL*Plus to remove StatsPack, and attempt installation 
  using the above steps:

        Oracle 8.1.6:
            on Unix:
              SQL>  connect / as sysdba
                SQL>  @?/rdbms/admin/statsdrp

            on NT:
              SQL>  connect / as sysdba
                SQL>  @%ORACLE_HOME%\rdbms\admin\statsdrp
            on VMS
              SQL>  connect / as sysdba
                SQL>  @ora_rdbms_admin:statsdrp


        Oracle8i 8.1.7 and Oracle9i 9.x
            on Unix:
              SQL>  connect / as sysdba
                SQL>  @?/rdbms/admin/spdrop

            on NT:
              SQL>  connect / as sysdba
                SQL>  @%ORACLE_HOME%\rdbms\admin\spdrop

            on VMS
              SQL>  connect / as sysdba
                SQL>  @ora_rdbms_admin:spdrop

        Oracle 10g and 11g
            on Unix:
              SQL>  connect / as sysdba
                SQL>  @?/rdbms/admin/spdrop

            on NT:
              SQL>  connect / as sysdba
                SQL>  @%ORACLE_HOME%\rdbms\admin\spdrop

            on VMS
              SQL>  connect / as sysdba
                SQL>  @ora_rdbms_admin:spdrop

- Batch mode installation

  There are two ways to install Statspack - interactively (as shown above), 
  or in 'batch' mode (as shown below).  Batch mode is useful when you do not 
  wish to be prompted for the PERFSTAT user's default and temporary tablespaces.

  To install in batch mode, you must assign values to the SQL*Plus 
  variables which specify the default and temporary tablespaces before running 
  the StatsPack installation script.

      The variables are:
        default_tablespace   -> for the default tablespace
        temporary_tablespace -> for the temporary tablespace

      e.g.
      on Unix:
          SQL>  connect / as sysdba
          SQL>  define default_tablespace='tools'
          SQL>  define temporary_tablespace='temp'
        Oracle8i 8.1.6
          SQL>  @?/rdbms/admin/statscre
        Oracle8i 8.1.7 or Oracle9i 9.x
          SQL>  @?/rdbms/admin/spcreate

  The StatsPack installation script will no longer prompt for the above 
  information.

Installing STATSPACK invalidates dbms_utility:
==============================================

If dbms_job is already installed, then comment out the @@dbmsjob line in spcusr.sql.


RELATED DOCUMENTS
-----------------

Note:94224.1 - FAQ - STATSPACK COMPLETE REFERENCE
内容概要:本文系统介绍了算术优化算法(AOA)的基本原理、核心思想及Python实现方法,并通过图像分割的实际案例展示了其应用价值。AOA是一种基于种群的元启发式算法,其核心思想来源于四则运算,利用乘除运算进行全局勘探,加减运算进行局部开发,通过数学优化器加速函数(MOA)和数学优化概率(MOP)动态控制搜索过程,在全局探索与局部开发之间实现平衡。文章详细解析了算法的初始化、勘探与开发阶段的更新策略,并提供了完整的Python代码实现,结合Rastrigin函数进行测试验证。进一步地,以Flask框架搭建前后端分离系统,将AOA应用于图像分割任务,展示了其在实际工程中的可行性与高效性。最后,通过收敛速度、寻优精度等指标评估算法性能,并提出自适应参数调整、模型优化和并行计算等改进策略。; 适合人群:具备一定Python编程基础和优化算法基础知识的高校学生、科研人员及工程技术人员,尤其适合从事人工智能、图像处理、智能优化等领域的从业者;; 使用场景及目标:①理解元启发式算法的设计思想与实现机制;②掌握AOA在函数优化、图像分割等实际问题中的建模与求解方法;③学习如何将优化算法集成到Web系统中实现工程化应用;④为算法性能评估与改进提供实践参考; 阅读建议:建议读者结合代码逐行调试,深入理解算法流程中MOA与MOP的作用机制,尝试在不同测试函数上运行算法以观察性能差异,并可进一步扩展图像分割模块,引入更复杂的预处理或后处理技术以提升分割效果。
C:\Users\ZSKBOOK>cpanm Perl::LanguageServer --> Working on Perl::LanguageServer Fetching http://www.cpan.org/authors/id/G/GR/GRICHTER/Perl-LanguageServer-2.6.2.tar.gz ... OK Configuring Perl-LanguageServer-v2.6.2 ... OK ==> Found dependencies: Class::Refresh, Coro, AnyEvent::AIO, Hash::SafeKeys, IO::AIO, Compiler::Lexer --> Working on Class::Refresh Fetching http://www.cpan.org/authors/id/D/DO/DOY/Class-Refresh-0.07.tar.gz ... OK Configuring Class-Refresh-0.07 ... OK ==> Found dependencies: Class::Unload, Devel::OverrideGlobalRequire --> Working on Class::Unload Fetching http://www.cpan.org/authors/id/I/IL/ILMARI/Class-Unload-0.11.tar.gz ... OK Configuring Class-Unload-0.11 ... OK Building and testing Class-Unload-0.11 ... OK Successfully installed Class-Unload-0.11 --> Working on Devel::OverrideGlobalRequire Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Devel-OverrideGlobalRequire-0.001.tar.gz ... OK Configuring Devel-OverrideGlobalRequire-0.001 ... OK Building and testing Devel-OverrideGlobalRequire-0.001 ... OK Successfully installed Devel-OverrideGlobalRequire-0.001 Building and testing Class-Refresh-0.07 ... OK Successfully installed Class-Refresh-0.07 --> Working on Coro Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/Coro-6.57.tar.gz ... OK Configuring Coro-6.57 ... OK ==> Found dependencies: Guard --> Working on Guard Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/Guard-1.023.tar.gz ... OK Configuring Guard-1.023 ... OK Building and testing Guard-1.023 ... OK Successfully installed Guard-1.023 Building and testing Coro-6.57 ... OK Successfully installed Coro-6.57 --> Working on AnyEvent::AIO Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/AnyEvent-AIO-1.1.tar.gz ... OK Configuring AnyEvent-AIO-1.1 ... OK ==> Found dependencies: IO::AIO --> Working on IO::AIO Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/IO-AIO-4.81.tar.gz ... OK Configuring IO-AIO-4.81 ... OK Building and testing IO-AIO-4.81 ... FAIL ! Installing IO::AIO failed. See C:\Users\ZSKBOOK\.cpanm\work\1752592067.8072\build.log for details. Retry with --force to force install it. ! Installing the dependencies failed: Module 'IO::AIO' is not installed ! Bailing out the installation for AnyEvent-AIO-1.1. --> Working on Hash::SafeKeys Fetching http://www.cpan.org/authors/id/M/MO/MOB/Hash-SafeKeys-0.04.tar.gz ... OK Configuring Hash-SafeKeys-0.04 ... OK Building and testing Hash-SafeKeys-0.04 ... OK Successfully installed Hash-SafeKeys-0.04 --> Working on Compiler::Lexer Fetching http://www.cpan.org/authors/id/G/GO/GOCCY/Compiler-Lexer-0.23.tar.gz ... OK ==> Found dependencies: Module::Build::XSUtil --> Working on Module::Build::XSUtil Fetching http://www.cpan.org/authors/id/H/HI/HIDEAKIO/Module-Build-XSUtil-0.19.tar.gz ... OK Configuring Module-Build-XSUtil-0.19 ... OK ==> Found dependencies: Cwd::Guard, Devel::CheckCompiler, File::Copy::Recursive::Reduced --> Working on Cwd::Guard Fetching http://www.cpan.org/authors/id/K/KA/KAZEBURO/Cwd-Guard-0.05.tar.gz ... OK Configuring Cwd-Guard-0.05 ... OK Building and testing Cwd-Guard-0.05 ... OK Successfully installed Cwd-Guard-0.05 --> Working on Devel::CheckCompiler Fetching http://www.cpan.org/authors/id/S/SY/SYOHEX/Devel-CheckCompiler-0.07.tar.gz ... OK Configuring Devel-CheckCompiler-0.07 ... OK Building and testing Devel-CheckCompiler-0.07 ... OK Successfully installed Devel-CheckCompiler-0.07 --> Working on File::Copy::Recursive::Reduced Fetching http://www.cpan.org/authors/id/J/JK/JKEENAN/File-Copy-Recursive-Reduced-0.008.tar.gz ... OK Configuring File-Copy-Recursive-Reduced-0.008 ... OK Building and testing File-Copy-Recursive-Reduced-0.008 ... OK Successfully installed File-Copy-Recursive-Reduced-0.008 Building and testing Module-Build-XSUtil-0.19 ... OK Successfully installed Module-Build-XSUtil-0.19 Configuring Compiler-Lexer-0.23 ... OK Building and testing Compiler-Lexer-0.23 ... OK Successfully installed Compiler-Lexer-0.23 ! Installing the dependencies failed: Module 'IO::AIO' is not installed, Module 'AnyEvent::AIO' is not installed ! Bailing out the installation for Perl-LanguageServer-v2.6.2. 11 distributions installed C:\Users\ZSKBOOK>cpanm PadWalker PPI PadWalker is up to date. (2.5) --> Working on PPI Fetching http://www.cpan.org/authors/id/M/MI/MITHALDU/PPI-1.283.tar.gz ... OK Configuring PPI-1.283 ... OK ==> Found dependencies: Test::Object, YAML::PP, Test::SubCalls, Safe::Isa --> Working on Test::Object Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Test-Object-0.08.tar.gz ... OK Configuring Test-Object-0.08 ... OK Building and testing Test-Object-0.08 ... OK Successfully installed Test-Object-0.08 --> Working on YAML::PP Fetching http://www.cpan.org/authors/id/T/TI/TINITA/YAML-PP-v0.39.0.tar.gz ... OK Configuring YAML-PP-v0.39.0 ... OK Building and testing YAML-PP-v0.39.0 ... OK Successfully installed YAML-PP-v0.39.0 --> Working on Test::SubCalls Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Test-SubCalls-1.10.tar.gz ... OK Configuring Test-SubCalls-1.10 ... OK ==> Found dependencies: Hook::LexWrap --> Working on Hook::LexWrap Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Hook-LexWrap-0.26.tar.gz ... OK Configuring Hook-LexWrap-0.26 ... OK Building and testing Hook-LexWrap-0.26 ... OK Successfully installed Hook-LexWrap-0.26 Building and testing Test-SubCalls-1.10 ... OK Successfully installed Test-SubCalls-1.10 --> Working on Safe::Isa Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Safe-Isa-1.000010.tar.gz ... OK Configuring Safe-Isa-1.000010 ... OK Building and testing Safe-Isa-1.000010 ... OK Successfully installed Safe-Isa-1.000010 Building and testing PPI-1.283 ... OK Successfully installed PPI-1.283 6 distributions installed C:\Users\ZSKBOOK>cpanm Perl::LanguageServer --> Working on Perl::LanguageServer Fetching http://www.cpan.org/authors/id/G/GR/GRICHTER/Perl-LanguageServer-2.6.2.tar.gz ... OK Configuring Perl-LanguageServer-v2.6.2 ... OK ==> Found dependencies: AnyEvent::AIO, IO::AIO --> Working on AnyEvent::AIO Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/AnyEvent-AIO-1.1.tar.gz ... OK Configuring AnyEvent-AIO-1.1 ... OK ==> Found dependencies: IO::AIO --> Working on IO::AIO Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/IO-AIO-4.81.tar.gz ... OK Configuring IO-AIO-4.81 ... OK Building and testing IO-AIO-4.81 ... FAIL ! Installing IO::AIO failed. See C:\Users\ZSKBOOK\.cpanm\work\1752592572.25820\build.log for details. Retry with --force to force install it. ! Installing the dependencies failed: Module 'IO::AIO' is not installed ! Bailing out the installation for AnyEvent-AIO-1.1. ! Installing the dependencies failed: Module 'IO::AIO' is not installed, Module 'AnyEvent::AIO' is not installed ! Bailing out the installation for Perl-LanguageServer-v2.6.2.
07-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值