将数据库的副本复制到本地 [英] make a copy of database to local

查看:91
本文介绍了将数据库的副本复制到本地的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是db2新手。我们有一个服务器托管db2 / 6000数据库,

限制使用备份,生成ddl。我想知道是否有一个简单的方法将数据库结构和数据传输到我的笔记本电脑中,

安装了db2 / nt。

i试图从microsoft sql server使用DTS服务。它没有
工作。

任何建议?

任何帮助都会受到赞赏。

alan。

i am a db2 newbie. we have a server hosting a db2/6000 database that
restricts the use of backup, generate ddl. i wonder if there is a
simple way to transfer the database structure and data into my laptop,
on which db2/nt was installed.
i had tried to use DTS service from microsoft sql server. it didn''t
work.
any suggestion?
any help would be appreciated.
alan.

推荐答案

如果您可以通过

笔记本电脑上的控制中心访问数据库,那么a生成DDL数据库的选项?如果是这样,你可以用
来生成你正在寻找的DDL。


数据可以使用以下方式复制:

INSERT INTO local_table

SELECT * FROM remote_table


祝你好运!

Phil Sherman


alanchinese写道:
If you have access to the database through the control center on your
laptop, is there a "Generate DDL" option for the database? If so, you
can use it to generate the DDL you are looking for.

Data can be copied using:
INSERT INTO local_table
SELECT * FROM remote_table

Good luck!
Phil Sherman

alanchinese wrote:
我是db2新手。我们有一个托管db2 / 6000数据库的服务器,它限制了备份的使用,生成了ddl。我想知道是否有一种简单的方法将数据库结构和数据传输到我的笔记本电脑上,
安装了db2 / nt。
我曾试图从microsoft sql server使用DTS服务。它没有工作。
任何建议?
任何帮助都将不胜感激。
阿兰。
i am a db2 newbie. we have a server hosting a db2/6000 database that
restricts the use of backup, generate ddl. i wonder if there is a
simple way to transfer the database structure and data into my laptop,
on which db2/nt was installed.
i had tried to use DTS service from microsoft sql server. it didn''t
work.
any suggestion?
any help would be appreciated.
alan.



alanchinese写道:
alanchinese wrote:
我是db2新手。我们有一个托管db2 / 6000数据库的服务器,它限制了备份的使用,生成了ddl。我想知道是否有一种简单的方法将数据库结构和数据传输到我的笔记本电脑上,
安装了db2 / nt。
我曾试图从microsoft sql server使用DTS服务。它没有工作。
任何建议?
任何帮助都会受到赞赏。
alan。
i am a db2 newbie. we have a server hosting a db2/6000 database that
restricts the use of backup, generate ddl. i wonder if there is a
simple way to transfer the database structure and data into my laptop,
on which db2/nt was installed.
i had tried to use DTS service from microsoft sql server. it didn''t
work.
any suggestion?
any help would be appreciated.
alan.



你需要使用db2move实用程序。


Larry Edelstein


You will need to use the db2move utility.

Larry Edelstein


更正:


INSERT。 ...选择......


不会跨数据库工作。


你应该能够导出数据到你的笔记本电脑然后导入到

本地表。如果您无法导出数据,那么您可以将其选择为

文件并将其用作加载的输入。你需要建立分隔符或

使用select中的固定长度输出。注意长字符

和varchar列如果你试图使用固定长度的记录 - 它们可以

导致非常大的文件。


所有这些选项都要求您编目远程数据库

你的笔记本电脑。


生成DDL右键单击控制中心数据库列表中的

数据库名称即可访问该选项。

Phil Sherman

Phil Sherman写道:
Correction:

INSERT .... SELECT ......

won''t work across databases.

You should be able to export the data to your laptop then import it to a
local table. If you can''t export the data, then you could select it to a
file and use that as input to load. You''ll need to build delimiters or
use fixed length output from the select. Watch out for long character
and varchar columns if you try to use fixed length records - they can
cause very large files.

All of these options require you to "catalog" the remote database on
your laptop.

The "Generate DDL" option is accessed using a right-click on the
database name in the control center''s list of databases.

Phil Sherman
Phil Sherman wrote:
如果您可以通过笔记本电脑上的控制中心访问数据库,那么是否有生成DDL。数据库的选项?如果是这样,您可以使用它来生成您正在寻找的DDL。

可以使用以下方法复制数据:
INSERT INTO local_table
SELECT * FROM remote_table <祝你好运!

Phil Sherman

alanchinese写道:
If you have access to the database through the control center on your
laptop, is there a "Generate DDL" option for the database? If so, you
can use it to generate the DDL you are looking for.

Data can be copied using:
INSERT INTO local_table
SELECT * FROM remote_table

Good luck!
Phil Sherman

alanchinese wrote:
我是db2新手。我们有一个托管db2 / 6000数据库的服务器,它限制了备份的使用,生成了ddl。我想知道是否有一种简单的方法将数据库结构和数据传输到我的笔记本电脑上,
安装了db2 / nt。
我曾试图从microsoft sql server使用DTS服务。它没有工作。
任何建议?
任何帮助都将不胜感激。
alan。
i am a db2 newbie. we have a server hosting a db2/6000 database that
restricts the use of backup, generate ddl. i wonder if there is a
simple way to transfer the database structure and data into my laptop,
on which db2/nt was installed.
i had tried to use DTS service from microsoft sql server. it didn''t
work.
any suggestion?
any help would be appreciated.
alan.



这篇关于将数据库的副本复制到本地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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