How to choose a database in MS SQL Server

You can select the database in MS SQL Server to operate in one of the ways below.

Method 1: use SQL Server Mangement Studio

Run the query to select the backup history on the database named msdb, select msdb as shown in the image below.

How to choose a database in MS SQL Server Picture 1
Choose from the database backup section

Method 2: Use T-SQL Script

Use 

Run the query to select the backup history on the database named msdb, select msdb by executing the following query

Exec use msdb

This query will open the msdb database. You can run the following query to select the backup history.

Select * from backupset

Previous article: How to create a database in MS SQL Server

Next lesson: How to delete the database in MS SQL Server

4.2 ★ | 5 Vote

May be interested

  • Ways to log in database on MS SQL ServerWays to log in database on MS SQL Server
    below are instructions on how to log into the database on ms sql server.
  • Compare the performance of MongoDB and SQL Server 2008Compare the performance of MongoDB and SQL Server 2008
    in the following article, we will point out the difference in performance of the relatively new database management system, which is mongodb and one of the popular systems like sql server (mysql or oracle). most of the data is given here in the form of charts, so we can easily imagine the advantages and disadvantages of mongodb as well as other database management systems.
  • Microsoft Windows PowerShell and SQL Server 2005 SMO - Part 10Microsoft Windows PowerShell and SQL Server 2005 SMO - Part 10
    in part 10, i will show you how to use powershell scripts in conjunction with smo and parameters to create sql server scripts. creating sql server scripts is an important task for administrators and sql server database development professionals.
  • Use and manage Database MailUse and manage Database Mail
    sql server 2005 has a small mail system called database mail. as an improved feature in sql mail compared to earlier versions of sql server, database mail is a mail queue system. email messages are stored in an internal queue
  • Restore SQL Server from Transaction LogRestore SQL Server from Transaction Log
    transaction log (also known as database log or binary log) is an action history that is executed by the database system to ensure acid properties when the system fails.
  • How to install SQL Server databaseHow to install SQL Server database
    one of the most important things you must do in sql server 2008 is to install data and log files
  • How to create users in MS SQL ServerHow to create users in MS SQL Server
    the user here is an account on ms sql server to access the database (database).
  • Upload multiple XML files into XML data type columnsUpload multiple XML files into XML data type columns
    sql server database administrators often have some needs such as importing multiple files into a table in the database. this article will discuss how to upload multiple files (especially xml files) into the xml data column of the sql server database.
  • Attach database in Microsoft SQL Server 2008Attach database in Microsoft SQL Server 2008
    this article will illustrate the different usage methods of the 'for attach' clause to overcome the limitations encountered when using sp_attach_db and sp_attach_single_file_db.
  • The difference between Truncate and Delete in Microsoft SQL ServerThe difference between Truncate and Delete in Microsoft SQL Server
    in the following article, we will help you distinguish some basic differences between two delete syntax and truncate table in microsoft sql server application. basically, both of these statements help us to remove the data, but in essence it is not so.