Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to start export from PL/SQL
Epicentre team A wrote:
> Is possible to run export (for generate dump) in stored proc.
Yes and no.
The No part. As Sybrand said, export is a "seperate command" (i.e. an external program) and not part of the PL/SQL language.
The Yes part. There are various ways it can be done. You could use a DBMS pipe to talk to a server side process (Unix shell script for example) and ask it to start the export for you. You could use UTL file and write your own CSV file. You could use a BFILE table and do the same. You could create a normal Oracle table for inserting o/s side commands into - this table is then polled by a server process (a good old fashioned sh script for example) that reads this table and performs the command. You could write an external stored proc (callable via PL/SQL) that uses the OCI to perform array fetches and write the contents to file. If the export is to be done client-side, you could do it in the client via an o/s exec call (a fork() on Unix or a CreateProcess() on Win32) to the local export program.
So many possibilities. So many kewl technologies. So little time. Does it not make you horny baby? Does it!? We are sexy bitches! Hmm.. yes we are. Oracle mojo. Oh behave!
-- BillyReceived on Wed Sep 04 2002 - 01:48:15 CDT