Home > Handy Scripts > Check VLFs

Check VLFs

given database

DBCC LogInfo;

all databases on the server

declare @v_sql nvarchar(max);
select @v_sql = coalesce(@v_sql + CHAR(13) + char(10), '') + N'
use [' + name + '];' + CHAR(13) +
'DBCC LogInfo;'
from sys.databases
where name not in ('master', 'tempdb', 'model', 'msdb', 'ReportServer', 'ReportServerTempDB');
print @v_sql
exec sp_executesql @v_sql
Advertisements
Categories: Handy Scripts Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: