Home » Server Options » Replication » Daily refresh at particular hour/minute (Oracle 10g)
Daily refresh at particular hour/minute [message #400444] Tue, 28 April 2009 04:21 Go to next message
summoner
Messages: 27
Registered: March 2009
Junior Member
I have a refresh group that targets to refresh on 4am each day.
However, I need to refresh the group manually sometimes. Therefore, I cannot set the interval as sysdate+1.

I have tried setting the interval as follows. However, they are not correct

Quote:
trunc(sysdate+1) +4/24

The next interval will show 9:25:20pm.

Quote:
trunc(sysdate+1) + interval '4' hour

Incorrect syntax


Thank you for your help
Re: Daily refresh at particular hour/minute [message #400455 is a reply to message #400444] Tue, 28 April 2009 04:56 Go to previous messageGo to next message
gentlebabu
Messages: 1382
Registered: December 2005
Location: India, Hyderabad
Senior Member


Try

interval => 'trunc(SYSDATE +1) + 4/24'


Babu
Re: Daily refresh at particular hour/minute [message #400466 is a reply to message #400455] Tue, 28 April 2009 05:22 Go to previous messageGo to next message
summoner
Messages: 27
Registered: March 2009
Junior Member
gentlebabu wrote on Tue, 28 April 2009 04:56

Try

interval => 'trunc(SYSDATE +1) + 4/24'


Babu


If shows error as follow:

Quote:

Failed to commit: ORA-06550: line 5, column 20: PLS-00103: Encountered the symbol "TRUNC" when expecting one of the following: ) , * & = - + < / > at in is mod remainder not rem <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member SUBMULTISET_ The symbol "," was substituted for "TRUNC" to continue. ORA-06550: line 5, column 44: PLS-00103: Encountered the symbol "" when expecting one of the following: ) , * & | = - + < / > at in is mod remainder not rem => .. <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || member S

Re: Daily refresh at particular hour/minute [message #400470 is a reply to message #400466] Tue, 28 April 2009 05:40 Go to previous messageGo to next message
gentlebabu
Messages: 1382
Registered: December 2005
Location: India, Hyderabad
Senior Member

Quote:
ORA-06550: line string, column string: string
Cause: Usually a PL/SQL compilation error.

Action: none


Babu
Re: Daily refresh at particular hour/minute [message #400471 is a reply to message #400470] Tue, 28 April 2009 05:40 Go to previous messageGo to next message
gentlebabu
Messages: 1382
Registered: December 2005
Location: India, Hyderabad
Senior Member


Post your jobs
Re: Daily refresh at particular hour/minute [message #400473 is a reply to message #400471] Tue, 28 April 2009 05:49 Go to previous message
gentlebabu
Messages: 1382
Registered: December 2005
Location: India, Hyderabad
Senior Member

Or try this

  1  declare
  2  jobno int;
  3  begin
  4   dbms_job.submit ( jobno,
  5   what => 'BEGIN tst_pro; END;',
  6   next_date => SYSDATE,
  7  interval => 'trunc(SYSDATE +1) + 4/24';
  8  commit;
  9*  end;
 10  /
interval => 'trunc(SYSDATE +1) + 4/24';
                                      *
ERROR at line 7:
ORA-06550: line 7, column 39:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
) , * & = - + < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
The symbol ")" was substituted for ";" to continue.

SQL>
SQL> VARIABLE JOBNO NUMBER
SQL> ED
Wrote file afiedt.buf

  1  declare
  2  jobno int;
  3  begin
  4   dbms_job.submit ( :JOBNO,
  5   what => 'BEGIN tst_pro; END;',
  6   next_date => SYSDATE,
  7  interval => 'trunc(SYSDATE +1) + 4/24');
  8  commit;
  9*  end;
SQL> /

PL/SQL procedure successfully completed.
Previous Topic:Database Synchronisation.
Next Topic:Sending email to administrator when Refresh fails
Goto Forum:
  


Current Time: Mon Nov 9 02:14:20 CST 2009

Total time taken to generate the page: 0.34569 seconds
.:: Forum Home :: Blogger Home :: Wiki Home :: Contact :: Privacy ::.