Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Script, logoff if not dba

JamesGordonMay 29 2012 — edited May 29 2012
Hi, I'm looking for a script that will check that the user is a DBA before running SYSDBA commands?

i.e.

select SYS_CONTEXT('USERENV','ISDBA') from dual;
when false exit
otherwise
grant x on y to z
...

Before I go around and create a script I was wondering if there was any easy way or Oracle script already in place for this?

James.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2012
Added on May 29 2012
2 comments
144 views