免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4181 | 回复: 12
打印 上一主题 下一主题

请问ziggler,PL/SQL Developer怎么export出数据? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-02 16:09 |只看该作者 |倒序浏览
20可用积分
刚才我的帖子--》 http://bbs3.chinaunix.net/thread-1563549-2-1.html
中提到的问题,
您说

“或者EXPORT成INSERT sql,然后到目标库上执行”
请问这个操作在哪里执行?
我刚刚安装了PL/SQL Developer,但是找不到在哪里操作?
---------------------
在TOOLS菜单下面是有Export的,但是只能Export出所有表的sql脚本,这个sql脚本,我生成的时候,有600多M!!!!
在TOAD中也是有这个东西(Export)的,也是不能选择表,只能Execute,结果也是生成600M的sql脚本!!!!!!!!!!

[ 本帖最后由 TOADLover 于 2009-9-2 16:16 编辑 ]

最佳答案

查看完整内容

给你个图。TOOL/EXPORT TABLES选择要导出的表,打开SQL INSERT标签。如果需要我给你把MANUAL发上来,在131页。[ 本帖最后由 ziggler 于 2009-9-2 16:52 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2009-09-02 16:09 |只看该作者
给你个图。TOOL/EXPORT TABLES

选择要导出的表,打开SQL INSERT标签。

如果需要我给你把MANUAL发上来,在131页。

[ 本帖最后由 ziggler 于 2009-9-2 16:52 编辑 ]

sql_insert.JPG (19.3 KB, 下载次数: 47)

sql_insert.JPG

Manual.pdf

2.59 MB, 下载次数: 60

论坛徽章:
0
3 [报告]
发表于 2009-09-02 16:14 |只看该作者
郁闷。。。。
杀了我吧,这么简单个东西,怎么搞了4个小时了。。。。。。。。。。。。。。。。。。。。。。

论坛徽章:
0
4 [报告]
发表于 2009-09-02 16:51 |只看该作者

回复 #2 TOADLover 的帖子

This export method creates a standard SQL script with insert statements and (optionally) DDL
statements to recreate the table definition. The tab page contains the following options:
· Drop tables – The generated SQL script contains statements to drop the tables before they are
recreated and loaded. The Create tables, Truncate tables, and Delete records options are disabled
in this situation, and have an implicit value.
· Create tables – The generated SQL script contains statements to create the tables before they are
loaded. This includes constraints, indexes and grants.
· Truncate tables – The generated SQL script uses truncate table statements to empty the tables
before they are loaded. This option is faster than the Delete tables, but cannot be used if foreign
key constraints exist.
· Delete records – The generated SQL script uses delete statements to empty the tables before they
are loaded.
· Disable triggers – The generated SQL script disables all triggers of the tables before they are
loaded, and enables them afterwards. This can improve performance, and can sometimes be
necessary if the triggers contain checks that are not applicable to the import process.
· Disable foreign key constraints – The generated SQL script disables all foreign keys of the tables
before they are loaded, and enables them afterwards. This can be necessary for self-referencing
foreign keys. Foreign keys between different tables will not lead to conflicts, because the tables
are exported in a correct order. Disabling foreign keys can also improve performance.
· Include storage – The generated SQL includes the original storage information such as tablespace
names and initial sizes for table creation statements. These may differ across databases, so this
may not always be appropriate.
· Include privileges – The generated SQL includes the grants of the object privileges to other users
and roles. When the objects are recreated in a different database, these users and roles need to
exist for obvious reasons.
· Commit every – Controls how many records will be inserted in the generated SQL script before a
commit is executed. If this value is zero, all inserts will be committed at once at the end of the
SQL script. For large export files and small rollback segments it will be necessary to supply an
appropriate value here.
· Where clause – Only records that match the where claus

论坛徽章:
0
5 [报告]
发表于 2009-09-02 16:56 |只看该作者
This export method creates a standard SQL script with insert statements and (optionally) DDL
statements to recreate the table definition. The tab page contains the following options:
· Drop tables – The generated SQL script contains statements to drop the tables before they are
recreated and loaded. The Create tables, Truncate tables, and Delete records options are disabled
in this situation, and have an implicit value.
· Create tables – The generated SQL script contains statements to create the tables before they are
loaded. This includes constraints, indexes and grants.
· Truncate tables – The generated SQL script uses truncate table statements to empty the tables
before they are loaded. This option is faster than the Delete tables, but cannot be used if foreign
key constraints exist.
· Delete records – The generated SQL script uses delete statements to empty the tables before they
are loaded.
· Disable triggers – The generated SQL script disables all triggers of the tables before they are
loaded, and enables them afterwards. This can improve performance, and can sometimes be
necessary if the triggers contain checks that are not applicable to the import process.
· Disable foreign key constraints – The generated SQL script disables all foreign keys of the tables
before they are loaded, and enables them afterwards. This can be necessary for self-referencing
foreign keys. Foreign keys between different tables will not lead to conflicts, because the tables
are exported in a correct order. Disabling foreign keys can also improve performance.
· Include storage – The generated SQL includes the original storage information such as tablespace
names and initial sizes for table creation statements. These may differ across databases, so this
may not always be appropriate.
· Include privileges – The generated SQL includes the grants of the object privileges to other users
and roles. When the objects are recreated in a different database, these users and roles need to
exist for obvious reasons.
· Commit every – Controls how many records will be inserted in the generated SQL script before a
commit is executed. If this value is zero, all inserts will be committed at once at the end of the
SQL script. For large export files and small rollback segments it will be necessary to supply an
appropriate value here.
· Where clause – Only records that match the where clause will be exported. The where clause must
%0

论坛徽章:
0
6 [报告]
发表于 2009-09-03 07:58 |只看该作者

回复 #2 ziggler 的帖子

谢谢!!!!!!!!
-----------
我犯的错误是没有用where clause,在你提到的图中右下角!
我的测试库中可能也有巨量的数据!
--------------------
TOAD 8.6.1.0对此功能是有缺陷的,不能指定Where clause!
PL/SQL Developer就做的很好,可以指定Where Clause!

[ 本帖最后由 TOADLover 于 2009-9-3 08:23 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2009-09-03 08:51 |只看该作者

回复 #6 TOADLover 的帖子

我一般数据量少喜欢用这种方式,尤其是代码表这样的东西。

我总觉的SQL脚本比较可靠。

论坛徽章:
0
8 [报告]
发表于 2009-09-03 08:58 |只看该作者

回复 #7 ziggler 的帖子

我总觉的SQL脚本比较可靠.
--------------------------------
这话什么意思?
。。。。。

论坛徽章:
0
9 [报告]
发表于 2009-09-03 09:07 |只看该作者

回复 #8 TOADLover 的帖子

如果是生产系统的话,数据库的补丁都应该搞成SQL语句,这样最好。

论坛徽章:
0
10 [报告]
发表于 2009-09-03 09:09 |只看该作者

回复 #9 ziggler 的帖子

如果是生产系统的话,数据库的补丁都应该搞成SQL语句
-----------------------------------------------------------
我更晕了,这跟数据库补丁有关系吗?
我现在只是想把数据从一个Oracle库copy一份到另一个Oracle库。。。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP