I got a client who is using the informix database under Unix OS. I have zero knowledge on both. There are no administrators.
I would like export the data from the informix tables to text files so that I could use them for some other purpose.
There is an utility provided in the database to execute sql commands.
Using that I typed the following command and the data was exported to the text file.
"unload to <text file> select * from <table>"
Unfortunately.. there were no field name came along with the data which makes my life very complicated.
Imagine.. there are around 100+ tables which I have to repeat the same process.
Plss help me with an easy way..
Infact I want everything (all the tables with the structrure).. Is there an easy way to accomplish this..?
I hope I will get some useful comments from you soon..
At unix prompt enter
it will create a directory <databasename>.exp. Under that directory there will be a file <databasename>.sql which will contain your database structure. And there will be many other files with extn. .unl which will contain your actual table data. You can also download a Windows based third party utility called Winsql from the net to view, which is similar to TOAD. The link is - http://www.indus-soft.com/SynametricsWebApp/WinSQL.jsp
But when I executed the commands (db export or dbschema) from the unix prompt after setting the environment variables the command was recognized but the following error came.
"Database not found or no system permission"
I used the login for the root user account. My friend says that we need to use the informix master login to execute such a command. But unfortuanately we can't find that user info.
Any idea of what's happening and the work arounds??
You must first check if the engine is up. Give the command onstat -
One more thing would be your env. variables are not set.
You must set INFORMIXSERVER, ONCONFIG, PATH, INFORMIXIR.
Also to check for informix user, give the command
There will be an entry for the user informix.
You can go thru the manuals at IBM site. http://www-306.ibm.com/software/data.../pubs/library/