开发者

Is there a Oracle equivalent of mysqldump

开发者 https://www.devze.com 2023-02-17 03:39 出处:网络
Is there a way to dump the content of a oracle table in to a file formated as INSERT statements. I can\'t use oradump as it is on GPL. I will be running it from a perl CGI script. I am looking for som

Is there a way to dump the content of a oracle table in to a file formated as INSERT statements. I can't use oradump as it is on GPL. I will be running it from a perl CGI script. I am looking for something to dump data directly from oracle server using a single command. Running a select and creating insert statements using perl is too slow as there will be lot of data.

I know I can probably do th开发者_开发技巧is using spool command and a plsql block at server side. But is there a built in command to do this instead of formating the INSERT statements myself?


Generating large numbers of INSERT statement will likely be slow no matter how you do it, and it will be slow to execute all the inserts as well. Why are you doing this? A more efficient solution, if you can't use a tool like data pump, would be to generate a text file you could later import with SQL*Loader.


the short answer is : NO. The performance of generating those insert statements can be very positively influenced using bulk fetches. There is a good chance that dbi does support bulk fetches. Check it out and experiment with it. I also wrote a little program called fun that generates sql loader files in PRO*c. Not the best code but you can fetch it from a recent blog I wrote http://ronr.blogspot.com/2010/11/proc-and-xcode-32-how-to-get-it-working.html In the article I explained how to get PRO*c working on a mac using xcode and the program by coincident wat fun. (Fast Un Load). It almost does what you want, you can adjust it a little... I hope it helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消