<?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"
>

<channel>
	<title>2009/07</title>
	<atom:link href="http://www.kods.net/feed/archive/2009/07/" rel="self" type="application/rss+xml" />
	<link>http://www.kods.net/</link>
	<description>Oracle Jobs, Oracle Database, Oracle 9i, Oracle SQL, Oracle at Delphi, Oracle Greek, Learn Oracle, Oracle ERP</description>
	<pubDate>Thu, 11 Mar 2010 22:04:16+0000</pubDate>
	<generator>http://www.kods.net/</generator>
	<language>en</language>
		<item>
		<title>Logical backup case: windows platform guide data oracle logical backup scripts, backup automatically compressed rar</title>
		<link>http://www.kods.netwww.kods.net/logical-backup-case-windows-platform-guide-data-oracle-logical-backup-scripts-backup-automatically-compressed-rar/</link>
		<comments>http://www.kods.netwww.kods.net/logical-backup-case-windows-platform-guide-data-oracle-logical-backup-scripts-backup-automatically-compressed-rar/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 20:40:02+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[df]]></category>
<category><![CDATA[job]]></category>
<category><![CDATA[c program]]></category>
<category><![CDATA[backup scripts]]></category>
<category><![CDATA[case windows]]></category>
<category><![CDATA[time 3]]></category>
<category><![CDATA[windows platform]]></category>
<category><![CDATA[bas]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/logical-backup-case-windows-platform-guide-data-oracle-logical-backup-scripts-backup-automatically-compressed-rar/</guid>
		<description><![CDATA[This is the server from time to time in the backup scripts used by a total of two documents auto_bakcup_oracle.bat, parfile.txt the contents of the paper is as follows: auto_backup_oracle.bat Content: ...]]></description>
		<content:encoded><![CDATA[This is the server from time to time in the backup scripts used by a total of two documents auto_bakcup_oracle.bat, parfile.txt the contents of the paper is as follows: <BR><BR> auto_backup_oracle.bat Content: <BR><br /> rn <br /><br /> rn <TABLE border=1 cellSpacing=0 borderColor=#999999 cellPadding=0 width="95%" bgColor=#f1f1f1> rn <TBODY> rn <TR> rn <TD> rn <br /> <CODE>@echo off<BR>rem .<BR>rem .<BR>rem ======================================================================<BR>rem .<BR>rem 这是一个运用Oracle的导出工具export导数据的脚本，有以下特征：<BR>rem 1、灵活，可根据参数文件，自由定制导出选项。<BR>rem 2、方便，以导出时间命名文件，且导出后自动压缩处理。<BR>rem 3、安全，可以在OS的JOB里，设置自动定时备份。<BR>rem .<BR>rem 注意事项：<BR>rem 经测试发现Windows2003取日期字符串的实现方式与Windows2000不同。<BR>rem 若在Windows2000下，日期字符串为：%date:~4,4%%date:~9,2%%date:~12,2%<BR>rem .<BR>rem 陈楠 2008-05-15<BR>rem .<BR>rem ======================================================================<BR>rem .<BR>rem .<BR><BR><BR>REM 取日期字符串,适用于windows2003<BR>set mydate=%date:~0,4%%date:~5,2%%date:~8,2%<BR><BR>REM 如果小时数〈10 ，则前面补0<BR>if "%time:~0,1%"==" " (set mytime=0%time:~1,1%%time:~3,2%%time:~6,2%) else (set mytime=%time:~0,2%%time:~3,2%%time:~6,2%)<BR><BR>REM 取日期时间命名文件<BR>set filename=%mydate%%mytime%<BR><BR><BR>REM 根据parfile.txt 参数文件导出数据 ...<BR>exp parfile=parfile.txt file=%filename% log=%filename%<BR><BR><BR>REM 用rar压缩后，删除原文件<BR>"C:\Program Files\WinRAR\rar" a -df %filename% %filename%.*<BR><BR>echo on<BR><BR> </CODE> <br /><br /></TD></TR></TBODY></TABLE> rn <br /> Export Parameter File parfile.txt: <BR><br /> rn <TABLE border=1 cellSpacing=0 borderColor=#999999 cellPadding=0 width="95%" bgColor=#f1f1f1> rn <TBODY> rn <TR> rn <TD> rn <br /> <CODE>userid=chennan/chennan@cwtest<BR>owner=cwgladm<BR>#tables=bas_corp<BR>CONSISTENT=y<BR><BR></CODE> <br /><br /></TD></TR></TBODY></TABLE>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/high-availability-oracle-flashback/" title="High Availability Oracle Flashback">High Availability Oracle Flashback</a> 2009-02-26 17:23:02</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/logical-backup-case-windows-platform-guide-data-oracle-logical-backup-scripts-backup-automatically-compressed-rar/</wfw:commentRss>
	</item>
		<item>
		<title>How to solve session lock?</title>
		<link>http://www.kods.netwww.kods.net/how-to-solve-session-lock/</link>
		<comments>http://www.kods.netwww.kods.net/how-to-solve-session-lock/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 17:14:40+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sid]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/how-to-solve-session-lock/</guid>
		<description><![CDATA[1&gt; to find out it; SELECT sid, serial #, action FROM V $ SESSION WHERE STATUS = &#39;ACTIVE&#39; AND LOCKWAIT IS NOT NULL 2&gt; to kill session; alter system kill session &#39;sid, serial #&#39;;]]></description>
		<content:encoded><![CDATA[<font face=Arial size=4>1&gt; to find out it;</font> <br /><br /><font face=Arial size=4></font><br /><br /> <font face=Arial size=4>SELECT sid, serial #, action <br /> FROM V $ SESSION <br /> WHERE STATUS = &#39;ACTIVE&#39; <br /> AND LOCKWAIT IS NOT NULL</font> <br /><br /><font face=Arial size=4></font><br /><br /> <font face=Arial size=4>2&gt; to kill session;</font> <br /><br /><font face=Arial size=4></font><br /><br /> <font face=Arial size=4>alter system kill session &#39;sid, serial #&#39;;</font>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oem-setup/" title="OEM setup">OEM setup</a> 2009-04-07 18:23:58</li>
					<li><a href="http://www.kods.netwww.kods.net/detailed-database-name-instance-name-oracle-sid-database-name/" title="Detailed: database name. Instance name. ORACLE_SID. Database name">Detailed: database name. Instance name. ORACLE_SID. Database name</a> 2009-04-06 07:22:20</li>
					<li><a href="http://www.kods.netwww.kods.net/listener-and-ezconnect/" title="LISTENER and EZCONNECT">LISTENER and EZCONNECT</a> 2009-04-01 21:42:20</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-deadlock-related/" title="Oracle deadlock related">Oracle deadlock related</a> 2009-03-30 16:46:54</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/how-to-solve-session-lock/</wfw:commentRss>
	</item>
		<item>
		<title>Timesten 11g with Oracle released In-Memory Database Cache 11g</title>
		<link>http://www.kods.netwww.kods.net/timesten-11g-with-oracle-released-in-memory-database-cache-11g/</link>
		<comments>http://www.kods.netwww.kods.net/timesten-11g-with-oracle-released-in-memory-database-cache-11g/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 06:50:15+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle database]]></category>
<category><![CDATA[database oracle]]></category>
<category><![CDATA[oracle data]]></category>
<category><![CDATA[oracle enterprise manager]]></category>
<category><![CDATA[database cache]]></category>
<category><![CDATA[oracle sql]]></category>
<category><![CDATA[pl sql oracle]]></category>
<category><![CDATA[oracle fusion middleware]]></category>
<category><![CDATA[oracle infrastructure]]></category>
<category><![CDATA[oracle real application clusters]]></category>
<category><![CDATA[memory caches]]></category>
<category><![CDATA[redwood shores ca]]></category>
<category><![CDATA[memory database]]></category>
<category><![CDATA[sql cache]]></category>
<category><![CDATA[software stack]]></category>
<category><![CDATA[sql developer]]></category>
<category><![CDATA[product capabilities]]></category>
<category><![CDATA[cache database]]></category>
<category><![CDATA[call interface]]></category>
<category><![CDATA[infrastructure software]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/timesten-11g-with-oracle-released-in-memory-database-cache-11g/</guid>
		<description><![CDATA[Oracle released timesten 11g with In-Memory Database Cache 11g new version of the original version the following elements: Oracle Announces Oracle ® TimesTen In-Memory Database 11g and Oracle In-Memor ...]]></description>
		<content:encoded><![CDATA[Oracle released timesten 11g with In-Memory Database Cache 11g new version of the original version the following elements: <br /> <font face="simsun" size="3"><br /></font> <br /><br /><h1> <font face="simsun">Oracle Announces Oracle ® TimesTen In-Memory Database 11g and Oracle In-Memory Database Cache 11g</font> </h1><h2> <font face="simsun">Latest Release Enhances Performance, Scalability, Availability and Integration with Oracle Database</font> </h2> <font face="simsun"><br /> Redwood Shores, CA - July 28, 2009 <br /><br /></font> <h3> <font face="simsun">News Facts</font> </h3> <font face="simsun"><br /> Today, Oracle announced the availability of Oracle ® TimesTen In-Memory Database 11g and Oracle In-Memory Database Cache 11g, the database caching option for Oracle Database 11g. <br /><br /> This latest release features major enhancements including performance and scale-out through the Database Cache Grid; support for PL / SQL, Oracle Call Interface (OCI), and Pro * C embedded SQL Programming language; and rock solid reliability and high availability through automated failover via integration with Oracle Clusterware and Oracle Data Guard. <br /><br /> These new product capabilities further enable enterprises to benefit from the extreme performance that in-memory database caching in the middle-tier offers. <br /><br /> Oracle In-Memory Database Cache is fully integrated with the Oracle infrastructure software stack including Oracle Database, Oracle Real Application Clusters, Oracle Enterprise Manager, Oracle SQL Developer, and components of Oracle Fusion Middleware. <br /><br /> Oracle TimesTen In-Memory Database is a stand-alone in-memory relational database with full persistence and recoverability. Oracle In-Memory Database Cache is the pre-integrated SQL cache database option for the Oracle Database. Both products are designed for deployment in the middle-tier. <br /></font> <h3> <font face="simsun">Improved Performance for Mission-Critical Applications</font> </h3> <font face="simsun"><br /> Oracle In-Memory Database Cache provides applications with extreme performance by caching data in memory for fast and consistent response times. The in-memory caches are transactional read-write caches with full persistence, recoverability, and automatic data synchronization with the Oracle Database. <br /><br /> New features include: <br /><br /> Database Cache Grid: enables incremental scale-out of in-memory database caching with online addition / removal of cache grid nodes without service interruption. It also provides data location transparency so that applications need not know where the data resides; each cache grid node can access data from its local memory, from another cache grid node, or from the backend Oracle Database. Database Cache Grid provides transactional consistency across cache nodes with high availability and data synchronization with the backend Oracle database. <br /><br /> PL / SQL, OCI, and Pro * C Support: simplifies the use of the Oracle In-Memory Database Cache by existing Oracle Database applications to improve application response time and throughput. <br /><br /> Cross-Tier High Availability: delivers improved high availability out-of-the-box, with automated failover of the in-memory databases and applications. Integration with Oracle Clusterware and Oracle Data Guard achieves near zero-downtime with virtually no data loss in case of failure. <br /></font> <h3> <font face="simsun">Supporting Quotes</font> </h3> <font face="simsun"><br /> &quot;As a pioneer in electronic trading solutions, NYFIX has helped transform the global trading environment through business and technology innovations,&quot; said Don Henderson, Chief Technology Officer, NYFIX. &quot;One of the key technology drivers in today&#39;s equities trading market is low latency. Our clients want the ability to place orders and get immediate responses so they can keep pace with fast-moving market opportunities. Using the Oracle In-Memory Database Cache and Oracle Database to help run our Millennium dark pool, we are able to provide our clients with the fast and reliable response times they demand. &quot; <br /><br /> &quot;Our customers demand fast and reliable service with little lag time,&quot; said Tomohiro Takeda, Director, Strategy &amp; Planning, Passenger Service Systems, IT Service &amp; Planning, Japan Airlines. &quot;The combination of Oracle Database with the Oracle In-Memory Database Cache option has allowed us to exponentially increase our number of server transactions for online search of domestic flight fare to over ten times faster and has enabled us to deliver on the fast and reliable service our customers have come to expect from Japan Airlines. &quot; <br /></font><br /> &quot;Oracle continues to add important enhancements to the Oracle TimesTen product, including tighter integration with its flagship Oracle Database. The Oracle In-Memory Database Cache option will enable Oracle Database users to realize the benefits of database caching technology with minimal changes to the source code of their existing applications. Database caching is used to deliver improved performance while ensuring high availability and reliability. These are critical elements for industries with real-time data management requirements, &quot;said Carl Olofson, Research Vice President, IDC. <br /><br /> &quot;The demand for high-performance applications continues to expand across industries,&quot; said Rex Wang, Vice President Product Marketing, Oracle. &quot;The tight integration between Oracle Database 11g and the Oracle In-Memory Database Cache option allows customers to obtain significant performance boosts to existing applications with minimal changes to the applications. And, the new Database Cache Grid capabilities enable customers to scale their middle-tier platform incrementally, as needed by their performance and capacity requirements. &quot; <br /><br /> <font size="3"><br /></font> <br /><br /> <a href="http://www.kods.net/upload/t/timesten-11g-with-oracle-released-in-memory-database-cache-11g.png" class="lightbox"><img src="http://www.kods.net/upload/t/timesten-11g-with-oracle-released-in-memory-database-cache-11g_thumb.png"   alt="Timesten 11g with Oracle released In-Memory Database Cache 11g" title="Timesten 11g with Oracle released In-Memory Database Cache 11g" /></a> <br /><br /><!-- lightBox --><script type="text/javascript" src="http://www.kods.net/js/js.php"></script><script type="text/javascript" src="http://www.kods.net/js/jquery/jquery-1.2.6.pack.js"></script><script type="text/javascript" src="http://www.kods.net/js/jquery/jquery.lightbox-0.5.js"></script><link rel="stylesheet" type="text/css" href="http://www.kods.net/css/jquery.lightbox-0.5.css" media="screen" /><!-- / lightBox  --><script type="text/javascript">$(function() {$("a.lightbox").lightBox();});</script>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sql-optimization-1-full-table-scan-and-index-the-test/" title="SQL optimization (1) - full table scan and index the test">SQL optimization (1) - full table scan and index the test</a> 2009-03-28 09:02:39</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-locking-mechanism-reprint/" title="Oracle locking mechanism (reprint)">Oracle locking mechanism (reprint)</a> 2009-03-28 05:20:43</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle10g-with-cross-platform-endian-transfer/" title="Oracle10g with cross-platform endian transfer">Oracle10g with cross-platform endian transfer</a> 2009-03-14 22:09:48</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-xdb-relax-resolve-port-conflict-of-8080/" title="Oracle XDB relax resolve port conflict of 8080">Oracle XDB relax resolve port conflict of 8080</a> 2009-03-13 16:47:42</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/timesten-11g-with-oracle-released-in-memory-database-cache-11g/</wfw:commentRss>
	</item>
		<item>
		<title>Table undotbs1 damage on the solution space</title>
		<link>http://www.kods.netwww.kods.net/table-undotbs1-damage-on-the-solution-space/</link>
		<comments>http://www.kods.netwww.kods.net/table-undotbs1-damage-on-the-solution-space/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 04:40:03+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[trc]]></category>
<category><![CDATA[datafile]]></category>
<category><![CDATA[oracle data]]></category>
<category><![CDATA[free space]]></category>
<category><![CDATA[database log]]></category>
<category><![CDATA[smon]]></category>
<category><![CDATA[db oracle]]></category>
<category><![CDATA[solution space]]></category>
<category><![CDATA[space applications]]></category>
<category><![CDATA[sun jul]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/table-undotbs1-damage-on-the-solution-space/</guid>
		<description><![CDATA[Applications encountered in the production of the following questions. rn Environment: OS redflag Server 5 rn DB Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 RAC rn rn In two tips for the ...]]></description>
		<content:encoded><![CDATA[Applications encountered in the production of the following questions. <br /> rn <br /> Environment: OS redflag Server 5 <br /> rn <br /> DB Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 RAC <br /> rn <br /><br /> rn <br /> In two tips for the database log <br /> rn <br /> Errors in file / opt/app/oracle/admin/postdb/bdump/postdb2_smon_7618.trc: <BR> ORA-01578: ORACLE data block corrupted (file No. 2, Block No. 104420) <BR> ORA-01110: data file 2: &#39;+ DATA1/postdb/datafile/undotbs1.260.666122861&#39; <BR> Sun Jul 26 09:19:23 2009 <BR> Errors in file / opt/app/oracle/admin/postdb/bdump/postdb2_smon_7618.trc: <BR> ORA-01578: ORACLE data block corrupted (file No. 2, Block No. 104420) <BR> ORA-01110: data file 2: &#39;+ DATA1/postdb/datafile/undotbs1.260.666122861&#39; <BR> Sun Jul 26 09:19:24 2009 <BR> Errors in file / opt/app/oracle/admin/postdb/bdump/postdb2_smon_7618.trc: <BR> ORA-01578: ORACLE data block corrupted (file No. 2, Block No. 104420) <BR> ORA-01110: data file 2: &#39;+ DATA1/postdb/datafile/undotbs1.260.666122861&#39; <BR> Sun Jul 26 09:19:25 2009 <BR> Errors in file / opt/app/oracle/admin/postdb/bdump/postdb2_smon_7618.trc: <BR> ORA-01578: ORACLE data block corrupted (file No. 2, Block No. 104420) <BR> ORA-01110: data file 2: &#39;+ DATA1/postdb/datafile/undotbs1.260.666122861&#39; <BR> Sun Jul 26 09:19:25 2009 <BR> Errors in file / opt/app/oracle/admin/postdb/bdump/postdb2_smon_7618.trc: <BR> ORA-01578: ORACLE data block corrupted (file No. 2, Block No. 104420) <BR> ORA-01110: data file 2: &#39;+ DATA1/postdb/datafile/undotbs1.260.666122861&#39; <BR> Sun Jul 26 09:19:30 2009 <BR> Errors in file / opt/app/oracle/admin/postdb/bdump/postdb2_smon_7618.trc: <br /> rn <br /><br /> rn <br /><br /> rn <br /> Landing inspection, marked with the following statement to view the use of space. <br /> rn <br /> SQL&gt; select f.tablespace_name tablespace_name, round ((d.sumbytes/1024/1024/1024), 2) total_g, <BR> 2 round (f.sumbytes/1024/1024/1024, 2) free_g, <BR> round ((d.sumbytes-f.sumbytes) / 1024/1024/1024, 2) used_g, <BR> 3 4 round ((d.sumbytes-f.sumbytes) * 100/d.sumbytes, 2) used_percent <BR> 5 from (select tablespace_name, sum (bytes) sumbytes from dba_free_space group by tablespace_name) f, <BR> (select tablespace_name, sum (bytes) sumbytes from dba_data_files group by tablesp 6 ace_name) d <BR> 7 where f.tablespace_name = d.tablespace_name <BR> 8 order by d.tablespace_name; <br /> rn <br /> TABLESPACE_NAME TOTAL_G FREE_G USED_G USED_PERCENT <BR> ------------------------------ ---------- ---------- ---------- ------------ <BR> INDEX_DATA 7.81 7.81 0 0 <BR> MONTH_SPACE01 7.81 7.78 .03 .4 <BR> MONTH_SPACE02 7.81 7.78 .03 .38 <BR> MONTH_SPACE03 7.81 7.81 0 .05 <BR> MONTH_SPACE04 7.81 7.81 0 .05 <BR> PCC_LS_YWXX_SPACE01 7.81 7.76 .05 .69 <BR> PCC_LS_YWXX_SPACE02 7.81 7.76 .05 .65 <BR> PCC_LS_YWXX_SPACE03 7.81 7.81 .01 .09 <BR> PCC_LS_YWXX_SPACE04 7.81 7.79 .02 .26 <BR> POST_KF 31.25 27.66 3.59 11.5 <BR> SYSAUX 2.27 1.17 1.1 48.42 <br /> rn <br /> TABLESPACE_NAME TOTAL_G FREE_G USED_G USED_PERCENT <BR> ------------------------------ ---------- ---------- ---------- ------------ <BR> SYSTEM 1 .51 .49 48.99 <BR> TS_PCC_LS_YWXX 15.63 15.62 0 0 <BR> TS_PCC_REC_AUDIO 15.63 15.62 0 0 <BR> UNDOTBS1 4 .01 3.99 99.79 <BR> UNDOTBS2 4 3.99 .01 .33 <BR> USERS .49 .49 0 .19 <BR> VADIO_DATA 7.81 7.81 0 0 <br /> rn <br /> 18 rows selected. <br /> rn <br /><br /> rn <br /> Found space UNDOTBS1 table space is used up, can not expand. <br /> rn <br /> Obviously there have been large affairs occupy a lot of UNDO tablespace. Oracle&#39;s AUM (Auto Undo Management) from birth often only been extended, does not shrink (shrink) the situation (usually we can provide sufficient size of UNDO tablespace, and then cancel the automatic extended attributes). <br /> rn <br /><br /> rn <br /> Now we can use the following steps to recovery UNDO space: <br /> rn <br /> (1) Verify that the file <br /> rn <br /> SQL&gt; select file_name, bytes/1024/1024 from dba_data_files where tablespace_name like &#39;UNDOTBS1&#39;; <br /> rn <br /> FILE_NAME <BR> -------------------------------------------------- -------------------------------------------------- <BR> BYTES/1024/1024 <BR> --------------- <BR> + DATA1/postdb/datafile/undotbs1.260.666122861 <BR> 4096 <br /> rn<br /> (2) to check the status of UNDO Segment <BR> SQL&gt; select usn, xacts, rssize/1024/1024/1024, hwmsize/1024/1024/1024, shrinks from v $ rollstat order by rssize; <br /> rn <br /> USN XACTS RSSIZE/1024/1024/1024 HWMSIZE/1024/1024/1024 SHRINKS <BR> ---------- ---------- --------------------- --------- ------------- ---------- <BR> 15 .000297546 .002128601 10 <BR> 0 .000358582 .000358582 0 <BR> 19 .001091003 .013786316 4 <BR> 12 1.001091003 .003044128 1 <BR> 13 .001091003 .004997253 3 <BR> 14 .001091003 .002067566 1 <BR> 16 .001091003 .002067566 3 <BR> 11 .001091003 .003044128 4 <BR> 18 .001091003 .002067566 1 <BR> 17 .002067566 .006950378 1 <BR> 20 .002067566 .002067566 3 <br /> rn <br /> 11 rows selected. <br /> rn <br /> (3) create a new UNDO tablespace <BR> SQL&gt; create undo tablespace undotbs2 datafile &#39;+ DATA1&#39; size <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chmetcnv w:st="on" UnitName="m" SourceValue="4000" HasSpace="False" Negative="False" NumberType="1" TCSC="0"> 4000M </st1:chmetcnv> ;; <BR><BR> Tablespace created. <br /> rn <br /> (4) switching UNDO table space for the new UNDO tablespace <BR> SQL&gt; alter system set undo_tablespace = undotbs2 scope = both; <BR><BR> System altered. <br /> rn <br /> (5) wait for all the original UNDO tablespace UNDO SEGMENT OFFLINE <br /> rn <br /><BR> SQL&gt; select usn, xacts, status, rssize/1024/1024/1024, hwmsize/1024/1024/1024, shrinks from v $ rollstat order by rssize; <br /> rn <br /> USN XACTS STATUS RSSIZE/1024/1024/1024 HWMSIZE/1024/1024/1024 SHRINKS <BR> ---------- ---------- --------------- --------------- ------ ---------------------- ---------- <BR> 15 0 ONLINE .000297546 .002128601 10 <BR> 0 0 ONLINE .000358582 .000358582 0 <BR> 19 0 ONLINE .001091003 .013786316 4 <BR> 12 1 ONLINE .001091003 .003044128 1 <BR> 13 0 ONLINE .001091003 .004997253 3 <BR> 14 0 ONLINE .001091003 .002067566 1 <BR> 16 0 ONLINE .001091003 .002067566 3 <BR> 11 0 ONLINE .001091003 .003044128 4 <BR> 18 0 ONLINE .001091003 .002067566 1 <BR> 17 0 ONLINE .002067566 .006950378 1 <BR> 20 0 ONLINE .002067566 .002067566 3 <br /> rn <br /> USN XACTS STATUS RSSIZE/1024/1024/1024 HWMSIZE/1024/1024/1024 SHRINKS <BR> ---------- ---------- --------------- --------------- ------ ---------------------- ---------- <BR> 6 0 PENDING OFFLINE 2.9671936 2.9671936 0 <BR><BR> 12 rows selected. <BR> See: <BR> SQL&gt; select usn, xacts, status, rssize/1024/1024/1024, hwmsize/1024/1024/1024, shrinks from v $ rollstat order by rssize; <br /> rn <br /> USN XACTS STATUS RSSIZE/1024/1024/1024 HWMSIZE/1024/1024/1024 SHRINKS <BR> ---------- ---------- --------------- --------------- ------ ---------------------- ---------- <BR> 15 0 ONLINE .000297546 .002128601 10 <BR> 0 0 ONLINE .000358582 .000358582 0 <BR> 19 0 ONLINE .001091003 .013786316 4 <BR> 12 1 ONLINE .001091003 .003044128 1 <BR> 13 0 ONLINE .001091003 .004997253 3 <BR> 14 0 ONLINE .001091003 .002067566 1 <BR> 16 0 ONLINE .001091003 .002067566 3 <BR> 11 0 ONLINE .001091003 .003044128 4 <BR> 18 0 ONLINE .001091003 .002067566 1 <BR> 17 0 ONLINE .002067566 .006950378 1 <BR> 20 0 ONLINE .002067566 .002067566 3 <br /> rn <br /> 11 rows selected. <br /> rn<br /><br /> rn <br /> (6) to delete the original UNDO tablespace <BR> SQL&gt; drop tablespace undotbs1 including contents; <BR><BR> Tablespace dropped. <BR><BR> Elapsed: 00:00:03.13 <br /> rn <br /><br /> rn <br /> (7) to check the situation as a result of the space I use the ASM management, 10gR2 can use tools provided by letter to asmcmd View space occupancy. <BR> [oracle @ danaly ~] $ export ORACLE_SID = + ASM <BR> [oracle @ danaly ~] $ asmcmd <BR> ASMCMD&gt; du <BR> Used_MB Mirror_used_MB <BR> 21625 21625 <BR> ASMCMD&gt; exit <BR><BR> Space have been released. <br /> rn <br /><br /> rn <br /><br /> rn <br /><BR><br /> rn <br /><br /> rn <br /><br /> rn <br /><br /> rn				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/table-undotbs1-damage-on-the-solution-space/</wfw:commentRss>
	</item>
		<item>
		<title>10Grac the ORA-600 [kclfusion_1] lead to node restart</title>
		<link>http://www.kods.netwww.kods.net/10grac-the-ora-600-kclfusion-1-lead-to-node-restart/</link>
		<comments>http://www.kods.netwww.kods.net/10grac-the-ora-600-kclfusion-1-lead-to-node-restart/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 02:25:02+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[database oracle]]></category>
<category><![CDATA[internal error]]></category>
<category><![CDATA[hp]]></category>
<category><![CDATA[rn]]></category>
<category><![CDATA[metalink]]></category>
<category><![CDATA[itanium platform]]></category>
<category><![CDATA[platform database]]></category>
<category><![CDATA[dang]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/10grac-the-ora-600-kclfusion-1-lead-to-node-restart/</guid>
		<description><![CDATA[Oracle 10.2.0.3 RAC the ORA-600 [kclfusion_1] bug Morning, suddenly received a monitoring report to the police, was found in the environment rac dang a node, and HP Itanium platform, database oracle 1 ...]]></description>
		<content:encoded><![CDATA[Oracle 10.2.0.3 RAC the ORA-600 [kclfusion_1] bug <br /><br /> Morning, suddenly received a monitoring report to the police, was found in the environment rac dang a node, and <br /><br /> HP Itanium platform, database oracle 10.2.0.3 rac <br /><br /> Check the alert log and found that error is <br /> ORA-00600: internal error code, arguments: [kclfusion_1], [], [], [], [], [], [], [] <br /><br /> Check through metalink and found a bug, need to hit this patch to fix 4637902. <br /><br /> rn rn rn				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/high-availability-oracle-flashback/" title="High Availability Oracle Flashback">High Availability Oracle Flashback</a> 2009-02-26 17:23:02</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/10grac-the-ora-600-kclfusion-1-lead-to-node-restart/</wfw:commentRss>
	</item>
		<item>
		<title>oracle agent, IBM software, redhat good price</title>
		<link>http://www.kods.netwww.kods.net/oracle-agent-ibm-software-redhat-good-price/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-agent-ibm-software-redhat-good-price/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 20:43:45+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[class software]]></category>
<category><![CDATA[enterprise class]]></category>
<category><![CDATA[multi faceted]]></category>
<category><![CDATA[high quality services]]></category>
<category><![CDATA[information technology solutions]]></category>
<category><![CDATA[oracle agent]]></category>
<category><![CDATA[jingcheng]]></category>
<category><![CDATA[oracle enterprise]]></category>
<category><![CDATA[company philosophy]]></category>
<category><![CDATA[qualification system]]></category>
<category><![CDATA[department tel]]></category>
<category><![CDATA[demand technology]]></category>
<category><![CDATA[professional application]]></category>
<category><![CDATA[company url]]></category>
<category><![CDATA[development co]]></category>
<category><![CDATA[software partners]]></category>
<category><![CDATA[development applications]]></category>
<category><![CDATA[computer manufacturers]]></category>
<category><![CDATA[blue sky]]></category>
<category><![CDATA[clear water]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-agent-ibm-software-redhat-good-price/</guid>
		<description><![CDATA[Larry Beijing Jingcheng Technology Development Co., Ltd. (hereinafter referred to Larry technology) is that the community and businesses to provide comprehensive information technology solutions for t ...]]></description>
		<content:encoded><![CDATA[Larry Beijing Jingcheng Technology Development Co., Ltd. (hereinafter referred to Larry technology) is that the community and businesses to provide comprehensive information technology solutions for the core business of high-tech enterprises. At present, there are two parts of the business - enterprise IT systems integration and sales of hardware and software products and systems research and development applications. <br /><br /> Larry Beijing Jingcheng Technology Development Co., Ltd. was founded in 2003, five million yuan registered capital. Larry Technology in Beijing in 2007 as a double soft certification companies, and in 2009 won the three-tier qualification system. <br /><br /> Company Philosophy: adhere to the technologies and services for the center to the user demand, technology and market-oriented combination provides users with a high standard of products, high-quality services. <br /><br /> As a professional application software and systems service providers, Larry and many of the world&#39;s companies are well-known computer manufacturers to form a multi-faceted cooperation, has been IBM, ORACLE, REDHAT, SYMANTEC, MICROSOFT, such as proxy from multiple vendors. <br /><br /> ORACLE enterprise-class software partners <br /><br /> IBM partners in clear water and blue sky <br /><br /> Gold Certified Partner redhat <br /><br /> Please contact us if there is demand for: <br /><br /> Larry Beijing Jingcheng Technology Development Co., Ltd. <br /><br /> Sales Department Tel :010 - 64981188 <br /><br /> Company URL: www.rozsoft.com				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/install-oracle-on-linux/" title="Install oracle on Linux">Install oracle on Linux</a> 2009-08-20 06:00:09</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-archive-is-full-delete-some-can-not-be-re-filed-after-the-dissemination-of-data-stream/" title="oracle archive is full, delete some can not be re-filed after the dissemination of data stream">oracle archive is full, delete some can not be re-filed after the dissemination of data stream</a> 2009-07-30 05:31:45</li>
					<li><a href="http://www.kods.netwww.kods.net/dba-hands-of-rational-data-architect/" title="DBA hands of Rational Data Architect">DBA hands of Rational Data Architect</a> 2009-06-18 10:34:15</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-is-willing-to-buy-7-4-billion-us-dollars-from-sun/" title="Oracle is willing to buy 7.4 billion US dollars from Sun">Oracle is willing to buy 7.4 billion US dollars from Sun</a> 2009-04-21 10:20:46</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-agent-ibm-software-redhat-good-price/</wfw:commentRss>
	</item>
		<item>
		<title>oracle background processes</title>
		<link>http://www.kods.netwww.kods.net/oracle-background-processes/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-background-processes/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 17:19:07+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[implementation]]></category>
<category><![CDATA[expression]]></category>
<category><![CDATA[parameters]]></category>
<category><![CDATA[circumstances]]></category>
<category><![CDATA[storage area]]></category>
<category><![CDATA[buffer zone]]></category>
<category><![CDATA[emergence]]></category>
<category><![CDATA[buffer storage]]></category>
<category><![CDATA[critical length]]></category>
<category><![CDATA[memory storage]]></category>
<category><![CDATA[critical parameter]]></category>
<category><![CDATA[disk blocks]]></category>
<category><![CDATA[disk buffer]]></category>
<category><![CDATA[least recently used algorithm]]></category>
<category><![CDATA[storage areas]]></category>
<category><![CDATA[write buffer]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-background-processes/</guid>
		<description><![CDATA[The function of the background process for a brief introduction: DBWR process: the process of implementation of the data files will be written into the buffer zone, buffer storage area is responsible  ...]]></description>
		<content:encoded><![CDATA[<strong>The function of the background process for a brief introduction:</strong> <br /> DBWR process: the process of implementation of the data files will be written into the buffer zone, buffer storage area is responsible for the management of an ORACLE background processes. When the buffer of a buffer is modified, it is marked as &quot;dirty&quot;, DBWR will be the main task is to &quot;dirty&quot; disk write buffer to the buffer zone to maintain &quot;clean.&quot; As the buffer storage areas fill in the database buffer dirty or user process, not by a decrease in the number of the buffer zone. When not used in the buffer zone fell to very few, so that the user process block read from disk into memory storage area can not be found when the buffer is not used, DBWR will manage the buffer storage area, so that users can not use the total process of buffer. <br /><br /> ORACLE using LRU (LEAST RECENTLY USED) algorithm (least recently used algorithm) to maintain the data in memory is the most recently used block, so that I / O minimum. Foreshadowed in the following circumstances DBWR write to the disk buffer dirty: <br /><br /> When a server process will be a buffer zone into the &quot;dirty&quot; table, the expression of the critical length dirty, the service will notify the DBWR process to write. The critical parameter is the length of DB-BLOCK-WRITE-BATCH half the value. <br /><br /> When a server process in the LRU table to find DB-BLOCK-MAX-SCAN-CNT buffer, no buffer available unused, it ceased to find and notify the DBWR to write. Emergence of overtime (three seconds each), DBWR will inform itself. When the check point, LGWR will notify DBWR. The former two cases, DBWR dirty table will be written into the disk blocks, each block can be written to initialize the parameters from DB-BLOCK-WRITE-BATCH by specified. If you do not dirty the table parameter specifies the number of buffer blocks, DBWR from LUR table to find a dirty buffer. <br /><br /> If not DBWR activity in three seconds, while there is overtime. In this case DBWR to specify the number of LRU table to find the buffer zone, will have to find any dirty buffers written to disk. Whenever there is overtime, DBWR buffer to find a new group. Find each DBWR buffer by the number of sleep parameters for the DB-BLOCK-WRITE-BATCH twice the value. Empty if the database is running, DBWR final storage area will be written into the disk buffer. <br /><br /> In the event of check points, LGWR modified to designate a buffer zone required to be written to disk. DBWR will write to the disk buffer specified. <br /><br /> In some platforms, an example may have multiple DBWR. In such cases, some can write a disk block, and some other block can be written into the disk. DB-WRITERS control parameters of the process of the number of DBWR. <br /><br /> LGWR process: the process will be written into the log buffer of a disk log file, which is responsible for managing a log buffer ORACLE background processes. LGWR process will write to the disk since the last full year of output log, LGWR output: <br /><br /> When the user when the process of submitting a written record of a submission. <br /><br /> Every three seconds to the log output buffer. <br /><br /> When the log buffer of 1 / 3 full when the log output buffer. <br /><br /> DBWR buffer zone will be changed when the disk will be written into the log output buffer. <br /><br /> LGWR process synchronously written to mirror the activities of online log file groups. If the group a file is deleted or unavailable, LGWR can continue to write other documents of the group. <br /><br /> Log buffer is a buffer cycle. When the log buffer LGWR will write to the log of the log file, the server process may be a new item into the log buffer to the log. LGWR usually write very quickly to ensure that there will always be room for the log buffer to log into the new item. <br /><br /> Note: Sometimes when the need for more when the log buffer, LWGR services in a log before items will be written, and these only when the log of affairs submitted at a later date after the permanent. <br /><br /> ORACLE submitted using the fast mechanism, when a user issued COMMIT statement, a COMMIT log record buffer Add immediately, but the corresponding change in the data buffer is delayed until more effective when they are written into the data files. When submitted to a Panel, they were assigned to a system changes its (SCN), with the transaction log of a <br /><br /> Effect recorded in the log. Since the SCN recorded in the log, resulting in parallel server configuration options, the recovery operations can take place in parallel. <br /><br /> CKPT process: the process in the checkpoint occurs, all data on the title of the document be amended to instruct the checkpoint. In normal circumstances, the task of implementation by the LGWR. However, if the checkpoint is clear that reducing system performance, the CKPT process can run, the LGWR process from the implementation of the original checkpoint separating the work, the realization by the CKPT process. For many applications, CKPT process is unnecessary. Database only when there are many data files, LGWR when the checkpoint is obviously able to reduce the performance to run CKPT. CKPT process does not write to disk blocks, the work is completed by the DBWR. <br /><br /> CHECKPOINT-PROCESS initialization parameter control to enable the CKPT process or not. When the default FALSE, which is not so. <br /><br /> SMON process: the process of implementation of examples of examples of when to start recovery, is also responsible for cleaning up the temporary segment is no longer used. With the Parallel Server option in the circumstances, SMON failure of CPU or to resume examples examples. SMON process being called up regularly to check whether there is a need, or other process of discovery can be called when necessary. <br /><br /> PMON process: the process of failure of the user when the process of implementation of the process of recovery, is responsible for clean-up inside the storage area and the release of the resources used in the process. For example: it is to reset the active transaction table, and the release of the blockade, the failure of the process ID from the activities of the process of removal of the table. PMON also periodically check the scheduling process (DISPATCHER) and the server process, and if dead, then restart (not including the intention to delete the process). <br /><br /> PMON regularly being called up to check whether there is a need, or other process of discovery can be called when necessary. <br /><br /> RECO process: the process is distributed in the option of a process used to automatically resolve the distributed transaction failures. A node RECO background process automatically connect to contain unresolved distributed transaction in the other database, RECO automatically resolve all pending matters. Have been processed in any of the corresponding pending transaction row from the database for each table by deleting the hoisting of affairs. <br /><br /> When a database server of the RECO background process of attempting to set up the same remote server communication, if the remote server is not available or when the network connection could not be established, RECO automatically after a time interval to connect again. <br /><br /> RECO background process is allowed only if the distributed transaction systems appear, and DISTRIBUTED - TRANSACTIONS parameter is greater than 0. <br /><br /> ARCH process: the process will have to fill up the online log files are copied to the designated storage devices. When the log is to use ARCHIVELOG mode and automatic archiving only exist when the ARCH process. <br /><br /> LCKn process: it is in a parallel server environment options can be up to 10 process (LCK0, LCK1 ... ..., LCK9), for example between the blockade. <br /><br /> Dnnn process (scheduling process): The process allows the user to process a limited share of the server process (SERVER PROCESS). There is no scheduling process, each user process requires a dedicated server process (DEDICATEDSERVER PROCESS). For more clues to the server (MULTI-THREADED SERVER) process to support multiple users. If in the system with a large number of users, and more clues to the server can support a large number of users, particularly in the client server environment _. <br /><br /> Examples in a database can create multiple scheduling process. Network protocol for each of at least the establishment of a scheduling process. Database Administrator in accordance with the process of the operating system can be connected to each restriction on the number of the scheduler decided to start a few of the best in the run-time instance of scheduling the process to increase or delete. Need more clues to the server SQL * NET version 2 or later versions. Clues in a multi-server configuration, a network process to wait for the receiver client application connection requests, and each sent to a dispatching process. If the client application can not be connected to a scheduling <br /><br /> Process, the network receiver process will start a dedicated server process. The network receiver process is not an integral part of ORACLE instance, it is to deal with the network ORACLE process. In the example starts, the network receiver is opened, for the user to connect to ORACLE to establish a communication path, and then a scheduling process for each connection request to the scheduling process to give it the address of the receiver. When a user process even <br /><br /> Access request, the network analysis of the receiver process the request and decide whether or not the user can use a scheduling process. If so, the process of the network to return to the receiver&#39;s address scheduling process, the process after the user to connect directly to the scheduling process. Some users can not process scheduling process communications (if you are using SQL * NET users of previous versions), the network receiver process so users can not connect to a scheduling process. In this case, the network receiver to establish a dedicated server process, to establish a suitable connection.				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/using-sql-trace-and-tkprof/" title="Using SQL TRACE and TKPROF">Using SQL TRACE and TKPROF</a> 2009-02-26 21:36:37</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-background-processes/</wfw:commentRss>
	</item>
		<item>
		<title>perl export data</title>
		<link>http://www.kods.netwww.kods.net/perl-export-data/</link>
		<comments>http://www.kods.netwww.kods.net/perl-export-data/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 06:30:14+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[configuration file]]></category>
<category><![CDATA[dict]]></category>
<category><![CDATA[pl]]></category>
<category><![CDATA[lt]]></category>
<category><![CDATA[export data]]></category>
<category><![CDATA[existence]]></category>
<category><![CDATA[cn]]></category>
<category><![CDATA[export table]]></category>
<category><![CDATA[auxiliary data]]></category>
<category><![CDATA[return str]]></category>
<category><![CDATA[table tool]]></category>
<category><![CDATA[open input]]></category>
<category><![CDATA[struct]]></category>
<category><![CDATA[perl]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/perl-export-data/</guid>
		<description><![CDATA[Wrote a user to export the data in the following table tool rn rn Use the following rn . / expdp.pl rn hbjxzl.cublog.cn auxiliary Data Utility Version 1.0.0 rn This script will auxiliary data and stru ...]]></description>
		<content:encoded><![CDATA[Wrote a user to export the data in the following table tool <br /> rn <br /><br /> rn <br /> Use the following <br /> rn <br /> . / expdp.pl <br /> rn <br /> hbjxzl.cublog.cn auxiliary Data Utility Version 1.0.0 <br /> rn <br /> This script will auxiliary data and struct. <BR> -h - Give help screen <BR> -E - for export dict <BR> -D export - for export dict&#39;s data <BR> -T drop - for export table&#39;s data <BR> Examples: <BR> auxiliary.pl-h / H <BR> auxiliary.pl-e / E <BR> auxiliary.pl-d / D <BR> auxiliary.pl-t / T <br /> rn <br /> Also need a configuration file <br /> rn <br /><br /> rn <br /> [oracle @ localhost DBD] $ cat exp.dict <BR> dsg.test # owner here is the user may also be users. the existence of the forms. <br /> rn <br /><br /> rn <br /><br /> rn <TABLE border=1 cellSpacing=0 borderColor=#999999 cellPadding=0 width="95%" bgColor=#f1f1f1> rn <TBODY> rn <TR> rn <TD> rn <br /> <CODE>#!/usr/bin/perl <BR><BR># dbusers - manage MySQL user table<BR><BR>use ExtUtils::testlib;<BR><BR>use Getopt::Long;<BR>use Config;<BR>use Getopt::Std;<BR>use Oraperl;<BR>$dbname="dsg";<BR>$dbuser="dsg";<BR>$dbpasswd="dsg";<BR>format HEADER =<BR><BR> hbjxzl.cublog.cn auxiliary Data Utility Version 1.0.0<BR><BR> This script will auxiliary data and struct. <BR> -h - Give help screen<BR> -E - for export dict <BR> -D export - for export dict's data<BR> -T drop - for export table's data<BR> Examples:<BR>   auxiliary.pl -h/H<BR>   auxiliary.pl -e/E<BR>   auxiliary.pl -d/<FONT color=#000000>D</FONT><BR>   auxiliary.pl -t/T<BR>.<BR><BR>sub do_help {<BR>  # Give help screen and exit<BR><BR>  $~ = "HEADER";<BR>  write;<BR>  exit();<BR>}<BR><BR>sub replace_null_to_{<BR>  $str=shift;<BR>  if($str){<BR>   $str =~ s/ /_/g;<BR>  }<BR>  return $str;<BR>}<BR><BR>sub replace_enter_to_{<BR>  $str=shift;<BR>  if($str){<BR>   $str =~ s/\n//g;<BR>  }<BR>  return $str;<BR>}<BR><BR>sub write_file{<BR>  $put_name=shift;<BR>  $put_trunc_name=shift;<BR>  $put_drop_name=shift;<BR>  open(OUTPUT, "&gt; $put_name ")<BR>    or die "Couldn't open $put_name for write: $!\n";<BR>  if ($put_trunc_name){<BR>    open(TRUNCATE_OUTPUT, "&gt; $put_trunc_name ")<BR>      or die "Couldn't open $put_trunc_name for write: $!\n";<BR>  }<BR>  if ($put_drop_name){<BR>    open(DROP_OUTPUT, "&gt; $put_drop_name ")<BR>      or die "Couldn't open $put_drop_name for write: $!\n";<BR>  }<BR>}<BR>sub close_write_file{<BR>  close(OUTPUT);<BR>  close(TRUNCATE_OUTPUT);<BR>  close(DROP_OUTPUT);<BR>}<BR><BR>sub read_file{<BR>  $get_name=shift;<BR>  open(INPUT, "&lt; $get_name ")<BR>    or die "Couldn't open $put_name for read: $!\n";<BR>}<BR><BR>sub close_read_file{<BR>  close(INPUT);<BR>}<BR><BR>sub connect_db{<BR>    my $dbname=shift;<BR>    my $dbuser=shift;<BR>    my $dbpasswd=shift;<BR>    #print " test dbname is ",$dbname," user is ", $dbuser," passwd is ", $dbpasswd,"\n";<BR><BR>    $dbh = DBI-&gt;connect("dbi:Oracle:$dbname", $dbuser,$dbpasswd,{ RaiseError=&gt;1 });<BR>    $dbh-&gt;{LongReadLen} = 512 * 1024;<BR>    return $dbh;<BR>}<BR><BR>sub dis_connect_db{<BR>    $dbh-&gt;disconnect;<BR>}<BR>sub print_array{<BR>   my @cfg_lines=split(" ",$_);<BR>   foreach (@cfg_lines){<BR>      print $_,"\t";<BR>   }<BR>   print "\n";<BR>   return @cfg_lines;<BR>}<BR><BR>sub obj_sql{<BR>  my $sql_code=shift;<BR>  my $get_sql="";<BR>  if($sql_code ==1){<BR>    $get_sql="select owner,table_name,column_name,data_type,data_length from dba_tab_columns where owner = ? and table_name = ? "; <BR> #for all table's column<BR><BR>  }elsif($sql_code==2){<BR>    $get_sql="select owner,table_name from dba_tables where owner like ? and cluster_name is null and iot_type is null";<BR>  }elsif($sql_code==3){<BR>  }<BR>  return $get_sql;<BR>}<BR><BR>sub tab_col_sql{<BR>  my $exp_owner=shift;<BR>  my $exp_tab =shift;<BR>  my $exp_dict_file=lc shift;<BR>  my $select_col="";<BR>  #print "&gt;&gt;test exp_owner is ",uc $exp_owner,"\n";<BR><BR>  #print "&gt;&gt;test exp_tab is ",$exp_tab,"\n";<BR><BR>  #print "&gt;&gt;test exp_dict_file is ",$exp_dict_file,"\n";<BR><BR>  open(INPUT_COL,"&lt; $exp_dict_file") or die "Couldn't open $exp_dict_file for read: $!\n";<BR>    while(&lt;INPUT_COL&gt;){<BR>      chomp;<BR>      @line_raw=split(" ",$_);<BR>      $exp_tab =~ s/\$/\_/g;<BR>      $exp_owner =~ s/\$/\_/g;<BR>      #print "exp_tab is ",$exp_tab,"\n";<BR><BR>      $match_var=$line_raw[0];<BR>      $match_var =~ s/\$/\_/g;<BR>      if( $match_var =~ m/\"$exp_owner\"\.\"$exp_tab\"/ ){<BR>         $select_col=join(",",$select_col,$line_raw[1]);<BR>      # print "Test select col ",$select_col,"\n";<BR>      }<BR>    }<BR>    $select_col=substr($select_col,1,length($select_col)-1);<BR>   #print "test select col ",$select_col,"\n";<BR>  close(INPUT_COL);<BR>  return $select_col;<BR>}<BR><BR>sub tab_dict{<BR>    my $dbh = shift;<BR>    my $tab_owner= shift;<BR>    my $tab_name = shift;<BR>    my $obj_type= shift;<BR>    my $get_obj_sql;<BR>    $put_file_name=lc join(".",$tab_owner,$tab_name,"dmp");<BR>    if($obj_type==1){<BR>      $get_obj_sql=&amp;obj_sql($obj_type);<BR>    }elsif($obj_type==2){<BR>      my $read_file=join(".",$tab_owner,"dict");<BR>      $get_obj_sql=&amp;tab_col_sql(uc $tab_owner,uc $tab_name,$read_file);<BR>      $get_obj_sql=join(" ","select",$get_obj_sql,"from",$tab_owner);<BR>      $get_obj_sql=join(".",$get_obj_sql,$tab_name);<BR>      #print $get_obj_sql,"\n";<BR>    }<BR>    my $sth = $dbh-&gt;prepare($get_obj_sql);<BR>    if($obj_type==1){<BR>       $sth-&gt;execute($tab_owner,$tab_name);<BR>    }elsif($obj_type==2){<BR>       $sth-&gt;execute;<BR>    }<BR>    $tab_text="";<BR>    <BR>    if($obj_type==2){<BR>      open(OUT_PUT, "&gt; $put_file_name ")<BR>        or die "Couldn't open $put_file_name for write: $!\n";<BR>    }<BR>    while (my @row= $sth-&gt;fetchrow){<BR>       my $arr_len=scalar @row;<BR>       if($obj_type==2){<BR>           for($i = 0 ; $i &lt; $arr_len ; $i ++){<BR>             print OUT_PUT $row[$i],"\t";<BR>           }<BR>         print OUT_PUT "\n";<BR>       }else{<BR>         $tab_text=join("\"",$tab_text,$row[0]);<BR>         $tab_text=join("\".\"",$tab_text,$row[1]);<BR>         $tab_text=join("\"\t\"",$tab_text,$row[2]);<BR>         $tab_text=join("\"\t",$tab_text,$row[3]);<BR>         if ($row[3] =~ m/NUMBER/ || $row[3] =~ m/CHAR/ || $row[3] =~ m/ROW/){<BR>           $tab_text=join("(",$tab_text,$row[4]);<BR>           $tab_text=join(")",$tab_text,"");<BR>         }<BR>             $tab_text=join("\n",$tab_text,"");<BR>       }<BR>     }<BR>     $sth-&gt;finish();<BR>    if($obj_type==1){<BR>      print OUTPUT "="x60,"\n";<BR>      print OUTPUT $tab_text;<BR>    }elsif($obj_type==2){<BR>      close(OUT_PUT);<BR>    }<BR>}<BR><BR>sub owner_all_tab{<BR>    my $dbh =shift;<BR>    my $exp_own =shift; <BR>    my $oper_p =shift; <BR>    my $get_obj_sql=&amp;obj_sql(2);<BR>    #print "test exp_owner is ",uc $exp_own,"\n";<BR>    #print "test get_obj_sql is ",$get_obj_sql,"\n";<BR>    my $sth = $dbh-&gt;prepare($get_obj_sql);<BR>       $sth-&gt;execute($exp_own);<BR>    my $exp_process_num=0;<BR>    while (@row= $sth-&gt;fetchrow){<BR>       print $row[0],"\t",$row[1]," Please waiting....";<BR>       &amp;tab_dict($dbh,$row[0],$row[1],$oper_p);<BR>       $exp_process_num++;<BR>       print " over \n";<BR>    }<BR>       $sth-&gt;finish();<BR>    print "\n";<BR>}<BR><BR>sub oper_from_file{<BR> $oper_p =shift;<BR> &amp;connect_db($dbname,$dbuser,$dbpasswd);<BR>  &amp;read_file("exp.dict") or die "Cannot get exp.dict for reading !"; <BR>    while(&lt;INPUT&gt;){<BR>     chomp;<BR>     if(/^\s*#/ or /^\s*$/){<BR>        next;<BR>      }<BR>     s/\s*#.*//;<BR>     tr/\t //d;<BR>    my @exp_dict= split /\./;<BR>    my $exp_owner=$exp_dict[0];<BR>    my $exp_tab=$exp_dict[1];<BR>    my $exp_dict_file =join(".",$exp_owner,"dict");<BR>    #print "oper is ",$oper_p," exp_owner is ",$exp_owner," exp_dict_file is ",$exp_dict_file,"\n";<BR>     if ($oper_p==1){<BR>       &amp;write_file($exp_dict_file);<BR>       &amp;owner_all_tab($dbh,uc $exp_owner,$oper_p);<BR>       &amp;close_write_file;<BR>     }elsif($oper_p == 2){<BR>       &amp;owner_all_tab($dbh,uc $exp_owner,$oper_p);<BR>     }elsif($oper_p==3){<BR>       #my $put_file_name=join(".",$exp_owner,$exp_tab,"dat");<BR>       #print "exp_owner is $exp_dict[0]\t exp_tab is ",$exp_tab,"\t",$put_file_name,"\n" ,<BR>       #print "Exp table's data!\n";<BR>       &amp;tab_dict($dbh,$exp_owner,$exp_tab,2);<BR>     }<BR>   }<BR>  &amp;close_read_file;<BR>  &amp;dis_connect_db(); <BR>}<BR><BR>sub do_opts{<BR>  %options=();<BR>  getopts("eEdDtThH",\%options);<BR>  &amp;do_help if ($options{h} or $options{H});<BR>  # like the shell getopt, "d:" means d takes an argument<BR>  if (defined $options{e}){<BR>     &amp;oper_from_file(1);<BR>  }elsif(defined $options{E}){<BR>     &amp;oper_from_file(1);<BR>  }elsif( defined $options{d}){<BR>     &amp;oper_from_file(2);<BR>  }elsif( defined $options{D}){<BR>     &amp;oper_from_file(2);<BR>  }elsif( defined $options{t}){<BR>     &amp;oper_from_file(3);<BR>  }elsif( defined $options{T}){<BR>     &amp;oper_from_file(3);<BR>  }elsif( defined $options{h}){<BR>     $do_help;<BR>  }elsif( defined $options{H}){<BR>     $do_help;<BR>  }else{<BR>    print "test opts Err:\n";<BR>  }<BR>}<BR><BR>$argv=scalar @ARGV; <BR>#print "test argv is :",$argv,"\n</CODE> <br /><br /></TD></TR></TBODY></TABLE>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/high-availability-oracle-flashback/" title="High Availability Oracle Flashback">High Availability Oracle Flashback</a> 2009-02-26 17:23:02</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/perl-export-data/</wfw:commentRss>
	</item>
		<item>
		<title>oracle archive is full, delete some can not be re-filed after the dissemination of data stream</title>
		<link>http://www.kods.netwww.kods.net/oracle-archive-is-full-delete-some-can-not-be-re-filed-after-the-dissemination-of-data-stream/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-archive-is-full-delete-some-can-not-be-re-filed-after-the-dissemination-of-data-stream/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 05:31:45+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[pl sql]]></category>
<category><![CDATA[target]]></category>
<category><![CDATA[colleagues]]></category>
<category><![CDATA[resumption]]></category>
<category><![CDATA[dissemination]]></category>
<category><![CDATA[propagation]]></category>
<category><![CDATA[adm]]></category>
<category><![CDATA[treasury]]></category>
<category><![CDATA[queue]]></category>
<category><![CDATA[oracle error]]></category>
<category><![CDATA[remote access]]></category>
<category><![CDATA[rf]]></category>
<category><![CDATA[oracle archive]]></category>
<category><![CDATA[oracle enterprise]]></category>
<category><![CDATA[data terminal]]></category>
<category><![CDATA[dead horse]]></category>
<category><![CDATA[data stream]]></category>
<category><![CDATA[medicine]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-archive-is-full-delete-some-can-not-be-re-filed-after-the-dissemination-of-data-stream/</guid>
		<description><![CDATA[Last night the Treasury found that the target stream archive full, 100%, the archive log oracle error is reported directly on the deletion of part of the documents in the archives, With pl / sql login ...]]></description>
		<content:encoded><![CDATA[Last night the Treasury found that the target stream archive full, 100%, the archive log oracle error is reported directly on the deletion of part of the documents in the archives, <br /><br /><table border=1 cellspacing=0 bordercolor=#999999 cellpadding=0 width="95%" bgcolor=#f1f1f1><tbody><tr><td><br /> <code><FONT face=NSimsun>ls -rht|head -n 100|xargs rm -rf</FONT></code> <br /><br /></td></tr></tbody></table><br /><br /> With pl / sql login, the error did not, and never seriously. <br /><br /> This morning one of my colleagues say I do not update data, landing data terminal is a look yesterday, it is estimated that the problem of stream synchronization, <br /><br /> Quickly open the computer, remote access to the room, open oracle enterprise console manage, view the capture state <br /><br /><table border=1 cellspacing=0 bordercolor=#999999 cellpadding=0 width="95%" bgcolor=#f1f1f1><tbody><tr><td><br /> <code><FONT face=NSimsun>select status from dba_capture</FONT></code> <br /><br /></td></tr></tbody></table><br /><br /> enable the state are normal, look at the state apply <br /><br /><table border=1 cellspacing=0 bordercolor=#999999 cellpadding=0 width="95%" bgcolor=#f1f1f1><tbody><tr><td><br /> <code>select status from dba_apply</code> <br /><br /></td></tr></tbody></table><br /> enable a state of normal <br /><br /> Look at the propagation, there are reported 16 errors, see the error content is archive err, on the scheduling in the resumption of propagation, then restart the capture <br /><br /> In terms of propagation, the error is still the number 16, but also to increase the number of queue <br /><br /> Again apply, has been idle state, apply a few had not been increased, or apply no restart, apply a few have been 0 <br /><br /> Carefully considered unreasonable ah, into the queue has been to increase the number, but do not apply the data received, stream where mass is definitely the problem or propagation <br /><br /> Queue will not be the problem? To restart the capture queue here, another capture, then apply to restart the queue, open apply, apply a few or 0, then it would not be a question of queue <br /><br /> And then look back propagation, although a few have been to increase the queue, but they are not spread to apply <br /><br /> Helpless, living dead horse Madang medicine, and had no choice but to stop capture, try to initialize propagation, and even if there is data loss do to remedy the damage, it is important to let the new data over the past <br /><br /><table border=1 cellspacing=0 bordercolor=#999999 cellpadding=0 width="95%" bgcolor=#f1f1f1><tbody><tr><td><br /> <code><FONT face=NSimsun>BEGIN<BR>   DBMS_CAPTURE_ADM.STOP_CAPTURE(CAPTURE_NAME =&gt; 'CAPTURE_MAIN');<BR>   DBMS_PROPAGATION_ADM.STOP_PROPAGATION(</FONT></code> <br /><br /> <code><FONT face=NSimsun>                  PROPAGATION_NAME=&gt;'PROPAGATION_MAIN',</FONT></code> <br /><br /> <code><FONT face=NSimsun>                  FORCE=&gt;TRUE);<BR>   DBMS_PROPAGATION_ADM.START_PROPAGATION(</FONT></code> <br /><br /> <code><FONT face=NSimsun>                  PROPAGATION_NAME=&gt;'PROPAGATION_MAIN');<BR>END;</FONT></code> <br /><br /></td></tr></tbody></table><br /><br /> Manually open the capture, see propagation, well, no errors, or apply a look at, apply the number has been increasing, and finally normal <br /><br /> The new data, such as mass over the last after the next data on both sides, there is no loss of data, the exception handling on the end of the <br /><br /> PS: <br /><br /> Since the archive is full, resulting in the dissemination of data stream can not be normal <br /><br /> After filing to remove part of the normal work of the oracle are, stream will not automatically resume the <br /><br /> stream is really very fragile and can not toss ah				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-archive-is-full-delete-some-can-not-be-re-filed-after-the-dissemination-of-data-stream/</wfw:commentRss>
	</item>
		<item>
		<title>oracle10g fine-grained auditing</title>
		<link>http://www.kods.netwww.kods.net/oracle10g-fine-grained-auditing/</link>
		<comments>http://www.kods.netwww.kods.net/oracle10g-fine-grained-auditing/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 05:25:46+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle 10g]]></category>
<category><![CDATA[select statement]]></category>
<category><![CDATA[test data]]></category>
<category><![CDATA[job]]></category>
<category><![CDATA[constraint]]></category>
<category><![CDATA[salary]]></category>
<category><![CDATA[conn]]></category>
<category><![CDATA[bind variables]]></category>
<category><![CDATA[dml]]></category>
<category><![CDATA[object schema]]></category>
<category><![CDATA[audit logs]]></category>
<category><![CDATA[audit records]]></category>
<category><![CDATA[strategy statement]]></category>
<category><![CDATA[table c]]></category>
<category><![CDATA[audit trail]]></category>
<category><![CDATA[opts]]></category>
<category><![CDATA[auditing]]></category>
<category><![CDATA[fga]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle10g-fine-grained-auditing/</guid>
		<description><![CDATA[Test the success of their own examples: sqlplus / nolog conn / as sysdba begin dbms_fga.add_policy ( object_schema =&gt; &#39;system&#39;, # # # # program name object_name =&gt; &#39;nbstutb&#39;, # # ...]]></description>
		<content:encoded><![CDATA[Test the success of their own examples: <br /><br /> sqlplus / nolog <br /> conn / as sysdba <br /><br /> begin <br /> dbms_fga.add_policy ( <br /> object_schema =&gt; &#39;system&#39;, # # # # program name <br /> object_name =&gt; &#39;nbstutb&#39;, # # # # Table name <br /> policy_name =&gt; &#39;nbstu&#39;, # # # # Since the definition of the strategy <br /> statement_types =&gt; &#39;SELECT, DELETE, INSERT, UPDATE&#39; <br /> ); <br /> end; <br /> / <br /><br /> Removal of test data: removal of fine-grained audit of the audit records: <br /><br /> sqlplus / nolog <br /><br /> conn / as sysdba <br /><br /> delete sys.fga_log $; <br /> commit; <br /><br /><h3> ORACLE <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0"> 10g </st1:chmetcnv> Fine-grained auditing <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></h3><br /> <strong>ORACLE</strong> <st1:chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0"> <strong>10g</strong> </st1:chmetcnv> In fine-grained auditing <strong>(FGA)</strong> has made a lot of expansion. Fine-grained audit <strong>9i</strong> only supports the <strong>SELECT</strong> statement, and <st1:chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0"> <strong>10g</strong> </st1:chmetcnv> <strong>DML</strong> provides support (support for <strong>Insert, Update</strong> and <strong>Delete, Merge</strong> is not an independent statement of the <strong>DML).</strong> <o:p></o:p><br /><br /><st1:chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0"> <strong>10g</strong> </st1:chmetcnv> Not only the fine-grained auditing to audit a related field can be audited on a number of fields. <strong>Audit_column_opts</strong> can be set up in <strong>dbms_fga.all_columns</strong> or <strong>dbms_fga.any_columns.</strong> <o:p></o:p><br /><br /> Audit logs can be <strong>SQL</strong> text and bind variables into the <strong>LO</strong> B field. If the cost of the audit is too large, you can shut down the information written into the <strong>LOB.</strong> <o:p></o:p><br /><br /> The following is a <st1:chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0"> <strong>10G</strong> </st1:chmetcnv> <strong>DBMS_FGA.ADD_POLICY</strong> example, one can see the fine-grained auditing and 9i are very different: <o:p></o:p><br /><br /> dbms_fga.add_policy (object_schema =&gt; &#39;PIET&#39;, object_name =&gt; &#39;EMP&#39;, <o:p></o:p><br /><br /> policy_name =&gt; &#39;MYPOLICY1&#39;, audit_condition =&gt; NULL, <o:p></o:p><br /><br /> audit_column =&gt; &#39;SALARY, COMMISSION_PCT&#39;, <o:p></o:p><br /><br /> audit_column_opts =&gt; DBMS_FGA.ALL_COLUMNS, <o:p></o:p><br /><br /> audit_trail =&gt; DBMS_FGA.DB_EXTENDED, <o:p></o:p><br /><br /> statement_types =&gt; &#39;INSERT, UPDATE&#39;); <o:p></o:p><br /><br /><font face="Times New Roman">     </font> An example the following <font face="Times New Roman">INSERT</font> presentation of the audit process: <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; connect piet / piet <o:p></o:p><br /><br /> Connected. <o:p></o:p><br /><br /> SQL&gt; CREATE TABLE EMP ( <o:p></o:p><br /><br /> EMPNO NUMBER (4) NOT NULL, <o:p></o:p><br /><br /> ENAME VARCHAR2 (10), <o:p></o:p><br /><br /> JOB VARCHAR2 (9), <o:p></o:p><br /><br /> MGR NUMBER (4) CONSTRAINT EMP_SELF_KEY REFERENCES EMP (EMPNO), <o:p></o:p><br /><br /> HIREDATE DATE, <o:p></o:p><br /><br /> SAL NUMBER (7,2), <o:p></o:p><br /><br /> COMM NUMBER (7,2), <o:p></o:p><br /><br /> DEPTNO NUMBER (2) NOT NULL, <o:p></o:p><br /><br /> CONSTRAINT EMP_PRIMARY_KEY PRIMARY KEY (EMPNO)); <o:p></o:p><br /><br /><o:p></o:p><br /><br /> Table created. <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; INSERT INTO EMP VALUES (7839, &#39;KING&#39;, &#39;PRESIDENT&#39;, NULL,&#39;17-NOV-81 &#39;, 5000, NU; <o:p></o:p><br /><br /> 1 row created. <o:p></o:p><br /><br /> SQL&gt; grant all on emp to miller; <o:p></o:p><br /><br /> Grant succeeded. <o:p></o:p><br /><br /> SQL&gt; conn system / manager <o:p></o:p><br /><br /> SQL&gt; execute sys.DBMS_FGA.ADD_POLICY (-- <o:p></o:p><br /><br /> object_schema =&gt; &#39;PIET&#39;, -- <o:p></o:p><br /><br /> object_name =&gt; &#39;EMP&#39;, -- <o:p></o:p><br /><br /> policy_name =&gt; &#39;mypolicy1&#39;, -- <o:p></o:p><br /><br /> audit_condition =&gt; &#39;sal &lt;1000&#39;, -- <o:p></o:p><br /><br /> audit_column =&gt; &#39;comm&#39;, -- <o:p></o:p><br /><br /> enable =&gt; TRUE, -- <o:p></o:p><br /><br /> statement_types =&gt; &#39;INSERT&#39;); <o:p></o:p><br /><br /><o:p></o:p><br /><br /> PL / SQL procedure successfully completed. <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; select * from DBA_AUDIT_POLICY_COLUMNS; <o:p></o:p><br /><br /><o:p></o:p><br /><br /> OBJECT_SCHEMA OBJECT_NAME <o:p></o:p><br /><br /> ------------------------------ -------------------- ---------- <o:p></o:p><br /><br /> POLICY_NAME POLICY_COLUMN <o:p></o:p><br /><br /> ------------------------------ -------------------- ---------- <o:p></o:p><br /><br /> PIET EMP <o:p></o:p><br /><br /> MYPOLICY1 COMM <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; select OBJECT_SCHEMA, OBJECT_NAME, POLICY_NAME, POLICY_TEXT, <o:p></o:p><br /><br /> POLICY_COLUMN, ENABLED, SEL, INS, <st1:place w:st="on"><st1:city w:st="on"> UPD </st1:city> , <st1:state w:st="on"> DEL </st1:state></st1:place><o:p></o:p><br /><br /> from DBA_AUDIT_POLICIES; <o:p></o:p><br /><br /><o:p></o:p><br /><br /> <font face=宋体>OBJECT_SCHEMA OBJECT_NAME POLICY_NAME POLICY_TEXT POLICY_COLUMN ENA SEL INS UPD</font> <st1:state w:st="on"><st1:place w:st="on"> <font face=宋体>DEL</font> </st1:place></st1:state><o:p></o:p><br /><br /> <font face=宋体>------------- ----------- ----------- ----------- ---- --------- --- --- --- --- ---</font> <o:p></o:p><br /><br /> <font face=宋体>PIET EMP MYPOLICY1 sal &lt;1000 COMM YES NO YES NO NO</font> <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; conn miller / miller <o:p></o:p><br /><br /> Connected. <o:p></o:p><br /><br /> The following example is inserted into a <strong>sal</strong> a record of less than <strong>1000,</strong> in line with audit requirements: <o:p></o:p><br /><br /> SQL&gt; INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (1000, &#39;SAM&#39;, 800, 15, 10); <o:p></o:p><br /><br /> 1 row created. <o:p></o:p><br /><br /> Insert the following example of a <strong>sal</strong> more than <strong>1000</strong> records, do not meet the conditions of the audit: <o:p></o:p><br /><br /> SQL&gt; INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (3000, &#39;TOM&#39;, 20000, 1000, 20); <o:p></o:p><br /><br /> 1 row created. <o:p></o:p><br /><br /> Insert the following statement does not contain a field audit, non-audit: <o:p></o:p><br /><br /> SQL&gt; INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, DEPTNO) <o:p></o:p><br /><br /> VALUES (1111, &#39;RAMA&#39;, 98,30); <o:p></o:p><br /><br /> 1 row created. <o:p></o:p><br /><br /> SQL&gt; commit; <o:p></o:p><br /><br /> Commit complete. <o:p></o:p><br /><br /> Click below to verify the results of the audit: <o:p></o:p><br /><br /> conn system / manager <o:p></o:p><br /><br /> SQL&gt; select DB_USER, OBJECT_SCHEMA &quot;SCHEMA&quot;, OBJECT_NAME, <o:p></o:p><br /><br /> POLICY_NAME, SQL_TEXT <o:p></o:p><br /><br /> from dba_fga_audit_trail; <o:p></o:p><br /><br /><o:p></o:p><br /><br /><o:p></o:p><br /><br /> <font face=宋体>DB_USER SCHEMA OBJECT</font> POLICY_NAME <o:p></o:p><br /><br /> <font face=宋体>-------- -------- ------ ---------------------------- --</font> <o:p></o:p><br /><br /> <font face=宋体>SQL_TEXT</font> <o:p></o:p><br /><br /> <font face=宋体>-------------------------------------------------- -----</font> <o:p></o:p><br /><br /> <font face=宋体>MILLER PIET EMP MYPOLICY1</font> <o:p></o:p><br /><br /> <font face=宋体>INSERT INTO</font> PIET.EMP <font face=宋体>(EMPNO, ENAME, SAL, COMM, DEPTNO)</font> <o:p></o:p><br /><br /> <font face=宋体>VALUES (1000, &#39;SAM&#39;, 800, 15, 10)</font> <o:p></o:p><br /><br /> The following examples demonstrate that contains the function <strong>(sysdate, uid, user, round,</strong> etc.) of the audit: <o:p></o:p><br /><br /> execute dbms_fga.drop_policy (object_schema =&gt; &#39;PIET&#39;, -- <o:p></o:p><br /><br /> object_name =&gt; &#39;EMP&#39;, -- <o:p></o:p><br /><br /> policy_name =&gt; &#39;mypolicy1&#39;); <o:p></o:p><br /><br /> SQL&gt; execute sys.DBMS_FGA.ADD_POLICY (-- <o:p></o:p><br /><br /> object_schema =&gt; &#39;PIET&#39;, -- <o:p></o:p><br /><br /> object_name =&gt; &#39;EMP&#39;, -- <o:p></o:p><br /><br /> policy_name =&gt; &#39;mypolicy1&#39;, -- <o:p></o:p><br /><br /> audit_condition =&gt; &#39;round (sal, -2)&gt; = 3000&#39;, -- <o:p></o:p><br /><br /> audit_column =&gt; &#39;comm&#39;, -- <o:p></o:p><br /><br /> enable =&gt; TRUE, -- <o:p></o:p><br /><br /> statement_types =&gt; &#39;INSERT&#39;); <o:p></o:p><br /><br /> PL / SQL procedure successfully completed. <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; connect miller / miller <o:p></o:p><br /><br /> Connected. <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (5000, &#39;RUDY&#39;, 2979, 15, 10); <o:p></o:p><br /><br /> 1 row created. <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; commit; <o:p></o:p><br /><br /> Commit complete. <o:p></o:p><br /><br /><font face="Times New Roman">    </font> Now to verify what the audit findings: <o:p></o:p><br /><br /> conn system / manager <o:p></o:p><br /><br /> SQL&gt; select DB_USER, OBJECT_SCHEMA &quot;SCHEMA&quot;, OBJECT_NAME, <o:p></o:p><br /><br /> POLICY_NAME, SQL_TEXT <o:p></o:p><br /><br /> from dba_fga_audit_trail; <o:p></o:p><br /><br /> DB_USER SCHEMA OBJECT POLICY_NAME <o:p></o:p><br /><br /> -------- -------- ------ ---------------------------- -- <o:p></o:p><br /><br /> SQL_TEXT <o:p></o:p><br /><br /> -------------------------------------------------- ----- <o:p></o:p><br /><br /> MILLER PIET EMP MYPOLICY1 <o:p></o:p><br /><br /> INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (1000, &#39;SAM&#39;, 800, 15, 10) <o:p></o:p><br /><br /><o:p></o:p><br /><br /> MILLER PIET EMP MYPOLICY1 <o:p></o:p><br /><br /> INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (5000, &#39;RUDY&#39;, 2979, 15, 10) <o:p></o:p><br /><br /><o:p></o:p><br /><br /><o:p></o:p><br /><br /> The following is an audit of the use of <strong>user</strong> functions: <o:p></o:p><br /><br /><o:p></o:p><br /><br /> execute dbms_fga.drop_policy (object_schema =&gt; &#39;PIET&#39;, -- <o:p></o:p><br /><br /> object_name =&gt; &#39;EMP&#39;, -- <o:p></o:p><br /><br /> policy_name =&gt; &#39;mypolicy1&#39;); <o:p></o:p><br /><br /><o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; execute sys.DBMS_FGA.ADD_POLICY (-- <o:p></o:p><br /><br /> object_schema =&gt; &#39;PIET&#39;, -- <o:p></o:p><br /><br /> object_name =&gt; &#39;EMP&#39;, -- <o:p></o:p><br /><br /> policy_name =&gt; &#39;mypolicy1&#39;, -- <o:p></o:p><br /><br /> audit_condition =&gt; &#39;ename = USER&#39;, -- <o:p></o:p><br /><br /> audit_column =&gt; &#39;comm&#39;, -- <o:p></o:p><br /><br /> enable =&gt; TRUE, -- <o:p></o:p><br /><br /> statement_types =&gt; &#39;INSERT&#39;); <o:p></o:p><br /><br /> PL / SQL procedure successfully completed. <o:p></o:p><br /><br /> SQL&gt; connect miller / miller <o:p></o:p><br /><br /> Connected. <o:p></o:p><br /><br /> SQL&gt; conn piet / piet <o:p></o:p><br /><br /> Connected. <o:p></o:p><br /><br /> SQL&gt; INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (89, &#39;MILLER&#39;, 800, 1000, 10); <o:p></o:p><br /><br /> 1 row created. <o:p></o:p><br /><br /> SQL&gt; commit; <o:p></o:p><br /><br /> Commit complete. <o:p></o:p><br /><br /><o:p></o:p><br /><br /> SQL&gt; conn miller / miller <o:p></o:p><br /><br /> Connected. <o:p></o:p><br /><br /> SQL&gt; INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (69, &#39;MILLER&#39;, 700, 700, 10); <o:p></o:p><br /><br /> 1 row created. <o:p></o:p><br /><br /> SQL&gt; commit; <o:p></o:p><br /><br /> Commit complete. <o:p></o:p><br /><br /><font face="Times New Roman">    </font> Just to test the audit findings: <o:p></o:p><br /><br /> con system / manager <o:p></o:p><br /><br /> SQL&gt; select DB_USER, OBJECT_SCHEMA &quot;SCHEMA&quot;, OBJECT_NAME, <o:p></o:p><br /><br /> POLICY_NAME, SQL_TEXT <o:p></o:p><br /><br /> from dba_fga_audit_trail; <o:p></o:p><br /><br /> DB_USER SCHEMA OBJECT POLICY_NAME <o:p></o:p><br /><br /> -------- -------- ------ ---------------------------- -- <o:p></o:p><br /><br /> SQL_TEXT <o:p></o:p><br /><br /> -------------------------------------------------- ----- <o:p></o:p><br /><br /> MILLER PIET EMP MYPOLICY1 <o:p></o:p><br /><br /> INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (1000, &#39;SAM&#39;, 800, 15, 10) <o:p></o:p><br /><br /><o:p></o:p><br /><br /> MILLER PIET EMP MYPOLICY1 <o:p></o:p><br /><br /> INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (5000, &#39;RUDY&#39;, 2979, 15, 10) <o:p></o:p><br /><br /><o:p></o:p><br /><br /> MILLER PIET EMP MYPOLICY1 <o:p></o:p><br /><br /> INSERT INTO PIET.EMP (EMPNO, ENAME, SAL, COMM, DEPTNO) <o:p></o:p><br /><br /> VALUES (69, &#39;MILLER&#39;, 800, 1000, 10) <br /><br /> . . . . . . . . . . . . . . . . . . . . <br /><br /> dbms_fga.add_policy ( <br /> object_schema =&gt; &#39;PIET&#39;, <br /> object_name =&gt; &#39;EMP&#39;, <br /> policy_name =&gt; &#39;MYPOLICY1&#39;, <br /> audit_condition =&gt; NULL, <br /> audit_column =&gt; &#39;SALARY, COMMISSION_PCT&#39;, <br /> audit_column_opts =&gt; DBMS_FGA.ALL_COLUMNS, <br /> audit_trail =&gt; DBMS_FGA.DB_EXTENDED, <br /> statement_types =&gt; &#39;INSERT, UPDATE&#39;); <br /><br /> FGA strategy (fine-grained auditing) <br /><br /> FGA strategy (fine-grained auditing) <br /><br /> DBMS_FGA: audit has become more concerned about a certain area, and more precise. <br /><br /> Through it, you can know which set out to visit and what line. <br /><br /> DBMS_FGA package has four processes: <br /> Add the use of predicate ADD_POLICY out the audit and audit strategy <br /> DROP_POLICY to delete the audit strategy <br /> Disable DISABLE_POLICY audit strategy, while keeping the table or view associated with the strategy <br /> ENABLE_POLICY opening strategy <br /><br /> Test users usually visit daily itmanager.perfdata table, <br /> FGA therefore can create a strategy for perfdatda.value out any audit of any visit: <br /> begin <br /> dbms_fga.add_policy ( <br /> object_schema =&gt; &#39;ITMANAGER&#39;, <br /> object_name =&gt; &#39;PERFDATA&#39;, <br /> policy_name =&gt; &#39;SAL_SELECT_PERFDATA&#39;, <br /> audit_column =&gt; &#39;VALUE&#39; <br /> ); <br /> end; <br /><br /> View related include: <br /><br /> Fine-grained audit strategy DBA_FGA_AUDIT_TRAIL audit trail entries<br /> FGA audit strategy to increase GRANT RESOURCE, CONNECT TO BANK IDENTIFIED BY BANK; <br /><br /> CREATE TABLE BANK.ACCOUNTS <br /> ( <br /> ACCT_NO NUMBER PRIMARY KEY, <br /> CUST_ID NUMBER NOT NULL, <br /> BALANCE NUMBER (15,2) NULL <br /> ); <br /> insert into bank.accounts values (1,1,10000); <br /> insert into bank.accounts values (2,2,20000); <br /> commit; <br /><br /> Begin <br /> dbms_fga.drop_policy ( <br /> object_schema =&gt; &#39;BANK&#39;, <br /> object_name =&gt; &#39;ACCOUNTS&#39;, <br /> policy_name =&gt; &#39;ACCOUNTS_Access&#39;); <br /> dbms_fga.add_policy ( <br /> object_schema =&gt; &#39;BANK&#39;, <br /> object_name =&gt; &#39;ACCOUNTS&#39;, <br /> policy_name =&gt; &#39;ACCOUNTS_ACCESS&#39;); <br /> end; <br /> / <br /><br /> select * from bank.accounts; <br /> select timestamp, db_user, os_user, object_schema, object_name, sql_text from dba_fga_audit_trail; <br /><br /> Auditors and audit requirements set out in add_policy add audit_column =&gt; &#39;BALANCE&#39; <br /> audit_condition =&gt; &#39;BALANCE&gt; = 11000&#39; <br /> Begin <br /> dbms_fga.drop_policy ( <br /> object_schema =&gt; &#39;BANK&#39;, <br /> object_name =&gt; &#39;ACCOUNTS&#39;, <br /> policy_name =&gt; &#39;ACCOUNTS_ACCESS&#39;); <br /><br /> dbms_fga.add_policy ( <br /> object_schema =&gt; &#39;BANK&#39;, <br /> object_name =&gt; &#39;ACCOUNTS&#39;, <br /> audit_column =&gt; &#39;BALANCE&#39;, <br /> audit_condition =&gt; &#39;BALANCE&gt; = 11000&#39;, <br /> policy_name =&gt; &#39;ACCOUNTS_ACCESS&#39;); <br /> end; <br /> / <br /><br /> This is not, Why? <br /> select BALANCE from bank.accounts; <br /> select timestamp, db_user, os_user, object_schema, object_name, sql_text from dba_fga_audit_trail; <br /><br /><br /> FGA governance strategy to delete the policy, you can use the following statement: <br /> begin <br /> dbms_fga.drop_policy ( <br /><br /> object_schema =&gt; &#39;BANK&#39;, <br /> object_name =&gt; &#39;ACCOUNTS&#39;, <br /> policy_name =&gt; &#39;ACCOUNTS_ACCESS&#39; <br /> ); <br /> end; <br /> / <br /><br /> Strategy for change, there is no check as used with the solution. To change any of the parameters of the strategy, the strategy must be deleted, and then change the parameters of the use of strategies to add. <br /> Auditors need to temporarily disable the collection - for example, if you want to move leads to a different table table space or table you want to remove clues. You can disable the FGA method according to the strategy are as follows: <br /> begin <br /> dbms_fga.enable_policy ( <br /> object_schema =&gt; &#39;BANK&#39;, <br /> object_name =&gt; &#39;ACCOUNTS&#39;, <br /> policy_name =&gt; &#39;ACCOUNTS_ACCESS&#39;, <br /> enable =&gt; FALSE <br /> ); <br /> end; <br /> / <br /> Is very simple to re-enable enable =&gt; TRUE <br /><br /> Presentation when the audit operation and when not to audit the operation of the various situations the state audit SQL statements select balance from accounts; audit. Add the user to choose the strategy set out by the designated audit BALANCE. <br /> select * from accounts; audit. Even if the user is not specified column BALANCE, * also implicitly select it. <br /> select cust_id from accounts where balance &lt;10000; audit. Even if the user is not specified column BALANCE, where clause also implicitly select it. <br /> select cust_id from accounts; not audit. Users have no choice out BALANCE. <br /> select count (*) from accounts; not audit. User does not have explicit or implicit choice of column BALANCE. <br /><br /><br /> Processor module is not only the function of FGA audit trail record of the incident; FGA also can be the implementation process. <br /><br /> Process can perform an action, such as when the user select from the table when a particular e-mail sent to the audit warned, or you can write the audit trail in a different. <br /> This code can be stored in the process of independent package or in the process, the processor module is called strategy. <br /> In fact due to security reasons, it does not need to base itself in the same mode, you may want to deliberately place it in a different mode. <br /> SELECT arise as a result of the process as long as the implementation will be very similar to DML statement to start the trigger, you can also be regarded as the SELECT statement trigger. <br /> The following parameter specifies a processor module will be assigned to the strategy: <br /> handler_schema process has a data name of the software process model handler_module Development Network processor module package can also be used to replace the name of the process name. In this case, the parameters handler_module in the format specified in package.procedure. <br /><br /><br /> FGA data dictionary view<br /> FGA strategy definition DBA_AUDIT_POLICIES is located in the data dictionary view. Table 2 contains the list view in a number of important short description. <br /> Audit trail collection in the SYS-owned table FGA_LOG $ in. SYS-owned for any original form, this form some view in a user-friendly display of information. DBA_FGA_AUDIT_TRAIL the form of a view. <br /> Out is an important SQL_BIND, it specified the use of query the value of bind variables - this is a significant function of the tool to enhance a message. <br /> Another important column is the SCN, when the occurrence of a particular query, it changed its recording system. <br /> This information is used to identify users in a specific time to see what, rather than the current value, it uses flashback query, this query can be displayed in the SCN value specified in the data. <br /><br /><br /> View and FGA <br /> So far I have discussed the application in the form FGA; Let us now look at how to view the use of FGA. Assume that the definition in the ACCOUNTS table VW_ACCOUNTS view as follows: <br /><br /> create view bank.vw_accounts as select * from bank.accounts; <br /><br /> select * from bank.vw_accounts; <br /> select timestamp, db_user, os_user, object_schema, object_name, sql_text from dba_fga_audit_trail; <br /><br /> If you just want to audit queries on the view instead of the query table, you can establish a strategy for the view itself. <br /> View by name rather than the name of the table passed to the process of packaging parameters dbms_fga.add_policy in object_name, can accomplish this task. <br /> OBJECT_NAME then out of DBA_FGA_AUDIT_TRAIL will show the name of view, and will not appear on the table access to additional records. <br /><br /> Records of other uses in addition to the choice of access to the table, FGA can also be used for certain other situations: <br /> You can use the data warehouse FGA, in order to capture a specific table, view, or materialized views on all statements, which helps plan the index. You do not need to go to V $ SQL view to obtain such information. Even if the SQL statement has exceeded the duration of the V $ SQL, in the FGA audit trail will always provide it. <br /> FGA capture as a result of bind variables, which can help you understand the value of the mode of bind variables, which contribute to the design collection, such as histogram. <br /> Processor module or to audit DBA to send a warning, which helps to track malicious applications. <br /> FGA as a result of SELECT statement can be used as triggers, you may need this kind of functionality at any time to use it. <br /> Conclusion FGA in Oracle Database enables you to support strategy and functions of privacy. Because of the internal audit took place in the database rather than applications, so users no matter what access method (such as SQL * Plus and other tools or applications), an audit of the operation and promised to set up very simple. <br /> Next time I will discuss the technologies, as well as senior FGA in Oracle Database 10g new features, these features make a very strong function of FGA, applicable to all types of audits. <br /><br /><br /> Data dictionary view DBA_AUDIT_POLICIES important OBJECT_SCHEMA out its strategy for the definition of the FGA or OBJECT_NAME view the owner&#39;s name or view name POLICY_NAME strategy - for example, ACCOUNTS_ACCESS <br /> Add POLICY_TEXT strategy specified in the audit of the conditions - for example, BALANCE&gt; = 11000 <br /> Audit POLICY_COLUMN out - for example, BALANCE <br /> ENABLED if the opening is YES, otherwise NO <br /> PF_SCHEMA processor module has a strategy mode (if it exists) <br /> PF_PACKAGE processor module package name (if exists) <br /> The process of PF_FUNCTION processor module name (if exists) <br /><br /><br /> Data dictionary view columns DBA_FGA_AUDIT_TRAIL important conversation identifier SESSION_ID audit; and V $ SESSION view different TIMESTAMP session identifier at the time of the audit records generated time tag database queries issued DB_USER users USERHOST users OS_USER operating system user to connect the host machine Customers who CLIENT_ID identifier (if the process of packing the call set dbms_session.set_identifier) <br /> External authentication EXT_NAME name customers, such as LDAP users to access the table OBJECT_SCHEMA trigger an audit of the owner of the table OBJECT_NAME the SELECT operation on the table to trigger an audit of the name of the table to trigger the audit strategy POLICY_NAME name (if the definition of a number of table strategy, each strategy will be to insert a record. <br /> In this case, the column shows the line which is inserted by which the strategy. ) <br /> SCN recorded in the audit of the Oracle system change number<br /> SQL_TEXT submitted by the user SQL_BIND the SQL statement used by the SQL statements to bind variables (if exists)				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/using-sql-trace-and-tkprof/" title="Using SQL TRACE and TKPROF">Using SQL TRACE and TKPROF</a> 2009-02-26 21:36:37</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle10g-fine-grained-auditing/</wfw:commentRss>
	</item>
		<item>
		<title>Summed up the issue of Oracle Character Set</title>
		<link>http://www.kods.netwww.kods.net/summed-up-the-issue-of-oracle-character-set/</link>
		<comments>http://www.kods.netwww.kods.net/summed-up-the-issue-of-oracle-character-set/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 04:00:12+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[data dictionary]]></category>
<category><![CDATA[oracle 8]]></category>
<category><![CDATA[contrary]]></category>
<category><![CDATA[oracle database server]]></category>
<category><![CDATA[database server side]]></category>
<category><![CDATA[unpredictable consequences]]></category>
<category><![CDATA[oracle support]]></category>
<category><![CDATA[oracle8]]></category>
<category><![CDATA[superset]]></category>
<category><![CDATA[set theory]]></category>
<category><![CDATA[last resort]]></category>
<category><![CDATA[props]]></category>
<category><![CDATA[subset]]></category>
<category><![CDATA[nls lang]]></category>
<category><![CDATA[rn]]></category>
<category><![CDATA[storage space]]></category>
<category><![CDATA[utf8]]></category>
<category><![CDATA[double byte characters]]></category>
<category><![CDATA[unicode]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/summed-up-the-issue-of-oracle-character-set/</guid>
		<description><![CDATA[$ echo $ NLS_LANG rn AMERICAN_AMERICA.ZHS16GBK rn If the inspection found that the server side and client-side character set inconsistent, please amend the unified server-side with the same character  ...]]></description>
		<content:encoded><![CDATA[<br /> <FONT face=宋体>$ echo $ NLS_LANG</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>AMERICAN_AMERICA.ZHS16GBK</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>If the inspection found that the server side and client-side character set inconsistent, please amend the unified server-side with the same character set.</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>Third, modify the character set oracle</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>Mentioned above, oracle character set are mutually inclusive relationship. If us7ascii is a subset of zhs16gbk from us7ascii there will be no data to explain zhs16gbk problems, there will be no data loss. All the characters in the utf8 should focus on is the biggest, because it is based on unicode, to preserve double-byte characters (and therefore the storage space occupied by more).</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>Once the database is created,</font> the <FONT face=宋体>database character set theory can not be changed. Therefore, in the design and installation of the early days of considering the use of a character set which is very important. According to Oracle&#39;s official description, character set conversion from a subset of the superset supported, not the contrary. Between the two character sets, if there is no subset and superset of the relationship, then the character set conversion is not subject to oracle support. On the database server,</font> the <FONT face=宋体>wrong character set changes will lead to a lot of unpredictable consequences, may seriously affect the normal operation of the database, it must be modified before the character set to confirm the existence of two sub-sets and superset relations. Generally speaking, unless a last resort, we do not propose to amend the oracle database server-side character set. In particular that we are the two most common character set ZHS16GBK and ZHS16CGB231280 does not exist between the subset and superset relations, so in theory the two between the character set conversion is not supported.</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>1, modify server-side character set (not recommended)</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>Before the oracle 8 can be used to directly modify the data dictionary table props $ to change the database character set. However, after oracle8 at least three records of a database system table character set of information, only props $ table does not change completely and may cause serious consequences. The right to amend as follows:</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>$ sqlplus /</font> nolog <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; conn / as sysdba;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>If the database server has been activated at this time, the SHUTDOWN IMMEDIATE command to the implementation of the closure of the database server, and then perform the following command:</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; STARTUP MOUNT;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; ALTER SYSTEM ENABLE RESTRICTED SESSION;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; ALTER SYSTEM SET</font> JOB_QUEUE_PROCESSES <FONT face=宋体>= 0;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; ALTER SYSTEM SET</font> AQ_TM_PROCESSES <FONT face=宋体>= 0;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; ALTER DATABASE OPEN;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; ALTER DATABASE CHARACTER SET ZHS16GBK;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; ALTER DATABASE national CHARACTER SET ZHS16GBK;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; SHUTDOWN IMMEDIATE;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; STARTUP</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>2, to amend a document character set dmp</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>Mentioned above, dmp files section 2, paragraph 3-byte character set information recorded,</font> the <FONT face=宋体>dmp files directly to amend Article 2, paragraph 3 of the contents of bytes can be &#39;cheated&#39; over oracle checks. To do so in theory is only a subset of the superset can be modified, but many cases in the absence of a subset and superset relations can also modify the circumstances, we used a number of character sets, such as US7ASCII, WE8ISO8859P1, ZHS16CGB231280,</font> ZHS16GBK <FONT face=宋体>basically can be changed. Because dmp file is changed, so have little effect.</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>Specific methods are more changes, the simplest is to directly modify UltraEdit the dmp file, paragraphs 2 and 3 bytes. Dmp file for example, want to change the character set ZHS16GBK, can use the following SQL to identify the character set that corresponds to 16 hexadecimal code:</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>SQL&gt; select</font> to_char <FONT face=宋体>(nls_charset_id ( &#39;ZHS16GBK&#39;), &#39;xxxx&#39;) from dual;</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>0354</font> <o:p></o:p><br /><br /> rn <br /> <FONT face=宋体>Dmp file and then revised to 2,3-byte to 0354.</font> <o:p></o:p><br /><br /> Dmp files if a lot could not be opened with ue, on the need to use the method of procedure. Online java stored procedure was used to write the conversion program (java stored procedure with the advantage of a good general education, the shortcomings are more trouble). I tested through the windows. Oracle database but requested JVM options must be installed. Friends who are interested can look at code				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/high-availability-oracle-flashback/" title="High Availability Oracle Flashback">High Availability Oracle Flashback</a> 2009-02-26 17:23:02</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/summed-up-the-issue-of-oracle-character-set/</wfw:commentRss>
	</item>
		<item>
		<title>ORACLE9I day-to-day operation</title>
		<link>http://www.kods.netwww.kods.net/oracle9i-day-to-day-operation/</link>
		<comments>http://www.kods.netwww.kods.net/oracle9i-day-to-day-operation/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 01:05:07+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[implementation]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[oracle user]]></category>
<category><![CDATA[root user]]></category>
<category><![CDATA[oracle instance]]></category>
<category><![CDATA[database files]]></category>
<category><![CDATA[database log]]></category>
<category><![CDATA[reconstruction]]></category>
<category><![CDATA[oracle corporation]]></category>
<category><![CDATA[fri]]></category>
<category><![CDATA[offline data]]></category>
<category><![CDATA[background processes]]></category>
<category><![CDATA[sga]]></category>
<category><![CDATA[oracle system]]></category>
<category><![CDATA[machine environment]]></category>
<category><![CDATA[several ways]]></category>
<category><![CDATA[oct 31]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle9i-day-to-day-operation/</guid>
		<description><![CDATA[rn A, ORACLE startup and shut down rn 1, in the stand-alone environment rn To start or shut down ORACLE system must first switch to the ORACLE user, as rn su - oracle rn a, start the ORACLE system rn  ...]]></description>
		<content:encoded><![CDATA[rn <br /> A, ORACLE startup and shut down <br /><br /> rn <br /> 1, in the stand-alone environment <br /><br /> rn <br /> To start or shut down ORACLE system must first switch to the ORACLE user, as <br /><br /> rn <br /> su - oracle <br /><br /> rn <br /> a, start the ORACLE system <br /><br /> rn <br /> oracle&gt; svrmgrl <br /><br /> rn <br /> SVRMGR&gt; connect internal <br /><br /> rn <br /> SVRMGR&gt; startup <br /><br /> rn <br /> SVRMGR&gt; quit <br /><br /> rn <br /> b, shut down ORACLE system <br /><br /> rn <br /> oracle&gt; svrmgrl <br /><br /> rn <br /> SVRMGR&gt; connect internal <br /><br /> rn <br /> SVRMGR&gt; shutdown <br /><br /> rn <br /> SVRMGR&gt; quit <br /><br /> rn <br /> Oracle9i database start command: <br /><br /> rn <br /> $ Sqlplus / nolog <br /><br /> rn <br /> SQL * Plus: Release 9.2.0.1.0 - Production on Fri Oct 31 13:53:53 2003 <br /><br /> rn <br /> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. <br /><br /> rn <br /> SQL&gt; connect / as sysdba <br /><br /> rn <br /> Connected to an idle instance. <br /><br /> rn <br /> SQL&gt; startup ^ C <br /><br /> rn <br /> SQL&gt; startup <br /><br /> rn <br /> ORACLE instance started. <br /><br /> rn <br /><br /> rn <br /> 2, in the two-machine environment <br /><br /> rn <br /> To start or shut down ORACLE system must first switch to the root user, as <br /><br /> rn <br /> su - root <br /><br /> rn <br /> a, start the ORACLE system <br /><br /> rn <br /> hareg-y oracle <br /><br /> rn <br /> b, shut down ORACLE system <br /><br /> rn <br /> hareg-n oracle <br /><br /> rn <br /> What are the Oracle database start-up mode <br /><br /> rn <br /><br /> rn <br /> Description: <br /><br /> rn <br /> There are several ways to start: <br /><br /> rn <br /> 1, startup nomount <br /><br /> rn <br /> Non-installation boot, under the executable to start this way: the reconstruction of the control file and rebuild the database <br /><br /> rn <br /> Read init.ora file, restart instance, that the SGA and background processes to start, which only need to activate init.ora file. <br /><br /> rn <br /> 2, startup mount dbname <br /><br /> rn <br /> Start the installation, under the executable to start this way: <br /><br /> rn <br /> Database log archiving, <br /><br /> rn <br /> Database media recovery, <br /><br /> rn <br /> So that online or offline data files, <br /><br /> rn <br /> Re-positioning data files, redo log files. <br /><br /> rn <br /> The implementation of &quot;nomount&quot;, and then open the control file to confirm data files and online log file, <br /><br /> rn <br /> However, at this time not data files and log files to check to check. <br /><br /> rn <br /> 3, startup open dbname <br /><br /> rn <br /> First implementation of &quot;nomount&quot;, then &quot;mount&quot;, then open the Redo log file, including all database files, <br /><br /> rn <br /> This way can access the data in the database. <br /><br /> rn <br /> 4, startup, equivalent to the following three command <br /><br /> rn <br /> startup nomount <br /><br /> rn <br /> alter database mount <br /><br /> rn <br /> alter database open <br /><br /> rn <br /> 5, startup restrict <br /><br /> rn <br /> Constraint start <br /><br /> rn <br /> In this way to start the database, but only allows users with certain access privileges <br /><br /> rn <br /> Non-privileged user access, we will have the following tips: <br /><br /> rn <br /> ERROR: <br /><br /> rn <br /> ORA-01035: ORACLE only with RESTRICTED SESSION allow users to use <br /><br /> rn <br /> 6, startup force <br /><br /> rn <br /> Mandatory start-up mode <br /><br /> rn <br /> When the database is not closed, can be used to complete the database startup force the closure of <br /><br /> rn <br /> To close the database, and then the database command to start the implementation of the normal <br /><br /> rn <br /> 7, startup pfile = parameter file name <br /><br /> rn <br /> Initialization parameter file with the start-up mode <br /><br /> rn <br /> Read parameter files first, and then set the parameter file to start the database <br /><br /> rn <br /> Cases: startup pfile = E: Oracleadminoradbpfileinit.ora <br /><br /> rn <br /> 8, startup EXCLUSIVE <br /><br /> rn <br /><br /> rn <br /> Second, the user how to effectively use the data dictionary <br /><br /> rn <br /> ORACLE database&#39;s data dictionary is an important part of one, it generated with the database created, with the database changes, <br /><br /> rn <br /> Reflected in the number of sys user tables and views. Data Dictionary of the English name is an uppercase character. <br /><br /> rn <br /> Data dictionary are user information, the user&#39;s permission information, all data object information, table constraints, statistical analysis, such as a database view. <br /><br /> rn <br /> We can not manually modify data dictionary information. <br /><br /> rn <br /> Very often, ORACLE users in general do not know how to use it effectively. <br /><br /> rn <br /> dictionary of all data dictionary table name and explained that it has a synonym dict <br /><br /> rn <br /> dict_column all the data dictionary table field names and interpretation of <br /><br /> rn <br /> If we want to query with the index-related data dictionary can be used the following SQL statement: <br /><br /> rn <br /> SQL&gt; select * from dictionary where instr (comments, &#39;index&#39;)&gt; 0; <br /><br /> rn <br /> If we want to know user_indexes table details the meaning of the name field, you can use the following SQL statement that: <br /><br /> rn<br /> select segment_name, tablespace_name, r.status, <br /><br /> rn <br /> (initial_extent/1024) InitialExtent, (next_extent/1024) NextExtent, <br /><br /> rn <br /> max_extents, v.curext CurExtent <br /><br /> rn <br /> From dba_rollback_segs r, v $ rollstat v <br /><br /> rn <br /> Where r.segment_id = v.usn (+) <br /><br /> rn <br /> order by segment_name; <br /><br /> rn <br /> 4, view the control file <br /><br /> rn <br /> select name from v $ controlfile; <br /><br /> rn <br /> 5, view the log file <br /><br /> rn <br /> select member from v $ logfile; <br /><br /> rn <br /> 6, view the use of table space <br /><br /> rn <br /> select sum (bytes) / (1024 * 1024) as free_space, tablespace_name <br /><br /> rn <br /> from dba_free_space <br /><br /> rn <br /> group by tablespace_name; <br /><br /> rn <br /> SELECT A. TABLESPACE_NAME, A. BYTES TOTAL, B. BYTES USED, C. BYTES FREE, <br /><br /> rn <br /> (B. BYTES * 100) / A. BYTES &quot;% USED&quot;, (C. BYTES * 100) / A. BYTES &quot;% FREE&quot; <br /><br /> rn <br /> FROM SYS.SM $ TS_AVAIL A, SYS.SM $ TS_USED B, SYS.SM $ TS_FREE C <br /><br /> rn <br /> WHERE A. TABLESPACE_NAME = B. TABLESPACE_NAME AND A. TABLESPACE_NAME = C. TABLESPACE_NAME; <br /><br /> rn <br /> 7, view the database object library <br /><br /> rn <br /> select owner, object_type, status, count (*) count # from all_objects group by owner, object_type, status; <br /><br /> rn <br /> 8, see the database version <br /><br /> rn <br /> Select version FROM Product_component_version <br /><br /> rn <br /> Where SUBSTR (PRODUCT, 1,6) = &#39;Oracle&#39;; <br /><br /> rn <br /> 9, the creation date to view the database and archiving methods <br /><br /> rn <br /> Select Created, Log_Mode, Log_Mode From V $ Database; <br /><br /> rn <br /> IV, ORACLE management of user connections <br /><br /> rn <br /> By system administrators to see the current database there are several user connections: <br /><br /> rn <br /> SQL&gt; select username, sid, serial # from v $ session; <br /><br /> rn <br /> If you want to stop a connection with <br /><br /> rn <br /> SQL&gt; alter system kill session &#39;sid, serial #&#39;; <br /><br /> rn <br /> If this command will not do, the process of looking for it a number of UNIX <br /><br /> rn <br /> SQL&gt; select pro.spid from v $ session ses, v $ process pro where ses.sid = 21 and ses.paddr = pro.addr; <br /><br /> rn <br /> Description: 21 is the sid of a number of connections <br /><br /> rn <br /> And then use the kill command to kill the process number. <br /><br /> rn <br /><br /> rn <br /> 5, SQL * PLUS using <br /><br /> rn <br /> a, near to the SQL * Plus <br /><br /> rn <br /> $ sqlplus username / password <br /><br /> rn <br /> Quit SQL * Plus <br /><br /> rn <br /> SQL&gt; exit <br /><br /> rn <br /> b, to help in the information under sqlplus <br /><br /> rn <br /> List of all SQL commands and SQL * Plus command <br /><br /> rn <br /> SQL&gt; help <br /><br /> rn <br /> Are listed in order of a particular information <br /><br /> rn <br /> SQL&gt; help command name <br /><br /> rn <br /> c, show the table structure DESCRIBE command <br /><br /> rn <br /> SQL&gt; DESC table name <br /><br /> rn <br /> d, SQL * Plus commands in the Edit <br /><br /> rn <br /> Shows SQL commands buffer <br /><br /> rn <br /> SQL&gt; L <br /><br /> rn <br /> Modify SQL command <br /><br /> rn <br /> First of all, to be correct line into the current row <br /><br /> rn <br /> SQL&gt; n <br /><br /> rn <br /> CHANGE command changes with <br /><br /> rn <br /> SQL&gt; c / old / new <br /><br /> rn <br /> Re-verify that the correct <br /><br /> rn <br /> SQL&gt; L <br /><br /> rn <br /> INPUT command can be used in the SQL buffer to add one or more lines of <br /><br /> rn <br /> SQL&gt; i <br /><br /> rn <br /> SQL&gt; input <br /><br /> rn <br /> e, call the external system editor <br /><br /> rn <br /> SQL&gt; edit the file name <br /><br /> rn <br /> DEFINE command can use the system variable EDITOR to change the type of text editor in the paper are defined as follows login.sql his <br /><br /> rn <br /> DEFINE_EDITOR = vi <br /><br /> rn <br /> f, run the command file <br /><br /> rn <br /> SQL&gt; START test <br /><br /> rn <br /> SQL&gt; @ test <br /><br /> rn <br /> SQL * Plus statements used <br /><br /> rn <br /> a, the table to create, modify, delete <br /><br /> rn <br /> Create table orders the following format: <br /><br /> rn <br /> create table table name (column description list); <br /><br /> rn <br /> Table-based commands add a new column as follows: <br /><br /> rn <br /> ALTER TABLE table ADD (column description list) <br /><br /> rn <br /> Cases: In order to increase test Table 1 Age, used to store the age of <br /><br /> rn <br /> sql&gt; alter table test <br /><br /> rn <br /> add (Age number (3)); <br /><br /> rn <br /> Amend the definition of order-based list is as follows: <br /><br /> rn <br /> ALTER TABLE table name <br /><br /> rn <br /> MODIFY (column name data type) <br /><br /> rn <br /> Example: Count table test out the width to 10 characters long <br /><br /> rn <br /> sql&gt; alter atble test <br /><br /> rn <br /> modify (County char (10)); <br /><br /> rn <br /> b, a table will delete the form of statement is as follows: <br /><br /> rn <br /> DORP TABLE table; <br /><br /> rn <br /> For example: table delete to delete table data and table definition <br /><br /> rn <br /> sql&gt; drop table test <br /><br /> rn <br /> c, table space to create, delete <br /><br /> rn <br /> 6, ORACLE logical backup file of SH <br /><br /> rn <br /> Full backup of the SH file: exp_comp.sh <br /><br /> rn <br /> rq = `date +&quot;% m% d &quot;`<br /><br /> rn <br /> Can be used to create table field names in Chinese, but the best of the field names in English <br /><br /> rn <br /> Create table fields can be added to the default value, for example, DEFAULT SYSDATE <br /><br /> rn <br /> This insertion and changes every time, do not process the operation of the field action can be time <br /><br /> rn <br /> Can create a table to add constraints to the field <br /><br /> rn <br /> For example, does not allow duplicate UNIQUE, keyword PRIMARY KEY <br /><br /> rn <br /> 2.ALTER (change table, index, view, etc.) <br /><br /> rn <br /> Change the name of the table <br /><br /> rn <br /> ALTER TABLE table 1 TO table 2; <br /><br /> rn <br /> In the table after adding a field <br /><br /> rn <br /> ALTER TABLE table name ADD paragraph description field names; <br /><br /> rn <br /> Amend the definition of exterior field description <br /><br /> rn <br /> ALTER TABLE table MODIFY of the fields described in paragraph names; <br /><br /> rn <br /> Add fields to the exterior condition <br /><br /> rn <br /> ALTER TABLE table name ADD CONSTRAINT constraint PRIMARY KEY (field names); <br /><br /> rn <br /> ALTER TABLE table name ADD CONSTRAINT constraint UNIQUE (field names); <br /><br /> rn <br /> On the table or remove the memory database <br /><br /> rn <br /> ALTER TABLE table CACHE; <br /><br /> rn <br /> ALTER TABLE table NOCACHE; <br /><br /> rn <br /> 3.DROP (delete tables, indexes, views, synonyms, procedures, functions, database links, etc.) <br /><br /> rn <br /> Delete table and all its constraints <br /><br /> rn <br /> DROP TABLE table CASCADE CONSTRAINTS; <br /><br /> rn <br /> 4.TRUNCATE (clear all records and deeds, to retain the table structure) <br /><br /> rn <br /> TRUNCATE table; <br /><br /> rn <br /> III. Query (SELECT) part <br /><br /> rn <br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] WHERE conditions; <br /><br /> rn <br /> Field names can be brought into the function <br /><br /> rn <br /> For example: COUNT (*), MIN (field names), MAX (field names), AVG (fieldname), DISTINCT (field names), <br /><br /> rn <br /> TO_CHAR (DATE field names, &#39;YYYY-MM-DD HH24: MI: SS&#39;) <br /><br /> rn <br /> NVL (EXPR1, EXPR2) function <br /><br /> rn <br /> Explained: <br /><br /> rn <br /> IF EXPR1 = NULL <br /><br /> rn <br /> RETURN EXPR2 <br /><br /> rn <br /> ELSE <br /><br /> rn <br /> RETURN EXPR1 <br /><br /> rn <br /> DECODE (AA, V1, R1, V2, R2 ....) function <br /><br /> rn <br /> Explained: <br /><br /> rn <br /> IF AA = V1 THEN RETURN R1 <br /><br /> rn <br /> IF AA = V2 THEN RETURN R2 <br /><br /> rn <br /> .. ... <br /><br /> rn <br /> ELSE <br /><br /> rn <br /> RETURN NULL <br /><br /> rn <br /> LPAD (char1, n, char2) function <br /><br /> rn <br /> Explained: <br /><br /> rn <br /> Char1 character n in accordance with the development of the median show that the shortage of char2-digit string with the replacement of the left side of the space <br /><br /> rn <br /> Field names can be between the arithmetic operations <br /><br /> rn <br /> For example: (1 * Field Name Field Name 1) / 3 <br /><br /> rn <br /> Query can be nested <br /><br /> rn <br /> For example: SELECT ... ... FROM <br /><br /> rn <br /> (SELECT ... ... FROM table 1, [table 2, ... ...] WHERE conditions) WHERE condition 2; <br /><br /> rn <br /> Query results of the two can be set to operate <br /><br /> rn <br /> For example: and set UNION (removing duplicate records), and set UNION ALL (do not remove duplicate records), Difference Sets MINUS, intersection INTERSECT <br /><br /> rn <br /> Sub-query <br /><br /> rn <br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] GROUP BY field names 1 <br /><br /> rn <br /> [HAVING conditions]; <br /><br /> rn <br /> Between two or more table join queries <br /><br /> rn <br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] WHERE <br /><br /> rn <br /> Table 1. Field name = table name 2. Fieldname [AND ... ...]; <br /><br /> rn <br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] WHERE <br /><br /> rn <br /> Table 1. Field name = table name 2. Field Name (+) [AND ... ...]; <br /><br /> rn <br /> There are (+) of the field-position auto-fill empty value <br /><br /> rn <br /> Query result set of the sort operation, the default is ascending order ASC, is descending DESC <br /><br /> rn <br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] <br /><br /> rn <br /> ORDER BY field names 1, Field Name 2 DESC; <br /><br /> rn <br /> Fuzzy string comparison <br /><br /> rn <br /> INSTR (field names, &#39;string&#39;)&gt; 0 <br /><br /> rn <br /> Field Name LIKE &#39;string%&#39; [ &#39;% string%&#39;] <br /><br /> rn <br /> Each table has a hidden field ROWID, it marks the uniqueness of records. <br /><br /> rn <br /> IV. ORACLE data objects in common (SCHEMA) <br /><br /> rn <br /> 1. Index (INDEX) <br /><br /> rn <br /> CREATE INDEX index name ON table (field 1, [field 2, ... ...]); <br /><br /> rn <br /> ALTER INDEX index name REBUILD; <br /><br /> rn <br /> A table is best not to index more than 3 (except special pages), the best single-field index, combined with an analysis of SQL statements implementation <br /><br /> rn <br /> Can also create a combination of multi-field index and the index based on function <br /><br /> rn <br /> ORACLE8.1.7 string of maximum length can be indexed for 1578 single-byte <br /><br /> rn <br /> ORACLE8.0.6 string can be indexed to the maximum length of 758 single-byte <br /><br /> rn <br /> 2. View (VIEW) <br /><br /> rn <br /> Of CREATE VIEW view AS SELECT .... FROM ... ..; <br /><br /> rn <br /> ALTER VIEW view name COMPILE; <br /><br /> rn<br /> View only a SQL query, which can form complex relationship between the simplicity of. <br /><br /> rn <br /> 3. Synonyms (SYNONMY) <br /><br /> rn <br /> CREATE SYNONYM synonym name FOR table; <br /><br /> rn <br /> CREATE SYNONYM synonym name FOR table @ database link name; <br /><br /> rn <br /> 4. Database link (DATABASE LINK) <br /><br /> rn <br /> Database link CREATE DATABASE LINK name CONNECT TO username IDENTIFIED BY password USING &#39;database connection string&#39;; <br /><br /> rn <br /> Database connection string can be used directly NET8 EASY CONFIG modify TNSNAMES.ORA or in definition. <br /><br /> rn <br /> Database parameters global_name = true when asked the name of the database link with the remote database name <br /><br /> rn <br /> Global database name can be identified with the following command <br /><br /> rn <br /> SELECT * FROM GLOBAL_NAME; <br /><br /> rn <br /> Query the remote database table <br /><br /> rn <br /> SELECT ... ... FROM table @ database link name; <br /><br /> rn <br /> 5. Rights Management (DCL) statements <br /><br /> rn <br /> 1.GRANT giving permission <br /><br /> rn <br /> Commonly used in the collection system has the following three rights: <br /><br /> rn <br /> CONNECT (basic connection), RESOURCE (Programming), DBA (database management) <br /><br /> rn <br /> Commonly used data objects have the following five rights: <br /><br /> rn <br /> ALL ON data object name, SELECT ON data object name, UPDATE ON data object name, <br /><br /> rn <br /> DELETE ON object name data, INSERT ON data object name, ALTER ON data object name <br /><br /> rn <br /> GRANT CONNECT, RESOURCE TO username; <br /><br /> rn <br /> GRANT SELECT ON table TO user name; <br /><br /> rn <br /> GRANT SELECT, INSERT, DELETE ON table TO user name 1, User Name 2; <br /><br /> rn <br /> 2.REVOKE recovery authority <br /><br /> rn <br /> REVOKE CONNECT, RESOURCE FROM username; <br /><br /> rn <br /> REVOKE SELECT ON table FROM user name; <br /><br /> rn <br /> REVOKE SELECT, INSERT, DELETE ON table FROM user name 1, User Name 2; <br /><br /> rn <br /> Query the database Error No. 63: <br /><br /> rn <br /> select orgaddr, destaddr from sm_histable0116 where error_code =&#39;63 &#39;; <br /><br /> rn <br /> Users query the database to open an account to submit the largest and the largest number of issued: select MSISDN, TCOS, OCOS from ms_usertable; <br /><br /> rn <br /> Query the database in the sum of a variety of error codes: <br /><br /> rn <br /> select error_code, count (*) from sm_histable0513 group by error_code order <br /><br /> rn <br /> by error_code; <br /><br /> rn <br /> If the database query statements for a single type of query statistics. <br /><br /> rn <br /> select sum (Successcount) from tbl_MiddleMt0411 where ServiceType2 = 111 <br /><br /> rn <br /> select sum (successcount), servicetype from tbl_middlemt0411 group by servicetype				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle9i-day-to-day-operation/</wfw:commentRss>
	</item>
		<item>
		<title>Common SQL statements</title>
		<link>http://www.kods.netwww.kods.net/common-sql-statements/</link>
		<comments>http://www.kods.netwww.kods.net/common-sql-statements/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 22:15:02+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[select name]]></category>
<category><![CDATA[dba]]></category>
<category><![CDATA[rollback segment]]></category>
<category><![CDATA[database object]]></category>
<category><![CDATA[sql statements]]></category>
<category><![CDATA[table space]]></category>
<category><![CDATA[free space]]></category>
<category><![CDATA[logfile]]></category>
<category><![CDATA[extents]]></category>
<category><![CDATA[segment name]]></category>
<category><![CDATA[usn]]></category>
<category><![CDATA[database version]]></category>
<category><![CDATA[archiving]]></category>
<category><![CDATA[tablespaces]]></category>
<category><![CDATA[rn 10]]></category>
<category><![CDATA[object library]]></category>
<category><![CDATA[format a8]]></category>
<category><![CDATA[component version]]></category>
<category><![CDATA[product component]]></category>
<category><![CDATA[select sum]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/common-sql-statements/</guid>
		<description><![CDATA[rn rn rn 1, see table space name and the size of rn select t.tablespace_name, round (sum (bytes / (1024 * 1024)), 0) ts_size rn from dba_tablespaces t, dba_data_files d rn where t.tablespace_name = d. ...]]></description>
		<content:encoded><![CDATA[rn <br /> rn <br /><br /> rn <br /> 1, see table space name and the size of <br /><br /> rn <br /> select t.tablespace_name, round (sum (bytes / (1024 * 1024)), 0) ts_size <br /><br /> rn <br /> from dba_tablespaces t, dba_data_files d <br /><br /> rn <br /> where t.tablespace_name = d.tablespace_name <br /><br /> rn <br /> group by t.tablespace_name; <br /><br /> rn <br /><br /> rn <br /> 2, see table space name and the physical file size <br /><br /> rn <br /><br /> rn <br /> select tablespace_name, file_id, file_name, <br /><br /> rn <br /> round (bytes / (1024 * 1024), 0) total_space <br /><br /> rn <br /> from dba_data_files <br /><br /> rn <br /> order by tablespace_name; <br /><br /> rn <br /><br /> rn <br /> 3, view the rollback segment name and size <br /><br /> rn <br /><br /> rn <br /> select segment_name, tablespace_name, r.status, <br /><br /> rn <br /> (initial_extent/1024) InitialExtent, (next_extent/1024) NextExtent, <br /><br /> rn <br /> max_extents, v.curext CurExtent <br /><br /> rn <br /> From dba_rollback_segs r, v $ rollstat v <br /><br /> rn <br /> Where r.segment_id = v.usn (+) <br /><br /> rn <br /> order by segment_name; <br /><br /> rn <br /><br /> rn <br /> 4, view the control file <br /><br /> rn <br /><br /> rn <br /> select name from v $ controlfile; <br /><br /> rn <br /><br /> rn <br /> 5, view the log file <br /><br /> rn <br /><br /> rn <br /> select member from v $ logfile; <br /><br /> rn <br /><br /> rn <br /> 6, view the use of table space <br /><br /> rn <br /><br /> rn <br /> select sum (bytes) / (1024 * 1024) as free_space, tablespace_name <br /><br /> rn <br /> from dba_free_space <br /><br /> rn <br /> group by tablespace_name; <br /><br /> rn <br /><br /> rn <br /> SELECT A. TABLESPACE_NAME, A. BYTES TOTAL, B. BYTES USED, C. BYTES FREE, <br /><br /> rn <br /> (B. BYTES * 100) / A. BYTES &quot;% USED&quot;, (C. BYTES * 100) / A. BYTES &quot;% FREE&quot; <br /><br /> rn <br /> FROM SYS.SM $ TS_AVAIL A, SYS.SM $ TS_USED B, SYS.SM $ TS_FREE C <br /><br /> rn <br /> WHERE A. TABLESPACE_NAME = B. TABLESPACE_NAME AND A. TABLESPACE_NAME = C. TABLESPACE_NAME; <br /><br /> rn <br /><br /> rn <br /> 7, view the database object library <br /><br /> rn <br /><br /> rn <br /> select owner, object_type, status, count (*) count # from all_objects group by owner, object_type, status; <br /><br /> rn <br /><br /> rn <br /> 8, see the database version <br /><br /> rn <br /><br /> rn <br /> Select version FROM Product_component_version <br /><br /> rn <br /> Where SUBSTR (PRODUCT, 1,6) = &#39;Oracle&#39;; <br /><br /> rn <br /><br /> rn <br /> 9, the creation date to view the database and archiving methods <br /><br /> rn <br /><br /> rn <br /> Select Created, Log_Mode, Log_Mode From V $ Database; <br /><br /> rn <br /><br /> rn <br /> 10, to capture long-running SQL <br /><br /> rn <br /><br /> rn <br /> column username format a12 <br /><br /> rn <br /> column opname format a16 <br /><br /> rn <br /> column progress format a8 <br /><br /> rn <br /><br /> rn <br /> select username, sid, opname, <br /><br /> rn <br /> round (sofar * 100 / totalwork, 0) | | &#39;%&#39; as progress, <br /><br /> rn <br /> time_remaining, sql_text <br /><br /> rn <br /> from v $ session_longops, v $ sql <br /><br /> rn <br /> where time_remaining &lt;&gt; 0 <br /><br /> rn <br /> and sql_address = address <br /><br /> rn <br /> and sql_hash_value = hash_value <br /><br /> rn <br /> / <br /><br /> rn <br /> 11. See data table parameters <br /><br /> rn <br /> SELECT partition_name, high_value, high_value_length, tablespace_name, <br /><br /> rn <br /> pct_free, pct_used, ini_trans, max_trans, initial_extent, <br /><br /> rn <br /> next_extent, min_extent, max_extent, pct_increase, FREELISTS, <br /><br /> rn <br /> freelist_groups, LOGGING, BUFFER_POOL, num_rows, blocks, <br /><br /> rn <br /> empty_blocks, avg_space, chain_cnt, avg_row_len, sample_size, <br /><br /> rn <br /> last_analyzed <br /><br /> rn <br /> FROM dba_tab_partitions <br /><br /> rn <br /> - WHERE table_name =: tname AND table_owner =: towner <br /><br /> rn <br /> ORDER BY partition_position <br /><br /> rn <br /><br /> rn <br /> 12. See the services have not submitted <br /><br /> rn <br /> select * from v $ locked_object; <br /><br /> rn <br /> select * from v $ transaction; <br /><br /> rn <br /><br /> rn <br /> 13. Find object for which the process used by <br /><br /> rn <br /> select <br /><br /> rn <br /> p.spid, <br /><br /> rn <br /> s.sid, <br /><br /> rn <br /> s.serial # serial_num, <br /><br /> rn <br /> s.username user_name, <br /><br /> rn <br /> a.type object_type, <br /><br /> rn <br /> s.osuser os_user_name, <br /><br /> rn <br /> a.owner, <br /><br /> rn <br /> a.object object_name, <br /><br /> rn <br /> decode (sign (48 - command), <br /><br /> rn <br /> 1, <br /><br /> rn <br /> to_char (command), &#39;Action Code #&#39; | | to_char (command)) action, <br /><br /> rn <br /> p.program oracle_process, <br /><br /> rn <br /> s.terminal terminal, <br /><br /> rn <br /> s.program program, <br /><br /> rn <br /> s.status session_status <br /><br /> rn <br /> from v $ session s, v $ access a, v $ process p <br /><br /> rn <br /> where s.paddr = p.addr and <br /><br /> rn <br /> s.type = &#39;USER&#39; and <br /><br /> rn <br /> a.sid = s.sid and <br /><br /> rn <br /> a.object = &#39;SUBSCRIBER_ATTR&#39; <br /><br /> rn <br /> order by s.username, s.osuser <br /><br /> rn <br /><br /> rn <br /> 14. Rollback Segment View <br /><br /> rn <br /> select rownum, sys.dba_rollback_segs.segment_name Name, v $ rollstat.extents <br /><br /> rn <br /> Extents, v $ rollstat.rssize Size_in_Bytes, v $ rollstat.xacts XActs, <br /><br /> rn <br /> v $ rollstat.gets Gets, v $ rollstat.waits Waits, v $ rollstat.writes Writes, <br /><br /> rn <br /> sys.dba_rollback_segs.status status from v $ rollstat, sys.dba_rollback_segs, <br /><br /> rn <br /> v $ rollname where v $ rollname.name (+) = sys.dba_rollback_segs.segment_name and <br /><br /> rn <br /> v $ rollstat.usn (+) = v $ rollname.usn order by rownum <br /><br /> rn <br /><br /> rn <br /> 15. The process of consumption of resources (top session) <br /><br /> rn <br /> select s.schemaname schema_name, decode (sign (48 - command), 1, <br /><br /> rn <br /> to_char (command), &#39;Action Code #&#39; | | to_char (command)) action, status <br /><br /> rn <br /> session_status, s.osuser os_user_name, s.sid, p.spid, s.serial # serial_num, <br /><br /> rn <br /> nvl (s.username, &#39;[Oracle process]&#39;) user_name, s.terminal terminal, <br /><br /> rn <br /> s.program program, st.value criteria_value from v $ sesstat st, v $ session s, v $ process p <br /><br /> rn <br /> where st.sid = s.sid and st.statistic # = to_number (&#39;38 &#39;) and (&#39; ALL &#39;=&#39; ALL &#39; <br /><br /> rn <br /> or s.status = &#39;ALL&#39;) and p.addr = s.paddr order by st.value desc, p.spid asc, s.username asc, s.osuser asc <br /><br /> rn <br /><br /> rn <br /> 16. See lock (lock) the situation <br /><br /> rn <br /> select / * + RULE * / ls.osuser os_user_name, ls.username user_name, <br /><br /> rn <br /> decode (ls.type, &#39;RW&#39;, &#39;Row wait enqueue lock&#39;, &#39;TM&#39;, &#39;DML enqueue lock&#39;, &#39;TX&#39;, <br /><br /> rn <br /> &#39;Transaction enqueue lock&#39;, &#39;UL&#39;, &#39;User supplied lock&#39;) lock_type, <br /><br /> rn <br /> o.object_name object, decode (ls.lmode, 1, null, 2, &#39;Row Share&#39;, 3, <br /><br /> rn <br /> &#39;Row Exclusive&#39;, 4, &#39;Share&#39;, 5, &#39;Share Row Exclusive&#39;, 6, &#39;Exclusive&#39;, null) <br /><br /> rn <br /> lock_mode, o.owner, ls.sid, ls.serial # serial_num, ls.id1, ls.id2 <br /><br /> rn <br /> from sys.dba_objects o, (select s.osuser, s.username, l.type, <br /><br /> rn <br /> l.lmode, s.sid, s.serial #, l.id1, l.id2 from v $ session s, <br /><br /> rn <br /> v $ lock l where s.sid = l.sid) ls where o.object_id = ls.id1 and o.owner <br /><br /> rn <br /> &lt;&gt; &#39;SYS&#39; order by o.owner, o.object_name <br /><br /> rn <br /> 17. See wait (wait) situation <br /><br /> rn <br /> SELECT v $ waitstat.class, v $ waitstat.count count, SUM (v $ sysstat.value) sum_value <br /><br /> rn <br /> FROM v $ waitstat, v $ sysstat WHERE v $ sysstat.name IN ( &#39;db block gets&#39;, <br /><br /> rn <br /> &#39;consistent gets&#39;) group by v $ waitstat.class, v $ waitstat.count <br /><br /> rn <br /> 18. Show sga situation <br /><br /> rn <br /> SELECT NAME, BYTES FROM SYS.V_ $ SGASTAT ORDER BY NAME ASC <br /><br /> rn <br /> 19. Show catched object <br /><br /> rn <br /> SELECT owner, name, db_link, namespace, <br /><br /> rn <br /> type, sharable_mem, loads, executions, <br /><br /> rn <br /> locks, pins, kept FROM v $ db_object_cache <br /><br /> rn <br /><br /> rn <br /> 20. See V $ SQLAREA <br /><br /> rn <br /> SELECT SQL_TEXT, SHARABLE_MEM, PERSISTENT_MEM, RUNTIME_MEM, SORTS, <br /><br /> rn <br /> VERSION_COUNT, LOADED_VERSIONS, OPEN_VERSIONS, USERS_OPENING, EXECUTIONS, <br /><br /> rn <br /> USERS_EXECUTING, LOADS, FIRST_LOAD_TIME, INVALIDATIONS, PARSE_CALLS, DISK_READS, <br /><br /> rn <br /> BUFFER_GETS, ROWS_PROCESSED FROM V $ SQLAREA <br /><br /> rn <br /><br /> rn <br /> 21. See the number of object categories <br /><br /> rn <br /> select decode (o.type #, 1, &#39;INDEX&#39;, 2, &#39;TABLE&#39;, 3, &#39;CLUSTER&#39;, 4, &#39;VIEW&#39;, 5, <br /><br /> rn <br /> &#39;SYNONYM&#39;, 6, &#39;SEQUENCE&#39;, &#39;OTHER&#39;) object_type, count (*) quantity from <br /><br /> rn <br /> sys.obj $ o where o.type #&gt; 1 group by decode (o.type #, 1, &#39;INDEX&#39;, 2, &#39;TABLE&#39;, 3 <br /><br /> rn <br /> , &#39;CLUSTER&#39;, 4, &#39;VIEW&#39;, 5, &#39;SYNONYM&#39;, 6, &#39;SEQUENCE&#39;, &#39;OTHER&#39;) union select <br /><br /> rn <br /> &#39;COLUMN&#39;, count (*) from sys.col $ union select &#39;DB LINK&#39;, count (*) from <br /><br /> rn <br /> 22. By the user to view object types <br /><br /> rn <br /> select u.name schema, sum (decode (o.type #, 1, 1, NULL)) indexes, <br /><br /> rn <br /> sum (decode (o.type #, 2, 1, NULL)) tables, sum (decode (o.type #, 3, 1, NULL)) <br /><br /> rn <br /> clusters, sum (decode (o.type #, 4, 1, NULL)) views, sum (decode (o.type #, 5, 1, <br /><br /> rn <br /> NULL)) synonyms, sum (decode (o.type #, 6, 1, NULL)) sequences, <br /><br /> rn <br /> sum (decode (o.type #, 1, NULL, 2, NULL, 3, NULL, 4, NULL, 5, NULL, 6, NULL, 1)) <br /><br /> rn <br /> others from sys.obj $ o, sys.user $ u where o.type #&gt; = 1 and u.user # = <br /><br /> rn <br /> o.owner # and u.name &lt;&gt; &#39;PUBLIC&#39; group by u.name order by <br /><br /> rn <br /> sys.link $ union select &#39;CONSTRAINT&#39;, count (*) from sys.con $ <br /><br /> rn<br /> 23. Information on the connection <br /><br /> rn <br /> 1) see which users connect <br /><br /> rn <br /> select s.osuser os_user_name, decode (sign (48 - command), 1, to_char (command), <br /><br /> rn <br /> &#39;Action Code #&#39; | | to_char (command)) action, p.program oracle_process, <br /><br /> rn <br /> status session_status, s.terminal terminal, s.program program, <br /><br /> rn <br /> s.username user_name, s.fixed_table_sequence activity_meter,&#39;&#39;query, <br /><br /> rn <br /> 0 memory, 0 max_memory, 0 cpu_usage, s.sid, s.serial # serial_num <br /><br /> rn <br /> from v $ session s, v $ process p where s.paddr = p.addr and s.type = &#39;USER&#39; <br /><br /> rn <br /> order by s.username, s.osuser <br /><br /> rn <br /> 2) According to v.sid view the resources occupied by the corresponding connection and so on <br /><br /> rn <br /> select n.name, <br /><br /> rn <br /> v.value, <br /><br /> rn <br /> n.class, <br /><br /> rn <br /> n.statistic # <br /><br /> rn <br /> from v $ statname n, <br /><br /> rn <br /> v $ sesstat v <br /><br /> rn <br /> where v.sid = 71 and <br /><br /> rn <br /> v.statistic # = n.statistic # <br /><br /> rn <br /> order by n.class, n.statistic # <br /><br /> rn <br /> 3) According to sid view of the corresponding connections are running sql <br /><br /> rn <br /> select / * + PUSH_SUBQ * / <br /><br /> rn <br /> command_type, <br /><br /> rn <br /> sql_text, <br /><br /> rn <br /> sharable_mem, <br /><br /> rn <br /> persistent_mem, <br /><br /> rn <br /> runtime_mem, <br /><br /> rn <br /> sorts, <br /><br /> rn <br /> version_count, <br /><br /> rn <br /> loaded_versions, <br /><br /> rn <br /> open_versions, <br /><br /> rn <br /> users_opening, <br /><br /> rn <br /> executions, <br /><br /> rn <br /> users_executing, <br /><br /> rn <br /> loads, <br /><br /> rn <br /> first_load_time, <br /><br /> rn <br /> invalidations, <br /><br /> rn <br /> parse_calls, <br /><br /> rn <br /> disk_reads, <br /><br /> rn <br /> buffer_gets, <br /><br /> rn <br /> rows_processed, <br /><br /> rn <br /> sysdate start_time, <br /><br /> rn <br /> sysdate finish_time, <br /><br /> rn <br /> &#39;&gt;&#39; | | Address sql_address, <br /><br /> rn <br /> &#39;N&#39; status <br /><br /> rn <br /> from v $ sqlarea <br /><br /> rn <br /> where address = (select sql_address from v $ session where sid = 71) <br /><br /> rn <br /><br /> rn <br /> 24. The use of table space query <br /><br /> rn <br /> select a.tablespace_name &quot;Tablespace Name&quot;, <br /><br /> rn <br /> 100-round ((nvl (b.bytes_free, 0) / a.bytes_alloc) * 100,2) &quot;occupancy rate (%)&quot;, <br /><br /> rn <br /> round (a.bytes_alloc/1024/1024, 2) &quot;the capacity of (M)&quot;, <br /><br /> rn <br /> round (nvl (b.bytes_free, 0) / 1024/1024, 2) &quot;Free (M)&quot;, <br /><br /> rn <br /> round ((a.bytes_alloc-nvl (b.bytes_free, 0)) / 1024/1024, 2) &quot;the use of (M)&quot;, <br /><br /> rn <br /> Largest &quot;the largest expansion of paragraph (M)&quot;, <br /><br /> rn <br /> to_char (sysdate, &#39;yyyy-mm-dd hh24: mi: ss&#39;) &quot;sampling time&quot; <br /><br /> rn <br /> from (select f.tablespace_name, <br /><br /> rn <br /> sum (f.bytes) bytes_alloc, <br /><br /> rn <br /> sum (decode (f.autoextensible, &#39;YES&#39;, f.maxbytes, &#39;NO&#39;, f.bytes)) maxbytes <br /><br /> rn <br /> from dba_data_files f <br /><br /> rn <br /> group by tablespace_name) a, <br /><br /> rn <br /> (select f.tablespace_name, <br /><br /> rn <br /> sum (f.bytes) bytes_free <br /><br /> rn <br /> from dba_free_space f <br /><br /> rn <br /> group by tablespace_name) b, <br /><br /> rn <br /> (select round (max (ff.length) * 16/1024, 2) Largest, <br /><br /> rn <br /> ts.name tablespace_name <br /><br /> rn <br /> from sys.fet $ ff, sys.file $ tf, sys.ts $ ts <br /><br /> rn <br /> where ts.ts # = ff.ts # and ff.file # = tf.relfile # and ts.ts # = tf.ts # <br /><br /> rn <br /> group by ts.name, tf.blocks) c <br /><br /> rn <br /> where a.tablespace_name = b.tablespace_name and a.tablespace_name = c.tablespace_name <br /><br /> rn <br /><br /> rn <br /> 25. Query table space extent of the debris <br /><br /> rn <br /><br /> rn <br /> select tablespace_name, count (tablespace_name) from dba_free_space group by tablespace_name <br /><br /> rn <br /> having count (tablespace_name)&gt; 10; <br /><br /> rn <br /><br /> rn <br /> alter tablespace name coalesce; <br /><br /> rn <br /> alter table name deallocate unused; <br /><br /> rn <br /><br /> rn <br /> create or replace view ts_blocks_v as <br /><br /> rn <br /> select tablespace_name, block_id, bytes, blocks, &#39;free space&#39; segment_name from dba_free_space <br /><br /> rn <br /> union all <br /><br /> rn <br /> select tablespace_name, block_id, bytes, blocks, segment_name from dba_extents; <br /><br /> rn <br /><br /> rn <br /> select * from ts_blocks_v; <br /><br /> rn <br /><br /> rn <br /> select tablespace_name, sum (bytes), max (bytes), count (block_id) from dba_free_space <br /><br /> rn <br /> group by tablespace_name;				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle-deadlock-related/" title="Oracle deadlock related">Oracle deadlock related</a> 2009-03-30 16:46:54</li>
					<li><a href="http://www.kods.netwww.kods.net/proc-will-select-the-data-on-the-two-dimensional-array/" title="ProC will select the data on the two-dimensional array">ProC will select the data on the two-dimensional array</a> 2009-03-30 11:50:27</li>
					<li><a href="http://www.kods.netwww.kods.net/terror-cpu/" title="Terror CPU">Terror CPU</a> 2009-03-30 10:35:18</li>
					<li><a href="http://www.kods.netwww.kods.net/turning-optimization-oracle-article/" title="Turning optimization oracle article">Turning optimization oracle article</a> 2009-03-26 21:39:35</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle10g-with-cross-platform-endian-transfer/" title="Oracle10g with cross-platform endian transfer">Oracle10g with cross-platform endian transfer</a> 2009-03-14 22:09:48</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/common-sql-statements/</wfw:commentRss>
	</item>
		<item>
		<title>Export Oracle database data into the basic methods and regular backup script unix</title>
		<link>http://www.kods.netwww.kods.net/export-oracle-database-data-into-the-basic-methods-and-regular-backup-script-unix/</link>
		<comments>http://www.kods.netwww.kods.net/export-oracle-database-data-into-the-basic-methods-and-regular-backup-script-unix/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 21:23:34+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[unix]]></category>
<category><![CDATA[test data]]></category>
<category><![CDATA[database table]]></category>
<category><![CDATA[oracle database data]]></category>
<category><![CDATA[database user]]></category>
<category><![CDATA[data export]]></category>
<category><![CDATA[export data]]></category>
<category><![CDATA[dmp]]></category>
<category><![CDATA[import and export]]></category>
<category><![CDATA[database field]]></category>
<category><![CDATA[backup script]]></category>
<category><![CDATA[export database]]></category>
<category><![CDATA[manager test]]></category>
<category><![CDATA[script unix]]></category>
<category><![CDATA[database import]]></category>
<category><![CDATA[system password]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/export-oracle-database-data-into-the-basic-methods-and-regular-backup-script-unix/</guid>
		<description><![CDATA[Oracle database import and export of basic methods of data collection using the most recent import and export data oracle encountered a lot of trouble! Oracle database was carried out on a serious stu ...]]></description>
		<content:encoded><![CDATA[Oracle database import and export of basic methods of data collection using the most recent import and export data oracle encountered a lot of trouble! Oracle database was carried out on a serious study, summed up the import and export order of several methods available for the future. <br /> Data Export: <br /> 1, will test full export database, user name, system password manager Export to d: \ daochu.dmp in <br /> exp system / manager @ test file = d: \ daochu.dmp full = y <br /> 2, the system user database table and export sys user <br /> exp system / manager @ test file = d: \ daochu.dmp owner = (system, sys) <br /> 3, the database table inner_notify, notify_staff_relat Export <br /> exp aichannel / aichannel @ testdb2 file = d: \ data \ newsmgnt.dmp tables = (inner_notify, notify_staff_relat) <br /> 4, will be in the database field in the table1 table filed1 to &quot;00&quot; Export data from the beginning <br /> exp system / manager @ test file = d: \ daochu.dmp tables = (table1) query = \ &quot;where filed1 like 00% \&quot; <br /> Derived above is commonly used for compression, both the dmp file using winzip to compress can be very good. In the above command can also be followed by compress = y to achieve. <br /><br /> Data Import: <br /> 1, will be d: \ daochu.dmp in the test data into the database. <br /> imp system / manager @ test file = d: \ daochu.dmp imp aichannel / aichannel @ hust full = y file = file = d: \ data \ newsmgnt.dmp ignore = y <br /> Above may be a bit, because some form already exists, then it is error, not to import the table. Followed by the ignore = y on it. <br /> 2, d: \ daochu.dmp import table table1 <br /> imp system / manager @ test file = d: \ daochu.dmp tables = (table1) <br /> Basically, the above import and export good enough for us. A number of cases is to first delete the table completely, and then import. <br /><br /> Note: The operator must have sufficient authority, it will prompt enough permissions. Can be connected to the database of. Tnsping test can be used to access the database can connect to the test. <br /><br /> Above the records, only oracle data import and export of the most basic way to practical application in a variety of factors will affect the results of import and export, there is a need for flexibility in the use of these basic commands, but we have to co-ordinate the operation of the whole environment to oracle consideration to the question. <br /><br /> This article comes from CSDN blog, reprint, please indicate the source: http://blog.csdn.net/usthycp/archive/2008/10/29/3176451.aspx <br /><br /> under unix script oracle backup database from time to time (by the user backup) <br /><br /> Can use the following command crontab way 14:00 every day from time to time the implementation of the script up to 30 sub-files, each file size of the largest form of 1G to export the database, <br /> If the database is a large amount of data, more than 30G, will export is unsuccessful, the amount of data at this time only in accordance with the size of the adjustment to the value of variable num. The post-script to export the database to use gzip compression, then saved to the system / data / expfiles, prior to export, will be moved to the previous day&#39;s backup / data / expfiles_bak, <br /> Such a backup can keep the last two days of data backup. <br /><br /> outfile = `date +% Y% m% d_% H% M` <br /> num = 30 <br /> i = 1 <br /> files = <br /><br /> if [!-d / data / expfiles]; then <br /> mkdir / data / expfiles <br /> fi <br /><br /> if [!-d / data / expfiles_bak]; then <br /> mkdir / data / expfiles_bak <br /> fi <br /><br /> dfile = `ls -1 / data / expfiles_bak / | awk &#39;(if (NR &lt;2) (print $ 1))&#39;` <br /> prefix = `echo | awk &#39;(print substr (&quot;&#39;&quot;${ dfile }&quot;&#39;&quot;, 1,13))&#39;` <br /> rm-f / data / expfiles_bak / $ (prefix) * <br /><br /> dfile = `ls -1 / data / expfiles / | awk &#39;(if (NR &lt;2) (print $ 1))&#39;` <br /> prefix = `echo | awk &#39;(print substr (&quot;&#39;&quot;${ dfile }&quot;&#39;&quot;, 1,13))&#39;` <br /> mv / data / expfiles / $ (prefix) * / data / expfiles_bak <br /><br /> while [$ i-lt $ num] <br /> do <br /> files = $ files / data / expfiles / $ (outfile) _ $ i.dmp, <br /> i = `expr $ i + 1` <br /> done <br /> files = $ files / data / expfiles / $ (outfile) _ $ i.dmp <br /><br /> # echo $ files <br /> exp userid = user / passwd @ acct FILE = $ files filesize = 1024M grants = N 2&gt;&gt; exp_rpt.log <br /><br /> gzip / data / expfiles / $ (outfile) * <br /><br /> Article Source: http://www.diybl.com/course/7_databases/oracle/oraclejs/200798/70924_6.html				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/high-availability-oracle-flashback/" title="High Availability Oracle Flashback">High Availability Oracle Flashback</a> 2009-02-26 17:23:02</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/export-oracle-database-data-into-the-basic-methods-and-regular-backup-script-unix/</wfw:commentRss>
	</item>
		<item>
		<title>About Oracle data types</title>
		<link>http://www.kods.netwww.kods.net/about-oracle-data-types/</link>
		<comments>http://www.kods.netwww.kods.net/about-oracle-data-types/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 21:15:13+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[expression]]></category>
<category><![CDATA[variables]]></category>
<category><![CDATA[varchar2]]></category>
<category><![CDATA[oracle data]]></category>
<category><![CDATA[data types]]></category>
<category><![CDATA[variable length]]></category>
<category><![CDATA[column types]]></category>
<category><![CDATA[binary operation]]></category>
<category><![CDATA[variable type]]></category>
<category><![CDATA[decimal format]]></category>
<category><![CDATA[database types]]></category>
<category><![CDATA[binary code]]></category>
<category><![CDATA[type error]]></category>
<category><![CDATA[integer value]]></category>
<category><![CDATA[date line]]></category>
<category><![CDATA[calibration]]></category>
<category><![CDATA[overflow]]></category>
<category><![CDATA[credibility]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/about-oracle-data-types/</guid>
		<description><![CDATA[rn rn I. Overview rn Defined in ORACLE8: scalar (SCALAR), composite (COMPOSITE), reference (REFERENCE) and four LOB data types, the following details of their characteristics. rn Second, scalar (SCALA ...]]></description>
		<content:encoded><![CDATA[rn <br /> rn <br /> I. Overview <br /><br /> rn <br /> Defined in ORACLE8: scalar (SCALAR), composite (COMPOSITE), reference (REFERENCE) and four LOB data types, the following details of their characteristics. <br /><br /> rn <br /> Second, scalar (SCALAR) <br /><br /> rn <br /> Legitimate scalar column types and database types used in the same, in addition to some expansion of it. It is divided into seven groups: the number of characters, line, date, line marking, and the credibility of Boolean. <br /><br /> rn <br /> Figures, it has three basic types - NUMBER, PLS_INTEGER, and BINARY_INTENER. Can be described NUMBER integer or real number, and PLS_INTEGER and can only be described BINARY_INTENER integer. <br /><br /> rn <br /> NUMBER, is <FONT color=#a10100>stored</font> in decimal format, it is easy to <FONT color=#a10100>store,</font> but in the calculation, the system will automatically convert it to be a binary operation. It is the definition of NUMBER (P, S), P is the precision, the largest 38, S is the calibration range can be -84 ... 127 value. For example: NUMBER (5,2) that can be used to <FONT color=#a10100>store</font> -999.99 ... 999.99 value. P, S can be omitted in the definition, such as: NUMBER (5), NUMBER, etc.; <br /><br /> rn <br /> Used to describe BINARY_INTENER not <FONT color=#a10100>stored</font> in the database, but with symbols used to calculate the integer value. It&#39;s up to 2 forms of expression binary code. Cycle counters often use this type. <br /><br /> rn <br /> PLS_INTEGER and BINARY_INTENER The only difference is that in the calculation of overflow which occurred when, BINARY_INTENER type of variable will be automatically assigned to a NUMBER and not go wrong type, PLS_INTEGER variable type error will occur. <br /><br /> rn <br /> Characters, including the CHAR, VARCHAR2 (VARCHAR), LONG, NCHAR and NVARCHAR2 types. <br /><br /> rn <br /> CHAR, description of fixed-length string, if not the actual value of the length of the definition, the system will be filled spaces. It&#39;s a statement as follows CHAR (L), L is the length of the string, the default is 1, as the largest variables 32,767 characters, as the data is <FONT color=#a10100>stored</font> on the largest ORACLE8 for 2000. <br /><br /> rn <br /> VARCHAR2 (VARCHAR), description of variable-length string. It means the following statement VARCHAR2 (L), L is the length of the string, there is no default value, as the largest 32,767-byte variable, as data is <FONT color=#a10100>stored</font> on the largest ORACLE8 for 4000. Byte in a multi-language environment, the actual number of characters <FONT color=#a10100>stored</font> value may be smaller than L, for example: when the language environment in Chinese (SIMPLIFIED CHINESE_CHINA.ZHS16GBK), a VARCHAR2 (200) out of the data can be saved, or 200 English characters 100 Chinese characters. <br /><br /> rn <br /> LONG, <FONT color=#a10100>store</font> in the database can be used to save up to 2G of data as a variable, can be expressed as a 32,760 byte maximum length of string variable. <br /><br /> rn <br /> NCHAR, NVARCHAR2, the national character set specified with the NLS environment variable set of language is closely related to the use of methods and CHAR, VARCHAR2 same. <br /><br /> rn <br /> Lines, including RAW and LONG RAW types. Used to <FONT color=#a10100>store</font> binary data, and not in the character set conversion between. <br /><br /> rn <br /> RAW, similar to CHAR, a statement the way RAW (L), L for length, in bytes, as the largest database in 2000 listed as the biggest variable 32767 bytes. <br /><br /> rn <br /> LONG RAW, similar to LONG, listed as the largest database of 2G bytes of data <FONT color=#a10100>storage,</font> as a maximum 32,760-byte variable. <br /><br /> rn <br /> Date, only one type - DATE, the time used to <FONT color=#a10100>store</font> information, station 7 bytes (from the second century), there is no &quot;millennium bug&quot; problem. <br /><br /> rn <br /> Line marking, only one type - ROWID, used to <FONT color=#a10100>store</font> &quot;line identifier&quot; ROWIDTOCHAR function can be used to convert the line to become the characters logo. <br /><br /> rn <br /> Boolean, only one type - BOOLEAN, can be expressed only TRUE, FALSE or NULL. <br /><br /> rn <br /> Credible, there is only one type - MLSLABEL, can be used to save TRUSTED ORACLE binary variable-length tags. ORACLE in the standard, the only <FONT color=#a10100>store</font> NULL values. <br /><br /> rn <br /> Third, composite (COMPOSITE) <br /><br /> rn <br /> Scalar type is predefined, the use of these types can be derived from a number of complex types. There are records in table. <br /><br /> rn <br /> Records, can be seen as a combination of scalar structure, it is a statement as follows: <br /><br /> rn <br /> TYPE record_type_name IS RECORD <br /><br /> rn <br /> (Filed1 type1 [NOT NULL] [: = expr1] <br /><br /> rn <br /> ....... <br /><br /> rn <br /> filedn typen [NOT NULL] [: = exprn]) <br /><br /> rn <br /> Which, record_type_name is the record type name. (Is not watched as CREATE TABLE ?......) reference variables must be related to the definition, recording only a TYPE, not VARIABLE. <br /><br /> rn<br /> Table, not the physical <FONT color=#a10100>storage</font> of data tables, here is a variable type, also known as PL / SQL table, it is similar to C language array, also in a similar way. It&#39;s a statement as follows: <br /><br /> rn <br /> TYPE table_type_name IS TABLE OF scalar_type INDEX BY BINARY_INTENER; <br /><br /> rn <br /> Which, table_type_name is the type of name, scalar_type scalar type is a type of statement. Reference must also be related to the definition of variables. Table and the array is different from table 2, KEY and VALUE, KEY statement is the definition of BINARY_INTENER, VALUE statement is the definition of scalar_type. <br /><br /> rn <br /> In addition to records and tables, there are object types, collections (nested tables and VARRAYS) type, which will be devoted to explain. <br /><br /> rn <br /> Fourth, reference (REFERENCE) <br /><br /> rn <br /> PL/SQL8.0 before in only one type - REF CURSOR, the cursor is. The definition of its relatively simple, <br /><br /> rn <br /> CURSOR cursor_name IS select ..... from .....; <br /><br /> rn <br /> PL/SQL8.0 after the introduction of the REF type, which point to an object. This type will be explained separately. (Such as I find out again, so in the face of an expert ......) <br /><br /> rn <br /> 5, LOB type <br /><br /> rn <br /> LOB variable is mainly used to <FONT color=#a10100>store</font> large amounts of data fields of the database, the largest 4G byte can <FONT color=#a10100>store</font> the content (as much, and keep VCD?, A waste!). Are: <br /><br /> rn <br /> CLOB: The LONG and ORACLE7 type is similar to single-byte character data <FONT color=#a10100>storage.</font> (Oh do not be used to keep the Chinese...) <br /><br /> rn <br /> NCLOB: used to <FONT color=#a10100>store</font> multi-byte character set data width. (For example: keep &quot;啸傲江湖&quot; on very good) <br /><br /> rn <br /> BLOB: and LONG RAW is similar to the structure used to <FONT color=#a10100>store</font> non-binary data. <br /><br /> rn <br /> BFILE: It ORACLE database used to allow outside <FONT color=#a10100>storage</font> of large binary form of the text read-only access. <br /><br /> rn <br /> Other <br /><br /> rn <br /> In fact, to complete the understanding of scalar variables basically to meet the C / S mode of conventional database applications, and the type of follow-up to tell the truth, I play a 5-year ORACLE, are rarely used. <br /><br /> rn <br /> Attachment: reference &quot;ORACLE8 PL / SQL Programming&quot; ( &quot;ORACLE8 PL / SQL PROGRAMMING&quot;) ORACLE Series Mechanical Technology Industry Press <br /><br /> rn <br /> Note: This article is cited by PL / SQL which can be defined data types, not all types can be specified in the building when the data type for the column. <br /><br /> rn				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/using-sql-trace-and-tkprof/" title="Using SQL TRACE and TKPROF">Using SQL TRACE and TKPROF</a> 2009-02-26 21:36:37</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/about-oracle-data-types/</wfw:commentRss>
	</item>
		<item>
		<title>Oracle error backup solution</title>
		<link>http://www.kods.netwww.kods.net/oracle-error-backup-solution/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-error-backup-solution/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 18:50:13+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[log archive]]></category>
<category><![CDATA[open database]]></category>
<category><![CDATA[table space]]></category>
<category><![CDATA[second oracle]]></category>
<category><![CDATA[database backup]]></category>
<category><![CDATA[database log]]></category>
<category><![CDATA[sqlplus nolog]]></category>
<category><![CDATA[conn]]></category>
<category><![CDATA[archived logs]]></category>
<category><![CDATA[log sequence]]></category>
<category><![CDATA[oracle error]]></category>
<category><![CDATA[mkdir]]></category>
<category><![CDATA[archivelog]]></category>
<category><![CDATA[database state]]></category>
<category><![CDATA[collapse]]></category>
<category><![CDATA[oracle archive]]></category>
<category><![CDATA[database methods]]></category>
<category><![CDATA[special circumstances]]></category>
<category><![CDATA[archive directory]]></category>
<category><![CDATA[backup solution]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-error-backup-solution/</guid>
		<description><![CDATA[rn rn rn ORACLE backup solution error rn rn First, backup overview rn 1, the use of thermal backup, need to run in archive mode, the database can be fully restored, that is, from a backup to the datab ...]]></description>
		<content:encoded><![CDATA[rn <br /> rn <br /><br /> rn <br /> ORACLE backup solution error <br /><br /> rn <br /><br /> rn <br /> First, backup overview <br /><br /> rn <br /> 1, the use of thermal backup, need to run in archive mode, the database can be fully restored, that is, from a backup to the database after the collapse of the data will not be lost; <br /><br /> rn <br /> 2, can be used to back up the whole database backup, for special circumstances, you can back up only specific data files, such as backup only the user table space (generally written especially for some of the data files frequently, you can increase the backup frequency alone ); <br /><br /> rn <br /> 3, if during the recovery process and found that damage to a number of data files that can be used one method to restore data files, can also be used to restore the entire database methods; <br /><br /> rn <br /> 4, to run in archive mode will have a lot of archive logs, the log of the restoration of the database is very important, as long as the existence of backup and archiving, the database will be able to achieve full recovery (no loss of data); <br /><br /> rn <br /> 5, the recovery process carried out under the mount, if the restoration of the success, and then open the database <br /><br /> rn <br /> Second, Oracle to back up the reasons for the failure <br /><br /> rn <br /> 1, did not find the existence of archived logs (Oracle is not running in archive mode) <br /><br /> rn <br /> Third, change the operating mode Oracle <br /><br /> rn <br /> 1, $ mkdir / ora_arch1 # create a oracle archive log archive directory <br /><br /> rn <br /> 2, $ sqlplus / nolog <br /><br /> rn <br /> SQL&gt; conn / as sysdba; <br /><br /> rn <br /> Connected. <br /><br /> rn <br /> SQL&gt; startup mount; # start to mount the database state <br /><br /> rn <br /> SQL&gt; alter database archivelog; # to oracle model for archiving <br /><br /> rn <br /> SQL&gt; archive log start; # start archiving mode <br /><br /> rn <br /> SQL&gt; archive log list; # See oracle archive case <br /><br /> rn <br /> <I>Database log mode Archive Mode</i> <br /><br /> rn <br /> <I>Automatic archival Enabled</i> <br /><br /> rn <br /> <I>Archive destination / ora_arch1</i> <br /><br /> rn <br /> <I>Oldest online log sequence</i> <I>　　</I> <I>565</i> <br /><br /> rn <br /> <I>Next log sequence to archive</i> <I>　</I> <I>567</i> <br /><br /> rn <br /> <I>Current log sequence</i> <I>　</I> <I>567</i> <br /><br /> rn <br /> SQL&gt; alter database open; # open database <br /><br /> rn <br /> SQL&gt; alter system set LOG_ARCHIVE_DEST_1 = &#39;LOCATION = / ora_arch1&#39; # / ora_arhc1 must be in front of mkdir / ora_arch1 operation of the establishment of the same path (the path set oracle archive) SQL&gt; alter system set log_archive_format = &#39;% t_% s.dbf&#39; scope = spfile; # set archive types <br /><br /> rn <br /> SQL&gt; alter system set log_archive_start = true scope = spfile; # set up automatic archiving mode <br /><br /> rn <br /> Restart the database, the settings take effect <br /><br /> rn <br /> SQL&gt; shutdown immediate; <br /><br /> rn <br /> SQL&gt; startup <br /><br /> rn <br /> SQL&gt; archive log list; # See archived case <br /><br /> rn <br /> <I>Database log mode Archive Mode</i> <br /><br /> rn <br /> <I>Automatic archival Enabled</i> <br /><br /> rn <br /> <I>Archive destination / ora_arch1</i> <br /><br /> rn <br /> <I>Oldest online log sequence</i> <I>　　</I> <I>565</i> <br /><br /> rn <br /> <I>Next log sequence to archive</i> <I>　</I> <I>567</i> <br /><br /> rn <br /> <I>Current log sequence</i> <I>　</I> <I>567</i> <br /><br /> rn				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle10g-asm-database-table-space-maintenance/" title="Oracle10g ASM database table space maintenance">Oracle10g ASM database table space maintenance</a> 2009-03-31 17:51:25</li>
					<li><a href="http://www.kods.netwww.kods.net/block-oracle-paragraph-reprint/" title="Block Oracle paragraph (reprint)">Block Oracle paragraph (reprint)</a> 2009-03-26 17:41:14</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle10g-with-cross-platform-endian-transfer/" title="Oracle10g with cross-platform endian transfer">Oracle10g with cross-platform endian transfer</a> 2009-03-14 22:09:48</li>
					<li><a href="http://www.kods.netwww.kods.net/troubleshooting-the-physical-set-up-the-backup-database/" title="Troubleshooting: the physical set up the backup database">Troubleshooting: the physical set up the backup database</a> 2009-03-13 00:53:17</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-error-backup-solution/</wfw:commentRss>
	</item>
		<item>
		<title>(Transfer from LU) how the client connected to ORACLE database</title>
		<link>http://www.kods.netwww.kods.net/transfer-from-lu-how-the-client-connected-to-oracle-database/</link>
		<comments>http://www.kods.netwww.kods.net/transfer-from-lu-how-the-client-connected-to-oracle-database/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 18:35:05+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[operating system]]></category>
<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[server side]]></category>
<category><![CDATA[configuration file]]></category>
<category><![CDATA[oracle server]]></category>
<category><![CDATA[database connectivity]]></category>
<category><![CDATA[java database]]></category>
<category><![CDATA[oracle client software]]></category>
<category><![CDATA[oracle listener]]></category>
<category><![CDATA[sql server client]]></category>
<category><![CDATA[thin models]]></category>
<category><![CDATA[port configuration]]></category>
<category><![CDATA[server database]]></category>
<category><![CDATA[server port]]></category>
<category><![CDATA[related software]]></category>
<category><![CDATA[cough]]></category>
<category><![CDATA[illusion]]></category>
<category><![CDATA[many things]]></category>
<category><![CDATA[lu]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/transfer-from-lu-how-the-client-connected-to-oracle-database/</guid>
		<description><![CDATA[rn rn How to configure the client can connect to the database: rn For a client machine can connect oracle database on the client machines need to install the oracle client software, the only exception ...]]></description>
		<content:encoded><![CDATA[rn <br /> rn <br /> How to configure the client can connect to the database: <br /><br /> rn <br /> For a client machine can connect oracle database on the client machines need to install the oracle client software, the only exception is when the java database connectivity, you can use jdbc thin models, do not have installed the oracle client software. To join the machine to fit you in the oracle database, you do not need a separate machine in the oracle client installed, because when installed oracle database will automatically install the oracle client. <br /><br /> rn <br /> Used sql server database and then use the new oracle might have some questions: what I asked when the sql server do not have sql server installed this client? The reason is simple, sql server is microsoft, and it integrates the operating system in the sql server client, microsoft, if there is an agreement with the oracle, oracle client will also be integrated into the operating system, then we would not have installed on the client machine oracle soft client machine can access the database, but it seems things can not be achieved. <br /><br /> rn <br /> Some people may ask: Why in the sql server port is not listening, said to be in the oracle listener port configuration? In fact, there is also sql server listening port, but microsoft will be listening port is fixed at 1433, does not allow any changes you, so give you a sense of illusion is not sql server listening port, cough, microsoft too many things to closure fitted to the black box, easy-to-use but also the need for side effects. The listening port of oracle directly in the configuration file to allow any changes, but no matter how it changes with the oracle server side set up the same listening port. <br /><br /> rn <br /> Well, get on, how can we do to make the client machine can connect to oracle database? <br /><br /> rn <br /> A. Installation of related software <br /><br /> rn <br /> B. Appropriate configuration <br /><br /> rn <br /> A. At an appropriate location to install the appropriate software: <br /><br /> rn <br /> On the client machine: <br /><br /> rn <br /> 1. On the client machines to install the Oracle Net communications ORACLE software, it is included in the oracle client software. <br /><br /> rn <br /> 2. Properly configured sqlnet.ora file: <br /><br /> rn <br /> NAMES.DIRECTORY_PATH = (TNSNAMES, ....) <br /><br /> rn <br /> NAMES.DEFAULT_DOMAIN = DB_DOMAIN <br /><br /> rn <br /> Under normal circumstances we do not have NAMES.DEFAULT_DOMAIN parameters. If you want to not use the parameters of the parameter # comment out or delete can be, for NAMES.DIRECTORY_PATH parameter default values can be used for parameter NAMES.DEFAULT_DOMAIN will need to comment out sometimes, there is a detailed explanation below. <br /><br /> rn <br /> 3. Tnsname.ora documents properly configured <br /><br /> rn <br /> Machines in the server-side: <br /><br /> rn <br /> 1. Ensure the listener has started <br /><br /> rn <br /> 2. To ensure that the database has already started. <br /><br /> rn <br /> If the database does not start, use: <br /><br /> rn <br /> Oracle 9i: <br /><br /> rn <br /> dos&gt; sqlplus &quot;/ as sysdba&quot; <br /><br /> rn <br /> sqlplus&gt; startup <br /><br /> rn <br /> Oracle 8i: <br /><br /> rn <br /> dos&gt; svrmgrl <br /><br /> rn <br /> svrmgrl&gt; connect internal <br /><br /> rn <br /> svrmgrl&gt; startup <br /><br /> rn <br /> Command to start the database <br /><br /> rn <br /> If the listener does not start, use: <br /><br /> rn <br /> lsnrctl start [listener name] <br /><br /> rn <br /> lsnrctl status [listener name] <br /><br /> rn <br /> Command to start listener <br /><br /> rn <br /> B. Appropriate configuration <br /><br /> rn <br /> How to correctly configure tnsname.ora documents: <br /><br /> rn <br /> Client machines can use oracle Net Configuration Assistant or oracle Net Manager graphical configuration tool for client-side configuration, the configuration tool actually modify tnsnames.ora file. Therefore, we can directly modify the tnsnames.ora file, the following documents in order to directly modify the tnsnames.ora example: <br /><br /> rn <br /> The location of the file as: ... \ network \ admin \ tnsnames.ora (for windows) <br /><br /> rn <br /> ... / Network / admin / tnsnames.ora (for unix) <br /><br /> rn <br /> Here, assuming that the server named testserver, service called orcl.testserver.com, the use of the listening port for 1521, the document tnsnams.ora a test network service name (database alias) as follows: <br /><br /> rn <br /> test = <br /><br /> rn <br /> (DESCRIPTION = <br /><br /> rn <br /> (ADDRESS_LIST = <br /><br /> rn <br /> (ADDRESS = (PROTOCOL = TCP) (HOST = testserver) (PORT = 1521)) <br /><br /> rn <br /> ) <br /><br /> rn <br /> (CONNECT_DATA = (SERVICE_NAME = orcl.testserver.com) <br /><br /> rn <br /> ) <br /><br /> rn <br /> ) <br /><br /> rn <br /> The contents of the red need to modify the content of the actual situation, it is explained as follows: <br /><br /> rn <br /> PROTOCOL: client and server-side communications protocol, usually TCP, do not change the content in general. <br /><br /> rn<br /> HOST: database listener&#39;s machine name or IP address of the machine, the database listener and database in general in the same machine, so when I say the machine where the database listener is the general machinery refers to the database is located. In UNIX or WINDOWS, you can listen in the database through the machine where the command prompt using the command hostname to be the machine name, or ipconfig (for WINDOWS) or ifconfig (for UNIX) command to be IP addresses. It should be noted that, regardless of using the machine name or IP address, the client must pass ping command ping the machine where the database listener&#39;s machine name, or the need to add in the hosts file of the machine where the database listener the name of the machine Analysis. <br /><br /> rn <br /> PORT: database listener port is listening, you can see the server side listener.ora file or listen in the database where the machine through the command prompt lnsrctl status [listener name] command View. Port value here must be familiar with the database listener is listening the same port. <br /><br /> rn <br /> SERVICE_NAME: the server side, after landing with system users, sqlplus&gt; show parameter service_name command View. <br /><br /> rn <br /> How to use configuration of network services to connect to the database: <br /><br /> rn <br /> Sqlplus procedure used test for testing of network services, such as sqlplus system / manager @ test. If you can not connect to the database, tnsname.ora document in the test of network services (net service) followed by the Oracle database DB_Domain parameter values, by using sqlplus&gt; show parameter db_domain View command. Parameter values for db_domain here testserver.com, be added to the back of network services, the revised tnsname.ora services on the network name says: <br /><br /> rn <br /> test.testserver.com = <br /><br /> rn <br /> (DESCRIPTION = <br /><br /> rn <br /> (ADDRESS_LIST = <br /><br /> rn <br /> (ADDRESS = (PROTOCOL = TCP) (HOST = testserver) (PORT = 1521)) <br /><br /> rn <br /> ) <br /><br /> rn <br /> (CONNECT_DATA = (SERVICE_NAME = orcl.testserver.com) <br /><br /> rn <br /> ) <br /><br /> rn <br /> ) <br /><br /> rn <br /> Sqlplus procedure with test.testserver.com testing of network services, such as sqlplus system / manager @ test.testserver.com. <br /><br /> rn <br /> Even on the service name in the network behind the increase db_domain parameters need to be aware of sql * plus connection of the principle of the database, I followed to resolve common fault in 12,154 is given detailed instructions. <br /><br /> rn <br /> If the above trick does not work, then you have to use the diversion of a large universe. <br /><br /> rn <br /> The client part of the network services <br /><br /> rn <br /> test.testserver.com = <br /><br /> rn <br /> (DESCRIPTION = <br /><br /> rn <br /> (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = testserver) (PORT = 1521)) <br /><br /> rn <br /> ) <br /><br /> rn <br /> (CONNECT_DATA = (SERVICE_NAME = orcl.testserver.com) <br /><br /> rn <br /> ) <br /><br /> rn <br /> ) <br /><br /> rn <br /> Copy to the server tnsnames.ora file. Server-side and then use sqlplus system / manager @ test.testserver.com to connect to the database. <br /><br /> rn <br /> If a successful connection on your client network and server-side problem. <br /><br /> rn <br /> If the connection fails, check with the front part of part of part of network services is correct, if satisfied that the correct part of network services and all clients are likely to crawl database system TCP / IP or the Oracle system, it was recommended that re - installation database. <br /><br /> rn <br /> Troubleshooting solutions: <br /><br /> rn <br /> TNS-12154 (ORA-12154): TNS: could not resolve service name <br /><br /> rn <br /> The error that the network services used to connect in the tnsnames.ora file does not exist, such as the above tnsnames.ora in the network services were only a test, if a user in connection with sqlplus system / manager @ test1 then will be given TNS-12154 error. <br /><br /> rn <br /> It should be noted that, sometimes even in the tnsnames.ora file of the network services, but with the connection of network services will be wrong to see such a typical configuration is as follows (on the client machine): <br /><br /> rn <br /> sqlnet.ora file: <br /><br /> rn <br /> NAMES.DIRECTORY_PATH = (TNSNAMES, ....) <br /><br /> rn <br /> NAMES.DEFAULT_DOMAIN = server.com <br /><br /> rn <br /> tnsnames.ora file: <br /><br /> rn <br /> test = <br /><br /> rn <br /> (DESCRIPTION = <br /><br /> rn <br /> (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = testserver) (PORT = 1521)) <br /><br /> rn <br /> ) <br /><br /> rn <br /> (CONNECT_DATA = (SERVICE_NAME = orcl.testserver.com) <br /><br /> rn <br /> ) <br /><br /> rn <br /> ) <br /><br /> rn <br /> sql * plus the basic mechanism of operation: <br /><br /> rn<br /> User input in sqlplus system / manager @ test after, sqlplus program will automatically find the sqlnet.ora file NAMES.DEFAULT_DOMAIN parameters, if the parameters exist, the value of the parameter removed, added to the back of network services, namely, this case you enter from the sqlplus system / manager @ test automatically into sqlplus system / manager @ test.server.com, and then to find tnsnames.ora file test.server.com of network services, which of course can not find the because the documents were only a test network services, so error. The solution is to sqlnet.ora file can be commented out NAMES.DEFAULT_DOMAIN parameters, such as # NAMES.DEFAULT_DOMAIN = server.com. If NAMES.DEFAULT_DOMAIN parameter does not exist, sqlplus program tnsnames.ora file directly to the test to find the network service name, and then remove the host, port, tcp, service_name, the use of such information will be connected to the request sent to the correct database server on . <br /><br /> rn <br /> Another principle in the tnsnames.ora configuration are not case-sensitive, but I did encounter the situation of case-sensitive, so it would be preferable to the use of Web services and tnsnames.ora configured in exactly the same. <br /><br /> rn <br /> ORA-12514: TNS: listener could not resolve SERVICE_NAME given in connect Descriptor. <br /><br /> rn <br /> The error that can be found in the network tnsnames.ora service name, but specified in the tnsnames.ora and server-side SERVICE_NAME inconsistent SERVICE_NAME. The solution is to modify the tnsnames.ora in the SERVICE_NAME. <br /><br /> rn <br /> Confusing terminology introduced: <br /><br /> rn <br /> Db_name: a database (Oracle database) the unique identifier, the database referred to as the first chapter of the Oracle database. Such that for a single database is sufficient, but with the database by a number of distributed database consisting of the popularity of such an order database to database management to a certain degree, since the name of each database are the same, resulting in management confusion. In order to resolve this situation, the introduction of Db_domain parameters, such identification in the database Db_name and Db_domain by joint decision of two parameters, because the database to avoid duplicate names caused confusion in management. This is similar to the machines of Internet management. Db_name and we will use two parameters Db_domain &#39;.&#39; To link up a database that will be the name of the database known as the Global_name, that it extends the Db_name. Db_name parameters can only be letters, numbers ,&#39;_&#39;,&#39;#&#39;,&#39;$&#39; component, and a maximum of eight characters. <br /><br /> rn <br /> Db_domain: the definition of a database where the domain, the domain name with the Internet&#39;s&#39; domain &#39;is not in any way related to, but the database administrator to better management of distributed database and determined according to the actual situation. In order to facilitate course management, can be equivalent to the Internet domain. <br /><br /> rn <br /> Global_name: a database (Oracle database) the unique identifier, oracle command this method proposed database. The value is in the creation of the database is to decide, and the default value of Db_name. Db_domain. Parameters at a later document Db_name with any changes Db_domain parameters Global_name does not affect the value, if we try to amend Global_name, can only use ALTER DATABASE RENAME GLOBAL_NAME TO &lt;db_name.db_domain&gt; order be modified, and then modify the appropriate parameters. <br /><br /> rn <br /> Service_name: The parameter is the newly introduced oracle8i. In 8i the past, we used to indicate the SID identifies an instance of the database, but Oracle&#39;s parallel environment, multiple instances of a database corresponds to, which will require a number of network services, and set the red tape. Parallel environment in order to facilitate the setting, the introduction of Service_name parameter corresponds to a database, rather than an example, and the parameters are many other benefits. The default values for parameters Db_name. Db_domain, that is equivalent to Global_name. Corresponds to more than a database can be Service_name, in order to achieve a more flexible configuration. This parameter is not directly related with the SID, that is, do not have Service name must be the same SID. <br /><br /> rn <br /> Net service name: Web services, and also known as the alias database (database alias). Client program is needed to access the database, shielding the client how to connect to the server-side details of the location of the database to achieve the characteristics of transparency.				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/using-sql-trace-and-tkprof/" title="Using SQL TRACE and TKPROF">Using SQL TRACE and TKPROF</a> 2009-02-26 21:36:37</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/transfer-from-lu-how-the-client-connected-to-oracle-database/</wfw:commentRss>
	</item>
		<item>
		<title>Archive oracle10g example (reprint)</title>
		<link>http://www.kods.netwww.kods.net/archive-oracle10g-example-reprint/</link>
		<comments>http://www.kods.netwww.kods.net/archive-oracle10g-example-reprint/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 18:12:52+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[parameters]]></category>
<category><![CDATA[log archive]]></category>
<category><![CDATA[open database]]></category>
<category><![CDATA[oracle instance]]></category>
<category><![CDATA[database log]]></category>
<category><![CDATA[contrary]]></category>
<category><![CDATA[global area]]></category>
<category><![CDATA[variable size]]></category>
<category><![CDATA[dbf]]></category>
<category><![CDATA[log sequence]]></category>
<category><![CDATA[demonstration]]></category>
<category><![CDATA[current system]]></category>
<category><![CDATA[arc]]></category>
<category><![CDATA[archivelog]]></category>
<category><![CDATA[dest]]></category>
<category><![CDATA[archive format]]></category>
<category><![CDATA[database archive]]></category>
<category><![CDATA[central plains]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/archive-oracle10g-example-reprint/</guid>
		<description><![CDATA[Oracle10g Automatic archiving settings Oracle10i Central Plains log_archive_start in some parameters have been abandoned, the archive log mode is set up we need to log_archive_format and log_archive_d ...]]></description>
		<content:encoded><![CDATA[<h2> Oracle10g Automatic archiving settings </h2><br /> Oracle10i Central Plains log_archive_start in some parameters have been abandoned, the archive log mode is set up we need to log_archive_format and log_archive_dest_N parameters, and then mount the database under the state alter database archivelog; can be set to the database archive log mode, Oracle will automatically archiving, on the contrary the use of alter database noarchivelog; can. <br /><br /> More than re-starting operation of the database will still be effective. The following is a demonstration of the process. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; startup mount</strong></font> <br /> ORACLE instance started. <br /><br /> Total System Global Area 399927208 bytes <br /> Fixed Size 1284008 bytes <br /> Variable Size 318767104 bytes <br /> Database Buffers 33554432 bytes <br /> Redo Buffers 46321664 bytes <br /> Database mounted. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; alter database archivelog;</strong></font> <br /><br /> Database altered. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; alter database open;</strong></font> <br /><br /> Database altered. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; show parameter</strong></font> archive_start <br /><br /> NAME TYPE VALUE <br /> ------------------------------------ ----------- --- --------------------------- <br /> log_archive_start boolean FALSE <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; archive log list</strong></font> <br /> Database log mode Archive Mode <br /> Automatic archival Enabled <br /> Archive destination / data4/oracle10/app/prodUCt/10.0.0/dbs/arch <br /> Oldest online log sequence 92 <br /> Next log sequence to archive 94 <br /> Current log sequence 94 <br /> SQL&gt; <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; shutdown immediate</strong></font> <br /> Database closed. <br /> Database dismounted. <br /> ORACLE instance shut down. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; startup</strong></font> <br /> ORACLE instance started. <br /><br /> Total System Global Area 399927208 bytes <br /> Fixed Size 1284008 bytes <br /> Variable Size 318767104 bytes <br /> Database Buffers 33554432 bytes <br /> Redo Buffers 46321664 bytes <br /> Database mounted. <br /> Database opened. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; archive log list</strong></font> <br /> Database log mode Archive Mode <br /> Automatic archival Enabled <br /><br /> Archive destination / data4/oracle10/app/product/10.0.0/dbs/arch <br /> Oldest online log sequence 92 <br /> Next log sequence to archive 94 <br /> Current log sequence 94 <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt;! Ls arch</strong></font> <br /> 1_92_496877985.dbf arch_1_93_496877985.arc <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; alter system archive log current;</strong></font> <br /><br /> System altered. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt;! Ls arch</strong></font> <br /> 1_92_496877985.dbf arch_1_93_496877985.arc arch_1_94_496877985.arc <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; alter system switch logfile;</strong></font> <br /><br /> System altered. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; /</strong></font> <br /><br /> System altered. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; /</strong></font> <br /><br /> System altered. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; /</strong></font> <br /><br /> System altered. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt; /</strong></font> <br /><br /> System altered. <br /><br /> <font color=#ff0000 size=4><strong>SQL&gt;! Ls arch</strong></font> <br /> 1_92_496877985.dbf arch_1_94_496877985.arc arch_1_96_496877985.arc arch_1_98_496877985.arc <br /> arch_1_93_496877985.arc arch_1_95_496877985.arc arch_1_97_496877985.arc arch_1_99_496877985.arc				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/archive-oracle10g-example-reprint/</wfw:commentRss>
	</item>
		<item>
		<title>ORACLE day-to-day maintenance manual (Download)</title>
		<link>http://www.kods.netwww.kods.net/oracle-day-to-day-maintenance-manual-download/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-day-to-day-maintenance-manual-download/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 17:30:11+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[routine maintenance]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-day-to-day-maintenance-manual-download/</guid>
		<description><![CDATA[rn rn rn rn rn rn rn rn rn rn Document: rn oracle manual routine maintenance. rar rn rn Size: rn 243KB rn rn Download: rn Download rn]]></description>
		<content:encoded><![CDATA[rn <br /> rn <TABLE borderColor=#dddddd cellSpacing=0 cellPadding=0 width=360 align=center border=1> rn <TBODY> rn <TR height=60> rn <TD align=middle width=60></TD> rn <TD> rn <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> rn <TBODY> rn <TR height=20> rn <TD align=middle width=40> Document: </TD> rn <TD> oracle manual routine maintenance. rar </TD></TR> rn <TR height=20> rn <TD align=middle width=40> Size: </TD> rn <TD> 243KB </TD></TR> rn <TR height=20> rn <TD align=middle width=40> Download: </TD> rn <TD> <FONT color=#0000ff>Download</font> </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><br /><br /> rn				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/high-availability-oracle-flashback/" title="High Availability Oracle Flashback">High Availability Oracle Flashback</a> 2009-02-26 17:23:02</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-day-to-day-maintenance-manual-download/</wfw:commentRss>
	</item>
		<item>
		<title><to> the database name (db_name). instance name (instance_name). ORACLE_SID</title>
		<link>http://www.kods.netwww.kods.net/the-database-name-db-name-instance-name-instance-name-oracle-sid/</link>
		<comments>http://www.kods.netwww.kods.net/the-database-name-db-name-instance-name-instance-name-oracle-sid/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 14:55:06+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[operating system]]></category>
<category><![CDATA[instance name]]></category>
<category><![CDATA[database control]]></category>
<category><![CDATA[parameter files]]></category>
<category><![CDATA[database instance]]></category>
<category><![CDATA[database name]]></category>
<category><![CDATA[database database]]></category>
<category><![CDATA[service names]]></category>
<category><![CDATA[oracle7]]></category>
<category><![CDATA[environment variable]]></category>
<category><![CDATA[emergence]]></category>
<category><![CDATA[rn]]></category>
<category><![CDATA[system environment]]></category>
<category><![CDATA[server connection]]></category>
<category><![CDATA[control parameters]]></category>
<category><![CDATA[external connections]]></category>
<category><![CDATA[domain service]]></category>
<category><![CDATA[server program]]></category>
<category><![CDATA[file database]]></category>
<category><![CDATA[linkages]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/the-database-name-db-name-instance-name-instance-name-oracle-sid/</guid>
		<description><![CDATA[rn Database name (DB_NAME), instance name (Instance_name), as well as the operating system environment variable (ORACLE_SID) In ORACLE7, 8 database, only the database name (db_name) and database insta ...]]></description>
		<content:encoded><![CDATA[rn <br /> <FONT size=2>Database name (DB_NAME), instance name (Instance_name), as well as the operating system environment variable (ORACLE_SID) <BR><BR> In ORACLE7, 8 database, only the database name (db_name) and database instance name (instance_name). In ORACLE8i, 9i in the emergence of new parameters, namely, the domain name database (db_domain), service name (service_name), as well as the operating system environment variable (ORACLE_SID). These are present in a database with the logo, the database used to distinguish between different parameters. <BR><BR> <STRONG>I. What is the database name (db_name)? <BR></strong> Database name is used to distinguish between internal identification data is stored in binary file database control parameters, in the data after the installation or to create will not be allowed to modify. Database after the installation is complete, the parameters are written into the database pfile parameter files, the format is as follows:</font> <BR> <STRONG>code:</strong> <br /><br /> rn <br /> ......... <BR> db_name = &quot;orcl&quot; # (not allowed to modify) <BR> db_domain = dbcenter.toys.com <BR> instance_name = orcl <BR> service_names = orcl.dbcenter.toys.com <BR> control_file =(............... <BR> ......... <br /><br /> rn <br /> In each run ORACLE8i database has a database name (db_name), if a server program to create the two databases, there are two database name. According to its control parameters are different in the control of pfile-related database. <BR><BR> <STRONG>Second, what is the database instance name (instance_name)</strong> <BR> Database instance name is used in and the linkages between the operating system for the use of external connections. In the operating system to obtain the interaction between the database, database instance name must be used. For example, to a database and a server connection, it is necessary to know the database instance name, only know the database name is of no use with the database name is different in the data after the installation or create the database, instance name can be modified. Database after the installation is complete, the examples were written into the database pfile parameter files, the format is as follows: <BR> <STRONG>code:</strong> <br /><br /> rn <br /> db_name = &quot;orcl&quot; # (not allowed to modify) <BR> db_domain = dbcenter.toys.com <BR> instance_name = orcl # (can be amended, the same can also be different db_name) <BR> service_names = orcl.dbcenter.toys.com <BR> control_file =(............... <BR> ......... <br /><br /> rn <br /> Database name and the relationship between the instance name. <BR> Database name and instance name is usually the relationship between the one-to-one relationship, there is a database instance name, a name, if a server to create two databases, there are two databases, and the two database instances, and with a database to determine the two logos, and examples of connected users. <BR> But in 8i, 9i&#39;s Parallel Server, the database with examples of one-to-one relationship between the non-existent, but one-to-many relationship, (corresponding to multiple instances of a database, the user only one time linked to an example, when a One example of failure, other examples of automated services to ensure the safe operation of the database.) <BR><BR> <STRONG>Third,</strong> the <STRONG>operating system environment variable (ORACLE_SID)</strong> <BR> In practice, the database instance name is sometimes used to describe the instance name (instance_name) parameters, and sometimes the use of ORACLE_SID parameter. These are two examples of the database, What is the difference between them then? (Often confused) <BR> <STRONG>code:</strong> <br /><br /> rn <br /> (ORACLE_SID) <BR> OS &lt;----------------&gt;; ORACLE database &lt;--------( Instance_name (instance name)) <br /><br /> rn <br /> Above that the instance name instance_name, ORACLE_SID and the database and the relationship between the operating system, although here the two parameters are listed in the database instance name, but the instance_name parameter is the ORACLE database parameters, this parameter can query parameter files that ORACLE_SID parameter is the operating system environment variables. <BR> ORACLE_SID environment variable for the operating system and operating system interaction. In other words, to be in the operating system instance name, it is necessary to use the ORACLE_SID. This parameter with the ORACLE_BASE, ORACLE_HOME, such as the use of the same. In the database after installation, ORACLE_SID parameter was used to define the name of the file database. Such as: <BR> $ ORACLE_BASE / admin / DB_NAME / pfile / init $ ORACLE_SID.ora. <BR> The definition of methods: <BR> <STRONG>code:</strong> <br /><br /> rn <br /> export ORACLE_SID = orcl <br /><br /> rn <br /> If the same server to create a number of databases, while at the same time is bound to have more than one database instance, then the process can repeat the above definition in order to choose a different example. <BR><BR> Also can be used: <br /><br /> rn <br /> <STRONG>code:</strong> <BR> [oracle @ Datacent] $. oraenv <br /><br /> rn <br /> ORACLE_SID to switch to a different operating system to start the adoption of different examples (instance) <br /><br /> rn				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/rman-created-physical-standby/" title="RMAN created physical standby">RMAN created physical standby</a> 2009-03-30 22:49:29</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-deadlock-related/" title="Oracle deadlock related">Oracle deadlock related</a> 2009-03-30 16:46:54</li>
					<li><a href="http://www.kods.netwww.kods.net/redhat-as-3-at-oracle10-2-1-install-document/" title="RedHat AS 3 at oracle10.2.1 install document">RedHat AS 3 at oracle10.2.1 install document</a> 2009-03-13 16:56:34</li>
					<li><a href="http://www.kods.netwww.kods.net/using-sql-trace-and-tkprof/" title="Using SQL TRACE and TKPROF">Using SQL TRACE and TKPROF</a> 2009-02-26 21:36:37</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/the-database-name-db-name-instance-name-instance-name-oracle-sid/</wfw:commentRss>
	</item>
	</channel>
</rss>
