Home » Listing Details
Top Websites
  1. Dynamics GP Help
    Over 6100 resources listed.
  2. Mark Polino's DynamicAccounting.net
    Over 5100 resources listed.
  3. Rose Business Solutions Blog New
    Over 2200 resources listed.
  4. Developing for Dynamics GP - By David Musgrave and the MS GP Dev Support Team
    Over 1100 resources listed.
  5. Mariano Gomez at The Dynamics GP Blogster
    Over 1000 resources listed.
  6. Microsoft Dynamics Partner Community Blog
    Over 900 resources listed.
  7. Christina Phillips, Steve Endow & Lorren Zemke at Dynamics GP Land
    Over 700 resources listed.
  8. Mohammad Daoud's Dynamics GP Blog
    Over 600 resources listed.
  9. Vaidy Mohan at Dynamics GP - Learn & Discuss
    Over 500 resources listed.
  10. Inside Microsoft Dynamics GP Official Blog
    Over 500 resources listed.
  11. eOne Business Solutions Blog
    Over 400 resources listed.
  12. About Dynamics, Development and Life
    Over 300 resources listed.
  13. Frank Hamelly at GP2theMax
    Over 300 resources listed.
  14. Dynamics CPM
    Over 300 resources listed.
  15. BKD Dynamics GP Insights Blog
    Over 200 resources listed.
  16. Leslie Vail at Dynamics Confessor Blogspot
    Over 200 resources listed.
  17. Victoria Yudin's Dynamics GP Website
    Over 200 resources listed.
    Victoria Yudin
  18. Janakiram M.P. at DynamicsBlogger
    Over 100 resources listed.
  19. VS Tools Forum
    Over 100 resources listed.
    Your Resource for Visual Studio Tools for Dynamics GP
  20. Inside Microsoft Dynamics GP Official Blog
    Over 100 resources listed.
  21. US Dynamics GP Field Team Blog
    Over 100 resources listed.
  22. Catherine Eibner MBS Developer Evangelist
    Over 100 resources listed.
  23. Sivakumar Venkataraman at Interesting Findings & Knowledge Sharing
    Over 100 resources listed.
  24. Dynamics Small Business
    Over 100 resources listed.
  25. Belinda, The GP CSI
    Over 100 resources listed.

ID:13326
Title:Getting the Size of Your Dynamics GP Database
URL:http://msdynamicsgp.blogspot.com/2007/11/getting-size-of-your-dynamics-gp.html
Description:How big is your Dynamics GP database? Well there's a couple of ways to find out and if you don't want to do a lot of right clicking in SQL Server Management Studio run the SQL Stored procedure sp_SpaceUsed as:

EXEC sp_spaceused @updateusage = true

This will return the space used by whatever DB you run it against. The @updateusage=true updates statistics first to ensure that the sizes are correct.

If you want the space used by a particular table, run the stored proc as:

EXEC sp_spaceused 'PM00200', @updateusage = true

substituting your own table for PM00200.

If you want to see the usage for EVERY table, you can use the undocumented MSforeachtable stored procedure and do it all in one line.

EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?', @updateusage = true "

Unfortunately, GP has too many tables to run this command directly and you probably don't want all the tables anyway. Most likely you want to see the sizes of a few tables that are important to you or you want to see the whole thing. To get just a few tables and give them friendly names, I've put together some SQL Code here that I'll also make available in the download box on the right.

This code creates a temp table, plugs all the sizes in the temp table and let you add friendly names via an included CASE statement. You limit the tables via the where clause. If you don't add a friendly name, don't worry, the code will pull the table name from GP for any tables you stick in the where clause.

The temp table and display are two different parts so you could separate them and run the temp table portion once a day and this will speed up the display for the user. This would make creating an SSRS or Crystal Report from this data much easier to build. The output looks like this:


There's no reason why you couldn't combine this with the table name data already available on DynamicAccounting.net to add friendly names to everything. Well, no reason except that it's close to Thanksgiving and I'm going to chose football over writing SQL code!

Category:SUPPORT (TECHNICAL)
Link Owner:
Date Added:June 21, 2010 06:11:20 PM
Number Hits:1
RatingsAverage rating: (0 votes)
Reviews

No Reviews Yet.

 
GPWindow.com

Thank you for your support for GPWindow. It helps us cover part of the hosting costs for GPWindow.