InterviewSolution
| 1. |
How Do I Uninstall The Statspack? |
|
Answer» Step 1: DELETE the ENTERED statspack jobs - Log on as the USER under which the statspack jobs run (usually PERFSTAT): SQL>connect PERFSTAT/ SQL>select job, what from user_jobs; This displays a list of the jobs that are currently entered under the user PERFSTAT. You can delete these jobs using DBMS_JOB.REMOVE SQL>connect PERFSTAT/ Execute the following SQL statement for all jobs you want to delete that have the print job number : SQL>execute dbms_job.remove( <job> ); Step 2: Delete the PERFSTAT objects and the PERFSTAT schema - SQL>connect / as sysdba SQL>@?/rdbms/admin/spdrop As a result, the tables of the PERFSTAT user and, after that, the user PERFSTAT are deleted. Step 3: Delete the PERFSTAT tablespace - Since the PERFSTAT tablespace was created specifically for the PERFSTAT user and the statspack DATA, it should be empty once you have deleted the PERFSTAT user. You can check this using SQL>select * from dba_segments where tablespace_name = 'PERFSTAT'; If the tablespace is empty, you can delete it. Step 1: Delete the entered statspack jobs - Log on as the user under which the statspack jobs run (usually PERFSTAT): SQL>connect PERFSTAT/ SQL>select job, what from user_jobs; This displays a list of the jobs that are currently entered under the user PERFSTAT. You can delete these jobs using DBMS_JOB.REMOVE SQL>connect PERFSTAT/ Execute the following SQL statement for all jobs you want to delete that have the print job number : SQL>execute dbms_job.remove( <job> ); Step 2: Delete the PERFSTAT objects and the PERFSTAT schema - SQL>connect / as sysdba SQL>@?/rdbms/admin/spdrop As a result, the tables of the PERFSTAT user and, after that, the user PERFSTAT are deleted. Step 3: Delete the PERFSTAT tablespace - Since the PERFSTAT tablespace was created specifically for the PERFSTAT user and the statspack data, it should be empty once you have deleted the PERFSTAT user. You can check this using SQL>select * from dba_segments where tablespace_name = 'PERFSTAT'; If the tablespace is empty, you can delete it. |
|