EasyManua.ls Logo

Sybase Adaptive Server Anywhere - BACKUP Statement

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 9 SQL Statements
401
BACKUP statement
Use this statement to back up a database and transaction log.
BACKUP DATABASE
DIRECTORY
backup-directory
[ WAIT BEFORE START ]
[ DBFILE ONLY ]
[ TRANSACTION LOG ONLY ]
[ TRANSACTION LOG RENAME [ MATCH ] ]
[ TRANSACTION LOG TRUNCATE ]
backup-directory: string
BACKUP DATABASE TO
archive-root
[ ATTENDED { ON | OFF } ]
[ WITH COMMENT
comment
string
]
archive-root: string
comment-string: string
Must have DBA authority.
Causes a checkpoint.
"RESTORE statement" on page 591
"Backup and Data Recovery" on page 645 of the book ASA Users Guide
Syntax 1 An image backup creates copies of each of the database files, in
the same way as the Backup utility (
dbbackup
). In the case of the BACKUP
statement, however, the backup is made on the server, while the Backup
utility makes the backup from a client machine.
Optionally, only the database file(s) or transaction log can be saved. The log
may also be renamed or truncated after the backup has completed.
Alternatively, you can specify an empty string as a directory to rename or
truncate the log without copying it first. This is particularly useful in a
replication environment where space is a concern. You can use this feature
with an event handler on transaction log size to rename the log when it
reaches a given size, and with the DELETE_OLD_LOGS option to delete
the log when it is no longer needed.
To restore from an image backup, copy the saved files back to their original
locations and reapply transaction logs as described in the chapter "Backup
and Data Recovery" on page 645 of the book ASA User’s Guide.
Syntax 2 An archive backup creates a single file holding all the required
backup information. The destination can be either a file name or a tape drive
device name.
Function
Syntax 1 (image
backup)
Syntax 2 (archive
backup)
Permissions
Side effects
See also
Description

Table of Contents

Related product manuals