title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|
View a Database Snapshot (SQL Server) |
Learn how to view a SQL Server database snapshot using SQL Server Management Studio or Transact-SQL. |
WilliamDAssafMSFT |
wiassaf |
jopilov |
05/04/2023 |
sql |
supportability |
how-to |
|
[!INCLUDE SQL Server]
This article explains how to view a [!INCLUDEssNoVersion] database snapshot using [!INCLUDEssManStudioFull].
Note
To create, revert to, or delete a database snapshot, you must use [!INCLUDEtsql].
To view a database snapshot
-
In Object Explorer, connect to the instance of the [!INCLUDEssDEnoversion] and then expand that instance.
-
Expand Databases.
-
Expand Database Snapshots, and select the snapshot you want to view.
To view a database snapshot
-
Connect to the [!INCLUDEssDE].
-
From the Standard bar, select New Query.
-
To list the database snapshots of the instance of [!INCLUDEssNoVersion], query the
source_database_id
column of the sys.databases catalog view for non-NULL values. -
You can also use this query to get details about the database snapshot and its files
SELECT db_name(db.source_database_id) source_database, db.name AS snapshot_db_name, db.database_id, db.source_database_id, db.create_date, db.compatibility_level, db.is_read_only, mf.physical_name FROM sys.databases db INNER JOIN sys.master_files mf ON db.database_id = mf.database_id WHERE db.source_database_id is not null AND mf.is_sparse =1 ORDER BY db.name;