Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Discovered way to grant/revoke any right from any user!
Hi,
Actually I developed a package a long time ago that does this function for you. I have made it available on the internet since I was getting a lot of emails everyday requiring a copy.
You can find it in http://www.gis.net/~waleed/ora_stuff.html
Regards,
Waleed Khedr
In article <7f6dh2$ros$1_at_news3.spacestar.net>,
"Viewer" <bmotzer_at_spacestar.com> wrote:
> No this is not some kind of crazy email. I've been an Oracle dba for five
> years now and it always bothered me
> that Oracle did not provide DBA's with a method of revoking/granting
> privileges to users or between users
> without loggin in as them and issuing the grant/revoke.
>
> It bothered me enough to find a way to do it and I want to share it with the
> rest
> of the Oracle dba's who may be having this problem. At a very high level
> what I do is use a
> c program to modify the contents of an export file replacing create table
> statements
> and create index statements with a sql statement like "REVOKE SELECT ON
> TABLE1
> from USERA".
>
> Here's how it works.
> 1) I found a table in the database that had grants on it.
> 2) I performed an export of a table without data
> 3) I had a friend of mine hack the export file with a C program. This must
> be done in C or a language that can edit/modify a binary file. We stripped
> out
> the entire lines containing CONNECT, TABLE and CREATE TABLE and replaced
> those lines with variable names we would use later.
>
> Here's how the file looked after the hack.
>
> EXPORT:V07.03.03
> DTSMBTM
> RTABLES
> 1024
> 0
> Sun Apr 11
> 11:32:17 1999
> CONNECTSTMT
> SQLSTMT
> ENDTABLE
> ENDTABLE
> EXIT
>
> Notice the words CONNECTSTMT and SQLSTMT.
> These are key words that we search for and replace each time just before
> we run this file back through an import. A sample run of this would produce
> the
> following export file.
>
> EXPORT:V07.03.03
> DTSMBTM
> RTABLES
> 1024
> 0
> Sun Apr 11
> 11:32:17 1999
> CONNECT TSMBTM3
> REVOKE SELECT ON "TSMBTM3_DROP_ME" FROM "TSMBTM2"
> ENDTABLE
> ENDTABLE
> EXIT
>
> We then run this export file through the imp process and that's it. Any
> user who has the IMP_FULL_DATABASE role can do this. If you have
> questions feel free to email me at bmotzer_at_spacestar.com
>
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Apr 27 1999 - 17:01:14 CDT
![]() |
![]() |