Allows you to purge records from the dump history file. The original dump history file is saved with the timestamp suffixed to the file name.
sp_dump_history [ @operation = {'list' | 'purge' | 'listfiles' | 'help'}] [, @until_time = 'date'] [, @database_name = 'database_name'] [, @dump_type = {'DATABASE' | 'TRAN[SACTION]' | 'CONFIG[URATION]'}] [, @status = {'success' | 'fail'}] [, @file = 'filename']
is a required parameter that include these options:
list – displays the records from the dump history file. By default, the list includes:
Database name – the server configuration name
Dump type
Total number of dump stripes
Compression level
Remote Backup Server name
Dump creation time
Error number – on Adaptive Server
purge – purges records from the dump history file. The records to be purged are selected based on criteria specified using the other sp_dump_history parameters.
listfiles – displays the list of dump history file names.
help – shows the syntax for sp_dump_history.
(optional) allows you to specify a date and time, with Backup Server purging all dump objects created before that time. By default, all dump records are purged.
(optional) is the name of the database that has dump records from the dump history file that are listed or purged. By default, all database dump records are included.
(optional) specifies the type of dump record to be listed or purged. Valid types are:
'DATABASE' – database dump objects created by dump database.
'TRAN[SACTION]' – transaction dump objects created by dump transaction.
'CONFIG[URATION]' – server configuration objects created by dump configuration.
By default, all types of dump records are listed or purged.
(optional) specifies with to list or purge the successful or failed dump records. By default, only successful dump records are included.
(optional) is the name of the dump history file. By default, the configured dump history file name is used.
Lists all dump records from the dump history file:
sp_dump_history 'list' go
Lists dump records of a specified database created before a specified time:
sp_dump_history 'list', "mar 20, 2010 10:51:43:866am", 'testdb' go
The default behavior for sp_dump_history with no parameters is to display the output from its list parameter.
The output for database and transaction dumps differs from that of configuration files.
The permission checks for sp_dump_history differ based on your granular permissions settings.
Granular permissions enabled |
With granular permissions enabled, you must be a user with manage dump configuration privilege. |
Granular permissions disabled |
With granular permissions disabled, you must be a user with sa_role or oper_role. |
Values in event and extrainfo columns from the sysaudits table are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
|
Documents For information about dump operations, see the System Administration Guide.