Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

delete transaction log file

$
0
0

Hi,

I have added additional T-log files in SQL Server 2012.

Can I follow below T-SQL to delete them? This is the prod database and is very critical.

1. Check the space of T-log by executing "dbcc sqlperf (logspace)"

2. Check the status of log by executing "select name,log_reuse_wait,log_reuse_wait_desc from sys.databases"

The output should be NOTHING

3. Empty the log file by executing "dbcc shrinkfile(SOBLOG,emptyfile)

once this command finishes, then execute 

4. alter database SOB remove file SOBLOG

Is it safe to use above procedure.  





Viewing all articles
Browse latest Browse all 5123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>