
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CHizSTudio &#187; oracle</title>
	<atom:link href="http://www.chizstudio.com/tags/oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chizstudio.com</link>
	<description>Lazy Trend Hunter&#039;s Digital life - Make your happy digital life</description>
	<lastBuildDate>Fri, 23 Apr 2010 03:32:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>tracking tablespace on oracle</title>
		<link>http://www.chizstudio.com/tracking-tablespace-on-oracle/</link>
		<comments>http://www.chizstudio.com/tracking-tablespace-on-oracle/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 00:57:27 +0000</pubDate>
		<dc:creator>sayo</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://www.chizstudio.com/?p=108</guid>
		<description><![CDATA[

SELECT
 DT.TABLESPACE_NAME,
 DT.BLOCK_SIZE,
 DT.INITIAL_EXTENT,
 DT.NEXT_EXTENT,
 DT.MIN_EXTENTS,
 DT.MAX_EXTENTS,
 DT.PCT_INCREASE,
 DT.MIN_EXTLEN,
 DT.STATUS,
 DT.CONTENTS,
 DT.LOGGING,
 DT.FORCE_LOGGING,
 DT.EXTENT_MANAGEMENT,
 DT.ALLOCATION_TYPE,
 DT.PLUGGED_IN,
 DT.SEGMENT_SPACE_MANAGEMENT,
 DF.PERCENT_BLOCKS_COALESCED,
 DF.TOTAL_BYTES
FROM
 SYS.DBA_TABLESPACES DT,
 SYS.DBA_FREE_SPACE_COALESCED DF
WHERE
 DT.TABLESPACE_NAME = DF.TABLESPACE_NAME (+)
ORDER BY
 DT.TABLESPACE_NAME

]]></description>
			<content:encoded><![CDATA[<pre class="brush: sql; ">

SELECT
 DT.TABLESPACE_NAME,
 DT.BLOCK_SIZE,
 DT.INITIAL_EXTENT,
 DT.NEXT_EXTENT,
 DT.MIN_EXTENTS,
 DT.MAX_EXTENTS,
 DT.PCT_INCREASE,
 DT.MIN_EXTLEN,
 DT.STATUS,
 DT.CONTENTS,
 DT.LOGGING,
 DT.FORCE_LOGGING,
 DT.EXTENT_MANAGEMENT,
 DT.ALLOCATION_TYPE,
 DT.PLUGGED_IN,
 DT.SEGMENT_SPACE_MANAGEMENT,
 DF.PERCENT_BLOCKS_COALESCED,
 DF.TOTAL_BYTES
FROM
 SYS.DBA_TABLESPACES DT,
 SYS.DBA_FREE_SPACE_COALESCED DF
WHERE
 DT.TABLESPACE_NAME = DF.TABLESPACE_NAME (+)
ORDER BY
 DT.TABLESPACE_NAME
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chizstudio.com/tracking-tablespace-on-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tracking current sql of sid on oracle</title>
		<link>http://www.chizstudio.com/tracking-current-sql-of-sid-on-oracle/</link>
		<comments>http://www.chizstudio.com/tracking-current-sql-of-sid-on-oracle/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 02:44:19 +0000</pubDate>
		<dc:creator>sayo</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://www.chizstudio.com/?p=104</guid>
		<description><![CDATA[

SELECT
sid,
SQL_TEXT,
piece
FROM
v$session se,
sys.v_$sqltext sq
WHERE
se.sql_address = sq.ADDRESS (+) AND
se.SQL_HASH_VALUE = sq.HASH_VALUE (+) AND
sid = 204
ORDER BY
address,
hash_value,
piece

]]></description>
			<content:encoded><![CDATA[<pre class="brush: sql; ">

SELECT
sid,
SQL_TEXT,
piece
FROM
v$session se,
sys.v_$sqltext sq
WHERE
se.sql_address = sq.ADDRESS (+) AND
se.SQL_HASH_VALUE = sq.HASH_VALUE (+) AND
sid = 204
ORDER BY
address,
hash_value,
piece
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chizstudio.com/tracking-current-sql-of-sid-on-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tacking oracle cpu usage</title>
		<link>http://www.chizstudio.com/tacking-oracle-cpu-usage/</link>
		<comments>http://www.chizstudio.com/tacking-oracle-cpu-usage/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 05:21:07 +0000</pubDate>
		<dc:creator>sayo</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[usage]]></category>

		<guid isPermaLink="false">http://www.chizstudio.com/?p=99</guid>
		<description><![CDATA[

select s.username &#34;Oracle User&#34;,s.osuser &#34;OS User&#34;,i.consistent_gets &#34;Consistent Gets&#34;,
i.physical_reads &#34;Physical Reads&#34;,s.status &#34;Status&#34;,s.sid &#34;SID&#34;,s.serial# &#34;Serial#&#34;,
s.machine &#34;Machine&#34;,s.program &#34;Program&#34;,to_char(logon_time, &#039;DD/MM/YYYY HH24:MI:SS&#039;) &#34;Logon Time&#34;,
w.seconds_in_wait &#34;Idle Time&#34;, P.SPID &#34;PROC&#34;,
name &#34;Stat CPU&#34;, value
from v$session s, v$sess_io i, v$session_wait w, V$PROCESS P, v$statname n, v$sesstat t
where s.sid = i.sid
and s.sid = w.sid (+)
and &#039;SQL*Net message from client&#039; = w.event(+)
and s.osuser is not null
and [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush: sql; ">

select s.username &quot;Oracle User&quot;,s.osuser &quot;OS User&quot;,i.consistent_gets &quot;Consistent Gets&quot;,
i.physical_reads &quot;Physical Reads&quot;,s.status &quot;Status&quot;,s.sid &quot;SID&quot;,s.serial# &quot;Serial#&quot;,
s.machine &quot;Machine&quot;,s.program &quot;Program&quot;,to_char(logon_time, &#039;DD/MM/YYYY HH24:MI:SS&#039;) &quot;Logon Time&quot;,
w.seconds_in_wait &quot;Idle Time&quot;, P.SPID &quot;PROC&quot;,
name &quot;Stat CPU&quot;, value
from v$session s, v$sess_io i, v$session_wait w, V$PROCESS P, v$statname n, v$sesstat t
where s.sid = i.sid
and s.sid = w.sid (+)
and &#039;SQL*Net message from client&#039; = w.event(+)
and s.osuser is not null
and s.username is not null
and s.paddr=p.addr
and n.statistic# = t.statistic#
and n.name like &#039;%cpu%&#039;
and t.SID = s.sid
order by 6 asc, 3 desc, 4 desc
</pre>
<p><a class="wpgallery" title="Track CPU Usage" href="http://www.oracle.com/technology/oramag/code/tips2005/112805.html" target="_blank">Track CPU Usage</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chizstudio.com/tacking-oracle-cpu-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>table data size on oracle</title>
		<link>http://www.chizstudio.com/table-data-size-on-oracle/</link>
		<comments>http://www.chizstudio.com/table-data-size-on-oracle/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 01:51:53 +0000</pubDate>
		<dc:creator>sayo</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[tablespace]]></category>

		<guid isPermaLink="false">http://www.chizstudio.com/?p=94</guid>
		<description><![CDATA[1. script
/*
** Table Data Size를 정확히 계산해주는 스크립트. &#60;&#60;박제용&#62;&#62;
**
** 사용법 : @tab_size [table_name]
**
*/
analyze table &#38;1 delete statistics;
analyze table &#38;1 compute statistics;
SELECT GREATEST(4, ceil(NUM_ROWS/
( (round(((1958-(INI_TRANS*23))*((100-PCT_FREE)/100))/AVG_ROW_LEN)))) * 2048) TableSize_Kbytes
FROM user_tables
WHERE table_name = upper(&#8216;&#38;1&#8242;);
2. p-sql
[Oracle] TABLE, INDEX 실 데이터 size 구하기
 
TABLE size 구하기
set pagesize 9999
col owner format a10
col tablespace_name format a20
col table_name format a30
col mb format 99990.99
SELECT [...]]]></description>
			<content:encoded><![CDATA[<p>1. script</p>
<p>/*<br />
** Table Data Size를 정확히 계산해주는 스크립트. &lt;&lt;박제용&gt;&gt;<br />
**<br />
** 사용법 : @tab_size [table_name]<br />
**<br />
*/<br />
analyze table &amp;1 delete statistics;<br />
analyze table &amp;1 compute statistics;</p>
<p>SELECT GREATEST(4, ceil(NUM_ROWS/<br />
( (round(((1958-(INI_TRANS*23))*((100-PCT_FREE)/100))/AVG_ROW_LEN)))) * 2048) TableSize_Kbytes<br />
FROM user_tables<br />
WHERE table_name = upper(&#8216;&amp;1&#8242;);</p>
<p>2. p-sql</p>
<p><a style="color: #6666cc; font-family: verdana, arial, sans-serif; font-size: 12px; text-decoration: none; font-weight: bold;" title="[Oracle] TABLE, INDEX 실 데이터 size 구하기" href="http://www.sung-ho.pe.kr/index.php?p=17947" target="_self"><strong>[Oracle] TABLE, INDEX 실 데이터 size 구하기</strong></a></p>
<p><strong> </strong></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">TABLE size 구하기</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">set pagesize 9999</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col owner format a10</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col tablespace_name format a20</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col table_name format a30</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col mb format 99990.99</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SELECT OWNER, TABLESPACE_NAME, TABLE_NAME, NUM_ROWS*AVG_ROW_LEN/1024/1024 as MB</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">FROM DBA_TABLES</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">WHERE OWNER IN (&#8216;ADPORTAL&#8217;,'INTRADBA&#8217;,'UWDBA&#8217;,'WEBSALES&#8217;)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORDER BY OWNER, TABLESPACE_NAME, TABLE_NAME;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">INDEX size 구하기</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">db_block_size를 LEAF_BLOCKS과 곱한다</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">select value from v$parameter where name = &#8216;db_block_size&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">set pagesize 9999</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col owner format a10</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col tablespace_name format a20</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col index_name format a30</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col mb format 99990.99</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SELECT OWNER, TABLESPACE_NAME, INDEX_NAME, LEAF_BLOCKS*8192/1024/1024 as MB</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">FROM DBA_INDEXES</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">WHERE OWNER IN (&#8216;ADPORTAL&#8217;,'INTRADBA&#8217;,'UWDBA&#8217;,'WEBSALES&#8217;)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORDER BY OWNER, TABLESPACE_NAME, INDEX_NAME;</div>
<pre class="brush: sql; ">

TABLE size 구하기
set pagesize 9999
col owner format a10
col tablespace_name format a20
col table_name format a30
col mb format 99990.99

SELECT OWNER, TABLESPACE_NAME, TABLE_NAME, NUM_ROWS*AVG_ROW_LEN/1024/1024 as MB
FROM DBA_TABLES
WHERE OWNER IN (&#039;ADPORTAL&#039;,&#039;INTRADBA&#039;,&#039;UWDBA&#039;,&#039;WEBSALES&#039;)
ORDER BY OWNER, TABLESPACE_NAME, TABLE_NAME;

INDEX size 구하기
db_block_size를 LEAF_BLOCKS과 곱한다
select value from v$parameter where name = &#039;db_block_size&#039;

set pagesize 9999
col owner format a10
col tablespace_name format a20
col index_name format a30
col mb format 99990.99

SELECT OWNER, TABLESPACE_NAME, INDEX_NAME, LEAF_BLOCKS*8192/1024/1024 as MB
FROM DBA_INDEXES
WHERE OWNER IN (&#039;ADPORTAL&#039;,&#039;INTRADBA&#039;,&#039;UWDBA&#039;,&#039;WEBSALES&#039;)
ORDER BY OWNER, TABLESPACE_NAME, INDEX_NAME;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chizstudio.com/table-data-size-on-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
