If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Backup up table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-05, 16:51
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
Backup up table

Hi
I need to back up the table using sql code.
I need something like mysqldump in MySql.
Is something like this in informix?

Thank you in advance
Reply With Quote
  #2 (permalink)  
Old 12-12-05, 18:09
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
dbschema -d database_name -t table_name -ss

to get the schema

unload to "table_name.unl"
select * from table_name

to unload the data

if you want to unload the whole database you can use dbexport
Reply With Quote
  #3 (permalink)  
Old 12-12-05, 19:52
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
Thanks, but Can I do this with some Informix SQL command?
I know about output and unload commands but they only write a data
to file, they dont write a schema.

Thanks
Reply With Quote
  #4 (permalink)  
Old 12-13-05, 16:36
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
The only way to do this is by querying systables and syscolumns, take a look how the values are stored. I did this long time ago and dont remember that value coresponds to what datatypes
Reply With Quote
  #5 (permalink)  
Old 12-14-05, 09:12
blackguard blackguard is offline
Registered User
 
Join Date: Sep 2002
Posts: 102
Attached is a unix shell script that extracts the table schema. You can extract the SQL to customize your unload script.
Attached Files
File Type: txt schema.txt (10.2 KB, 126 views)
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

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