dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaDatabaseSnapshot

Retrieves the list of database snapshot available, along with their base (the db they are the snapshot of), Size in MB, creation time and other details.

Screenshots

Examples

To return a custom object displaying Server, Database, DatabaseCreated, SnapshotOf, SizeMB, DatabaseCreated, IsReadCommittedSnapshotOn, SnapshotIsolationState

Get-DbaDatabaseSnapshot -SqlServer sqlserver2014a

To return information for database snapshots having HR and Accounting as base dbs

Get-DbaDatabaseSnapshot -SqlServer sqlserver2014a -Databases HR, Accounting

To return information for database snapshots HR_snapshot and Accounting_snapshot

Get-DbaDatabaseSnapshot -SqlServer sqlserver2014a -Snapshots HR_snapshot, Accounting_snapshot

Author

This command was created by Simone Bizzotto. You can find Simone on LinkedIn.

Get-Help

From PowerShell, execute Get-Help Get-DbaDatabaseSnapshot -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaDatabaseSnapshot.ps1 on GitHub
 

Related commands