- MS SQL Server
- MS SQL Server - Home
- MS SQL Server - Overview
- MS SQL Server – Editions
- MS SQL Server – Installation
- MS SQL Server – Architecture
- MS SQL Server – Managment Studio
- MS SQL Server – Login Database
- MS SQL Server - Create Database
- MS SQL Server - Select Database
- MS SQL Server - Drop Database
- MS SQL Server - Creating Backups
- MS SQL Server - Restoring Databases
- MS SQL Server - Create Users
- MS SQL Server - Assign Permissions
- MS SQL Server - Monitor Database
- MS SQL Server - Services
- MS SQL Server - HA Technologies
- MS SQL Server - Reporting services
- MS SQL Server - Execution Plans
- MS SQL Server - Integration Services
- MS SQL Server - Analysis Services
- MS SQL Server Useful Resources
- MS SQL Server - Quick Guide
- MS SQL Server - Useful Resources
- MS SQL Server - Discussion
MS SQL Server - Select Database
Select your database based on your action before going ahead with any of the following methods.
Method 1 – Using SQL Server Management Studio
Example
To run a query to select backup history on database called ‘msdb’, select the msdb database as shown in the following snapshot.
Method 2 – Using T-SQL Script
Use <your database name>
Example
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
Advertisements
To Continue Learning Please Login
Login with Google