Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Show database size info across an instance Expand / Collapse
Author
Message
Posted Monday, August 2, 2010 10:57 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:20 AM
Points: 969, Visits: 691
Comments posted to this topic are about the item Show database size info across an instance

Hope this helps,
Rich



Post #962585
Posted Tuesday, August 3, 2010 4:29 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, July 22, 2013 11:59 AM
Points: 477, Visits: 719
Just to note, OBJECT_SCHEMA_NAME was actually introduced in SQL Server 2005 SP2...

Atlantis Interactive - SQL Server Tools
My blog
Why I wrote a sql query analyzer clone
Post #962701
Posted Tuesday, August 3, 2010 8:03 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 7:05 PM
Points: 1,210, Visits: 3,203
not sure why you used dbo.sysfiles i/o sys.database_files.
Post #962830
Posted Tuesday, August 3, 2010 3:34 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, May 7, 2014 9:05 AM
Points: 92, Visits: 132
You can use this free tool
http://www.sqldbtools.com/Tools.aspx?ProductId=3

Post #963154
Posted Friday, August 6, 2010 12:48 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, March 27, 2012 11:08 AM
Points: 16, Visits: 134
Very useful script. I have been doing some sp_spaceused manually to collect this data until I could write this, thanks for sharing a workable solution. I did run this on 2008 and 2005 version 9.00.4035.00 without any modification. Thanks again.
Post #965407
Posted Saturday, August 7, 2010 3:41 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:20 AM
Points: 969, Visits: 691
Hi all,

Thanks for your replies, I've not been able to respond before due to illness.

Matt: That's really interesting, I'll bear that in mind, thanks.

Pei Zhu: This is the way that MS chose to write the code inside sp_spaceused.

DLRDBA: Glad this worked for you.

Rich



Hope this helps,
Rich



Post #965536
Posted Thursday, August 26, 2010 1:55 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 25, 2014 9:22 AM
Points: 2, Visits: 57
Getting this error when I run on SQL Server 2008:

Msg 156, Level 15, State 1, Line 24
Incorrect syntax near the keyword 'END'.
Msg 102, Level 15, State 1, Line 37
Incorrect syntax near 'DECLARE
EXEC sp_MSforeachdb
@pages BIGINT -- Working variable for size calc.
,@dbname SYSNAME
,@dbsize BIGINT
,@logs'.
Post #975923
Posted Thursday, August 26, 2010 4:41 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:20 AM
Points: 969, Visits: 691
Hi,

It appears that there is a parenthesis ")" missing after DATA_COMPRESSION = PAGE

Rich


Hope this helps,
Rich



Post #976014
Posted Wednesday, August 21, 2013 9:16 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, September 22, 2014 8:53 AM
Points: 16, Visits: 51
Thank you Richard for the script. Newbie to SQL Server and am using 2008 R2 and am getting the following error:

Cannot enable compression for object 'DatabaseGrowth'. Only SQL Server Enterprise Edition supports compression.


Would apprecaite any help.

Thanks
Post #1486768
Posted Wednesday, August 21, 2013 9:43 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, September 22, 2014 8:53 AM
Points: 16, Visits: 51
Figured it out!!

Don't have enterprise edition.

Thanks
Post #1486780
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse