.ora-code.com

Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
monitoring jobs (dbms_job)

monitoring jobs (dbms_job)

2005-07-28       - By Marquez, Chris
Reply:     1     2     3     4     5     6     7     8  

What cat*.sql script includes the DBA_REFRESH_PASS view?

SQL> desc  DBA_REFRESH_PASS
ERROR:
ORA-04043 (See ORA-04043.ora-code.com): object DBA_REFRESH_PASS does not exist

SQL> select * from v$version;
BANNER
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
PL/SQL Release 9.2.0.5.0 - Production
CORE    9.2.0.6.0       Production
TNS for Linux: Version 9.2.0.5.0 - Production
NLSRTL Version 9.2.0.5.0 - Production

Thanks,

Chris Marquez
Oracle DBA



-- --Original Message-- --
From: oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)]
Sent: Thu 7/28/2005 10:51 AM
To: maxim.pakhutkin@(protected); oracle-l@(protected)
Subject: RE: monitoring jobs (dbms_job)

Max,

  The following is the sql that I use to watch jobs.  It is also
used to other things as well so there is a little bit more here that I
think you'll not need.

Encrypt is a package created here as a wrapper around dbms_obfuscation.
Much longer history too.

DBA_REPRESH_PASS is a table where we store the username and encrypted
password of the job's owner.

I think the RUN_TIME column will be of interest.  We generate warning
messages for any job that exceeds 30 minutes of run_time.

SELECT /*+ RULE */ SCHEMA_USER, ENCRYPT.CODE(NVL(RPASS,'8('))RPASS,
E.JOB,
              NVL(ROUND((SYSDATE-E.THIS_DATE)*1440),0)RUN_TIME,
              ROUND((SYSDATE - E.NEXT_DATE )*1440) REFRESH_TIME, SPID,
BROKEN, E.WHAT,
              REPLACE(UPPER(INTERVAL),
'SYSDATE','TO_DATE('||CHR(39)||NVL(E.LAST_DATE, SYSDATE)||CHR(39)||')'),
              TO_NUMBER(TO_CHAR(E.NEXT_DATE,'J'))
           FROM DBA_REFRESH_PASS A, (SELECT D.JOB, SPID
                                     FROM V$PROCESS B, V$SESSION C,
DBA_JOBS_RUNNING D
                                     WHERE PADDR = ADDR AND C.SID =
D.SID)F, DBA_JOBS E
           WHERE A.RJOWNER(+) = rtrim(SCHEMA_USER)
             AND F.JOB(+) = E.JOB
             AND E.LAST_DATE IS NOT NULL;

-- --Original Message-- --
From: oracle-l-bounce@(protected)
[mailto:oracle-l-bounce@(protected)] On Behalf Of Pakhutkin, Maxim
(Max)
Sent: Thursday, July 28, 2005 10:31 AM
To: oracle-l@(protected)
Subject: monitoring jobs (dbms_job)

Has anyone tried monitoring the run duration of jobs scheduled with
dbms_jobs over time to determine trends? I'm thinking of running some
pl/sql in intervals that will, in general, do the following: looking at
jobs that are scheduled to run at least that often, note their next_date
and then, when the monitored job runs next time, compared the noted next
time to the values in last_date. The description of the dba_jobs view
gives me doubts however, as it doesn't seem to correspond to reality in
respect to last_date, last_sec columns. My observation has been that
last_sec shows when the job last completed, but the view description
says it shows when the job last started.

The business need is to prevent jobs from running into the scheduled
cold backups and interfering with them. I've searched the archive and
ask tom, but couldn't come up with any direct hits. If anyone has tried
this before, I would appreciate if you could point out any non-trivial
issues you've encountered, thanks.

mostly 9i's with some 8i's thrown in on solaris.

Max Pakhutkin
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7232.39">
<TITLE>RE: monitoring jobs (dbms_job)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>What cat*.sql script includes the DBA_REFRESH_PASS view?<BR>
<BR>
SQL&gt; desc&nbsp; DBA_REFRESH_PASS<BR>
ERROR:<BR>
ORA-04043 (See ORA-04043.ora-code.com): object DBA_REFRESH_PASS does not exist<BR>
<BR>
SQL&gt; select * from v$version;<BR>
BANNER<BR>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
-<BR>
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production<BR>
PL/SQL Release 9.2.0.5.0 - Production<BR>
CORE&nbsp;&nbsp;&nbsp; 9.2.0.6.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Production
<BR>
TNS for Linux: Version 9.2.0.5.0 - Production<BR>
NLSRTL Version 9.2.0.5.0 - Production<BR>
<BR>
Thanks,<BR>
<BR>
Chris Marquez<BR>
Oracle DBA<BR>
<BR>
<BR>
<BR>
-- --Original Message-- --<BR>
From: oracle-l-bounce@(protected) [<A HREF="mailto:oracle-l-bounce@(protected)
.org">mailto:oracle-l-bounce@(protected)</A>]<BR>
Sent: Thu 7/28/2005 10:51 AM<BR>
To: maxim.pakhutkin@(protected); oracle-l@(protected)<BR>
Subject: RE: monitoring jobs (dbms_job)<BR>
<BR>
Max,<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The following is the sql that I use
to watch jobs.&nbsp; It is also<BR>
used to other things as well so there is a little bit more here that I<BR>
think you'll not need.<BR>
<BR>
Encrypt is a package created here as a wrapper around dbms_obfuscation.<BR>
Much longer history too.<BR>
<BR>
DBA_REPRESH_PASS is a table where we store the username and encrypted<BR>
password of the job's owner.<BR>
<BR>
I think the RUN_TIME column will be of interest.&nbsp; We generate warning<BR>
messages for any job that exceeds 30 minutes of run_time.<BR>
<BR>
SELECT /*+ RULE */ SCHEMA_USER, ENCRYPT.CODE(NVL(RPASS,'8('))RPASS,<BR>
E.JOB,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; NVL(ROUND((SYSDATE-E.THIS_DATE)*1440),0)RUN_TIME,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; ROUND((SYSDATE - E.NEXT_DATE )*1440) REFRESH_TIME, SPID,<BR>
BROKEN, E.WHAT,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; REPLACE(UPPER(INTERVAL),<BR>
'SYSDATE','TO_DATE('||CHR(39)||NVL(E.LAST_DATE, SYSDATE)||CHR(39)||')'),<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; TO_NUMBER(TO_CHAR(E.NEXT_DATE,'J'))<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM DBA
_REFRESH_PASS A, (SELECT D.JOB, SPID<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM V
$PROCESS B, V$SESSION C,<BR>
DBA_JOBS_RUNNING D<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE PADDR =
ADDR AND C.SID =<BR>
D.SID)F, DBA_JOBS E<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE A
.RJOWNER(+) = rtrim(SCHEMA_USER)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
AND F.JOB(+) = E.JOB<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
AND E.LAST_DATE IS NOT NULL;<BR>
<BR>
-- --Original Message-- --<BR>
From: oracle-l-bounce@(protected)<BR>
[<A HREF="mailto:oracle-l-bounce@(protected)">mailto:oracle-l-bounce
@(protected)</A>] On Behalf Of Pakhutkin, Maxim<BR>
(Max)<BR>
Sent: Thursday, July 28, 2005 10:31 AM<BR>
To: oracle-l@(protected)<BR>
Subject: monitoring jobs (dbms_job)<BR>
<BR>
Has anyone tried monitoring the run duration of jobs scheduled with<BR>
dbms_jobs over time to determine trends? I'm thinking of running some<BR>
pl/sql in intervals that will, in general, do the following: looking at<BR>
jobs that are scheduled to run at least that often, note their next_date<BR>
and then, when the monitored job runs next time, compared the noted next<BR>
time to the values in last_date. The description of the dba_jobs view<BR>
gives me doubts however, as it doesn't seem to correspond to reality in<BR>
respect to last_date, last_sec columns. My observation has been that<BR>
last_sec shows when the job last completed, but the view description<BR>
says it shows when the job last started.<BR>
<BR>
The business need is to prevent jobs from running into the scheduled<BR>
cold backups and interfering with them. I've searched the archive and<BR>
ask tom, but couldn't come up with any direct hits. If anyone has tried<BR>
this before, I would appreciate if you could point out any non-trivial<BR>
issues you've encountered, thanks.<BR>
<BR>
mostly 9i's with some 8i's thrown in on solaris.<BR>
<BR>
Max Pakhutkin<BR>
--<BR>
<A HREF="http://www.freelists.org/webpage/oracle-l">http://www.freelists.org
/webpage/oracle-l</A><BR>
--<BR>
<A HREF="http://www.freelists.org/webpage/oracle-l">http://www.freelists.org
/webpage/oracle-l</A><BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>