0

Duplicate of: How to find out size of the individual databases in the sql server 2005?

how to find out log size of each of the database in sql server 2005?

1
  • can any one provide me a solution. I will be clear this time if A,B are the databases in my Server. I want log size of database A,Log size of database B. Commented Sep 30, 2009 at 11:19

5 Answers 5

1

You can use this SQL:

EXECUTE sp_msforeachdb 'SELECT *, GETDATE() FROM [?].sys.database_files'
Sign up to request clarification or add additional context in comments.

2 Comments

Hi Orban here i am not getting log file size of database at once. <br>I want like for example A,B are databases in the server then <br>I want total log size of A,Total log size of server B.Thank you very much for your reply.
Your question sepcified "each database", that is what the above does.
1

In SQL management studio , goto object explorer, right click database, goto "properties" , select "Files" . These you can see one "Initial size" column which will be the size of your DB. you will get both Data and Log file size over here.

1 Comment

Thanks for your help Umesh.I will execute the query and i will update you.
1

try this

dbcc sqlperf(logspace)

Bye.

Comments

0

How to determine SQL Server database transaction log usage

try this :

DBCC SQLPERF(logspace)

Comments

0

If you have rights...

SELECT SIZE/128.0, * FROM sys.master_files MF WHERE MF.type = 1

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.