File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 11tmp /
22src /build /*
3+ libtoddog.so
Original file line number Diff line number Diff line change @@ -5,14 +5,16 @@ declare
55 tag varchar2 (50 );
66 result varchar2 (10 );
77 cursor c_table is
8- select TABLE_NAME, NUM_ROWS from all_tables where OWNER = ' HR' ;
8+ select TABLE_NAME, NUM_ROWS, OWNER
9+ from all_tables where OWNER = ' HR' ;
910 errorinloop EXCEPTION;
1011 err_num NUMBER ;
1112 err_msg VARCHAR2 (100 );
1213begin
1314 name := ' sample.rowcount' ;
1415 for t in c_table loop
15- tag := concat(' schema:hr,table_name:' ,t .table_name );
16+ tag := ' table_name:' || t .table_name || ' ,schema:' || t .owner ;
17+ dbms_output .put_line (name || ' :' || t .num_rows || ' ,' || tag);
1618 result := f_gaugetoddog(name,t .num_rows ,tag);
1719 IF result != ' done' THEN
1820 RAISE errorinloop;
Original file line number Diff line number Diff line change @@ -5,37 +5,36 @@ CREATE OR REPLACE PROCEDURE proc_rowcount_toddog AS
55 result varchar2(10);
66 tag varchar2(50);
77 cursor c_table is
8- select TABLE_NAME, NUM_ROWS from all_tables where OWNER = 'HR';
8+ select TABLE_NAME, NUM_ROWS, OWNER
9+ from all_tables where OWNER = 'HR';
910 errorinloop EXCEPTION;
1011 err_num NUMBER;
1112 err_msg VARCHAR2(100);
1213begin
1314 name := 'sample.rowcount';
1415 for t in c_table loop
15- tag := concat('schema:hr, table_name:', t.table_name) ;
16+ tag := ' table_name:' || t.table_name || ',schema:' || t.owner ;
1617 result := f_gaugetoddog(name,t.num_rows,tag);
1718 IF result != 'done' THEN
1819 RAISE errorinloop;
1920 END IF;
2021 end loop;
2122EXCEPTION
2223 WHEN errorinloop THEN
23- raise_application_error(-20101, 'error inside loop on samples/rowcount .sql');
24+ raise_application_error(-20101, 'error inside loop on samples/rowcount_job .sql');
2425 WHEN OTHERS THEN
2526 err_num := SQLCODE;
2627 err_msg := SUBSTR(SQLERRM, 1, 100);
2728 raise_application_error(err_num, err_msg);
2829END;
2930/
30-
3131show err
3232
3333begin
3434proc_rowcount_toddog;
3535end;
3636/
37-
38-
37+ show err
3938
4039declare
4140 job_doesnt_exist EXCEPTION;
@@ -60,6 +59,7 @@ DBMS_SCHEDULER.create_job (
6059 comments => 'Job defined entirely by the CREATE JOB procedure.');
6160END;
6261/
62+ show err
6363
6464prompt check if job enabled
6565SELECT ENABLED as E FROM DBA_SCHEDULER_JOBS where JOB_NAME = UPPER('job_rowcount_toddog');
You can’t perform that action at this time.
0 commit comments