A brief introduction to my self-compiled Sybase recovery tool

Source: Internet
Author: User
Tags sybase sybase database

----------------------------------------------------------------------------

---- This is andkylee's personal originality. Please repost it with respect to the author's Labor achievements;

---- The original source must be specified for reprinting.
:
Http://blog.csdn.net/andkylee

---- Keyword: database recovery Sybase device page tool dat

----------------------------------------------------------------------------

 

In May July this year, the backup file B of another database on the PC laptop was accidentally restored to an online database a (both are experimental databases !). Database B is much smaller than database. Consulting from multiple parties (including Sybase technical) says there is no way to recover it by backing up the file. However, I think there should be a way! Is there no way for Sybase? In this case, I load a small backup file into a large database. Can this large database be recovered only by using backup?

Suddenly came up with an idea: Could you open the Sybase device file and see what data is stored in it? Reading a little data is also rewarding!

So in the next three months, I spent a lot of time studying the internal data structure of Sybase, writing and reading programs using VB, and testing and modifying them repeatedly. Finally, two gadgets are basically formed.

1. read_sybdevice that can extract data from Sybase data devices

2. log_analyzer_assistant that extracts log information from the Log Device (these two names are temporarily called and may be changed later)

The data read by the two tools is as follows:

1. Data on the pages of the sybase database to be read (page number: 165621, table name: flowrec1, hexadecimal data on the page is displayed in the upper right corner, the following section shows the data of flowrec1 on page 165621)

 

2. log information extracted from the log device (including: page number, intra-page offset, available line number, log type op, session ID, column width, log operation time, SUID, UID, spid, and log content ). Insert (OP = 4), delete (OP = 5), and update (OP = 9) to write SQL statements in reverse order.

 

In the subsequent articles, I will introduce how to use these two gadgets!

Provides sybase database file repair.

(1) When the system crashes, only the data files are recovered, and even the database files do not exist, but the backup files are damaged.

(2) False delete data recovery, false Delete table recovery (drop), and truncate table recovery.

(3) fix various Sybase errors.

(4) The Sybase Database is marked as suspicious or unavailable.

(5) restore data files in the sybase database when bad blocks occur.

(6) restore a sybase database with no data files but logs.

(7) restore the sybase database only when the device data file does not have any logs.

(8) restore the Sybase data file when it is deleted by mistake.

(9) Restore when the Sybase Database on the disk array is incorrectly formatted.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.