将Oracle表数据转储到INSERT语句中 [英] Dump Oracle table(s) data to INSERT statements

查看:87
本文介绍了将Oracle表数据转储到INSERT语句中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在有一个要求,我的客户的业务人员必须在网站上填充大量数据.他们希望该站点能够使用UAT数据投入生产,以便在发布之日不会出现贫瘠的情况.

I have a requirement right now where my client's business people have populated a website with a bunch of data. They want the site to go live to production with the UAT data so that on launch day the site is not barren.

现在,网络服务器和数据中心由我们的某个蓝色巨人"朋友管理,他们拒绝向我提供UAT数据库服务器上的用户帐户,即使访问权限仅限于我的应用程序拥有的表,也是如此.这种情况可以再讨论一次.

Now, the webservers and data centers are managed by a certain Big Blue friend of ours and they refuse to give me a user account on the UAT Database server, not even with access restricted only to the tables my app owns. That situation can be left to another discussion.

因此,最初,我只是简单地使用SQL Developer连接到UAT,然后运行它的漂亮的INSERT语句导出工具,该工具会将表中的数据转储到一系列INSERT语句中.由于我无法访问UAT,因此无法这样做.

So, originally I was simply going to connected up to UAT using SQL Developer, and run it's nifty little INSERT statement export tool which will dump the data from a table into a series of INSERT statements. Since I can't have access to UAT, I can't do that.

有没有一种方法可以让我的蓝色朋友从字面上看一些PL/SQL代码,这些代码会将所有表数据从指定的表中转储到INSERT语句中?最好是文件(而不是控制台)?这样,他们可以采用那些INSERT语句并针对UAT执行它们.

Is there a method by which I can literally hand my blue friends some PL/SQL code which will dump all the table data from specified tables to INSERT statements? Preferably to a file (instead of the console)? This way they can take those INSERT statements and execute them against UAT.

推荐答案

我昨天回答了一个类似的问题.它可能不完全是您想要的(它仍然不完整),但是它可能具有使您自己开始完成脚本的信息. 查看.

I just answered a similar question yesterday. It may not be exactly what you want (and it is still incomplete), but it probably has the information to get you started to complete the scripts yourself. Check it out.

这篇关于将Oracle表数据转储到INSERT语句中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆