sp_BackupDatabase

Advantage Concepts

Backup a data dictionary and its associated tables.

Syntax

sp_BackupDatabase(

DestinationPath, MEMO,

Options, MEMO );

 

Parameters

DestinationPath (I)

Path to place the backup image in. This path can be any form recognized by the server operating system. For example, in Microsoft Windows this path can be UNC ( \\myserver\myshare\mydir ) or a local drive letter ( c:\mydir ). If using drive letters keep in mind the drive letter must be recognized by the server machine, any drives mapped on the client executing the backup command are irrelevant. Mapped network drive letters are not supported, and should not be used.

Options (I)

Options. See Backup and Restore Options for details.

 

Remarks

The sp_BackupDatabase canned procedure can be used to make a backup image of the data dictionary you are currently connected to. It cannot be called from a free connection.

You must be logged in as the ADSSYS user or a user in the DB:Backup group in order to call sp_BackupDatabase.

As an alternative to using this canned procedure, you can also use the command-line utility adsbackup.

Note The backup image that is created should not be used directly. The backup image is not structurally complete. You must use sp_RestoreDatabase to restore the backup image before using it.

Result Set

See Backup and Restore Canned Procedure Result Sets

Examples

Backup a data dictionary:

EXECUTE PROCEDURE sp_BackupDatabase( ‘\\myserver\myshare\mybackupdir’,

NULL );

 

Backup two specific tables from the database:

EXECUTE PROCEDURE sp_BackupDatabase( ‘\\myserver\myshare\mybackupdir’,

‘include=table1,table2’ );

 

Backup a data dictionary and place the backup image in a drive local to the server Advantage Database Server is running on:

EXECUTE PROCEDURE sp_BackupDatabase( ‘d:\mybackupdir’, NULL );

 

Initialize a differential backup:

EXECUTE PROCEDURE sp_BackupDatabase( ‘d:\mybackupdir’, ‘PrepareDiff’ );

 

Perform a differential backup:

EXECUTE PROCEDURE sp_BackupDatabase( ‘d:\mybackupdir’, ‘Diff’ );