Oracle9i Statspack Installation and use of detailed

Source: Internet
Author: User

The following is tested under Window xp,oracle9.2.0.1, under Linux/unix the path "" is replaced by the "/"

Installation of 1.Statspack

Sqlplus/nolog
Conn/as SYSDBA

--Create a statspack table space, require more than 80M or use existing tablespace, but must have more than 80M of free space

Sql>create tablespace statspack datafile ' <statspack_tbs.dbf> '
Size 100M autoextend on
EXTENT MANAGEMENT Local uniform SIZE 128K
--Execute the installation script, under Oracle_home dbmsadmin
Sql>@? Dbmsadminspcreate.sql

--During the creation, you will be prompted to enter the password for the new user Perfstat, the default tablespace, the default temp table space, and I'll set this here to: Oracle Statspack TEMP

-After the creation, will automatically use the Perfstat user to connect, may check the sql>show user--if not perfstat the user, may execute one of the following

Sql>conn perfstat/oracle

2. Generate performance reports manually using Statspack
--Grab a snapshot, must be 2 times or more
Sql>exec Statspack.snap

--at least two times
Sql>exec Statspack.snap

--Generate a report that prompts you to enter the test and end snapshot ID of the generated report, and must be a continuous snapshot within the same cycle without disrupting the database

Sql>@? Dbmsadminspreport.sql

--Prompts you to enter the file name of the report, either by default or

3. Open the generated report with a text editor, specific analysis

4. If the installation process error, how to correct

You must first delete the related information created by Spcreate.sql with Spdrop.sql
Sql>conn/as SYSDBA
Sql>@? Dbmsadminspdrop.sql

5. Install Statspack.snap to automatic execution, grab a snapshot every hour
Sql>@? Dbmsadminspauto.sql
--Check if the task has this task, and you can see the job ID

Sql>select * from Dba_job;
--You can delete a task if you don't want to automatically grab the snapshot

--Write down the ID of the job and then execute
Sql>conn perfstat/oracle
Sql>exec dbms_remove (n);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.