Rebuild Single or Muitlple Transaction Log Files (SQL Server 2008)

There comes a time when database transaction log files have grown too large,
and need to shrink the files.

Here are the steps to acomplish that:

1. Detach the database (TESTDB)

2.
use master
go
create database TESTDB
on
(FILENAME = 'D:\data\TESTDB_DATA.MDF'),
(FILENAME =  'D:\data\TESTDB_DATA2.NDF')
for attach_rebuild_log
go

 

arrow
arrow
    全站熱搜

    DanBrother 發表在 痞客邦 留言(0) 人氣()