Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Database Size
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Database Size

 Post Reply Post Reply
Author
VBScript View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2004
Location: United Kingdom
Status: Offline
Points: 219
Post Options Post Options   Thanks (0) Thanks(0)   Quote VBScript Quote  Post ReplyReply Direct Link To This Post Topic: Database Size
    Posted: 22 July 2006 at 9:46pm
Does anyone know how I can get the size of a mySQL database?
Back to Top
Freon22 View Drop Down
Groupie
Groupie


Joined: 04 December 2005
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Freon22 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2006 at 8:21pm
Doesent the prompt command
show table status;

give you a size as well?
Back to Top
VBScript View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2004
Location: United Kingdom
Status: Offline
Points: 219
Post Options Post Options   Thanks (0) Thanks(0)   Quote VBScript Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2006 at 9:39am
How do you use it?
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2006 at 2:22pm
just execute it as a query in admin+ or in any asp page...
Back to Top
VBScript View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2004
Location: United Kingdom
Status: Offline
Points: 219
Post Options Post Options   Thanks (0) Thanks(0)   Quote VBScript Quote  Post ReplyReply Direct Link To This Post 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.



Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Freon22 View Drop Down
Groupie
Groupie


Joined: 04 December 2005
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Freon22 Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.