MSSQL Server maintenance

Find the physical location

select name, physical_name  from sys.database_files

 

Backup and shrink

use DBname
go
alter database DBname
set recovery simple
go
DBCC SHRINKFILE (DB_Log_Name,2) --- MSSSNTI_log is the logical file name of the database
go
alter database DBname
set recovery full
go

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top