Wednesday, March 21, 2012

How to find the size of all databases at once

Hi everyone.

I'm very new to SQL and need to move databases from an old server to a new one that is attached to a SAN. I'm trying to plan LUN sizes.

Is there a way to show the sizes of all databases on the server at once?

Thank you.

Try running the following: "exec sp_helpdb". This will give you the size in megabytes of each database. If you pass the database name to sp_helpdb you will get file level information which may assist in your planning. Thanks.

|||

When I execute this command I get this error:

Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53

Cannot insert the value NULL into column '', table ''; column does not allow nulls. INSERT fails.

The statement has been terminated.

Do I need to add something else?

|||

It seems that one of the databases does not have an owner. Check the following link:

http://www.fogcreek.com/FogBugz/KB/errors/CannotinsertthevalueNULLi.html

I hope this solves your problem.

Best regards,

Sami Samir

No comments:

Post a Comment