Thursday , April 18 2019
Home / DataBase / SQL SERVER / DBCC SQLPERF (Transact-SQL)



To increase sql Performance always we need to keep an eye on log File size. DBCC SQLPERF command will get size information about the transaction logs for all databases , so this command will useful in helping to monitor the growth of your transaction logs.

Syntax: DBCC SQLPERF( logspace)



The idea here is to capture and store the growth information at set intervals. This can provide a way to report on how much the logs are growing by and when. Reports are then delivered by an automated process.

1.Create a table to store LogTransctions here i taken table name as LogTransMonitor

2.Insert values into LogTransMonitor table

3.Now run the code and then have a look at the data in your new table and it will look very similar to the output from running DBCC SQLPERF(logspace) to screen


TIP: Create a schedule job and run above step 2 insert query every day in certain time then you can keep track on log file size on every day


Thanks for reading this article if you like this article please share with your Friends.

Print Friendly
Print Friendly, PDF & Email

Give us your valuable feedback


About Murali

Hello everyone I am Software Developer having 3+ years of Experience in Microsoft Technologies and Others. My skills :-, C#,, SQL SERVER, web services, windows Service,Windows applications,HTML,CSS, JavaScript,JQuery,AnjularJs

Check Also

sql server backup script

Backup all databases in SQL Instance with one script

Backup: A copy of SQL Server data that can be used to restore and recover the …