Friday, December 15, 2023

SQL Server Gathering Information about database

You can gather information about today's SQL server database in two ways.

GUI mode

Right click database and click properties menu item. We get Database Properties dialogue box. This dialogue box contains a number of pages such as General, Files, FileGroups, Options, Change Tracking, Permissions, Extended Properties and Query Store.


  • The General page contains information about database backup and database log backup, its name, status, owner, date created, size, space available and number of users.
  • The Files page contains information about database file and log file such as its location size and maximum size.
  • The Filegroups page allows you to create new file group.
  • The Options page provides information of database such as collation, recovery model, compatibility level, containment type and various other information e.g. database read only status encryption enabled or not etc.
  • The Permissions page allows you to create Rules, Roles, function, stored procedure, Select, Insert and Execute permissions etc.

The second approach to gather information about a database is to execute system stored procedure sp_helpdb. This system stored procedure after execution provides information about all the databases available in SQL Server. It gives information of each database with its size, owner, compatibility level, status and date of creation.

EXEC sp_helpdb

In the next post we will learn about how to Import Excel file into Database in SQL Server.

No comments:

Post a Comment

Hot Topics