dbTalk Databases Forums  

Help..need to repair corrupted db!

comp.databases.gupta comp.databases.gupta


Discuss Help..need to repair corrupted db! in the comp.databases.gupta forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
straighteight@gmail.com
 
Posts: n/a

Default Help..need to repair corrupted db! - 05-19-2005 , 03:15 AM






Hi,

Maybe a long shot posting here, but I am looking for some help in
repairing a corrupted database in SQLBASE server.

We have no good backup of the database, it looks as if it has been
corrupted for quite a while. Our application which uses this DB still
works, although it is running into problems all the time, and is a key
application in our business.

I first tried reorganizing the database which didn't work. I scrapped
the dbs file as it was now no good and took back in a backup. I tried a
segmented unload of the database using a control file, it gets so far
(produced about 2.5gb of unload data, the db itself is just under 2gb)
and then throws the error 00703 Fatal SQLBASE system failure (VIO IPN)

If I try an UPDATE STATISTICS I get the same error. If I try a check
database I get CHECK Failure (ROW BEN) Corrupted row page for table
DB.MY_TABLE

Everything I have read tells me to unload as much as I can, drop the
bad row and recreate the database and populate with the unloaded data.
There are two problems, 1. I don't know the schema of the database, how
can I view this at a glance? 2. I am pretty much a newbie to SQL so I
need exact commands

Thanks in advance for any help!


Reply With Quote
  #2  
Old   
Oliver
 
Posts: n/a

Default Re: Help..need to repair corrupted db! - 05-19-2005 , 02:45 PM






Hi,
had once a similar problem, but it worked just fine, to export the
database in a textfile (SQL-Statements) and import it in a new DB File.

Oliver


Reply With Quote
  #3  
Old   
CONP
 
Posts: n/a

Default Re: Help..need to repair corrupted db! - 07-13-2005 , 09:45 PM



If you can connect to the database, then it isn't entirely corrupt which is a good thing
try the command
UNLOAD DATABASE C:\DATABASE.SQL;
Open the DATABASE.SQL file in SQL Talk and load each table one by one.
If the DATABASE.SQL file is too large, then you can unload each table one by one

The command below will display all your created databases.
SELECT DISTINCT TBNAME FROM SYSCOLUMNS WHERE TBNAME NOT LIKE 'SYS%';

Insert each table name into the line below and execute
UNLOAD DATA SQL <table name>.SQL <table name>;

The command below will create a file that will load all the tables into a new database
UNLOAD SCHEMA C:\SCHEMA.SQL;

Create a new blank database, run the SCHEMA.SQL file and then run each <table name>.sql one by one until you get an error in one of
the files
Use the LOAD SQL <table name>.sql; command
Once an error has occurred, open the SQL file and check for corrupt data and remove it and run it again. If it still occurs, check
how many values have been inserted and go to that line number in the SQL file name
So if 500 rows have been inserted, go to the 501st row of the SQL file and see if that's corrupt and remove it. Keep doing this
until you complete the LOAD for that table successfully. Then repeat for each table.

Good Luck


<straighteight (AT) gmail (DOT) com> wrote

Quote:
Hi,

Maybe a long shot posting here, but I am looking for some help in
repairing a corrupted database in SQLBASE server.

We have no good backup of the database, it looks as if it has been
corrupted for quite a while. Our application which uses this DB still
works, although it is running into problems all the time, and is a key
application in our business.

I first tried reorganizing the database which didn't work. I scrapped
the dbs file as it was now no good and took back in a backup. I tried a
segmented unload of the database using a control file, it gets so far
(produced about 2.5gb of unload data, the db itself is just under 2gb)
and then throws the error 00703 Fatal SQLBASE system failure (VIO IPN)

If I try an UPDATE STATISTICS I get the same error. If I try a check
database I get CHECK Failure (ROW BEN) Corrupted row page for table
DB.MY_TABLE

Everything I have read tells me to unload as much as I can, drop the
bad row and recreate the database and populate with the unloaded data.
There are two problems, 1. I don't know the schema of the database, how
can I view this at a glance? 2. I am pretty much a newbie to SQL so I
need exact commands

Thanks in advance for any help!




Reply With Quote
Reply




Thread Tools
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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.