Thor Logo dbatools

Database

Get-DbaDbExtentDiff

Viorel Ciucu, cviorel.com

Get-DbaDbExtentDiff View Source Viorel Ciucu, cviorel.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Calculates the percentage of database extents modified since the last full backup Description Analyzes database extents to determine how much data has changed since the last full backup, helping DBAs decide between differential and full backup strategies. The function examines extent-level modifications (groups of 8 pages) to provide accurate change percentages, which is essential for optimizing backup schedules and storage requirements.

Read more

Get-DbaDbForeignKey

Claudio Silva (@ClaudioESSilva), claudioessilva.eu

Get-DbaDbForeignKey View Source Claudio Silva (@ClaudioESSilva), claudioessilva.eu Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves foreign key constraints from SQL Server database tables Description Retrieves all foreign key constraint definitions from tables across one or more SQL Server databases. Essential for documenting referential integrity relationships, analyzing table dependencies before migrations, and troubleshooting cascade operations. Returns detailed foreign key properties including referenced tables, schema information, and constraint status (enabled/disabled, checked/unchecked).

Read more

Get-DbaDbMemoryUsage

Shawn Melton (@wsmelton), wsmelton.github.io

Get-DbaDbMemoryUsage View Source Shawn Melton (@wsmelton), wsmelton.github.io Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves detailed buffer pool memory consumption by database and page type for performance analysis. Description Analyzes SQL Server buffer pool memory usage by querying sys.dm_os_buffer_descriptors to show exactly how much memory each database consumes, broken down by page type (data pages, index pages, etc.). This helps DBAs identify memory-hungry databases that may be impacting instance performance and guides decisions about memory allocation, database optimization, or server capacity planning.

Read more

Get-DbaDbObjectTrigger

Claudio Silva (@claudioessilva), claudioessilva.eu

Get-DbaDbObjectTrigger View Source Claudio Silva (@claudioessilva), claudioessilva.eu Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves triggers attached to tables and views across SQL Server databases. Description Retrieves all DML triggers that are attached to tables and views within specified databases. This function helps DBAs inventory trigger-based business logic, identify potential performance bottlenecks, and document database dependencies. You can filter results by database, object type (tables vs views), or pipe in specific objects from Get-DbaDbTable and Get-DbaDbView.

Read more

Get-DbaDbOrphanUser

Claudio Silva (@ClaudioESSilva) | Garry Bargsley (@gbargsley) | Simone Bizzotto (@niphlod)

Get-DbaDbOrphanUser View Source Claudio Silva (@ClaudioESSilva) , Garry Bargsley (@gbargsley) , Simone Bizzotto (@niphlod) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Get orphaned users. Description An orphan user is defined by a user that does not have their matching login. (Login property = “”). Syntax Get-DbaDbOrphanUser [-SqlInstance] <DbaInstanceParameter[]> [[-SqlCredential] <PSCredential>] [[-Database] <Object[]>] [[-ExcludeDatabase] <Object[]>] [-EnableException] [<CommonParameters>] Examples Example: 1 PS C:\> Get-DbaDbOrphanUser -SqlInstance localhost\sql2016 Finds all orphan users without matching Logins in all databases present on server ’localhost\sql2016’.

Read more

Get-DbaDbPageInfo

Chrissy LeMaire (@cl), netnerds.net

Get-DbaDbPageInfo View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves detailed page allocation information from SQL Server databases for storage analysis and troubleshooting Description This function queries the sys.dm_db_database_page_allocations dynamic management view to return detailed information about page allocation, including page type, free space percentage, allocation status, and mixed page allocation indicators. Use this when troubleshooting storage issues, analyzing space utilization patterns, or investigating page-level performance problems in your databases.

Read more

Get-DbaDbPartitionFunction

Klaas Vandenberghe (@PowerDbaKlaas)

Get-DbaDbPartitionFunction View Source Klaas Vandenberghe (@PowerDbaKlaas) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves partition function definitions and metadata from SQL Server databases. Description Retrieves partition function definitions and their metadata from one or more SQL Server databases. Partition functions define how table or index data is distributed across multiple partitions based on the values of a partitioning column.

Read more

Get-DbaDbPartitionScheme

Klaas Vandenberghe (@PowerDbaKlaas)

Get-DbaDbPartitionScheme View Source Klaas Vandenberghe (@PowerDbaKlaas) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves partition schemes from SQL Server databases for table partitioning management. Description Retrieves partition scheme objects from one or more SQL Server databases, providing details about how partitioned tables and indexes are distributed across filegroups. Partition schemes define the physical storage mapping for partitioned tables by specifying which filegroups contain each partition’s data.

Read more

Get-DbaDbSchema

Adam Lancaster, github.com/lancasteradam

Get-DbaDbSchema View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves database schema objects from SQL Server instances for inventory, security auditing, and management tasks Description Returns SQL Server Management Object (SMO) schema objects from one or more databases, allowing you to inspect schema ownership, enumerate database organization, and identify schema-level security configurations. This function is essential for database documentation, security auditing when you need to track who owns which schemas, and migration planning where schema ownership and structure must be preserved.

Read more

Get-DbaDbServiceBrokerQueue

Ant Green (@ant_green)

Get-DbaDbServiceBrokerQueue View Source Ant Green (@ant_green) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Gets database service broker queues Description Gets database Sservice broker queue Syntax Get-DbaDbServiceBrokerQueue [[-SqlInstance] <DbaInstanceParameter[]>] [[-SqlCredential] <PSCredential>] [[-Database] <Object[]>] [[-ExcludeDatabase] <Object[]>] [-ExcludeSystemQueue] [-EnableException] [<CommonParameters>] Examples Example: 1 PS C:\> Get-DbaDbServiceBrokerQueue -SqlInstance sql2016 Gets all database service broker queues Example: 2 PS C:\> Get-DbaDbServiceBrokerQueue -SqlInstance Server1 -Database db1 Gets the service broker queues for the db1 database

Read more
Page 2 of 8