Veritas NetBackup™ DataStore SDK Programmer's Guide for XBSA 1.1.0
- Introduction to NetBackup XBSA
- How to set up the SDK
- Using the NetBackup XBSA interface
- NetBackup XBSA data structures
- NetBackup XBSA environment
- XBSA sessions and transactions
- Creating a NetBackup XBSA application
- How to build an XBSA application
- How to run a NetBackup XBSA application
- API reference
- Function calls
- Function specifications
- Type definitions
- Process flow and troubleshooting
- How to use the sample files
- Support and updates
- Appendix A. Register authorized locations
Query transaction
An XBSA application can query for NetBackup XBSA objects that have been created in a query transaction. The BSAQueryObject() call is used to query the NetBackup catalog for NetBackup XBSA objects. Since retention of NetBackup XBSA objects is a function of NetBackup there is no guarantee that the call to BSAQueryObject() returns any objects.
The query is based on a subset of the object descriptor attributes, contained in a query descriptor. All fields in the query descriptor must be populated and the query searches for the objects that match all fields. Each of the fields has a wildcard or 'ANY' value that can be used. If you leave a field blank, it only matches the objects that also have blanks in that field.
The result of a query can return object descriptors, but never XBSA object data. If a query finds multiple object descriptors, BSAQueryObject() returns the first object descriptor and the remaining objects can be retrieved one at a time by using a succession of BSAGetNextQueryObject() calls.
It should be noted that the use of transactions for query operations does not provide any functional benefit to the XBSA application but it is required for completeness. As noted in the other transaction types, queries can be embedded in restore and delete transactions.