How to use Job in Oracle 8i

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
Post Reply
User avatar
TBou
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 136
Joined: Thu, 05 Aug 2004 9:33 am
Location: Campo Grande - MS
Thiago Bourscheidt
thiago.info@apoiorural.com.br
Analista de Sistemas

I have clients with Oracle 9i, 10g and 8i, I set up a process that uses calls with the job to run on the bank without locking the screen, and allowing the scheduling of processes.
on the 10G and 9i beauty banks, but in Bank 8i the job creates but does not perform.
See:

Select all

declare 
  v_job number; 
BEGIN 
  dbms_job.submit(v_job,'null;',sysdate,'sysdate'); 
 
  DBMS_JOB.WHAT(v_job,' begin 
                          insert into thiago values (''carregou'');  
                          commit; 
                        end; '); 
 
commit; 
 
END;   
The job created:

Select all

SQLWKS> select * from user_jobs 
     2>  
JOB        LOG_USER                       WHAT  
---------- ------------------------------ --------------------------------------  
         26 MAXICON                          begin insert into thiago values                 
                                                           (''carregou'');  
                                                           commit; 
                                                       end;  
 
But if I consult the table that should insert thee

Select all

 
SQLWKS> select * from thiago 
     2>  
DS_ERRO                                                                          
-------------------------------------------------------------------------------- 
0 linhas selecionadas. 
Alkem could inform me if there are any particularity ..?
Some parameter of the bank that I should change ..?
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Very weird ...

I tried on 9i and really worked. (I do not have an 8i here, but I'm going to test in my house)

Try to do the following Select, to see if he stopped:

Select all

SQL> select to_char(last_date, 'dd/mm/rr-hh24:mi:ss') last_date 
  2  ,      to_char(next_date, 'dd/mm/rr-hh24:mi:ss') next_date 
  3  from user_jobs 
  4  where job=26 
  5  / 
 
LAST_DATE         NEXT_DATE 
----------------- ----------------- 
06/07/05-09:09:56 06/07/05-09:09:56 
 
SQL> 
User avatar
TBou
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 136
Joined: Thu, 05 Aug 2004 9:33 am
Location: Campo Grande - MS
Thiago Bourscheidt
thiago.info@apoiorural.com.br
Analista de Sistemas

Oh gagothão ... Iuhu ... I got it Senguinte ...
This parameter has to be 10 but in Oracle 8i the default is 0 see

Select all

SELECT value FROM V$PARAMETER 
WHERE NAME LIKE '%job%' 
But there still that way does not work has to put a commit in the middle see

Select all

declare  
v_job number;  
BEGIN  
dbms_job.submit(v_job,'null;',sysdate,'sysdate');  
COMMIT; 
DBMS_JOB.WHAT(v_job,' begin  
insert into thiago_teste values (''carregou'');  
commit;  
end; ');  
commit;  
END;  
ERIKAFURLAN
Rank: Estagiário Júnior
Rank: Estagiário Júnior
Posts: 1
Joined: Tue, 16 May 2006 4:39 pm
Location: Brasilia-DF

Friend,
I was seeing your code and would like to know how you implemented this?
You had to do an interface, where all the inserts in the bank would be fired by this job, I need something for the programmers to make a CREATE TABLE direct in the production and I think this job helps me well, I'm right From this? Do I need anything else besides implementing an interface?

Thanks from now!
User avatar
TBou
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 136
Joined: Thu, 05 Aug 2004 9:33 am
Location: Campo Grande - MS
Thiago Bourscheidt
thiago.info@apoiorural.com.br
Analista de Sistemas

Hello lady.

Next Job is a process that runs in the bank releasing the Forms screen.

What I did was set up a table that manipulated and returned to me the Status of the Job execution

but for you to create a table in system execution I do not know if it will help a lot for this you could uasar an execute_imediate
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests