Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to config a job to be executed?

Re: How to config a job to be executed?

From: Fraser McCallum <fmcc_at_nospam_odbaguru.com>
Date: Thu, 9 Jan 2003 09:01:48 +1100
Message-ID: <3e1c9eda@news.>


Stored procedures using definer rights, which I believe executing isubmit from the command line counts as, can only use the privileges explicitly granted to the owner of the stored procedure. This may be what is stopping it being able to work on other users tables. Any privileges granted via roles will not be picked up!

So either:

grant all the privileges explicitly to your user to do what you need.

or

build a stored procedure using invoker rights.

Kind Regards,

Fraser McCallum
MVP Oracle Administration
www.brainbench.com

"Helge Hauan" <helge.hauan_at_applica.no> wrote in message news:ddb41d2b.0301080000.21feae4_at_posting.google.com...
> Hi.
> In the project I'm working on now each developer have its own user
> account towards the database. The application we are doing generates
> logging information into a logTable. What we want is to delete old log
> information (older than 30 days) from that table. Each user accounts
> have it's own 'instance' of logTable named 'LogTable', same name for
> every account. By this, I mean there, is not a common logTable, but
> one for each user account.
>
> The make system we are using drops all tables, sequences, stored
> procedures, views, and so on.
>
> So to my question.
> Tried to implement a job by doing this:
> EXECUTE dbmsjob.remove(1);
> EXECUTE dbmsjob.isubmit(1, 'sp_delete_history_log',
> trunc(sysdate+1,'DD'), 'trunc(sysdate+1,''DD'')');
>
> This sp_dele... is a stored procedure which will be executed every
> midnight for the user schema that creates it.
>
> This seems to be a problem because it cannot be executed for more than
> one user (schema), as long as jobNo(1) only belongs to one user. I
> know about dbmsjob.submit but wants to make it possible from our
> makesystem to use a fixed jobNo, regardless of the user running make.
>
>
> I want to enable all developers doing remove and isubmit of jonNo = 1,
> but can You please help me with a solution? Is it a user access
> problem, or can the same task be achieved by other solutions?
>
> Best regards,
> Helge Hauan
Received on Wed Jan 08 2003 - 16:01:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US