You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shrinks the size of the data and log files in the specified database.
43
43
@@ -62,14 +62,14 @@ DBCC SHRINKDATABASE
62
62
Is the percentage of free space that you want left in the database file after the database has been shrunk.
63
63
64
64
NOTRUNCATE
65
-
Compacts the data in data files by moving allocated pages from the end of a file to unallocated pages in the front of the file. *target_percent* is optional.
65
+
Compacts the data in data files by moving allocated pages from the end of a file to unallocated pages in the front of the file. *target_percent* is optional. This option is not supported with Azure SQL Data Warehouse.
66
66
67
67
The free space at the end of the file is not returned to the operating system, and the physical size of the file does not change. Therefore, when NOTRUNCATE is specified, the database appears not to shrink.
68
68
69
69
NOTRUNCATE is applicable only to data files. The log file is not affected.
70
70
71
71
TRUNCATEONLY
72
-
Releases all free space at the end of the file to the operating system but does not perform any page movement inside the file. The data file is shrunk only to the last allocated extent. *target_percent* is ignored if specified with TRUNCATEONLY.
72
+
Releases all free space at the end of the file to the operating system but does not perform any page movement inside the file. The data file is shrunk only to the last allocated extent. *target_percent* is ignored if specified with TRUNCATEONLY. This option is not supported with Azure SQL Data Warehouse.
73
73
74
74
TRUNCATEONLY affects the log file. To truncate only the data file, use DBCC SHRINKFILE.
75
75
@@ -105,6 +105,9 @@ Running DBCC SHRINKDATABASE without specifying either the NOTRUNCATE option or t
105
105
The database being shrunk does not have to be in single user mode; other users can be working in the database when it is shrunk. This includes system databases.
106
106
107
107
You cannot shrink a database while the database is being backed up. Conversely, you cannot backup a database while a shrink operation on the database is in process.
108
+
109
+
>[!NOTE]
110
+
> Currently, Azure SQL Data Warehouse does not support DBCC SHRINKDATABASE with TDE enabled.
108
111
109
112
## How DBCC SHRINKDATABASE Works
110
113
DBCC SHRINKDATABASE shrinks data files on a per-file basis, but shrinks log files as if all the log files existed in one contiguous log pool. Files are always shrunk from the end.
0 commit comments