How to add multiple log files in SQL Database

Below query can create ldf file.Its creating second ldf file on Testdb Database. You can create as many as you want.

USE [master]

GO

ALTER DATABASE [TestDb] ADD LOG FILE ( NAME = N'TestDB_Log2',

FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008R2\MSSQL\DATA\Testdb_Log2.ldf' ,

SIZE = 1024KB , FILEGROWTH = 10%)

GO

I Hope this could be your expected solution.

Comments