SQL Admin Provider::ListBackupInformation
The ListBackupInformation method returns the information about backup events stored in particular disk file. This is required to provide the caller with the instance number of a particular backup so that this number can be specified during a call to RestoreDBFromDisk.
Arguments
Input argument | Required | Description |
---|---|---|
FilePath |
Yes |
Full path to the backup file to query. |
ServerName |
No |
A string representing the name of the server. This can be a NetBIOS name, a FQDN, or an IP address. It is vital that the server upon which MPS is running be able to resolve server names by using whichever naming convention you employ. |
[sqlUserName] |
No |
User name for connecting to the SQL server via SQL Authentication. If this node is present the connection will be made via SQL Authentication rather than Windows Authentication. The existence of this node also requires that the <sqlUserPass/> node exist. |
[sqlUserPass] |
No |
The password for connecting to the SQL server via SQL Authentication using the username indicated by <sqlUserName/>. If the <sqlUserName/> node is not present, this node is ignored. |
Output argument | Description |
---|---|
BackupName |
Backup set name. |
BackupDescription |
Backup set description. |
BackupType |
Backup type (1=Database, 2=Transaction Log, 4=File, 5=Differential Database, 6=Differential File). |
ExpirationDate |
Expiration date for the backup set. |
Compressed |
0=No. SQL Server does not support software compression. |
Position |
Position of the backup set in the volume. |
DeviceType |
Number corresponding to the device used for the backup operation:
|
UserName |
Username that performed the backup operation. |
ServerName |
Name of the server that wrote the backup set. |
DatabaseName |
Name of the database that was backed up. |
DatabaseVersion |
Version of the database from which the backup was created. |
DatabaseCreationDate |
Date and time the database was created. |
BackupSize |
Size of the backup in bytes. |
FirstLsn |
Log sequence number of the first transaction in the backup set. |
LastLsn |
Log sequence number of the last transaction in the backup set. |
CheckpointLsn |
Log sequence number of the most recent full database backup. |
BackupStartDate |
Date and time that the backup operation began. |
BackupFinishDate |
Date and time that the backup operation finished. |
SortOrder |
Server sort order. This column is valid for database backups only. |
Codepage |
Server code page or character set used by the server. |
UnicodeLocalId |
Server Unicode locale ID configuration option used for Unicode character data sorting. Provided for backward compatibility. |
UnicodeComparisonStyle |
Server Unicode comparison style configuration option that provides additional control over the sorting of Unicode data. |
CompatibilityLevel |
Compatibility level setting of the database from which the backup was created. |
SoftwareVendorId |
Software vendor identification number. For SQL Server, this number is 4608 (or hexadecimal 0x1200). |
SoftwareVersionMajor |
Major version number of the server that created the backup set. |
SoftwareVersionMinor |
Server minor version number that did the backup. |
SoftwareversionBuild |
Server build number that did the backup. |
MachineName |
Server that performed the backup. |
Flags |
Bit 0 (x1) is returned if bulk-logged data is captured in the log backup. |
BindingID |
Database binding ID. |
RecoveryForkID |
Recovery fork ID. |
Collation |
Database collation. |
Remarks
Rollback Calls
The ListBackupInformation method has no transaction rollback support.
Sample Code
Example XML Request
The following is an example of an XML request for the ListBackupInformation method:
<?xml version="1.0" encoding="iso-8859-1" ?>
<request>
<data>
<serverName>SQL01</serverName>
<filePath>D:\Backups\SampleSQL01.bak</filePath>
<sqlUserName>sampleUser</sqlUserName>
<sqlUserPass>Pass1Word</sqlUserPass>
</data>
<procedure>
<execute namespace="SQL Admin Provider"
procedure="ListBackupInformation">
<before source="data" destination="executeData" mode="merge"/>
<after source="executeData" destination="data" mode="insert"/>
</execute>
</procedure>
</request>
Example XML Response
The following is an example of the structure of an XML response for the ListBackupInformation method. The actual returned data will be filled in within the <data> nodes:
<?xml version="1.0" encoding="iso-8859-1" ?>
<response>
<data>
<filePath>D:\Backups\SampleSQL01.bak</filePath>
<backups>
<backup>
<backupName/>
<backupDescription/>
<backupType/>
<expirationDate/>
<compressed/>
<position/>
<deviceType/>
<userName/>
<serverName/>
<databaseName/>
<databaseVersion/>
<databaseCreationDate/>
<backupSize/>
<firstLsn/>
<lastLsn/>
<checkpointLsn/>
<differentialBaseLsn/>
<backupStartDate/>
<backupFinishDate/>
<sortOrder/>
<codePage/>
<unicodeLocaleId/>
<unicodeComparisonStyle/>
<compatibilityLevel/>
<softwareVendorId/>
<softwareVersionMajor/>
<softwareVersionMinor/>
<softwareVersionBuild/>
<machineName/>
<flags/>
<bindingId/>
<recoveryForkId/>
<collation/>
</backup>
</backups>
</data>
</response>
Applies To
for:
Hosted Messaging and Collaboration version 4.5
Hosted Messaging and Collaboration version 4.0
Hosted Messaging and Collaboration version 3.5
Hosted Messaging and Collaboration version 3.0
Windows-based Hosting version 4.5
Windows-based Hosting version 4.0
Windows-based Hosting version 3.5
Windows-based Hosting for Applications version 1.0