cancel
Showing results for 
Search instead for 
Did you mean: 

Restoring database Error SQLCODE -697

Former Member
5,645

Dear Experts,

I am new in Sybase I am installed SAP BusinessObjects 4.1 during installation it's create databse which is Sybase SQL anywhere 12 Database ( First time I use it ). I am trying to login in database but unable then I found and installed SQL anywhere12 client which include Sybase Central Admin tool I lgoin and take Create backup image ( Tools --- > Create Backup Image ) it's create two file in backup folder BI4_CMC.db and BI4_CMC.log ( before taken backup I stop the service of Database from Windows Services ) then I delete BI4_CMC.db from actual database path ( c:\\Program Files (x86)\\BusinessObjects\\sqlanywhere\\database ) then try to start database but unable to start then I goto sybase Central admin tool ( Tools --> restore database ) its ask about Where is the archive you want to restore ? I gave backup folder path and BI4_CMC.db then it asked about what is the directory and path name where you want to restore the main database file ? I gave c:Program Files (x86)\\BusinessObjects\\sqlanywhere\\database\\BI_CMC.db after that

RESTORE DATABASE 'c:\\Program Files (x86)\\BusinessObjects\\sqlanywhere\\database\\BI4_CMC.db' FROM 'c:\\SQLanywhereBackup\\BI4_CMC.db' I press Finsh Button it gave me error

The Database archive 'c:\\SQLanywhereBackup\\BI4_CMC.db' Could not be restored on the Server' _sc739059084'.
Error During backup/restore: Unable to open device 'c:\\SQLanywhereBackup\\BI4_CMC.db' (unknown error status HDR lables)
SQLCODE -697
SQLSTATE HY000
SQL statement  RESTORE DATABASE 'c:\\Program Files (x86)\\BusinessObjects\\sqlanywhere\\database\\BI4_CMC.db' FROM 
'c:\\SQLanywhereBackup\\BI4_CMC.db'

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Breck_Carter
Participant

The file 'c:\\SQLanywhereBackup\\BI4_CMC.db' is probably an image backup rather than an archive backup and you can only use the RESTORE DATABASE statement for archive backups.

An image backup is much easier to restore: You just do a file copy to the folder where you want it run it, along with the 'c:\\SQLanywhereBackup\\BI4_CMC.log', and start the server. No special statement is required to "restore" an image backup because it is a usable database file itself.

Former Member
0 Kudos

Thankx a lot Breck for guidance, I also taken backup from Sybase Cental Tool database backup when I restore it its resotr but when I start database ( service from windows ) datbase not start

I don't how to find the log what is the problem not erro shown in restore but I can not find resore logs or message.

regards

justin_willey
Participant
0 Kudos

There should be something in the Windows Application Log if the service can't start. If you don't understand what it says, please post it here.

reimer_pods
Participant
0 Kudos

You might want to configure the database engine to write a log file. This will help to analyze why the DB couldn't be started. Example:

-o C:\\Temp\\SA12log.txt
-os 2M
-oe C:\\temp\\SA12err.txt