dbTalk Databases Forums  

EXECUTE IMMEDIATE and DBMS_SQL

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss EXECUTE IMMEDIATE and DBMS_SQL in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pbewig@swbell.net
 
Posts: n/a

Default EXECUTE IMMEDIATE and DBMS_SQL - 12-13-2004 , 10:45 AM






I am writing a PL/SQL program (a single anonymous
block) that performs a query input by the user at
run-time. I want to allow the user to read any
table or view in the database, and call any stored
functions they might use. However, I am worried
that a user, either through carelessness or malice,
might try to write in the database, which I want
to disallow (and record any attempt in a log).

I've never done anything like this before.

I know about EXECUTE IMMEDIATE and DBMS_SQL. Can I
restrict access to read-only by either of these two
methods? Is there some other technique I might use?
What words can I use to search this newsgroup in
Google Groups? What else do I need to be aware of?

Many thanks,

Phil


Reply With Quote
  #2  
Old   
Michel Cadot
 
Posts: n/a

Default Re: EXECUTE IMMEDIATE and DBMS_SQL - 12-13-2004 , 11:11 AM







<pbewig (AT) swbell (DOT) net> a écrit dans le message de
news:1102956332.207637.85010 (AT) c13g2000cwb (DOT) googlegroups.com...
Quote:
I am writing a PL/SQL program (a single anonymous
block) that performs a query input by the user at
run-time. I want to allow the user to read any
table or view in the database, and call any stored
functions they might use. However, I am worried
that a user, either through carelessness or malice,
might try to write in the database, which I want
to disallow (and record any attempt in a log).

I've never done anything like this before.

I know about EXECUTE IMMEDIATE and DBMS_SQL. Can I
restrict access to read-only by either of these two
methods? Is there some other technique I might use?
What words can I use to search this newsgroup in
Google Groups? What else do I need to be aware of?

Many thanks,

Phil

Grant select any table, execute any procedure to user;

....and search for a new job!

You are not doing what you want in a correct way.
Just let him select the table he needs and execute the function he needs,
why don't you want to pack that in a procedure?

Regards
Michel Cadot




Reply With Quote
  #3  
Old   
Michel Cadot
 
Posts: n/a

Default Re: EXECUTE IMMEDIATE and DBMS_SQL - 12-13-2004 , 03:50 PM




"Michel Cadot" <micadot{at}altern{dot}org> a écrit dans le message de
news:41bdcc9e$0$11241$626a14ce (AT) news (DOT) free.fr...
Quote:
pbewig (AT) swbell (DOT) net> a écrit dans le message de
news:1102956332.207637.85010 (AT) c13g2000cwb (DOT) googlegroups.com...
I am writing a PL/SQL program (a single anonymous
block) that performs a query input by the user at
run-time. I want to allow the user to read any
table or view in the database, and call any stored
functions they might use. However, I am worried
that a user, either through carelessness or malice,
might try to write in the database, which I want
to disallow (and record any attempt in a log).

I've never done anything like this before.

I know about EXECUTE IMMEDIATE and DBMS_SQL. Can I
restrict access to read-only by either of these two
methods? Is there some other technique I might use?
What words can I use to search this newsgroup in
Google Groups? What else do I need to be aware of?

Many thanks,

Phil


Grant select any table, execute any procedure to user;

...and search for a new job!

You are not doing what you want in a correct way.
Just let him select the table he needs and execute the function he needs,
why don't you want to pack that in a procedure?

Regards
Michel Cadot


Sorry, my last question is "why _do_ you want to pack that in a procedure?"
and not the opposite.

Regards
Michel Cadot





Reply With Quote
  #4  
Old   
DA Morgan
 
Posts: n/a

Default Re: EXECUTE IMMEDIATE and DBMS_SQL - 12-13-2004 , 07:32 PM



pbewig (AT) swbell (DOT) net wrote:

Quote:
I am writing a PL/SQL program (a single anonymous
block) that performs a query input by the user at
run-time. I want to allow the user to read any
table or view in the database, and call any stored
functions they might use. However, I am worried
that a user, either through carelessness or malice,
might try to write in the database, which I want
to disallow (and record any attempt in a log).

I've never done anything like this before.

I know about EXECUTE IMMEDIATE and DBMS_SQL. Can I
restrict access to read-only by either of these two
methods? Is there some other technique I might use?
What words can I use to search this newsgroup in
Google Groups? What else do I need to be aware of?

Many thanks,

Phil
Re-examine the requirement and what you are proposing.
If you just want to become unemployed a letter of resignation
is a far more straight-forward approach.

Your posting would seem to indicate that you want to put
a bunch of loaded guns into the hands of a bunch of school
children and hope none of them pull the trigger.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.