I have a .savf file that someone created from an IBM DB2 S400 server to transmit a database to me.
I installed db2 server community edition on Ubuntu. My install works, as I was able to create a test database, load it with some data, and make some queries.
Now, I’d like to use the savf file to recreate the database it was created from.
I am drowning in IBM documentation pages such as https://www.ibm.com/docs/en/i/7.1?topic=ssw_ibm_i_71/cl/crtsavf.html
I though something like rstobj to mydatabase from data.savf
, like with sql dump files would work but I can’t get around it.
Tried some commands with rstobj
, but I really don’t understand the logic of SAVLIB and the rest of the documentation. Documentation ressources on db2 seem limited on the net. https://www.db2tutorial.com does not say anything about savf file.
Can someone help me?
2
Answers
A save file is an archive file format native to the IBM i (AS/400) similar to tar, zip, etc. I am not aware of any utilities that can restore it on any another operating system.
You cannot restore a database image from AS400 (i-series) into a Db2-LUW database (i.e Db2-community-edition on Ubuntu).
You can only restore the savf file on another AS400 environment.
If you want to move content and DDL from i-series to Db2-LUW that is possible via different means, but not via a savf file.
For example, you can have data exported from the i-series into IXF format files (an IBM specific interchange format) , and that IXF format is directly importable/loadable into Db2-LUW and any EBCDIC to ASCII translations get done (and the table(s) can be created via the Db2-LUW
...import from ....IXF create into ....
tooling.Other data export mechanisms are available, including loading from a remote-cursor.
But any routines on the i-series that are not written in SQL PL will need to be migrated manually, and some SQL PL native routines will need adjusting for the different platform syntax.
Documentation about Db2 is extensive via the relevant IBM Knowledge Centres for each platform of Db2, so only look on IBM websites.