>JOB ile analiz

>http://www.elliott-technologies.com/oracle.php

BEGIN
SYS.DBMS_JOB.REMOVE(28);
COMMIT;
END;
/

DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => ‘begin
dbms_stats.gather_schema_stats(ownname=> ”SAPSR3” , cascade=> TRUE);
end;’
,next_date => to_date(‘07.11.2009 16:21:07′,’dd/mm/yyyy hh24:mi:ss’)
,interval => ‘null’
,no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE(‘Job Number is: ‘ || to_char(x));
COMMIT;
END;
/
————————————
select * from user_jobs;

ps -auxww | grep snp._$ORACLE_SID

select * from v$version

SELECT RAWTOHEX(paddr) paddr_hex, name FROM v$bgprocess
WHERE RAWTOHEX(paddr) HEXTORAW(0)
AND name LIKE ‘SNP%’;

select * from dba_jobs_running;

select object_name,object_type from all_OBJECTS where object_name like ‘%DBA_JOBS_RUNNING%’

select object_name,object_type from dba_OBJECTS where object_name like ‘%DBA_JOBS_RUNNING%’;

select text from all_views where view_name=’DBA_JOBS_RUNNING’;

select v.SID, v.id2 JOB, j.FAILURES,
LAST_DATE, substr(to_char(last_date,’HH24:MI:SS’),1,8) LAST_SEC,
THIS_DATE, substr(to_char(this_date,’HH24:MI:SS’),1,8) THIS_SEC,
j.field1 INSTANCE
from sys.job$ j, v$lock v
where v.type = ‘JQ’ and j.job (+)= v.id2

———————
CREATE OR REPLACE PROCEDURE SAPSR3.test IS

BEGIN

dbms_stats.gather_table_stats(ownname=> ‘SAPSR3’, tabname=> ‘AAACC_OBJ_ERR’, partname=> NULL);

END test;
/

———-
BEGIN
SYS.DBMS_JOB.REMOVE(21);
COMMIT;
END;
/

————-

DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => ‘test;’
,next_date => to_date(‘30.10.2009 10:01:16′,’dd/mm/yyyy hh24:mi:ss’)
,interval => ‘NULL’
,no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE(‘Job Number is: ‘ || to_char(x));
COMMIT;
END;
/

—————————–

DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => ‘BEGIN dbms_stats.gather_table_stats(ownname=> ”SAPSR3”, tabname=> ”AAACD2”, partname=> NULL); END;’
,next_date => to_date(‘30.10.2009 10:50:16′,’dd/mm/yyyy hh24:mi:ss’)
,interval => ‘NULL’
,no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE(‘Job Number is: ‘ || to_char(x));
COMMIT;
END;
/

http://download.oracle.com/docs/cd/B10501_01/server.920/a96521/jobq.htm

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s