将数据库从一台 Informix IDS 11 服务器复制到另一台服务器的最简单方法是什么

发布于 2024-07-05 02:27:25 字数 108 浏览 7 评论 0原文

源数据库相当大。 目标数据库不会自动增长。 他们在不同的机器上。

我来自 MS SQL Server、MySQL 背景,IDS11 似乎过于复杂(我确信,这是有充分理由的)。

The source database is quite large. The target database doesn't grow automatically. They are on different machines.

I'm coming from a MS SQL Server, MySQL background and IDS11 seems overly complex (I am sure, with good reason).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

栖迟 2024-07-12 02:27:25

如果两台机器都使用相同版本的 IDS,则另一种选择是使用 ontape 在一台机器上进行备份并在另一台机器上进行恢复。 您可以使用 STDIO 选项,然后将备份流式传输到另一台计算机上,在该计算机上恢复可以从 STDIO 恢复。

来自“高可用性和分发的数据复制”红皮书:

ontape -s -L 0 -F | rsh secondary_server "ontape –p"

您还可以在主机之间创建无密码 ssh 连接,并以更安全的方式进行传输。

If both the machines use the same version of IDS then another option would be to use ontape to take a backup on one machine one machine and restore on another. You can use the STDIO option and then just stream the backup onto the other machine where the restore could just restore from the STDIO.

From the "Data Replication for High Availability and Distribution" redbook:

ontape -s -L 0 -F | rsh secondary_server "ontape –p"

You could also create a passwordless ssh connection b/w the hosts and transfer in a more secure way.

酷炫老祖宗 2024-07-12 02:27:25

正如其他人提到的,最简单的方法是 dbexport/dbimport。

最快的方法是使用 onpload,即高性能加载器。 如果您有大量数据,但表数量不是很多,那么这绝对值得追求。 IIUG 站点上有一些零散的信息,可能有助于编写 HPL 脚本以生成您需要的所有配置。

The easiest way is dbexport/dbimport, as others have mentioned.

The fastest way is using onpload, the High Performance Loader. If you have lots of data, but not a ridiculous number of tables, this is definitely worth pursuing. There are some bits and pieces on the IIUG site that may be of assistance in scripting the HPL to generate all the config you'll need.

独自唱情﹋歌 2024-07-12 02:27:25

你用过导出工具吗? 过去有一种方法,如果您首先将数据库置于静态模式,然后您实际上可以复制 DBSpaces(我认为 dbspaces 工具......已经有几年了)。

因为使用 informix,您过去能够指定用于表的 DBSpace(甚至可能在 alter 表中?)。

检查 - dbaccess 工具 - 有一个导出命令。
将数据库置于静止模式或关闭,复制 dbspace,然后附加表,告诉它指向新的 dbspace 文件。 (dbspaces 工具可能值得一看。我这里有手册。它们是 9.2,但应该不会改变太多)。

have you used the export tool ? There used to be a way if you first put the db's into quiescent mode and then you could actually copy the DBSpaces across (dbspaces tool I think... its been a few years now).

Because with informix you used to be able to specify the DBSpaces(s) to used for the table (maybe even in the alter table ?).

Check - dbaccess tool - there is an export command.
Put the DB's into quiesent mode or shut down, copy the dbspaces and then attach table telling it to point to the new dbspaces file. (the dbspaces tool could be worth while looking at.. I have manuals around here. they are 9.2, but it shouldn't have changed too much).

装迷糊 2024-07-12 02:27:25

将数据从一台服务器移动到另一台服务器的一种方法是使用 dbexport 命令备份数据库。

然后将备份文件复制到目标服务器后运行 dbimport 命令。

要创建新数据库,您需要使用 onmonitor 工具为新数据库创建 DBSpace,此时您可以使用其他服务器中的现有文件。

然后,您需要使用 dbaccess 工具在目标服务器上创建数据库。 dbaccess 工具有一个数据库选项,允许您创建数据库。 创建数据库时,您指定要使用的 DBSpace。

源数据库可能由许多块组成,您还需要将它们复制并附加到新数据库。

One way to move data from one server to another is to backup the database using the dbexport command.

Then after copying the backup files to the destination server run the dbimport command.

To create a new database you need to create the DBSpace for the new database using the onmonitor tool, at this point you could use the existing files from the other server.

You will then need to create the database on the destination server using the dbaccess tool. The dbaccess tool has a database option that allows you to create a database. When creating the database you specify what DBSpace to use.

The source database may be made up of many chunks which you will also need to copy and attach to the new database.

青衫儰鉨ミ守葔 2024-07-12 02:27:25

您有几个选择。

数据库导出/数据库导入
卸载/加载
HPL(高性能装载机)选项。

我个人使用过 onunload/onload 和 dbexport/dbimport。 我没用过HPL。 我正在使用 IDS 10。

onunload/onload IBM 文档

  • 将原始数据库以页面大小的块备份到磁盘或磁带
  • 更快(特别是如果您转到磁盘)
  • 如果数据库服务器位于不同的操作系统或硬件上,或者它们只是具有不同的页面大小,则会出现问题。

    dbexport/dbimport IBM 文档

  • 在分隔的 ascii 文件中备份数据库
  • 将数据库的 ascii 模式写入一个巨大的纯文本文件中,包括所有用户、表、视图、索引等。有关数据库结构的所有内容。
  • 数据库的每个表也有单独的纯文本文件
  • 没那么快
  • 任何包含错误数据的表、任何语法不正确的视图等上的 dbimport 问题(这可能是一件好事,是一个识别和清理的机会)
  • 当您跑进商店买冰淇淋时,请勿将此胶带留在汽车前座上(否则您会出现在新闻中)。另请阅读。 ..这不是一种非常安全的数据移动方式。 :)
  • 限制:需要对源数据库的独占访问权限。

    这里是文档的一个很好的起点 --> 迁移数据库服务器之间的数据

  • You have a few choices.

    dbexport/dbimport
    onunload/onload
    HPL (high performance loader) options.

    I have personally used onunload/onload and dbexport/dbimport. I have not used HPL. I'm using IDS 10.

    onunload/onload IBM docs

  • Back up the raw database to disk or tape in page size chunks
  • faster (especially if you go to disk)
  • Issues if the the database servers are on different operating systems or hardware or if they just have different page sizes.

    dbexport/dbimport IBM docs

  • backup the database in delimited ascii files
  • writes an ascii schema of the database including all users, tables, views, indexes, etc. Everything about the structure of the database into one huge plain text file.
  • separate plain text files for each table of the database as well
  • not so fast
  • issues on dbimport on any table that has bad data, any view with incorrect syntax, etc. (This can be a good thing, an opportunity to identify and clean)
  • DO NOT LEAVE THIS TAPE ON THE FRONT SEAT OF YOUR CAR WHEN YOU RUN INTO THE STORE FOR AN ICE CREAM (or you'll be on the news). Also read ... Not a very secure way to be moving data around. :)
  • Limitation: Requires exclusive access to the source database.

    Here is a good place to start in the docs --> Migration of Data Between Database Servers

  • ~没有更多了~
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文