附加Informix .dat和.idx文件 [英] Attaching Informix .dat and .idx files

查看:410
本文介绍了附加Informix .dat和.idx文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试在测试服务器上复制一个informix数据库,但是没有Informix的专业知识,我们只能猜测我们需要做什么。我正在自己学习这些东西,并且无处可以有效地或甚至低效地运行Informix所需的专业知识水平。无论如何...
我们设法从实时服务器的某个地方复制.dat和.idx文件。安装了Linux和最新的Informix Dynamic Server,并启动并运行。

We are trying to duplicate one of our informix database on a test server, but without Informix expertise in house we can only guess what we need to do. I am learning this stuff on the fly myself and nowhere near the expertise level needed to operate Informix efficiently or even inefficiently. Anyhow... We managed to copy the .dat and .idx files from the live server somewhere. Installed Linux and the latest Informix Dynamic Server on it and have it up and running.

现在我们应该从实时服务器中的.dat和idx文件中做什么?我们将它复制到某处,它会自动识别它吗?

Now what should we do with the .dat and idx files from the live server? Do we copy it somewhere and it will recognize it automatically?

或者有一个等同的方式,像你可以从MS SQLServer附加DB来注册新数据库文件数据库?

Or is there an equivalent way like you can do attach DB from MS SQLServer to register the database files in the new database?

在我的绳子端...

推荐答案

你没有意识到,我们问了一个相当复杂的问题。 Informix被构建为共享的所有数据库引擎,意味着该实例可用的所有资源都可用于该实例中的每个数据库。这意味着多个数据库可以将数据存储在任何给定的dbspace,.dat或.idx文件中。大多数DBA知道比做这个更好,但它是需要注意的事情。鉴于此知识,您现在知道.dat和.idx文件不属于数据库,但属于实例。创建数据库空间和文件以包含数据库数据,但它们技术上属于实例。值得注意的是,数据库中的.dat和.idx文件由逻辑dbspace名称知道。

You've asked a pretty complicated question without realizing it. Informix is architected as a shared everything database engine, meaning all resources available to the instance are available to every database in that instance. This means that more than one database can store data in any given dbspace, .dat or .idx file in your case. Most DBA's know better than to do that but it's something to be aware of. Given this knowledge you now know that the .dat and .idx files do not belong to a database but belong the instance. The dbspaces and files were created to contain your databases data but they technically belong to the instance. It's worth noting that the .dat and .idx files are known to the database by the logical dbspace name.

配置这个背景信息,假设生产和开发服务器运行相同的操作系统,并且您的硬件相对相同,而不是PARISC,Itanium或x86 / x64的组合,我将为您投出几个选项。

Armed with this background info and assuming that the production and development servers are running the same OS and that your hardware is relatively the same, not a combination of PARISC, Itanium or x86/x64, I'll throw a couple of options out for you.


  1. 在新实例中创建需要的数据库空间,并使用onunload和onload
    将数据库从生产复制到开发。

  2. 使用ontape或onbar来备份整个生产实例,
    还原它的开发实例。

选项1要求你知道命名的dbspace是多少,它们有多大。在生产实例上使用 onstat -d 来找出这一点。 BTW,onstat -d中列出的数字是页面,我相信Linux是一个2K的页面。

Option 1 requires that you know what the dbspaces are named and how large they are. Use onstat -d on the production instance to find this out. BTW, the numbers listed in onstat -d are in pages, I believe that Linux is a 2K page.

选项2只需要数据文件的路径是在两台服务器上相同。这意味着在两种情况下,ROOTDBS都需要相同。这可以通过执行 onstat -c |找到grep ROOTDBS

Option 2 simply requires that the paths for the data files are the same on both servers. This means that the ROOTDBS needs to be the same in both instances. That can be found by executing onstat -c | grep ROOTDBS

有很多被遗漏了,但我希望这给你需要向前推进你的任务的信息。

There's a lot that has been left out but I hope that this gives you the info that you need to move forward with your task.

这篇关于附加Informix .dat和.idx文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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