Yurov,
Both files stored in "n:\nm_backup" are used for recovery. This is a
"full backup" which includes both files - these two files can be copied
over your original corrupt database.
Steps for restore:
1. Have you validated this backup database to make sure it's not corrupt
also?
copy n:\nm_backup\ptadata.edb c:\restore
copy n:\nm_backup\ptadata.log c:\restore
dbvalid -c "UID=MyUser;PWD=MyPwd;DBF=c:\restore\ptadata.e db"
** If this step fails with an error about the database being corrupted,
you may want to open a case with technical support.
Also, see if the online transaction log is still okay - if it is, you
can use this as part of a later step:
dbtran c:\origdatabase\ptadata.log
2. Make sure you have a *backup copy* of your corrupted database. You
may be able to use it for partial recovery later.
mkdir c:\restore\badcopy
copy c:\origdatabase\ptadata.edb c:\restore\badcopy
copy c:\origdatabase\ptadata.log c:\restore\badcopy
3. Try applying the online transaction log (if it translated okay in Step 1)
dbsrv6 c:\restore\ptadata.edb -a c:\restore\badcopy\ptadata.log
(See:
http://manuals.sybase.com/onlinebook...4577;pt=4577#X
)
4. Make another copy of the restored database - just in case:
mkdir c:\restore\restoreddb
copy c:\restore\ptadata.edb c:\restore\restoreddb
copy c:\restore\ptadata.log c:\restore\restoreddb
5. Try starting it up:
attrib -r c:\origdata\ptadata.edb
attrib -r c:\origdata\ptadata.log
copy /Y c:\restore\ptadata.edb c:\origdata\ptadata.edb
copy /Y c:\restore\ptadata.log c:\origdata\ptadata.log
dbisql -c "dsn=nma"
Regards,
Yurov Ardyy wrote:
Quote:
Hi, We have a sybase v6 database, and we use a small script
to backup each night.dbbackup -c "dsn=nma" -y -q
n:\nm_backupthis generates two files one is called
ptadata.edb and one called ptadata.log, i need to restore
the data back, as the database is corrupt. Could someone
please show me how to restore a backup, just the syntax
would be good. |
--
Jeff Albion, Sybase iAnywhere
iAnywhere Developer Community :
http://www.sybase.com/developer/libr...ere-techcorner
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
SQL Anywhere Patches and EBFs :
http://downloads.sybase.com/swd/summ...&timeframe =0
Report a Bug/Open a Case : http://case-express.sybase.com/cx/