RE: Import Public Grants (9.2)

  • From: "Powell, Mark D" <mark.powell@xxxxxxx>
  • To: <rlsmith@xxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 14 Jun 2005 09:21:55 -0400

 Public grants below to PUBLIC and not to the base object owner.  You
cannot import user PUBLIC so the only way to import public synonyms is
as part of a full imp, full=3Dy.  We usually run a imp with full=3Dy and
rows=3Dn to get public objects after rebuilding a database, but you =
cannot
do this if you only want portions of the source db.

So the solution is just to generate the create synonyms by selecting
from dba_synonyms.  Just add the necessary where clause to the following
and a few SQLPlus set commands for feedback, linesize, etc....

select
  'create '||decode(owner,'PUBLIC','PUBLIC',NULL)||' synonym '||
             decode(owner,'PUBLIC',NULL,table_owner||'.')||
           synonym_name||' for '||
           table_owner||'.'||table_name||
           decode(db_link,NULL,NULL,'@'||db_link)||';'
from
  sys.dba_synonyms
Where ....

HTH -- Mark D Powell --

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Smith, Ron L.
Sent: Monday, June 13, 2005 4:38 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Import Public Grants (9.2)

I am trying to import grants made to Public for all the objects in a
schema.  I have tried running a full import as SYSTEM and as the Schema
owner.  Neither imports the Public grants.  What am I doing wrong?

Thanks!
Ron=3D20
--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l

Other related posts: