Print Page | Close Window

Database Size

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20783
Printed Date: 29 March 2026 at 9:20am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Database Size
Posted By: VBScript
Subject: Database Size
Date Posted: 22 July 2006 at 9:46pm
Does anyone know how I can get the size of a mySQL database?

-------------
http://www.james-r.co.uk" rel="no follow - James
http://www.gotrillian.com/?4498-20" rel="no follow - Trillian - M



Replies:
Posted By: Freon22
Date Posted: 22 July 2006 at 11:47pm
That is a very good question. I have this forum running on mysite and it would be nice to keep an eye on the mysql database size. I know that with SQL you can use sp_helpdb to get that information.
 
So I did a search for getting the meta data for mysql and I did find one but it was coded in php. I don't have the time to recode it in vb so if you do find something please post it here. If I get the time to recode the php or find a code I will post it here.
 
Take Care


Posted By: michael
Date Posted: 24 July 2006 at 8:21pm
Doesent the prompt command
show table status;

give you a size as well?


-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: VBScript
Date Posted: 25 July 2006 at 9:39am
How do you use it?

-------------
http://www.james-r.co.uk" rel="no follow - James
http://www.gotrillian.com/?4498-20" rel="no follow - Trillian - M


Posted By: michael
Date Posted: 25 July 2006 at 2:22pm
just execute it as a query in admin+ or in any asp page...

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: VBScript
Date Posted: 25 July 2006 at 2:29pm
I tries this...
Response.Write(adoCon.Execute("SHOW TABLE STATUS"))


But got this error....

Response object error 'ASP 0185 : 8002000e'

Missing Default Property

/admin/Default.asp, line 0

A default property was not found for the object.





-------------
http://www.james-r.co.uk" rel="no follow - James
http://www.gotrillian.com/?4498-20" rel="no follow - Trillian - M


Posted By: michael
Date Posted: 25 July 2006 at 10:43pm
Sry. My bad
SHOW TABLE STATUS [FROM db_name]


http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Freon22
Date Posted: 27 July 2006 at 10:09pm
I didn't have alot of time this afternoon, but after searching and looking for some codes. That would show a list of table names and the size of each table. I found that there isn't anything out there yet. So I wanted to put together some codes in vb.net that would show this information. Now I am new to vb.net so I took the easy way of doing this. If any of you should use this and do some rewriting of the code it would be nice if you would also post your rewrite here so we can all learn.
 
This is coded using codes behind.
 
databasesize.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="databasesize.aspx.vb" Inherits="databasesize" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitled Page</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<asp:Panel ID="Panel1" runat="server" Height="75px" Width="750px">

<asp:TextBox ID="txtpass" runat="server" TextMode="Password"></asp:TextBox>

<asp:Button ID="btpass" runat="server" Text="Button" />

</asp:Panel>

<asp:Panel ID="Panel2" runat="server" Height="200px" Width="750px">

<asp:ListBox ID="tablelist" runat="server" EnableViewState="false" Width="200px" Height="450px" Visible="false"></asp:ListBox>

<asp:Label ID="results" runat="server" EnableViewState="false"></asp:Label>

</asp:Panel>

</div>

</form>

</body>

</html>

databasesize.aspx.vb
[code]

Im




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net