Antwort: Disbale Default 10G stats job - GATHER_STATS_JOB

From: Martin Klier <Martin.Klier_at_klug-is.de>
Date: Thu, 8 Jul 2010 08:17:29 +0200
Message-ID: <OFE164EA5F.E2117B35-ONC125775A.0022893F-C125775A.0022902A_at_klug-is.de>



AFAIK a job can only be operated as the owner.

--

Mit freundlichem Gruß

Martin Klier
Senior Oracle Database Administrator


Klug GmbH integrierte Systeme
Lindenweg 13, D-92552 Teunz
Tel.: +49 9671/9216-245
Fax.: +49 9671/9216-112
mailto: martin.klier_at_klug-is.de
www.klug-is.de


Geschäftsführer: Johann Klug, Roman Sorgenfrei Sitz der Gesellschaft: Teunz, USt-ID-Nr. DE175481608, HRB Nr. 2037, Amtsgericht Amberg

Von:	Sreejith S Nair <Sreejith.Sreekantan_at_ibsplc.com>
An:	oracle-l_at_freelists.org
Datum:	08.07.2010 07:18
Betreff:	Disbale Default 10G stats job - GATHER_STATS_JOB
Gesendet von:	oracle-l-bounce_at_freelists.org



Hi list memebers,

I would like to disable the default stats gathering job in 10g and would like to configure our own.But I am facing some issues in disabling it.

select grantee,table_name from user_tab_privs where grantee='APP_OWNER'; GRANTEE TABLE_NAME

APP_OWNER        V_$SESSION
APP_OWNER        V_$PARAMETER2
APP_OWNER        V_$DATABASE
APP_OWNER        V_$INSTANCE
APP_OWNER        V_$SGASTAT
APP_OWNER        DBA_ROLLBACK_SEGS
APP_OWNER        DBA_JOBS_RUNNING
APP_OWNER        DBA_JOBS
APP_OWNER        DBMS_LOCK
APP_OWNER        AQ$_AGENT
APP_OWNER        AQ$_DEQUEUE_HISTORY
APP_OWNER        AQ$_SUBSCRIBERS
APP_OWNER        AQ$_RECIPIENTS
APP_OWNER        AQ$_HISTORY
APP_OWNER        AQ$_DEQUEUE_HISTORY_T
APP_OWNER        AQ$_NOTIFY_MSG
APP_OWNER        DBMS_AQ
APP_OWNER        DBMS_AQADM
APP_OWNER        DBMS_SCHEDULER
APP_OWNER        JAVA$JVM$STATUS


H:\>sqlplus APP_OWNER/APP_OWNER_at_MYDB

SQL*Plus: Release 9.2.0.1.0 - Production on Thu Jul 8 10:32:53 2010

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> BEGIN

  2     -- Disable programs and jobs.
  3     DBMS_SCHEDULER.DISABLE(NAME      => 'GATHER_STATS_JOB');
  4 END;
  5 /
BEGIN
*
ERROR at line 1:
ORA-27476: "APP_OWNER.GATHER_STATS_JOB" does not exist
ORA-06512: at "SYS.DBMS_ISCHED", line 2763
ORA-06512: at "SYS.DBMS_SCHEDULER", line 1753
ORA-06512: at line 3


SQL> select JOB_NAME,STATE,ENABLED from dba_scheduler_jobs;

JOB_NAME                       STATE           ENABL

------------------------------ --------------- -----
PURGE_LOG SCHEDULED TRUE FGR$AUTOPURGE_JOB DISABLED FALSE GATHER_STATS_JOB SCHEDULED TRUE AUTO_SPACE_ADVISOR_JOB SCHEDULED TRUE RLM$EVTCLEANUP SCHEDULED TRUE RLM$SCHDNEGACTION SCHEDULED TRUE GATHER_STALE_STATS_DICTIONARY SCHEDULED TRUE GATHER_SCHEMA_STALE_APP_OWNER SCHEDULED TRUE GATHER_SCHEMA_STATS_APP_OWNER SCHEDULED TRUE

9 rows selected.

SQL> select user from dual;

USER



APP_OWNER SQL> SQL> select JOB_NAME,STATE,ENABLED from all_scheduler_jobs;
JOB_NAME                       STATE           ENABL

------------------------------ --------------- -----
RLM$EVTCLEANUP SCHEDULED TRUE RLM$SCHDNEGACTION SCHEDULED TRUE GATHER_STALE_STATS_DICTIONARY SCHEDULED TRUE GATHER_SCHEMA_STALE_CTS_OWNER SCHEDULED TRUE GATHER_SCHEMA_STATS_CTS_OWNER SCHEDULED TRUE

Can we DISABLE this job only as connecting as SYS / should I give any permission to disable this job connecting as APP_OWNER ?

Many Thanks,
Sreejith Nair

DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."

--

http://www.freelists.org/webpage/oracle-l Received on Thu Jul 08 2010 - 01:17:29 CDT

Original text of this message