sys.sp_helpdb
sphelpdb reports information about a specified database or all databases.
What changes
- Input
- Not stated in the Microsoft summary.
- Output or change
- Not stated in the Microsoft summary.
Syntax at a glance
sys.sp_helpdb [ [ @dbname = ] N'dbname' ]
[ ; ]
Work example
sphelpdb reports information about a specified database or all databases.
Write a proposed call on paper. Name the target, required permission, expected change, and recovery step before any lab use.
Check your work Reports master database metadata. Microsoft documents execution for a database member of public.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
EXEC master.sys.sp_helpdb @dbname = N'master';
Open Microsoft Learn for full syntax, permissions, and details for your version.