USE mydatabasename DBCC SHRINKDATABASE (mydatabasename) DBCC SHRINKFILE(mydatabasename_log, 10) BACKUP LOG mydatabasename WITH TRUNCATE_ONLY
You can search the web for information about the following functions to learn about usage:
DBCC SHRINKDATABASE DBCC SHRINKFILE BACKUP LOG
If you must shrink a production database, you should always rebuild indexes afterwards (DBCC DBREINDEX). You need to keep in mind that DBCC DBREINDEX is an offline process as it can take some time to run
Leggi tutto il post...