show parameter job_qu
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 1000
show parameter timed_s
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
timed_statistics boolean TRUE
select file_name from dba_data_files;
FILE_NAME
---------------------------------------------
/u01/app/oracle/oradata/dba/users01.dbf
/u01/app/oracle/oradata/dba/undotbs01.dbf
/u01/app/oracle/oradata/dba/sysaux01.dbf
/u01/app/oracle/oradata/dba/system01.dbf
/u01/app/oracle/oradata/dba/example01.dbf
create tabelspace stpk datafile '/u01/app/oracle/oradata/dba/stpk' size 200M;
@?/rdbms/admin/spcreate
@?/rdbms/admin/spdrop
hufei
STPK
temp
exec statspack.snap
exec statspack.snap
@?/rdbms/admin/spreport
1
2
aa.txt
-----------------------------------------------------------------------------------------
Instance Efficiency Indicators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 100.00 Redo NoWait %: 100.00
Buffer Hit %: 99.98 Optimal W/A Exec %: 100.00
Library Hit %: 90.08 Soft Parse %: 78.52
Execute to Parse %: 68.23 Latch Hit %: 100.00
Parse CPU to Parse Elapsd %: 0.00 % Non-Parse CPU: 100.00
Shared Pool Statistics Begin End
------ ------
Memory Usage %: 76.59 77.61
% SQL with executions>1: 61.10 63.85
% Memory for SQL w/exec>1: 72.50 75.92
cd /u01/app/oracle/product/11.2.0/rdbms/admin
ls -l spauto.sql
variable jobno number;
variable instno number;
begin
select instance_number into :instno from v$instance;
dbms_job.submit(:jobno, 'statspack.snap;', trunc(sysdate+1/24,'HH'), 'trunc(SYSDATE+1/24,''HH'')', TRUE, :instno);
commit;
end;
/
@?/rdbms/admin/spauto.sql
PL/SQL procedure successfully completed.
Job number for automated statistics collection for this instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that this job number is needed when modifying or removing
the job:
JOBNO
----------
23
Job queue process
~~~~~~~~~~~~~~~~~
Below is the current setting of the job_queue_processes init.ora
parameter - the value for this parameter must be greater
than 0 to use automatic statistics gathering:
NAME_COL_PLUS_SHOW_PARAM
------------------------------------------------------------------------------
TYPE
-----------
VALUE_COL_PLUS_SHOW_PARAM
------------------------------------------------------------------------------
job_queue_processes
integer
1000
Next scheduled run
~~~~~~~~~~~~~~~~~~
The next scheduled run for this job is:
JOB NEXT_DATE NEXT_SEC
---------- ------------------- --------------------------------
23 2014-03-26 17:00:00 17:00:00