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 > Informix Dbase Table - help needed...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-20-04, 18:08
henigfurs henigfurs is offline
Registered User
 
Join Date: Dec 2004
Posts: 7
Informix Dbase Table - help needed...

Hi to all! I'm a newbie.

here's my problem;

I have a table that have some indexes that are corrupt. I have tried repairing the table 4 times using the 'repair' utility and still didn't fix all the errors.

This is what I want to do:

Unload data of the table (unload)
create a backup of the table (dbschema)
check schema file
drop old table
create table
load data

i know how to unload the data and to get the schema of the old table. after that, I don't know what to do.

please help.
thanks!
jojo

Last edited by henigfurs; 12-21-04 at 11:29.
Reply With Quote
  #2 (permalink)  
Old 12-20-04, 22:22
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Hi Jojo,

After you have taken an unload and save the output of dbshcema in to a file. Edit the file and give the table a new name, then run dbaccess, select your database and run the schema file, a new table will be created. Then load the data into the new table. Check the contents. Now drop the old table and rename this table to your old table.

Steps -

In dbaccess
unload to a.unl select * from abc

At unix prompt

dbschema -d nwo -t abc a.out
(will create a file a.out with the schema of table abc, edit this file and change the table name say to xyz)

In dbaccess

Run a.out, a new table will be created
load from a.unl insert into xyz
(check the contents)
drop table abc
rename table abc to xyz

Hope it helps.
Reply With Quote
  #3 (permalink)  
Old 12-21-04, 10:30
henigfurs henigfurs is offline
Registered User
 
Join Date: Dec 2004
Posts: 7
yes! thank you so much!!!
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