<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Google Charts for DBA: Tablespaces Allocation</title>
	<atom:link href="http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/</link>
	<description>News and views from Pythian DBAs</description>
	<lastBuildDate>Fri, 10 Feb 2012 13:01:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: A Faster MySQL Database Size Google Chart &#171; JZ Talk Blogger</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-399461</link>
		<dc:creator>A Faster MySQL Database Size Google Chart &#171; JZ Talk Blogger</dc:creator>
		<pubDate>Thu, 21 Jan 2010 07:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-399461</guid>
		<description>[...] month ago or so I read a couple of posts about using the Google chart API to visualize database size. Although I [...]</description>
		<content:encoded><![CDATA[<p>[...] month ago or so I read a couple of posts about using the Google chart API to visualize database size. Although I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kartik</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-389669</link>
		<dc:creator>kartik</dc:creator>
		<pubDate>Wed, 02 Dec 2009 13:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-389669</guid>
		<description>Hi Alex,

I tried this scirpt with one of our test isntance.. the proc gor excuted and URL also was displayed but whenI copied in the ie.. it says Bad Request .. i have cleared cahce and cookies as well.. any thoughts as to why this is happening??</description>
		<content:encoded><![CDATA[<p>Hi Alex,</p>
<p>I tried this scirpt with one of our test isntance.. the proc gor excuted and URL also was displayed but whenI copied in the ie.. it says Bad Request .. i have cleared cahce and cookies as well.. any thoughts as to why this is happening??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Gorbachev</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-376694</link>
		<dc:creator>Alex Gorbachev</dc:creator>
		<pubDate>Thu, 24 Sep 2009 21:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-376694</guid>
		<description>@poratips: Thanks for your feedback. did you forget to paste your error?</description>
		<content:encoded><![CDATA[<p>@poratips: Thanks for your feedback. did you forget to paste your error?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: poratips</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-376667</link>
		<dc:creator>poratips</dc:creator>
		<pubDate>Thu, 24 Sep 2009 19:41:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-376667</guid>
		<description>Hi Alex,
Its a wonderful articles and ver very helpful for people woh works with DB.
I tried to copy your code but i am getting follwoing error even though i have SET serverout ON size 1000000.
Could you please email me the solution to how to correct this error?
I tried to google it but couldn&#039;t fine nay useful information which i can use it.
I am running Oracle 9i R2.

My email is: [redacted]

Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Hi Alex,<br />
Its a wonderful articles and ver very helpful for people woh works with DB.<br />
I tried to copy your code but i am getting follwoing error even though i have SET serverout ON size 1000000.<br />
Could you please email me the solution to how to correct this error?<br />
I tried to google it but couldn&#8217;t fine nay useful information which i can use it.<br />
I am running Oracle 9i R2.</p>
<p>My email is: [redacted]</p>
<p>Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Gorbachev</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-351976</link>
		<dc:creator>Alex Gorbachev</dc:creator>
		<pubDate>Wed, 25 Mar 2009 13:41:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-351976</guid>
		<description>Thanks Hoang. I edited your post -- added the code formatting.</description>
		<content:encoded><![CDATA[<p>Thanks Hoang. I edited your post &#8212; added the code formatting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hoang</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-351811</link>
		<dc:creator>Hoang</dc:creator>
		<pubDate>Tue, 24 Mar 2009 05:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-351811</guid>
		<description>Made a minor change to John Dixon&#039;s bar chart script to properly line up tbspace name and % used:

&lt;pre&gt;
SET define OFF
SET serverout ON
set lines 500

DECLARE
  t    VARCHAR2(30);
  u    NUMBER;
  chd  VARCHAR2(4000);
  chd2 VARCHAR2(4000);
  chxl1 VARCHAR2(4000);
  chxl2 VARCHAR2(4000);
  chxl VARCHAR2(4000);
  chl  VARCHAR2(4000);
  dbname varchar(10) := &#039;&#039;;
  CURSOR c
  IS
 select ts.tablespace_name tsname,round((1-(free/total))*100) as used_pct, round((free/total*100)) as free_pct from
  (select tablespace_name,sum(bytes) as total from dba_data_files group by tablespace_name) ts,
  (select tablespace_name,sum(bytes) as free from dba_free_space group by tablespace_name) fs
 where ts.tablespace_name=fs.tablespace_name order by ts.tablespace_name;
BEGIN
  select database_name into dbname from v$database;
  FOR usage IN c
  LOOP

    IF chd IS NULL THEN
      chd  := usage.used_pct;
    ELSE
      chd := chd &#124;&#124; &#039;,&#039; &#124;&#124; usage.used_pct;
    END IF;

    IF chd2 IS NULL THEN
      chd2  := usage.free_pct;
    ELSE
      chd2 := chd2 &#124;&#124; &#039;,&#039; &#124;&#124; usage.free_pct;
    END IF;

    IF chxl1 IS NULL THEN
      chxl1  := usage.tsname;
    ELSE
      chxl1 := usage.tsname&#124;&#124; &#039;&#124;&#039; &#124;&#124;chxl1;-- &#124;&#124; &#039;&#124;&#039; &#124;&#124; usage.tsname;
    END IF;

    IF chxl2 IS NULL THEN
      chxl2  := usage.used_pct;
    ELSE
      chxl2 := usage.used_pct &#124;&#124;&#039;&#124;&#039;&#124;&#124;chxl2;
    --  chxl2 := chxl2 &#124;&#124;&#039;&#124;&#039;&#124;&#124;usage.used_pct;
    END IF;
  END LOOP;
  chd := chd &#124;&#124;&#039;&#124;&#039;&#124;&#124; chd2;
  chxl:=&#039;1:&#124;&#039;&#124;&#124;chxl1&#124;&#124;&#039;&#124;2:&#124;&#039;&#124;&#124;chxl2;
  dbms_output.put_line(&#039;DATABASE: &#039;&#124;&#124;dbname);
  dbms_output.put_line(&#039;http://chart.apis.google.com/chart?cht=bhs&amp;chs=400x600&amp;chco=4D89F9,C6D9FD&#039;
    &#124;&#124; &#039;&amp;chtt=Tablespace_Usage_(%)_for_SID:_&#039;&#124;&#124;dbname
    &#124;&#124; &#039;&amp;chxt=x,y,r&#039;
    &#124;&#124; &#039;&amp;chl=&#039; &#124;&#124; chl &#124;&#124; &#039;&amp;chd=t:&#039; &#124;&#124; chd &#124;&#124; &#039;&amp;chxl=&#039; &#124;&#124; chxl);

END;
/
quit
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Made a minor change to John Dixon&#8217;s bar chart script to properly line up tbspace name and % used:</p>
<pre>
SET define OFF
SET serverout ON
set lines 500

DECLARE
  t    VARCHAR2(30);
  u    NUMBER;
  chd  VARCHAR2(4000);
  chd2 VARCHAR2(4000);
  chxl1 VARCHAR2(4000);
  chxl2 VARCHAR2(4000);
  chxl VARCHAR2(4000);
  chl  VARCHAR2(4000);
  dbname varchar(10) := '';
  CURSOR c
  IS
 select ts.tablespace_name tsname,round((1-(free/total))*100) as used_pct, round((free/total*100)) as free_pct from
  (select tablespace_name,sum(bytes) as total from dba_data_files group by tablespace_name) ts,
  (select tablespace_name,sum(bytes) as free from dba_free_space group by tablespace_name) fs
 where ts.tablespace_name=fs.tablespace_name order by ts.tablespace_name;
BEGIN
  select database_name into dbname from v$database;
  FOR usage IN c
  LOOP

    IF chd IS NULL THEN
      chd  := usage.used_pct;
    ELSE
      chd := chd || ',' || usage.used_pct;
    END IF;

    IF chd2 IS NULL THEN
      chd2  := usage.free_pct;
    ELSE
      chd2 := chd2 || ',' || usage.free_pct;
    END IF;

    IF chxl1 IS NULL THEN
      chxl1  := usage.tsname;
    ELSE
      chxl1 := usage.tsname|| '|' ||chxl1;-- || '|' || usage.tsname;
    END IF;

    IF chxl2 IS NULL THEN
      chxl2  := usage.used_pct;
    ELSE
      chxl2 := usage.used_pct ||'|'||chxl2;
    --  chxl2 := chxl2 ||'|'||usage.used_pct;
    END IF;
  END LOOP;
  chd := chd ||'|'|| chd2;
  chxl:='1:|'||chxl1||'|2:|'||chxl2;
  dbms_output.put_line('DATABASE: '||dbname);
  dbms_output.put_line('http://chart.apis.google.com/chart?cht=bhs&amp;chs=400x600&amp;chco=4D89F9,C6D9FD'
    || '&amp;chtt=Tablespace_Usage_(%)_for_SID:_'||dbname
    || '&amp;chxt=x,y,r'
    || '&amp;chl=' || chl || '&amp;chd=t:' || chd || '&amp;chxl=' || chxl);

END;
/
quit
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Gorbachev</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-350263</link>
		<dc:creator>Alex Gorbachev</dc:creator>
		<pubDate>Thu, 12 Mar 2009 05:00:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-350263</guid>
		<description>Thanks Google Chart Team! Keep up good work!</description>
		<content:encoded><![CDATA[<p>Thanks Google Chart Team! Keep up good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Google Chart API Team</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-350163</link>
		<dc:creator>Google Chart API Team</dc:creator>
		<pubDate>Mon, 09 Mar 2009 18:59:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-350163</guid>
		<description>This is great! We&#039;ve added it to the list of related links in the documentation:

http://groups.google.com/group/google-chart-api/web/useful-links-to-api-libraries?hl=en

Thanks and keep up the cool work!

The Google Chart API Team</description>
		<content:encoded><![CDATA[<p>This is great! We&#8217;ve added it to the list of related links in the documentation:</p>
<p><a href="http://groups.google.com/group/google-chart-api/web/useful-links-to-api-libraries?hl=en" rel="nofollow">http://groups.google.com/group/google-chart-api/web/useful-links-to-api-libraries?hl=en</a></p>
<p>Thanks and keep up the cool work!</p>
<p>The Google Chart API Team</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Gorbachev</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-345057</link>
		<dc:creator>Alex Gorbachev</dc:creator>
		<pubDate>Wed, 25 Feb 2009 23:04:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-345057</guid>
		<description>Hi Andy,

Thanks for the feedback. Glad you liked it.

It&#039;s indeed a rather trivial example and I didn&#039;t want to complicate the query. The way to do it is to display top 10 or top 20 tablespaces by size or so. The rest would be aggregated as &quot;Others&quot; but it would complicate the query and make it more difficult to understand.

Cheers,
Alex</description>
		<content:encoded><![CDATA[<p>Hi Andy,</p>
<p>Thanks for the feedback. Glad you liked it.</p>
<p>It&#8217;s indeed a rather trivial example and I didn&#8217;t want to complicate the query. The way to do it is to display top 10 or top 20 tablespaces by size or so. The rest would be aggregated as &#8220;Others&#8221; but it would complicate the query and make it more difficult to understand.</p>
<p>Cheers,<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gildus&#187; Blog Archive &#187; Realizar grÃ¡ficas con MySQL y Google Graph</title>
		<link>http://www.pythian.com/news/1490/google-charts-for-dba-tablespaces-allocation/#comment-345029</link>
		<dc:creator>Gildus&#187; Blog Archive &#187; Realizar grÃ¡ficas con MySQL y Google Graph</dc:creator>
		<pubDate>Wed, 25 Feb 2009 21:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1490/google-charts-for-dba-tablespaces-allocation#comment-345029</guid>
		<description>[...] Buen ejemplo para obtener la URL que nos dibuja grÃ¡ficas usando Google Graph mediante procedimientos almacenados de MySQL. EstÃ¡ sacado de este ejemplo, que a su vez estÃ¡ sacado de este otro para Oracle. [...]</description>
		<content:encoded><![CDATA[<p>[...] Buen ejemplo para obtener la URL que nos dibuja grÃ¡ficas usando Google Graph mediante procedimientos almacenados de MySQL. EstÃ¡ sacado de este ejemplo, que a su vez estÃ¡ sacado de este otro para Oracle. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

