Sunday, March 8, 2009

AWR report creation

Automatic workload Repository(AWR) help us in analyzing the SQL queries. We've our system in unix and this AWR report help us in analyzing the queries which have been executed in the system.

The following are the steps to create an awr report:

1) Login to the unix system using username and password.

2) sqlplus username/password@dbname (ex : scott/tiger@SYS)

3) Then execute the following command :

    exec dbms_workload_repository.create_snapshot();

   The above command will create a snapshot at time X.

4) After the monitoring time again execute the above command to create the snapshot at time Y.Now we've to two snapshot to create the report.

5) Execute the following command to create the report:

  @?rdbms/admin/awrrpt.sql

6) On excecuting the above command a prompt screen will come to enter the number of days to show the snapshot id. Type it as 1 On pressing enter the snapshot ids that have been taken today will be displayed on the screen.

7)Then type of report to be generated has to be entered .Type it as html and press enter.

8) Then we've to enter the snapshot id. Enter the snapshot id as displayed on the screen.

9)Then enter the output file name. The output will be created as ouputfile.lst. The The output format would be in "lst" format. ftp the file to desktop and change the extension to html.Then the report can be view in internet explorer.

 

No comments:

Powered By Blogger