<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Simple Oracle Queries in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076854#M809969</link>
    <description>This code will help with usage of the the allocated tablespaces.&lt;BR /&gt; &lt;BR /&gt;ttitle left ' Free Space By Tablespace' skip 1 &lt;BR /&gt;prompt &lt;BR /&gt;set wrap off &lt;BR /&gt;column dummy noprint &lt;BR /&gt;column  pct_used format 999.9       heading "%|Used"  &lt;BR /&gt;column  "Tablespace Name"    format a16       &lt;BR /&gt;column  bytes   format 9,999,999,999,999    heading "Bytes"  &lt;BR /&gt;column  used    format 99,999,999,999   heading "Used"  &lt;BR /&gt;column  free    format 999,999,999,999  heading "Free"  &lt;BR /&gt;break   on report  &lt;BR /&gt;compute sum of bytes on report  &lt;BR /&gt;compute sum of free on report  &lt;BR /&gt;compute sum of used on report  &lt;BR /&gt;select a.tablespace_name    "Tablespace Name", &lt;BR /&gt;       b.tablespace_name    dummy, &lt;BR /&gt;       sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id ) bytes, &lt;BR /&gt;       sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id ) - &lt;BR /&gt;       sum(a.bytes)/count( distinct b.file_id ) used, &lt;BR /&gt;       sum(a.bytes)/count( distinct b.file_id ) free, &lt;BR /&gt;       100 * ( (sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )) -&lt;BR /&gt;       (sum(a.bytes)/count( distinct b.file_id ) )) / &lt;BR /&gt;       (sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )) pct_used &lt;BR /&gt;from sys.dba_free_space a, sys.dba_data_files b &lt;BR /&gt;where a.tablespace_name = b.tablespace_name &lt;BR /&gt;group by a.tablespace_name, b.tablespace_name; &lt;BR /&gt;clear break&lt;BR /&gt;clear compute&lt;BR /&gt;clear column&lt;BR /&gt; &lt;BR /&gt;That sql code is oracle only, tested oin 8.1.7.4.0&lt;BR /&gt; &lt;BR /&gt;You should be ablt to cut and paste it.&lt;BR /&gt; &lt;BR /&gt;With regards to the 100% CPU use on a Superdome.  That's quit an achievment.  Do you have all the latest Gold Packs/OS Patches recommended installed for roacle.&lt;BR /&gt; &lt;BR /&gt;SEP</description>
    <pubDate>Tue, 23 Sep 2003 16:04:59 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2003-09-23T16:04:59Z</dc:date>
    <item>
      <title>Simple Oracle Queries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076853#M809968</link>
      <description>We are using the HP OV SPI for Databases and we recently found that a child process of the SPI with a username of daemon consumes 100% of a Superdome CPU. In working with HP it turns out that it is 2 metrics that are causing the problems. The SPI is working OK its the size of the database that is the problem. Is there a few simple queries that a non-DBA (Me) can execute that will tell me the size of the database? How many tables are in the database? The size of the tablespaces? How many segements are in each tablespace?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 23 Sep 2003 16:00:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076853#M809968</guid>
      <dc:creator>Tony Williams</dc:creator>
      <dc:date>2003-09-23T16:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Oracle Queries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076854#M809969</link>
      <description>This code will help with usage of the the allocated tablespaces.&lt;BR /&gt; &lt;BR /&gt;ttitle left ' Free Space By Tablespace' skip 1 &lt;BR /&gt;prompt &lt;BR /&gt;set wrap off &lt;BR /&gt;column dummy noprint &lt;BR /&gt;column  pct_used format 999.9       heading "%|Used"  &lt;BR /&gt;column  "Tablespace Name"    format a16       &lt;BR /&gt;column  bytes   format 9,999,999,999,999    heading "Bytes"  &lt;BR /&gt;column  used    format 99,999,999,999   heading "Used"  &lt;BR /&gt;column  free    format 999,999,999,999  heading "Free"  &lt;BR /&gt;break   on report  &lt;BR /&gt;compute sum of bytes on report  &lt;BR /&gt;compute sum of free on report  &lt;BR /&gt;compute sum of used on report  &lt;BR /&gt;select a.tablespace_name    "Tablespace Name", &lt;BR /&gt;       b.tablespace_name    dummy, &lt;BR /&gt;       sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id ) bytes, &lt;BR /&gt;       sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id ) - &lt;BR /&gt;       sum(a.bytes)/count( distinct b.file_id ) used, &lt;BR /&gt;       sum(a.bytes)/count( distinct b.file_id ) free, &lt;BR /&gt;       100 * ( (sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )) -&lt;BR /&gt;       (sum(a.bytes)/count( distinct b.file_id ) )) / &lt;BR /&gt;       (sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )) pct_used &lt;BR /&gt;from sys.dba_free_space a, sys.dba_data_files b &lt;BR /&gt;where a.tablespace_name = b.tablespace_name &lt;BR /&gt;group by a.tablespace_name, b.tablespace_name; &lt;BR /&gt;clear break&lt;BR /&gt;clear compute&lt;BR /&gt;clear column&lt;BR /&gt; &lt;BR /&gt;That sql code is oracle only, tested oin 8.1.7.4.0&lt;BR /&gt; &lt;BR /&gt;You should be ablt to cut and paste it.&lt;BR /&gt; &lt;BR /&gt;With regards to the 100% CPU use on a Superdome.  That's quit an achievment.  Do you have all the latest Gold Packs/OS Patches recommended installed for roacle.&lt;BR /&gt; &lt;BR /&gt;SEP</description>
      <pubDate>Tue, 23 Sep 2003 16:04:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076854#M809969</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-23T16:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Oracle Queries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076855#M809970</link>
      <description>Thanks for the code. Recent June 2003 Gold patches not the latest. Metric 3, the # of tablespaces with free low space, and metric 16, the # of segments that cannot extend are the culprits. According to HP the size of our databae (1.5 TB) and the number of tablespaces and objects cause these two metrics to hammer on the database without mercy. The SPI is supposed to run for 5 minutes and actually runs for 25 minutes with 100% CPU. We didn't see this problem on smaller databases that the SPI is deployed on.</description>
      <pubDate>Tue, 23 Sep 2003 16:11:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076855#M809970</guid>
      <dc:creator>Tony Williams</dc:creator>
      <dc:date>2003-09-23T16:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Oracle Queries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076856#M809971</link>
      <description>I'm attaching some performance data collection scripts.&lt;BR /&gt; &lt;BR /&gt;They run background and will at least show you where the bottleneck is.&lt;BR /&gt; &lt;BR /&gt;It might be the process is waiting on resources, not sure without more data.&lt;BR /&gt; &lt;BR /&gt;You also might want to fire up glance plus and drill into the process and see whats going on there.&lt;BR /&gt; &lt;BR /&gt;Good Luck,&lt;BR /&gt; &lt;BR /&gt;SEP</description>
      <pubDate>Tue, 23 Sep 2003 16:18:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076856#M809971</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-23T16:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Oracle Queries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076857#M809972</link>
      <description>if I had a Â</description>
      <pubDate>Tue, 23 Sep 2003 16:49:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076857#M809972</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2003-09-23T16:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Oracle Queries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076858#M809973</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;if you want to do monitoring, statspack will be the best way to go!&lt;BR /&gt;&lt;BR /&gt;You should be using statspack on a constant basis.&lt;BR /&gt;&lt;BR /&gt;Every morning, you should take a snapshot, every afternoon another, every evening, yet another.&lt;BR /&gt;&lt;BR /&gt;Now you have a history.  You can compare a statspack from today (bad performance) with last weeks at the same time (good performance) and look for major differences.&lt;BR /&gt;&lt;BR /&gt;Also, people must "quantify" things.  Eg: Screen 1 typically takes less then 1 second, today it is taking 60 seconds.  -- Ah ha, maybe we lost an index on some of the tables surrounding screen 1, lets look at that.  Are there specific components "going slow" or is the entire thing going slow.  &lt;BR /&gt;&lt;BR /&gt;Statspack will help you identify the top sql, the big wait events, contention points, bad performance metric.&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Wed, 24 Sep 2003 02:24:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-oracle-queries/m-p/3076858#M809973</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-09-24T02:24:26Z</dc:date>
    </item>
  </channel>
</rss>

