I'ld try to run the scripts one by one. from the spcreate.sql. Also I'ld agree to the Jeff's pointCode:1.1. Database Space Requirements 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. Note: The default initial and next extent size is 1MB or 5MB for all tables and indexes which contain changeable data. The minimum default tablespace requirement is approximately 45MB. Dictionary Managed Tablespaces 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. Locally Managed Tablespaces If you install the package in a locally-managed tablespace, storage clauses are not required, as the storage characteristics are automatically managed. 1.2 Installing the Tool Step 1. This step creates the PERFSTAT user, which will own all PL/SQL code and database objects created (including the STATSPACK tables, constraints and the STATSPACK package). During the installation you will be prompted for the PERFSTAT user's default and temporary tablespaces. The default tablespace will be used to create all Statspack objects (such as tables and indexes). The temporary tablespace will be used for sort-type activities (for more information on temporary tablespaces, see the Oracle Concepts Documentation). NOTE: o Oracle do not recommend using the SYSTEM tablespace to store statistics data. A more appropriate tablespace is the TOOLS tablespace. Similarly, do not use the SYSTEM tablespace as the Statspack user's TEMPORARY tablespace. 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. To install the package, either change directory to the ORACLE_HOME rdbms/admin directory, or fully specify the ORACLE_HOME/rdbms/admin directory when calling the installation script, spcreate. To run the installation script, you must use SQL*Plus and connect as a user with SYSDBA privilege. Do not use Server Manager (svrmgrl) to install Statspack, as the installation will fail. e.g. Start SQL*Plus, then: on Unix: SQL> connect / as sysdba SQL> @?/rdbms/admin/spcreate on NT: SQL> connect / as sysdba SQL> @%ORACLE_HOME%\rdbms\admin\spcreate The spcreate install script runs 3 other scripts - you do not need to run these - the scripts are called automatically: 1. spcusr -> creates the user and grants privileges 2. spctab -> creates the tables 3. spcpkg -> creates the package Check each of the three output files produced (spcusr.lis, spctab.lis, spcpkg.lis) by the installation to ensure no errors were encountered, before continuing on to the next step. Note that there are two ways to install Statspack - interactively (as shown above), or in "batch" mode; batch mode is useful when you do not wish to be prompted for the PERFSTAT user's default and temporary tablespaces. 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. Step 2. The setup phase is now complete. If you wish to, you may decide to change the password of the PERFSTAT user for security purposes. 1.3 Errors during installation A common error made during Statspack installation is running the install script from Server Manager (svrmgrl) rather than from SQL*Plus. If you use svrmgrl, the installation will fail. To correctly install Statspack after such errors, first run the de-install script, then the install script. Both scripts must be run from SQL*Plus. e.g. Start SQL*Plus, connect as a user with SYSDBA privilege, then: SQL> @spdrop SQL> @spcreate
Sam




Reply With Quote