简体   繁体   English

如何从AS400建立测试数据库

[英]How to make a test database from AS400

For SQL Server, we are able to send over the db for the most part pretty easily to offshore staff. 对于SQL Server,我们能够轻松地将数据库大部分发送给离岸人员。

Is this possible with the AS/400 or they can only VPN in to work? AS / 400是否可能这样做,或者他们只能通过VPN正常工作?

The easiest way I can think of would be to create a Save File (SAVF) then FTP that save file to the other IBM i and [restore it] ( http://pic.dhe.ibm.com/infocenter/iseries/v6r1m0/index.jsp?topic=/cl/rstobj.htm ). 我想到的最简单的方法是先创建一个保存文件 (SAVF),然后通过FTP将文件保存到其他IBM i并[恢复]( http://pic.dhe.ibm.com/infocenter/iseries/v6r1m0 /index.jsp?topic=/cl/rstobj.htm )。

In the PC world this is similar to zipping up a directory, FTPing it to another machine and then unzipping it. 在PC世界中,这类似于将目录压缩,将其FTP传输到另一台计算机然后解压缩。

If this isn't what you mean, can you elaborate on what you're wanting? 如果这不是您的意思,您可以详细说明您想要的吗?

Every database engine has a slightly different version of SQL. 每个数据库引擎都有一个稍微不同的SQL版本。 DB2 for i at V5R4 has differences to DB2 LUW 9.7 and both are different to SQL Server and MySQL at any version. V5R4上的DB2 i版与DB2 LUW 9.7版有所不同,两者在任何版本上都与SQL Server和MySQL不同。 So the quick answer is no, you can't simply make a copy of a DB2 for i database and run it on MySQL or SQL Server. 因此,快速的答案是“否”,您不能简单地复制DB2 for i数据库并在MySQL或SQL Server上运行它。 You'd normally do exactly as you are doing with SQL Server: Have one machine here and another machine there and unload/reload the data as needed. 通常,您的操作通常与使用SQL Server时完全相同:在这里有一台计算机,在那儿有一台计算机,并根据需要卸载/重新加载数据。

Having said that, the differences between SQL dialects are not usually crippling. 话虽如此,SQL方言之间的差异通常不会削弱。 Use the IBM Navigator for i and extract all of the DDL for the IBM database, then try to execute the DDL on the SQL Server machine. 对i使用IBM Navigator,并提取IBM数据库的所有DDL,然后尝试在SQL Server计算机上执行DDL。 You'll have some syntax problems, but you should be able to work them out with someone who is knowledgeable in both dialects. 您会遇到一些语法问题,但是您应该能够与熟悉这两种方言的人一起解决它们。 Keep track of the changes to the DDL because you'll need them in order to extract the data from the IBM side. 跟踪DDL的更改,因为您需要它们才能从IBM端提取数据。

Once you have the empty database created on the new machine, it's time to extract out the data. 在新计算机上创建空数据库之后,就该提取数据了。 Write some CL programs to do CPYTOIMPF to generate CSV files or flat files or whatever it is that SQL Server wants in order to import properly. 编写一些CL程序以执行CPYTOIMPF来生成CSV文件或平面文件,或SQL Server正确导入所需的任何文件。 Then FTP that data to the new machine and write some scripts to do the import. 然后将该数据通过FTP传输到新计算机,并编写一些脚本来进行导入。

As you can tell, this is not going to be a simple process and it will take some time to develop and debug. 如您所知,这将不是一个简单的过程,并且将花费一些时间进行开发和调试。 I'd go with having the offshore staff using a VPN to the local IBM machine. 我要让离岸人员使用VPN到本地IBM机器。

The offshore site probably has their own SQL Server, probably running the same version as you. 离岸站点可能有自己的SQL Server,运行的版本可能与您相同。

But unless they also have an IBM Power System running the same release of IBM i, then they will most likely need to access your system. 但是,除非他们也具有运行相同版本的IBM i的IBM Power System,否则他们很可能需要访问您的系统。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM