[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference amcucs::ms-sqlsvr

Title:Microsoft SQL Server Support
Notice:Please Registar, Note #11
Moderator:AMCUCS::BETTS
Created:Tue Aug 23 1994
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:382
Total number of notes:1233

368.0. "database size" by ALFSS1::WALTERS () Mon Apr 28 1997 18:19

    Hi all,
    I've got a customer running NT 4.0 on a Prioris ZX with SQL-Server.
    
    1) The enterprise manager utility reports the size of the Transaction
    logs and the Database.  How do you determine how much actual data
    is consumed within the tablespaces?  I've got good knowledge of
    Oracle, but not SQL-server...yet.  Can I get what I'm after from
    Enterprise Mgr. or do I have to generate some SQL scripts?
    
    
    2) Is it possible to automate the DBCC reports(?) or do I have to
    continue invoking them manually?
    
    Any help appreciated.
    
    Best regards,
    craig
T.RTitleUserPersonal
Name
DateLines
368.1See SQLMAINTFUSE::VELLETRITue Apr 29 1997 09:184
    See SQLMAINT for automated database maintenance.
    
>    2) Is it possible to automate the DBCC reports(?) or do I have to
>    continue invoking them manually?
368.2first question too, pleaseALFSS1::WALTERSSat May 03 1997 12:394
    Thanks for reply to question 2.
    Can someone help me with question 1?
    Thanks,
    craig
368.3CSC32::HOEPNERA closed mouth gathers no feetMon May 05 1997 18:234
    
    Look at the available DBCC commands to look at space available.  I 
    can't remember off hand which ones to use. 
    
368.4sp_spaceusedAMCUCS::BETTSTue May 06 1997 15:4821
    If you are looking for space used by your database try this:
    
    use DatabaseName
    go
    sp_spaceused
    go
    
    If you've had major changes to your database size, you and force
    sp_spaceused to recalculate.  Caution:  on large databases this
    can take some time.
    
    sp_spaceused @updateusage = 'TRUE'
    go
    
    
    Hope this helps,
    
    /Eric
    
    
    
368.5GUIDUK::HEALYAlan Healy @ZSOTue May 13 1997 14:519
    to report the amount of space used in a table used sp_spaceused
    <tablename>, e.g., for the log:
    
    sp_spaceused syslogs
    
    name                 rows        reserved           data              index_size         unused             
    -------------------- ----------- ------------------ ------------------------------------ ------------------ 
    syslogs              3137        240 KB             232 KB            0 KB               8 KB