Re: DBMS_DATAPUMP (Multiple Schemas) - need some suggestions for the parameter
Date: Tue, 5 Mar 2019 11:50:43 -0500
Message-ID: <CADo_RaPfgQ9BOKDKi0q-Y93d1ap6xigwMQLm6SGdGUuEHNxEkw_at_mail.gmail.com>
My guess is the LOOP should build the string of usernames and then once you
have your schema list, pass it into the VALUE parameter.
Andy K
On Tue, Mar 5, 2019 at 11:44 AM Chris Taylor <
christopherdtaylor1994_at_gmail.com> wrote:
> env: 12.1.0.2
>
> I'm trying to export multiple schemas using DBMS_DATAPUMP and have run
> into a bit of a conundrum.
>
> This line only accepts on schema at a time:
> So as long as my loop only contains one schema, it works
> DBMS_DATAPUMP.metadata_filter (
> handle => h1,
> name => 'SCHEMA_EXPR',
> VALUE => 'IN(''' || rec.username || ''')');
>
> This line "appears" to work better but actually doesn't import anything
> unless there's only one schema in the loop.
>
> dbms_datapump.metadata_filter(h1, 'SCHEMA_LIST',
> ''''||rec.username||'''');
>
> So, how can I add multiple schemas via Loop ? I've been putzing with this
> for several hours now and hitting a brick wall on this.
>
> There will be about 10 schemas and I want the loop to be able to be
> dynamic if possible. The export is coming from a source code database so
> the data size is going to be small and will be used by developers running
> docker images.
>
> I've got it working great for 1 schema - but I'd like to build it where it
> can handle doing all the schemas at once.
>
> Chris
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Mar 05 2019 - 17:50:43 CET