Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Getting tables and tablesizes
 

Pages: 1
LLBLGen Pro Runtime Framework
Getting tables and tablesizes
Page:1/1 

  Print all messages in this thread  
Poster Message
Pablo
User



Location:
Sneek
Joined on:
21-Mar-2005 01:17:52
Posted:
81 posts
# Posted on: 08-Oct-2009 23:26:43.  
Hello,
I have a system running, where I need to monitor thesize of the database a bit more closer.

For this purpose I wanted to create an overview of DB usage, consisting of the following:

List of all tables in the schema.
For each table, I want to print out the record size and the record count.

Any ideas on how to do that with llblgen???

Thanx in advance for your suggestions,
Paul
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8088 posts
# Posted on: 09-Oct-2009 05:35:17.  
Hi Paul,

Shouldn't it be easier to write an SP and return the result via LLBLGen?
Also remember that LLBLGen is an OR/Mapper and one of its features is that you can choose what tables/fields to be mapped, so the final llblgen objects doesn't neccesary correspond to the number of tables and number of fields in your db.
Are you using Adapter or SelfServicing?


David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Pablo
User



Location:
Sneek
Joined on:
21-Mar-2005 01:17:52
Posted:
81 posts
# Posted on: 09-Oct-2009 08:36:52.  
Hello Daelmo,

In response to your comments:
- I don't consider writing an SP easier ... sorry. I'm used to deal with the database through llblgen objects. Maybe you're right tough, wouldn't know!
- I make sure that my generated code is always 100% synchronised with the database.
- Selfservice.

I'd rather do something with reflection ... Looking for all CollectionObjects, then for each collection calculating record size and subsequently doing a query per table requesting a record count. Put everything in a small table et voila ...

Then I was hoping .... could there be an easier and more precise manner?

Anybody?


  Top
Pablo
User



Location:
Sneek
Joined on:
21-Mar-2005 01:17:52
Posted:
81 posts
# Posted on: 09-Oct-2009 12:22:43.  
Daelmo,
Your comments made me think about using the sp option a bit more. At first i did not get that to work, but now I've been able to call sp's.
I found one especially interesting sp ie: sp_spaceused ...

Works like a charm.
So, this issue has been solved.
Thanx for your help!
Paul


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.