Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    3

    Unhappy Unanswered: Export informix data

    Hi there,

    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..

    Thanks
    Ahmad
    Hong Kong

  2. #2
    Join Date
    Aug 2003
    Location
    India
    Posts
    262

    Re: Export informix data

    Originally posted by faheem786
    Hi there,

    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..

    Thanks
    Ahmad
    Hong Kong
    Hi Ahmad,

    At unix prompt enter

    dbexport <databasename>

    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

    Regards,

    lloyd

  3. #3
    Join Date
    Dec 2003
    Posts
    3

    Thumbs down dbexport access problem

    Hi there,

    Thanks for the reply..

    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??

    Thanks
    Ahmad
    Hong Kong

  4. #4
    Join Date
    Aug 2003
    Location
    India
    Posts
    262

    Re: dbexport access problem

    Originally posted by faheem786
    Hi there,

    Thanks for the reply..

    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??

    Thanks
    Ahmad
    Hong Kong
    Hi Ahmad,

    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
    more /etc/group
    more /etc/passwd
    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/


    Regards,

    lloyd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •