Select your database based on your action before going ahead with any of the following methods.
To run a query to select backup history on database called ‘msdb’, select the msdb database as shown in the following snapshot.
Use <your database name>
To run your query to select backup history on database called ‘msdb’, select the msdb database by executing the following query.
Exec use msdb
The query will open msdb database. You can execute the following query to select backup history.
Select * from backupset