Re: DBMS_DATAPUMP API equivalent of EXCLUDE=grants
Date: Thu, 14 Mar 2019 07:14:13 -0700 (PDT)
Message-ID: <5ce7a20a-d29e-4111-a0e2-e512b059e197_at_googlegroups.com>
On Friday, February 20, 2015 at 8:24:29 AM UTC-5, miste..._at_gmail.com wrote:
> > I'm trying to do some importing in PL/SQL instead of using the command
> > line impdp utility. The thing is, that the impdp utility takes
> > EXCLUDE=grant whereas there seems to be no direct mapping of this
> > functionality to to the DBMS_DATAPUMP api.
> >
> > I think such filtering is done via DBMS_DATAPUMP.metadata_filter.
> >
> > Various filters are available including one called EXCLUDE_PATH_EXPR.
> >
> > There are object paths that can be viewed by selecting from
> > DATABASE_EXPORT_OBJECTS, SCHEMA_EXPORT_OBJECTS and
> > TABLE_EXPORT_OBJECTS.
> >
> >
> > However I don't know which of these correspond to those that would be
> > excluded if using EXCLUDE=grant with impdp.
> >
> > I also have not been able to find this out on the web.
> >
> > Does anyone know exactly what impdp's EXCLUDE=grants does in terms of
> > the DBMS_DATAPUMP api?
> >
> >
> > Thanks.
>
>
> Hi
>
> You can achieve this with the following command:
> DBMS_DATAPUMP.METADATA_FILTER(h1, 'EXCLUDE_PATH_LIST', 'SYSTEM_GRANT');
>
> Reference:
> https://community.oracle.com/thread/839324
>
>
> Good work!
Does not work in Oracle 11g aws RDS
This worked for me:
DBMS_DATAPUMP.METADATA_FILTER(l_dp_handle,
'EXCLUDE_PATH_EXPR', 'IN (''GRANT'')');
-- La información contenida en este e-mail y sus anexos es confidencial, privilegiada y está dirigida exclusivamente a su destinatario, en consecuencia, solo puede ser utilizada por aquel. Si usted no es el destinatario original, no deberá examinar, usar, copiar o distribuir este mensaje o la información que contiene. Si lo recibe por error, por favor reenvíelo a la persona que se lo envió y elimínelo. Cualquier retención o uso total o parcial no autorizada de este mensaje está estrictamente prohibida y sancionada por ley.Received on Thu Mar 14 2019 - 15:14:13 CET