ba6.us - Dave's Database Related Stuff

  • home
  • blog
  • notes
  • projects
  • recent
  • about
  • !
Home › Blogs › dmann's blog

Tag Cloud

apex data development export funnies Hint HTML import linux monitoring oem oracle performance perl pl/sql reporting rman scripting solaris sql sqlplus tuning unix windows
more tags

Search

RSS Feed

Blog Posts :

Navigation

  • Feed aggregator

User login

  • Request new password

Copying Oracle JVM Permissions

dmann — Tue, 03/31/2009 - 10:49

Now that I am working in an environment where I am responsible for more database instances it seems like data is always moving around. Machines are being retired, platforms are changing, all kinds of fun stuff.

I often have to move using regular old Oracle import/export utilities. These utilities aren't the best at some of the more esoteric Oracle features so some 'backfilling' of objects or permissions may be required.

Here are some queries that are helpful when moving a schema that has Oracle Java Virtual Machine (JVM) Dependencies:

Overview of all Java Permissions in a Database

SELECT * FROM DBA_JAVA_POLICY
WHERE ENABLED='ENABLED'
 ORDER BY GRANTEE, KIND, TYPE_SCHEMA, TYPE_NAME, ACTION;

Grab permissions for specified user

Here is a query that will give you grants associated with the Oracle JVM so that you can run them on another database.

SELECT 'exec dbms_java.grant_permission('''||
       GRANTEE||''','''||
       TYPE_SCHEMA||':'||TYPE_NAME||''','''||
       NAME||''','''||ACTION||''');' as "Grant Stmt" 
  FROM DBA_JAVA_POLICY
 WHERE GRANTEE = UPPER('&granteename')
 AND ENABLED='ENABLED'
 ORDER BY GRANTEE, KIND, TYPE_SCHEMA, TYPE_NAME, ACTION;
  • Java
  • JVM
  • oracle
  • dmann's blog

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
3 + 10 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.


Cornify
  • home
  • blog
  • notes
  • projects
  • recent
  • about
  • !

Content Copyright 2006-2010. Links are copyright of respective owners.