Thursday , December 14 2017
Home / DataBase / SQL SERVER / DBCC SQLPERF (Transact-SQL)

DBCC SQLPERF (Transact-SQL)

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)

Output:

DBCC SQLPERF Studyclues

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

comments

About Murali

Hello everyone I am Software Developer having 3+ years of Experience in Microsoft Technologies and Others.

My skills :- Asp.net, C#,Ado.net, SQL SERVER, web services, windows Service,Windows applications,HTML,CSS,
JavaScript,JQuery,AnjularJs

Check Also

Find all rows count and columns count in single database in sql server

In General for any database it contains lot of tables, if we want to find …

%d bloggers like this: