Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Informix > Export informix data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-03, 07:25
faheem786 faheem786 is offline
Registered User
 
Join Date: Dec 2003
Posts: 3
Unhappy 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
Reply With Quote
  #2 (permalink)  
Old 12-05-03, 08:17
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Re: Export informix data

Quote:
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
Reply With Quote
  #3 (permalink)  
Old 12-11-03, 22:27
faheem786 faheem786 is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 12-11-03, 22:53
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Re: dbexport access problem

Quote:
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On