View Single Post
  #2   Report Post  
Tushar Mehta
 
Posts: n/a
Default

If I were in your shoes, the first thing I'd do is see if a PivotTable
(and Chart) do the job. Start with Data | PivotTable and PivotChart
Report...

One of the options you will see is to use an external database. Follow
the various dialog boxes and XL should do all the necessary
SQL/whatever work is needed to get you the data.

If that is not good enough, consider using Data | Import External Data
and then either Import Data... or New Database query... This will

give you the data from your database in a XL worksheet. You can then
analyze it in various ways.


--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hello, all -- I have a job that grabs the size of each SQL Server database
and log file size and saves one row per database into a table. I run this
routine on a daily basis, so I basically grab the size each day and can
monitor growth.

The table data is below.

What I would like to do is have a SQL Query setup to graph the data in Excel
to show the growth rate of each database by week, month, year.

I'm not sure the best way to do the SQL and the best way to do the graph.
Since new databases are created all the time, new rows will appear in the
output -- so creating specific graphs for each database may not be ideal...
so I'm hoping someone could help me.

Essentially, I want a graph of:

By Week -All Databases (DB274, DB332, DB344, etc) showing the start size and
the end size within a specified period.
By Month - All Databases (DB274, DB332, DB344, etc) showing the start size
and the end size within a specified period.
By Year - All Databases (DB274, DB332, DB344, etc) showing the start size
and the end size within a specified period.

I woudl then like to graph each database individually showing its individual
growt as:
By Week - DB274
By Month - DB274
By Year - DB274

Then again another by Week, Month, Year for each remaining database.

I figure I'll need a separate query for the Week, Month, Year for all
databases. Then separate queries for the Week, Month, Year for each
individual database.

How to have this in Excel for graphing is another big question for me.
Obviously, as new databases come on... I do not want to have to remember and
add/create a new graph. (If this is required, fine... I'm just trying to
find a dynamic solution here.)

Here is all my data that I've been collecting each data starting 12/17/04
thru 02/01/05.

Any help or pointers would be appreciated greatly.

ID RECORD_TYPE DBNAME
DATA_SIZE DATA_USED LOG_SIZE LOG_USED STAT_DATE
----------- ----------- -------------------------------------------------- -----------
----------- ----------- ----------- ------------------------------------------------------
2 1 DB274
15670.00 15517.00 3.49 .40 2005-01-17 13:59:10.477
36 1 DB274
15670.00 15518.00 .99 .62 2005-01-18 08:00:11.637
70 1 DB274

{snip}