Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to dump all tables belong to a user into multiple flatfiles
allanwtham_at_yahoo.com (godmann) wrote in message news:<95cd51c.0209022323.460fe7dd_at_posting.google.com>...
> Hi there,
>
> I do not think I need to use Utl_file.
>
> I know how to dump tables one by one into delimited flatfile.
> But how to modify the script to make it dump ALL tables belong to a
> user say Scott into multiple flatfile named after the table itself?
>
> See example script at http://www.jlcomp.demon.co.uk/faq/flatfile.html
> Thanks.
>
> Allan
Allan, try the following: comment out the accept statements. Replace the &&variable with &1 and &2 then replace the spool command with &2..sql. Now generate a sql command file using something like
select 'start scriptname '||lower(owner)||' '||lower(table_name) from user_tables;
This should help you out, and thank you for using the cooperative FAQ.
HTH -- Mark D Powell -- Received on Tue Sep 03 2002 - 09:13:14 CDT