A brief introduction to the backup and recovery of Sybase database

Source: Internet
Author: User
Tags manual log sybase sybase database backup

Sybase is a database software PRODUCT based on the Client/server architecture. It consists of three main parts, one is the database management and maintenance of an online relational database management system Sybase SQL Server; the second is to support the establishment and development of database application of a set of front-end tools Sybase SQL toolset; Third, the heterogeneous environment of other manufacturers of the application software and any type of data connected to the interface Sybase Open Client/open Server. The backup and recovery of Sybase databases is primarily for Sybase SQL Server.

Sybase offers two different types of restores: one is the system's automated software system failure recovery. Another type of media failure recovery that requires manual completion.

Automatic recovery is a protective measure provided by the system itself to prevent system failure. The automatic recovery mechanism is run every time Sybase restarts. The automatic control recovery mechanism ensures that transactions completed before the system is paralyzed are written to the database device, and that the unfinished transactions are rolled back.

Manual recovery is to back up the database to a tape device in advance through the Database Backup tool command or online data streaming management software, and then restore the database through the corresponding recovery command and mode.

Sybase's traditional backup and recovery

Let's begin by discussing how to back up the database regularly to learn about the traditional methods of backup and recovery for Sybase databases.

For Sybase databases, once a hardware or system failure occurs, the database can be recovered only if the backup of the database and its transaction log is present.

The tasks that are backed up are usually assumed by the system administrator or the database owner. However, the right to back up a database or transaction log can be passed to other users by the database owner.

It is important to develop a backup schedule. It is difficult to determine the "best" schedule for backing up data and its logs. In fact, the frequency of backups determines the quality of recovery. If a media failure occurs, the maximum amount of data may be lost. For large, frequently updated databases, you typically do multiple log backups and at least one backup of the database every day.

You can back up the database or transaction log while the database is active. This type of backup (Sybase's unique feature) is called dynamic unload. Dynamic offloading makes it easy to make backups and making continuous operations possible.

Dynamic unloading will partially reduce Sybase's speed.

Selection of backup devices

Sybase's backup devices are listed in system table master. sysdevices, executable command:

Select * From master..sysdevices
Where name like ”%dump%“.

To view the status of the device.

If the value listed in status is 16 or 24 (indicates that the device is a device being unloaded), the value of the CntrlType column indicates the type of device being discharged. The value of the unload device can be: 2~8.

2: The data is unloaded by means of a disk byte throttle interface. The removable device can be a disk, a partial disk, or an operating system file. The default is the operating system file when you do not indicate the unload device.

3~8: Represents the tape unloading device.

To increase the unload device, the system procedure can be sp_addumpdevice. The syntax is:

For tape Devices:

sp_addumpdevice ”type“,device_
name,
physicalname,cntrltype{,skip|noskip},size

For disk devices:

sp_addumpdevice ”disk“,device_
name,physicalname,cntrltype

Backing up data directly to tape ensures that the data is stored offsite, but the backup time is extended. You can also take the database back to the local disk first, and then back up the tape when the machine is not busy.

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.