<?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>Oracle</title>
	<atom:link href="http://www.kods.net/feed/category/oracle/" rel="self" type="application/rss+xml" />
	<link>http://www.kods.net/</link>
	<description>Oracle</description>
	<pubDate>Wed, 10 Mar 2010 15:25:16+0000</pubDate>
	<generator>http://www.kods.net/</generator>
	<language>en</language>
		<item>
		<title>[Change] Use shell handle the database alert log oracle</title>
		<link>http://www.kods.netwww.kods.net/change-use-shell-handle-the-database-alert-log-oracle/</link>
		<comments>http://www.kods.netwww.kods.net/change-use-shell-handle-the-database-alert-log-oracle/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 07:55:02+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[quot]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[fri]]></category>
<category><![CDATA[file format]]></category>
<category><![CDATA[rn]]></category>
<category><![CDATA[boring work]]></category>
<category><![CDATA[figure 1]]></category>
<category><![CDATA[sql scripts]]></category>
<category><![CDATA[algorithm]]></category>
<category><![CDATA[text editing tools]]></category>
<category><![CDATA[shell scripts]]></category>
<category><![CDATA[repetitive operations]]></category>
<category><![CDATA[000060]]></category>
<category><![CDATA[more time consuming]]></category>
<category><![CDATA[implementation services]]></category>
<category><![CDATA[it168]]></category>
<category><![CDATA[article deals]]></category>
<category><![CDATA[starting line]]></category>
<category><![CDATA[critical error]]></category>
<category><![CDATA[technical documentation]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/change-use-shell-handle-the-database-alert-log-oracle/</guid>
		<description><![CDATA[rn 2008-10-17 22:37 rn rn rn rn rn From: ITPUB.NET Link: http://tech.it168.com/a2008/1016/208/000000208136.shtml rn Technical documentation】 【IT168 In this paper, using the shell to realize oracle dat ...]]></description>
		<content:encoded><![CDATA[rn <br /> 2008-10-17 22:37 <br /> rn <TABLE"TABLE-LAYOUT: fixed; WIDTH: 100%" _fckxhtmljob="2"> rn <TBODY _fckxhtmljob="2"> rn <TR _fckxhtmljob="2"> rn <TD _fckxhtmljob="2"> rn <br /> From: ITPUB.NET <BR _fckxhtmljob="2"> Link: http://tech.it168.com/a2008/1016/208/000000208136.shtml <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> rn <br /> <STRONG _fckxhtmljob="2">Technical documentation】 【IT168</strong> <BR _fckxhtmljob="2"> In this paper, using the shell to realize oracle database alert log processing algorithms and implementation process, and give a sample, examples show that the analysis of the script can be quickly and effectively alert logs, to meet the demand, the final look ahead to deal with the process. <br /><br /> rn <br /> <STRONG _fckxhtmljob="2">1.</strong> &lt;BR _fckxhtmljob=&quot;2&quot;&gt; <STRONG _fckxhtmljob="2">Outlined the background</strong> for the daily number of repetitive operations, as well as deal with the problem site in the user process, using some automated scripts to accomplish some work, make some boring work of change were simple, and quick, but also is not prone to error. In certain provinces of Unicom Corporation and the Treasurer and implementation services in the process learned that users have the following needs: to provide shell scripts to achieve the alert log of oracle database to track processing, for example according to the time (in days) to see and deal with alert logs. <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> Without scripting, the common approach is to download the alert files, use the text editing tools to find, statistics, positioning, filtering, download the trace file. Is generally more time-consuming, and may be omitted. <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> This first set out the algorithm, and then gives sample code and implementation, and finally gives outlook, the script includes shell scripts and sql scripts. <br /><br /> rn <br /> <STRONG _fckxhtmljob="2">2. Algorithm <BR _fckxhtmljob="2"> <a href="http://www.kods.net/upload/c/change-use-shell-handle-the-database-alert-log-oracle.jpg" class="lightbox"><img src="http://www.kods.net/upload/c/change-use-shell-handle-the-database-alert-log-oracle.jpg"   alt="[Change] Use shell handle the database alert log oracle" title="[Change] Use shell handle the database alert log oracle" /></a></strong> <br /><br /> rn <br /><BR _fckxhtmljob="2"> Figure 1 flow chart to determine how many days need to analyze the log since the situation on the time for processing, according to timestamp format (This article deals with the time of the alert file format is similar to: Fri Aug 1 13:22:37 2008), to obtain the starting line number analysis from the starting line number to the end of all content. <BR _fckxhtmljob="2"> ORA-filter all of the information, and give them statistics. <BR _fckxhtmljob="2"> Of critical error message (ORA-00600, ORA-000060, ORA-1555, ORA-07445), for separate treatment. <BR _fckxhtmljob="2"> Find and obtain the trace file. Generated ftp format, use the ftp command to download the trace file. <BR _fckxhtmljob="2"> Use operating system commands, access to an error corresponding meaning. <br /><br /> rn <br /><br /> rn <br /> 3. <STRONG _fckxhtmljob="2">Shell code</strong> &lt;BR _fckxhtmljob=&quot;2&quot;&gt; processing alert files called scripts check_alert.sh <br /><br /> rn <br /> rn<br /> #! / bin / sh <BR _fckxhtmljob="2"> # Set the alert log file environment variables <BR _fckxhtmljob="2"> ORIGINAL_ALERT = &quot;/ arraybill / home / oracle / app / oracle / admin / hnbill / bdump / alert_hnbill.log&quot; <BR _fckxhtmljob="2"> # Determine the input parameters: days <BR _fckxhtmljob="2"> if [$ #-ne 1] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> echo &quot;wrong argument, usage: sh check_alert.sh 3&quot; <BR _fckxhtmljob="2"> exit 1 <BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"> if [$ 1-lt 0] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> echo &quot;Sorry, please enter a non-negative integer&quot; <BR _fckxhtmljob="2"> exit 1 <BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # Query parameters corresponding to the time before the system time <BR _fckxhtmljob="2"> sh dated_alert.sh $ 1&gt; / dev / null <BR _fckxhtmljob="2"> # Decomposition time format, pay attention, which may be a days, it could be two, the month is three, month and day length of the string consisting of a fixed <BR _fckxhtmljob="2"> str_day = $ (sed 1d tmp_date.log | awk &#39;(if (substr ($ 1,1,1) == 0) print substr ($ 1,2,1); else print substr ($ 1,1,2))&#39;) <BR _fckxhtmljob="2"> str_length = $ (echo $ str_day | awk &#39;(print length ($ 1))&#39;) <BR _fckxhtmljob="2"> # 3 letters of the month will be broken down into the first letter capitalized, other lower-case <BR _fckxhtmljob="2"> str_month = $ (sed 1d tmp_date.log | awk &#39;(print substr ($ 1,4,3))&#39; | sed &#39;1, $ y / [JFMASODN] ABCDEFGHIJKLMNOPQRSTUVWXYZ / [JFMASODN] abcdefghijklmnopqrstuvwxyz / &#39;) <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> if [$ str_length-eq 1] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> echo &quot;awk&#39;/&quot;&quot;$ str_month $ str_day&quot; &quot;/ (print NR) &#39;&quot; $ ORIGINAL_ALERT &quot;&quot;&gt; tmp.sh <BR _fckxhtmljob="2"> # echo &quot;$ str_month $ str_day&quot; <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"> if [$ str_length-eq 2] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> echo &quot;awk&#39;/&quot;&quot;$ str_month $ str_day&quot; &quot;/ (print NR) &#39;&quot; $ ORIGINAL_ALERT &quot;&quot;&gt; tmp.sh <BR _fckxhtmljob="2"> # echo &quot;$ str_month $ str_day&quot; <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> chmod 777 tmp.sh <BR _fckxhtmljob="2"> chmod 777 tmp.sh <BR _fckxhtmljob="2"> sh tmp.sh | awk &#39;NR == 1 (print $ 1)&#39;&gt; rownum.lst <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # Get the alert to deal with the beginning of the log line number and ending line number <BR _fckxhtmljob="2"> alert_row_begin = $ (cat rownum.lst | awk &#39;(print $ 1)&#39;) <BR _fckxhtmljob="2"> alert_row_end = $ (wc-l $ ORIGINAL_ALERT | awk &#39;(print $ 1)&#39;) <BR _fckxhtmljob="2"> echo &quot;awk &#39;NR == $ alert_row_begin, NR == $ alert_row_end (print \ $ 0)&#39;&quot; $ ORIGINAL_ALERT &quot;&quot;&gt; tmp.sh <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # Line number according to the scope of interception of alert log content, and saved to a temporary file in tmp_alert.tmp <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> sh tmp.sh&gt; tmp_alert.tmp <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"> echo &quot;-----------------------------------------------&quot; <BR _fckxhtmljob="2"> echo &quot;Error Summary Start Time: $ begin_date_time&quot; <BR _fckxhtmljob="2"> echo &quot;-----------------------------------------------&quot; <BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> echo &quot;Number Error number&quot; <BR _fckxhtmljob="2"> echo &quot;---- -------------------&quot; <BR _fckxhtmljob="2"> grep ORA-tmp_alert.tmp | awk &#39;(print substr ($ 0,0,9))&#39; | sort-nr | uniq-c | sort-nr <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # If there are 600 errors, 600 error handling script calls <BR _fckxhtmljob="2"> if [$ (awk &#39;/ ORA-00600 / (print NR)&#39; tmp_alert.tmp | wc-l | awk &#39;(print $ 1)&#39;)-gt 0] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> sh check_00600.sh <BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"> # 07445 If there are errors, call 07445 error handling script <BR _fckxhtmljob="2"> if [$ (awk &#39;/ ORA-07445 / (print NR)&#39; tmp_alert.tmp | wc-l | awk &#39;(print $ 1)&#39;)-gt 0] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> sh check_07445.sh <BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # If there are 000.06 thousand errors, call the 000060 error handling script <BR _fckxhtmljob="2"> if [$ (awk &#39;/ ORA-000060 / (print NR)&#39; tmp_alert.tmp | wc-l | awk &#39;(print $ 1)&#39;)-gt 0] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> sh check_000060.sh <BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # 01555 If there are errors, call 01555 error handling script <BR _fckxhtmljob="2"> if [$ (awk &#39;/ ORA-01555 / (print NR)&#39; tmp_alert.tmp | wc-l | awk &#39;(print $ 1)&#39;)-gt 0] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> sh check_01555.sh <BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"> # Remove the call to the temporary files generated in the process <BR _fckxhtmljob="2"> rm-f tmp_3_line.sh <BR _fckxhtmljob="2"> rm-f tmp_date.log <BR _fckxhtmljob="2"> rm-f tmp.sh <BR _fckxhtmljob="2"> rm-f ora01555_trc.log <BR _fckxhtmljob="2"> rm-f ora006000_trc.log <BR _fckxhtmljob="2"> rm-f ora07445_trc.log <BR _fckxhtmljob="2"> rm-f ora000060_trc.log <BR _fckxhtmljob="2"> rm-f trc_tmp <BR _fckxhtmljob="2"> rm-f tmp_alert.tmp <BR _fckxhtmljob="2"> rm-f ora006000_rownum.log <BR _fckxhtmljob="2"> rm-f rownum.lst <br /><br /> rn <br /><BR _fckxhtmljob="2"> Formatted date generated script dated_alert.sh <br /><br /> rn <br /> rn<br /> echo &quot;set heading off&quot;&gt; get_date.sql <BR _fckxhtmljob="2"> echo &quot;set feedback off&quot;&gt;&gt; get_date.sql <BR _fckxhtmljob="2"> echo &quot;set term off&quot;&gt;&gt; get_date.sql <BR _fckxhtmljob="2"> echo &quot;spool tmp_date.log&quot;&gt;&gt; get_date.sql <BR _fckxhtmljob="2"> echo &quot;select sysdate-&quot; $ 1 &quot;from dual;&quot;&gt;&gt; get_date.sql <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> echo &quot;spool off&quot;&gt;&gt; get_date.sql <BR _fckxhtmljob="2"> echo &quot;exit&quot;&gt;&gt; get_date.sql <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> export NLS_LANG = american <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> sqlplus &quot;/ as sysdba&quot; @ get_date.sql &lt;&lt;EOF <BR _fckxhtmljob="2"> EOF <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> rm-f get_date.sql <br /><br /> rn <br /><br /> rn <br /><br /> rn <br /> ORA-00600 error handling script check_00600.sh <BR _fckxhtmljob="2"> This just gives ORA-00600 error handling script, other errors similar to space limitations, other error handling script is omitted here. <br /><br /> rn <br /> rn <br /> echo <BR _fckxhtmljob="2"> echo &quot;----------------------&quot; <BR _fckxhtmljob="2"> echo &quot;ORA-00600 error trace information&quot; <BR _fckxhtmljob="2"> echo &quot;----------------------&quot; <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> awk &#39;/ ORA-00600 / (print NR)&#39; tmp_alert.tmp | awk &#39;(print &quot;awk&quot; &quot;&#39; \&#39;&#39;&quot; &quot;NR ==&quot; $ 1-1 &quot;(print&quot; &quot;\&quot; mget \ &quot;&quot; &quot;substr ($ 4,1, length ($ 4) -1 )}&quot;&quot;&#39; \&#39;&#39; &quot;&quot; tmp_alert.tmp &quot;) &#39;&gt; tmp1.sh <BR _fckxhtmljob="2"> chmod 777 tmp1.sh <BR _fckxhtmljob="2"> chmod 777 tmp1.sh <BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"> sh tmp1.sh | sort-r | uniq&gt; ora006000_trc.log <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # For all of the ORA-00600 trace file processing, eliminating duplicate files, to determine whether the file exists, and generate a usable format for ftp <BR _fckxhtmljob="2"> echo &quot;&quot;&gt; trc_tmp <BR _fckxhtmljob="2"> for trc_file in $ (cat ora006000_trc.log | awk &#39;(print $ 2)&#39;) <BR _fckxhtmljob="2"> do <BR _fckxhtmljob="2"> if [-f $ trc_file] <BR _fckxhtmljob="2"> then <BR _fckxhtmljob="2"> echo &quot;mget $ trc_file&quot;&gt;&gt; trc_tmp <BR _fckxhtmljob="2"> else <BR _fckxhtmljob="2"> echo &quot;can not find the trace file: $ trc_file&quot;&gt;&gt; trc_tmp <BR _fckxhtmljob="2"> fi <BR _fckxhtmljob="2"> done <BR _fckxhtmljob="2"> cat trc_tmp | sort-r <BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> echo&gt; tmp_3_line.sh <BR _fckxhtmljob="2"> chmod 777 tmp_3_line.sh <BR _fckxhtmljob="2"> chmod 777 tmp_3_line.sh <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # For each ORA-00600, printing timestamp, trace file and the specific error from <BR _fckxhtmljob="2"> for tmp_row_num in $ (awk &#39;/ ORA-00600 / (print NR)&#39; tmp_alert.tmp) <BR _fckxhtmljob="2"> do <BR _fckxhtmljob="2"> let tmp_time = $ tmp_row_num-2 <BR _fckxhtmljob="2"> let tmp_trc = $ tmp_row_num-1 <BR _fckxhtmljob="2"> echo &quot;awk &#39;NR ==&quot; $ tmp_time &quot;(print \ $ 0)&#39; tmp_alert.tmp&quot;&gt;&gt; tmp_3_line.sh <BR _fckxhtmljob="2"> echo &quot;awk &#39;NR ==&quot; $ tmp_trc &quot;(print \ $ 0)&#39; tmp_alert.tmp&quot;&gt;&gt; tmp_3_line.sh <BR _fckxhtmljob="2"> echo &quot;awk &#39;NR ==&quot; $ tmp_row_num &quot;(print \ $ 0)&#39; tmp_alert.tmp&quot;&gt;&gt; tmp_3_line.sh <BR _fckxhtmljob="2"> echo &quot;echo&quot;&gt;&gt; tmp_3_line.sh <BR _fckxhtmljob="2"> done <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> sh tmp_3_line.sh <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"> echo <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> # Error message telling you <BR _fckxhtmljob="2"> echo &quot;---------------&quot; <BR _fckxhtmljob="2"> echo &quot;on the ORA-00600&quot; <BR _fckxhtmljob="2"> echo &quot;---------------&quot; <BR _fckxhtmljob="2"> oerr ora 00600 <BR _fckxhtmljob="2"> echo <br /><br /> rn <br /><BR _fckxhtmljob="2"> Output Sample <br /><br /> rn <br /> rn<br /> $ Sh check_alert.sh 2 <BR _fckxhtmljob="2"> ---------------------------------------------- <BR _fckxhtmljob="2"> Error Summary Start Time: Wed Sep 10 00:11:39 2008 <BR _fckxhtmljob="2"> ----------------------------------------------- <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> Error Number Number <BR _fckxhtmljob="2"> ---- ------------------- <BR _fckxhtmljob="2"> 3 ORA-00600 <BR _fckxhtmljob="2"> 1 ORA-01555 <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> ---------------------- <BR _fckxhtmljob="2"> ORA-00600 error tracking information <BR _fckxhtmljob="2"> ---------------------- <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> mget / arraybill/home/oracle/app/oracle/admin/hnbill/udump/hnbill_ora_5984.trc <BR _fckxhtmljob="2"> Can not find trace file: / arraybill/home/oracle/app/oracle/admin/hnbill/udump/hnbill_ora_10650.trc <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"><BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> Fri Sep 10 11:55:42 2008 <BR _fckxhtmljob="2"> Errors in file / arraybill/home/oracle/app/oracle/admin/hnbill/udump/hnbill_ora_15196.trc: <BR _fckxhtmljob="2"> ORA-00600: internal error code, arguments: [qerrmObnd1], [932], [ORA-00932: inconsistent datatypes: expected got <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> Fri Sep 10 11:56:16 2008 <BR _fckxhtmljob="2"> Errors in file / arraybill/home/oracle/app/oracle/admin/hnbill/udump/hnbill_ora_15196.trc: <BR _fckxhtmljob="2"> ORA-00600: internal error code, arguments: [qerrmObnd1], [932], [ORA-00932: inconsistent datatypes: expected got <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> Tue Sep 10 19:48:49 2008 <BR _fckxhtmljob="2"> Errors in file / arraybill/home/oracle/app/oracle/admin/hnbill/udump/hnbill_ora_5984.trc: <BR _fckxhtmljob="2"> ORA-00600: internal error code, arguments: [729], [1200], [space leak], [], [], [], [], [] <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> --------------- <BR _fckxhtmljob="2"> About ORA-00600 <BR _fckxhtmljob="2"> --------------- <BR _fckxhtmljob="2"> 00600, 00000, &quot;internal error code, arguments: [% s], [% s], [% s], [% s], [% s], [% s], [% s], [% s] &quot; <BR _fckxhtmljob="2"> / / * Cause: This is the generic internal error number for Oracle program <BR _fckxhtmljob="2"> / / Exceptions. This indicates that a process has encountered an <BR _fckxhtmljob="2"> / / Exceptional condition. <BR _fckxhtmljob="2"> / / * Action: Report as a bug - the first argument is the internal error number <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"><BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> ------------------------- <BR _fckxhtmljob="2"> ORA-01555 error tracking information <BR _fckxhtmljob="2"> ------------------------- <BR _fckxhtmljob="2"> Thu Sep 11 04:38:18 2008 <BR _fckxhtmljob="2"> ORA-01555 caused by SQL statement below (Query Duration = 12429 sec, SCN: 0x0240.ba061afa): <BR _fckxhtmljob="2"> Thu Sep 11 04:38:18 2008 <BR _fckxhtmljob="2"> SELECT * FROM BB_SERVICE_RELATION_T WHERE CITY_CODE =: B4 AND SERVICE_KIND =: B3 AND IF_VALID = 1 AND SERVING_STATUS &lt;&gt; 10 AND SERVING_STATUS &lt;&gt; 20 AND (PRESERVE02 &lt;&gt; 1 OR PRESERVE02 IS NULL) AND MOD (USER_ID,: B2) =: B1 - 1 <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> --------------- <BR _fckxhtmljob="2"> About ORA-01555 <BR _fckxhtmljob="2"> --------------- <BR _fckxhtmljob="2"> 01555, 00000, &quot;snapshot too old: rollback segment number% s with name \&quot;% s \ &quot;too small&quot; <BR _fckxhtmljob="2"> / / * Cause: rollback records needed by a reader for consistent read are <BR _fckxhtmljob="2"> / / Overwritten by other writers <BR _fckxhtmljob="2"> / / * Action: If in Automatic Undo Management mode, increase undo_retention <BR _fckxhtmljob="2"> / / Setting. Otherwise, use larger rollback segments <br /><br /> rn <br /> <STRONG _fckxhtmljob="2">4. Post-processing and Prospects <BR _fckxhtmljob="2"></strong> This time format only in line with the alert document processing, the script need to be further improved to enhance its scalability, that is able to define a list of errors is equivalent to a configuration table, just need to modify the list of errors, you can decide which error is need to focus attention. In addition, the need to add a module, if the alert file not found on the corresponding time stamp records, the need for an exception handling. <BR _fckxhtmljob="2"><BR _fckxhtmljob="2"> To the right to find errors, to timely post-processing, such processing includes: analysis of errors to find documents, need to optimize the statement is optimized, need to patch the bug, as the case may download and patch. <br /><br /></TD></TR></TBODY></TABLE><!-- 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/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/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>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/change-use-shell-handle-the-database-alert-log-oracle/</wfw:commentRss>
	</item>
		<item>
		<title>Oracle create table space. To create a user and to authorize. View permissions</title>
		<link>http://www.kods.netwww.kods.net/oracle-create-table-space-to-create-a-user-and-to-authorize-view-permissions/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-create-table-space-to-create-a-user-and-to-authorize-view-permissions/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 18:10:02+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle product]]></category>
<category><![CDATA[datafile]]></category>
<category><![CDATA[test data]]></category>
<category><![CDATA[table space]]></category>
<category><![CDATA[extent]]></category>
<category><![CDATA[c oracle]]></category>
<category><![CDATA[privileges]]></category>
<category><![CDATA[sys]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-create-table-space-to-create-a-user-and-to-authorize-view-permissions/</guid>
		<description><![CDATA[Create a temporary table space rn Create a temporary table space CREATE TEMPORARY TABLESPACE test_temp TEMPFILE &#39;C: \ oracle \ product \ 10.1.0 \ oradata \ orcl \ test_temp01.dbf&#39; SIZE 32M AUT ...]]></description>
		<content:encoded><![CDATA[Create a temporary table space rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_175739.style.display='none'; Code_Open_Image_175739.style.display='inline'; Code_Open_Text_175739.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_175739.style.display='none'; Code_Closed_Image_175739.style.display='inline'; Code_Closed_Text_175739.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> Create a temporary table space <BR><!--<br />rn<br />rnCode highlighting produced by Actipro CodeHighlighter (freeware)<br />rnhttp://www.CodeHighlighter.com/<br />rn<br />rn--> CREATE TEMPORARY TABLESPACE test_temp <BR> TEMPFILE &#39;C: \ oracle \ product \ 10.1.0 \ oradata \ orcl \ test_temp01.dbf&#39; <BR> SIZE 32M <BR> AUTOEXTEND ON <BR> NEXT 32M MAXSIZE 2048M <BR> EXTENT MANAGEMENT LOCAL; <br /> rn <br /> To create a user table space <br /><br /> rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_175849.style.display='none'; Code_Open_Image_175849.style.display='inline'; Code_Open_Text_175849.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_175849.style.display='none'; Code_Closed_Image_175849.style.display='inline'; Code_Closed_Text_175849.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> To create a user table space <BR><!--<br />rn<br />rnCode highlighting produced by Actipro CodeHighlighter (freeware)<br />rnhttp://www.CodeHighlighter.com/<br />rn<br />rn--> CREATE TABLESPACE test_data <BR> LOGGING <BR> DATAFILE &#39;C: \ ORACLE \ PRODUCT \ 10.1.0 \ ORADATA \ ORCL \ TEST_DATA01.DBF&#39; <BR> SIZE 32M <BR> AUTOEXTEND ON <BR> NEXT 32M MAXSIZE 2048M <BR> EXTENT MANAGEMENT LOCAL; <br /> rn <br /> Create a user and set the table space <br /><br /> rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_180011.style.display='none'; Code_Open_Image_180011.style.display='inline'; Code_Open_Text_180011.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_180011.style.display='none'; Code_Closed_Image_180011.style.display='inline'; Code_Closed_Text_180011.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> To create a user and specify the table space <BR><!--<br />rn<br />rnCode highlighting produced by Actipro CodeHighlighter (freeware)<br />rnhttp://www.CodeHighlighter.com/<br />rn<br />rn--> CREATE USER username IDENTIFIED BY password <BR> DEFAULT TABLESPACE TEST_DATA <BR> TEMPORARY TABLESPACE TEST_TEMP; <br /> rn <br /> To grant permission to the user <br /><br /> rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_180105.style.display='none'; Code_Open_Image_180105.style.display='inline'; Code_Open_Text_180105.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_180105.style.display='none'; Code_Closed_Image_180105.style.display='inline'; Code_Closed_Text_180105.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> To grant permission to the user <BR><!--<br />rn<br />rnCode highlighting produced by Actipro CodeHighlighter (freeware)<br />rnhttp://www.CodeHighlighter.com/<br />rn<br />rn--> GRANT <BR> CREATE SESSION, CREATE ANY TABLE, CREATE ANY VIEW, CREATE ANY INDEX, CREATE ANY PROCEDURE, <BR> ALTER ANY TABLE, ALTER ANY PROCEDURE, <BR> DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE, <BR> SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE <BR> TO username; <br /> rn <br /> Role This role will be to grant username, that is, to make username the user can manage and use the resources owned by role <br /><br /> rn <br /> GRANT role TO username; <br /> rn <br /><BR> ----------------------------------------------- View user rights -------------------------------------------------- ------- <BR><BR> View all users <br /><br /> rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_180346.style.display='none'; Code_Open_Image_180346.style.display='inline'; Code_Open_Text_180346.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_180346.style.display='none'; Code_Closed_Image_180346.style.display='inline'; Code_Closed_Text_180346.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> View all users <BR><!--<br /> rn<br /> rnCode highlighting produced by Actipro CodeHighlighter (freeware) <br /> rnhttp: / / www.CodeHighlighter.com/ <br /> rn <br /> rn -&gt; SELECT * FROM DBA_USERS; <BR> SELECT * FROM ALL_USERS; <BR> SELECT * FROM USER_USERS; <br /> rn <br /> View user&#39;s system privileges <br /><br /> rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_180452.style.display='none'; Code_Open_Image_180452.style.display='inline'; Code_Open_Text_180452.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_180452.style.display='none'; Code_Closed_Image_180452.style.display='inline'; Code_Closed_Text_180452.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> View user&#39;s system privileges <BR><!--<br />rn<br />rnCode highlighting produced by Actipro CodeHighlighter (freeware)<br />rnhttp://www.CodeHighlighter.com/<br />rn<br />rn--> SELECT * FROM DBA_SYS_PRIVS; <BR> SELECT * FROM USER_SYS_PRIVS; <br /> rn <br /> See the user object or role privileges <br /><br /> rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_180528.style.display='none'; Code_Open_Image_180528.style.display='inline'; Code_Open_Text_180528.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_180528.style.display='none'; Code_Closed_Image_180528.style.display='inline'; Code_Closed_Text_180528.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> View User Object Permissions <BR><!--<br />rn<br />rnCode highlighting produced by Actipro CodeHighlighter (freeware)<br />rnhttp://www.CodeHighlighter.com/<br />rn<br />rn--> SELECT * FROM DBA_TAB_PRIVS; <BR> SELECT * FROM ALL_TAB_PRIVS; <BR> SELECT * FROM USER_TAB_PRIVS; <br /> rn <br /> View all the roles <br /><br /> rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_180636.style.display='none'; Code_Open_Image_180636.style.display='inline'; Code_Open_Text_180636.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_180636.style.display='none'; Code_Closed_Image_180636.style.display='inline'; Code_Closed_Text_180636.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> View all users <BR><!--<br />rn<br />rnCode highlighting produced by Actipro CodeHighlighter (freeware)<br />rnhttp://www.CodeHighlighter.com/<br />rn<br />rn--> SELECT * FROM DBA_ROLES; <br /> rn <br /> View user or role which has the role of <br /><br /> rn <br /><a href="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Closed_Text_180839.style.display='none'; Code_Open_Image_180839.style.display='inline'; Code_Open_Text_180839.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" width=11 height=16></a><a href="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" target="_blank" title="Oracle create table space. To create a user and to authorize. View permissions" class="lightbox" rel="external nofollow"><IMG"this.style.display='none'; Code_Open_Text_180839.style.display='none'; Code_Closed_Image_180839.style.display='inline'; Code_Closed_Text_180839.style.display='inline';" alt="" align=top src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 height=16></a> View user or role which has the role of <BR><!--<br />rn<br />rnCode highlighting produced by Actipro CodeHighlighter (freeware)<br />rnhttp://www.CodeHighlighter.com/<br />rn<br />rn--> SELECT * FROM DBA_ROLE_PRIVS; <BR> SELECT * FROM USER_ROLE_PRIVS;				<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-create-table-space-to-create-a-user-and-to-authorize-view-permissions/</wfw:commentRss>
	</item>
		<item>
		<title>Oracle data dictionary and dynamic performance views</title>
		<link>http://www.kods.netwww.kods.net/oracle-data-dictionary-and-dynamic-performance-views/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-data-dictionary-and-dynamic-performance-views/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 16:25:03+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[dynamic performance]]></category>
<category><![CDATA[statistical information]]></category>
<category><![CDATA[rollback segment]]></category>
<category><![CDATA[partition]]></category>
<category><![CDATA[table space]]></category>
<category><![CDATA[free space]]></category>
<category><![CDATA[quota]]></category>
<category><![CDATA[oracle data dictionary]]></category>
<category><![CDATA[management information]]></category>
<category><![CDATA[database storage]]></category>
<category><![CDATA[database description]]></category>
<category><![CDATA[synonym]]></category>
<category><![CDATA[partitions]]></category>
<category><![CDATA[data tables]]></category>
<category><![CDATA[common data dictionary]]></category>
<category><![CDATA[quotas]]></category>
<category><![CDATA[segment description]]></category>
<category><![CDATA[memory region]]></category>
<category><![CDATA[information query]]></category>
<category><![CDATA[memory data]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-data-dictionary-and-dynamic-performance-views/</guid>
		<description><![CDATA[Common data dictionary: dba_data_files: usually used to query the information on the database file dba_db_links: in all databases including database links, which is databaselinks. dba_extents: a datab ...]]></description>
		<content:encoded><![CDATA[Common data dictionary: <BR><BR> dba_data_files: usually used to query the information on the database file <BR><BR> dba_db_links: in all databases including database links, which is databaselinks. <BR><BR> dba_extents: a database of information on all partitions <BR><BR> dba_free_space: the freedom of all the table space partition <BR><BR> dba_indexs: all the indexes on the database description <BR><BR> dba_ind_columns: In all tables and clustered indexes on the column compression <BR><BR> dba_objects: all the objects in the database <BR><BR> dba_rollback_segs: rollback segment description <BR><BR> dba_segments: All database storage sub-paragraph <BR><BR> dba_synonyms: on the synonym of Information Query <BR><BR> dba_tables: database, a description of all the data tables <BR><BR> dba_tabespaces: The information on the table space <BR><BR> dba_tab_columns: description of all the tables, views, and gathered out <BR><BR> dba_tab_grants / privs: object permissions granted <BR> dba_ts_quotas: all user table space quota <BR><BR> dba_users: With regard to the data for all users of information <BR> dba_views: a database of all the text view <BR><BR> Commonly used dynamic performance views <BR><BR> v $ datafile: the database used data file information <BR><BR> v $ librarycache: shared pool SQL statement, the management information <BR> v $ lock: access the database through the session, set the object lock all of the information <BR><BR> v $ log: from the control file to extract the information related to redo log group <BR> v $ logfile group of the instance to reset the log file name and location information <BR><BR> v $ parameter: initialization parameter file, the value of all the items <BR> v $ process: the current process of information <BR><BR> v $ rollname: rollback segment information, <BR><BR> v $ rollstat: Online rollback Statistics <BR><BR> v $ rowcache: in-memory data dictionary activity / performance information <BR><BR> v $ session: the session information <BR><BR> v $ sesstat: In the v $ session to report on the current session of the statistical information <BR><BR> v $ sqlarea: shared pool using the current cursor statistics, the cursor is a memory region that Oracle open when dealing with SQL statements. <BR><BR> v $ statname: in the v $ sesstat reported the meaning of the various statistics <BR><BR> v $ sysstat: based on the current operating system session conducted by Statistics <BR> v $ waitstat: a database of more than one session to access the data in detail. When there is more than one session to access the same information, there may be waiting for the situation. <BR><BR> Summarizes how these completely different from the views and data dictionary, is not so easy to confuse. Hei hei! ! !				<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/sql-optimization-5-commonly-used-test-hints/" title="SQL optimization (5) - commonly used test hints">SQL optimization (5) - commonly used test hints</a> 2009-03-29 08:39:54</li>
					<li><a href="http://www.kods.netwww.kods.net/use-sqlldr-1-introduction/" title="use sqlldr 1 Introduction">use sqlldr 1 Introduction</a> 2009-03-27 19:39:01</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/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-data-dictionary-and-dynamic-performance-views/</wfw:commentRss>
	</item>
		<item>
		<title>oracle time, plus or minus a comprehensive</title>
		<link>http://www.kods.netwww.kods.net/oracle-time-plus-or-minus-a-comprehensive/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-time-plus-or-minus-a-comprehensive/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 01:04:31+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[yyyy]]></category>
<category><![CDATA[dd]]></category>
<category><![CDATA[ss]]></category>
<category><![CDATA[canada]]></category>
<category><![CDATA[subtraction]]></category>
<category><![CDATA[d2]]></category>
<category><![CDATA[time zone]]></category>
<category><![CDATA[new time]]></category>
<category><![CDATA[z1]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-time-plus-or-minus-a-comprehensive/</guid>
		<description><![CDATA[oracle time, plus or minus a comprehensive Addition select sysdate, add_months (sysdate, 12) from dual; - plus 1 year select sysdate, add_months (sysdate, 1) from dual; - Canada in January select sysd ...]]></description>
		<content:encoded><![CDATA[<h3> <font color=#006600>oracle time, plus or minus a comprehensive</font> </h3><br /><br /> Addition <br /> select sysdate, add_months (sysdate, 12) from dual; - plus 1 year <br /> select sysdate, add_months (sysdate, 1) from dual; - Canada in January <br /> select sysdate, to_char (sysdate +7, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - plus 1 week <br /> select sysdate, to_char (sysdate +1, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - plus 1 day <br /> select sysdate, to_char (sysdate +1 / 24, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - plus 1 hour <br /> select sysdate, to_char (sysdate +1/24/60, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - plus 1 minute <br /> select sysdate, to_char (sysdate +1/24/60 / 60, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - plus 1 seconds <br /><br /> Subtraction <br /> select sysdate, add_months (sysdate, -12) from dual; - by 1 year <br /> select sysdate, add_months (sysdate, -1) from dual; - by January <br /> select sysdate, to_char (sysdate-7, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - minus 1 week <br /> select sysdate, to_char (sysdate-1, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - minus 1 day <br /> select sysdate, to_char (sysdate-1/24, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - minus 1 hour <br /> select sysdate, to_char (sysdate-1/24/60, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - minus 1 minute <br /> select sysdate, to_char (sysdate-1/24/60/60, &#39;yyyy-mm-dd HH24: MI: SS&#39;) from dual; - minus 1 sec <br /><br /> Between the date of date and does not add up <br /><br /> Dates and numbers can be added to <br /><br /> SQL&gt; select sysdate +1 from dual; <br /><br /> Date and dates can subtract <br /><br /> SQL&gt; select sysdate-sysdate from dual; <br /><br /> Add_Months (D, X) <br /> Back to D plus X months after the date of the date of <br /> Last_Day (D) <br /> Back to D, contains the date of the date of the last day of the month <br /><br /> add_months (sysdate, 1) plus one month <br /><br /> add_months (sysdate, -1) by one month <br /><br /> sysdate +1 plus one day <br /><br /> -------------------------------------------------- ----------------------------- <br /> Months_Between (D1, D2) <br /> Back to D1, D2 between the number of months <br /><br /> New_Time (D, Z1, Z2) <br /> Back to the time zone Z1 where time is D, time zone Z2 <br /><br /> Next_Day (D, S) <br /> Back to satisfy the condition S, the next day <br /> S for the day of the week <br /><br /> Round (D, F) <br /> D carried out in accordance with the date format, rounding F <br /><br /> Sysdate <br /> Back to the database the current time <br /><br /> Trunc (D, F) <br /> Accordance with the format of F truncated time D <br /><br /> In addition: Date can be directly subtraction, such as: sysdate +1, sysdate -1 <br /><br /> -------------------------------------------------- ---------- <br /><br /> sysdate +1 plus one day <br /> sysdate +1 / 24 + 1 hour <br /> sysdate +1 / (24 * 60) plus 1 minute <br /> sysdate +1 / (24 * 60 * 60) plus a second				<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-time-plus-or-minus-a-comprehensive/</wfw:commentRss>
	</item>
		<item>
		<title>With regard to the process of creating oracle dblink Some experience bar</title>
		<link>http://www.kods.netwww.kods.net/with-regard-to-the-process-of-creating-oracle-dblink-some-experience-bar/</link>
		<comments>http://www.kods.netwww.kods.net/with-regard-to-the-process-of-creating-oracle-dblink-some-experience-bar/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 18:07:51+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[instance name]]></category>
<category><![CDATA[database table]]></category>
<category><![CDATA[database user]]></category>
<category><![CDATA[connect data]]></category>
<category><![CDATA[database name]]></category>
<category><![CDATA[database connection]]></category>
<category><![CDATA[name query]]></category>
<category><![CDATA[database link]]></category>
<category><![CDATA[global name]]></category>
<category><![CDATA[connection string]]></category>
<category><![CDATA[database server]]></category>
<category><![CDATA[database parameters]]></category>
<category><![CDATA[public database]]></category>
<category><![CDATA[database servers]]></category>
<category><![CDATA[experience bar]]></category>
<category><![CDATA[table database]]></category>
<category><![CDATA[link database]]></category>
<category><![CDATA[ssid]]></category>
<category><![CDATA[oracle dblink]]></category>
<category><![CDATA[local service]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/with-regard-to-the-process-of-creating-oracle-dblink-some-experience-bar/</guid>
		<description><![CDATA[Two different database servers, from one database server to read a user to another database server under a user&#39;s data, this time you can use the dblink. In fact, dblink in the view and the databa ...]]></description>
		<content:encoded><![CDATA[<table cellspacing=0 cellpadding=0 width="100%" align=center border=0><tbody><tr><td align=middle bgcolor=#bbf0ff> <font color=#000066><strong></strong></font> </td><tr><td><table bordercolor=#bbf0ff cellspacing=1 cellpadding=0 width="100%" border=1><tbody><tr><td align=middle><table cellspacing=0 cellpadding=0 width=650 border=0><tbody><tr><td align=middle><table cellspacing=0 cellpadding=0 width="100%" border=0><tbody><tr><td width=650><br /> Two different database servers, from one database server to read a user to another database server under a user&#39;s data, this time you can use the dblink. <br /> In fact, dblink in the view and the database is almost built dblink need to know to be the time to read the database ip address, ssid, and database user name and password. <br /> Creating can be used in two ways: <br /> 1, the local service has been configured <br /><br /> create public database <br /> link fwq12 connect to fzept <br /> identified by neu using &#39;fjept&#39; <br /> CREATE DATABASE LINK database link name CONNECT TO username IDENTIFIED BY password USING &#39;local configuration of the data instance name&#39;; <br /> 2, local service is not configured <br /><br /> create database link linkfwq <br /> connect to fzept identified by neu <br /> using &#39;(DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) (HOST = 10.142.202.12) (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = fjept) <br /> ) <br /> ) &#39;; <br /><br /> host = the ip address of the database, service_name = database ssid. <br /> In fact, two ways to configure the dblink in a similar vein, I personally feel the second method is better still, so unaffected by the domestic services. <br /><br /> Database connection string can be NET8 EASY CONFIG or directly modify the TNSNAMES.ORA where defined. <br /><br /> Database Parameters global_name = true to request the database link name with the same remote database name <br /><br /> Database global name can be found using the following command <br /> SELECT * FROM GLOBAL_NAME; <br /><br /> Queries the remote database table <br /> SELECT ... ... FROM table @ database link name; <br /> Query, delete and insert data and operating the local database is the same, only the table name needs to be written, &quot;table @ dblink server&quot; only. <br /><br /> Incidentally, under the synonym creation: <br /><br /> CREATE SYNONYM synonym name FOR table; <br /> CREATE SYNONYM synonym name FOR table @ database link name; <br /><br /> Remove dblink: DROP PUBLIC DATABASE LINK linkfwq. <br /><br /> If you create a global dblink, you must use systm or sys user, in the database before the Canadian public. <br /><br /></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle-database-basic-use-and-parameters/" title="oracle database basic use and parameters">oracle database basic use and parameters</a> 2009-04-10 06:10:04</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle10g-network-configuration/" title="Oracle10g Network Configuration">Oracle10g Network Configuration</a> 2009-04-05 05:19:49</li>
					<li><a href="http://www.kods.netwww.kods.net/sqlplus-skills/" title="SQLPlus skills">SQLPlus skills</a> 2009-04-01 09:37:29</li>
					<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/oracle-deadlock-related/" title="Oracle deadlock related">Oracle deadlock related</a> 2009-03-30 16:46:54</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/with-regard-to-the-process-of-creating-oracle-dblink-some-experience-bar/</wfw:commentRss>
	</item>
		<item>
		<title>ORA-01940 error resolution process</title>
		<link>http://www.kods.netwww.kods.net/ora-01940-error-resolution-process/</link>
		<comments>http://www.kods.netwww.kods.net/ora-01940-error-resolution-process/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 16:12:56+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sql procedure]]></category>
<category><![CDATA[pl sql]]></category>
<category><![CDATA[test table]]></category>
<category><![CDATA[yyyy]]></category>
<category><![CDATA[dd]]></category>
<category><![CDATA[line 1]]></category>
<category><![CDATA[logical backup]]></category>
<category><![CDATA[dmp]]></category>
<category><![CDATA[cascade]]></category>
<category><![CDATA[schema]]></category>
<category><![CDATA[select job]]></category>
<category><![CDATA[interval]]></category>
<category><![CDATA[test user]]></category>
<category><![CDATA[test time]]></category>
<category><![CDATA[error line]]></category>
<category><![CDATA[os linux]]></category>
<category><![CDATA[datetime values]]></category>
<category><![CDATA[error resolution]]></category>
<category><![CDATA[test session]]></category>
<category><![CDATA[last date]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/ora-01940-error-resolution-process/</guid>
		<description><![CDATA[DMP in the daily logical backup into a database, in the process of the data in the guide can not be removed before the user action occurs the following error: OS: linux Oracle9i Enterprise Edition Rel ...]]></description>
		<content:encoded><![CDATA[DMP in the daily logical backup into a database, in the process of the data in the guide can not be removed before the user action occurs the following error: <br /> OS: linux <br /><br /> Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production <br /><br /> SQL&gt; drop user test cascade; <br /><br /> drop user test cascade <br /><br /> * <br /><br /> Error line 1: <br /><br /> ORA-01940: cannot drop a user that is currently connected <br /><br /> Address: <br /><br /> Find out the reasons is because in the original DMP logical backup of data in the test user exists under the job, due to import data of these job has already begun, so there is in the process caused <br /><br /> JOB users to perform tasks in the test session, indicating that the user is being used, so the user can not be drop out of the <br /><br /> The following error ORA-01940 is the process of recovery: <br /><br /> Creating a Test Table <br /><br /> drop table test1 <br /><br /> select * from test1 <br /><br /> create table test1 (datetime date); <br /><br /> Create a custom process <br /><br /> create or replace procedure MYPROC as <br /><br /> begin <br /><br /> for i in 1 .. 100000 loop <br /><br /> insert into TEST1 (datetime) values (sysdate); <br /><br /> end loop; <br /><br /> end; <br /><br /> PL / SQL procedure successfully completed <br /><br /> Create a JOB, a day 1440 minutes, that is to run every 5 minutes during test time <br /><br /> declare <br /><br /> job number; <br /><br /> begin <br /><br /> sys.dbms_job.submit <br /><br /> (job =&gt; job, <br /><br /> what =&gt; &#39;MYPROC;&#39;, <br /><br /> next_date =&gt; sysdate, <br /><br /> interval =&gt; &#39;sysdate + (1 / 1440) * 5&#39;); <br /><br /> commit; <br /><br /> end; <br /><br /> PL / SQL procedure successfully completed <br /><br /> Running JOB <br /><br /> SQL&gt; begin <br /><br /> 2 sys.dbms_job.run (241); <br /><br /> 3 end; <br /><br /> 4 / <br /><br /> PL / SQL procedure successfully completed <br /><br /> There needs to delete a user daimin, they will report the following error <br /><br /> In order to sys landing system, remove the user daimin <br /><br /> - See daimin user job under the <br /><br /> SQL&gt; select job, what, interval, to_char (next_date, &#39;yyyy-mm-dd hh24: mi: ss&#39;) <br /><br /> 2 from dba_jobs where schema_user = &#39;DAIMIN&#39;; <br /><br /> JOB WHAT INTERVAL TO_CHAR (NEXT_DATE, &#39;YYYY-MM-DDH <br /><br /> 241 MYPROC; sysdate + (1 / 1440) * 5 2008-12-16 10:10:03 <br /><br /> See Running JOB <br /><br /> SQL&gt; select * from dba_jobs_running; <br /><br /> SID JOB FAILURES LAST_DATE LAST_SEC THIS_DATE THIS_SEC INSTANCE <br /><br /> 1619 2412008-12-16 10:25:51 0 <br /><br /> View user&#39;s active session daimin <br /><br /> SQL&gt; select sid, serial #, username, program, machine, status <br /><br /> 2 from v $ session <br /><br /> 3 where username = &#39;DAIMIN&#39; <br /><br /> 4 AND STATUS = &#39;ACTIVE&#39;; <br /><br /> SID SERIAL # USERNAME PROGRAM MACHINE STATUS <br /><br /> 1619 2360 DAIMIN plsqldev.exe STAPLES \ DELLF98P-10QC ACTIVE <br /><br /> - In order to remove the sys user down daimin users, will be reported the following error <br /><br /> SQL&gt; drop user daimin cascade; <br /><br /> drop user daimin cascade <br /><br /> ORA-01940: cannot drop a user that is currently connected <br /><br /> Attempt to remove the job <br /><br /> SQL&gt; begin <br /><br /> 2 FOR r_job IN (select job, what, interval, to_char (next_date, &#39;yyyy-mm-dd hh24: mi: ss&#39;) <br /><br /> 3 from dba_jobs where schema_user = &#39;DAIMIN&#39; <br /><br /> 4) LOOP <br /><br /> 5 dbms_job.REMOVE (r_job.job); <br /><br /> 6 end loop; <br /><br /> 7 commit; <br /><br /> 8 end; <br /><br /> 9 / <br /><br /> begin <br /><br /> FOR r_job IN (select job, what, interval, to_char (next_date, &#39;yyyy-mm-dd hh24: mi: ss&#39;) <br /><br /> from dba_jobs where schema_user = &#39;DAIMIN&#39; <br /><br /> ) LOOP <br /><br /> dbms_job.REMOVE (r_job.job); <br /><br /> end loop; <br /><br /> commit; <br /><br /> end; <br /><br /> ORA-23421: job number 241 is not a job in the job queue <br /><br /> ORA-06512: at &quot;SYS.DBMS_SYS_ERROR&quot;, line 86 <br /><br /> ORA-06512: at &quot;SYS.DBMS_IJOB&quot;, line 529 <br /><br /> ORA-06512: at &quot;SYS.DBMS_JOB&quot;, line 171 <br /><br /> ORA-06512: at line 5 <br /><br /> Analysis of error: due to the sys user to delete the user daimin under the JOB, it&#39;ll get an error <br /><br /> Solution: <br /><br /> 1, kill the task of implementing JOB conversation process; <br /><br /> alter system disconnect session &#39;sid, serial #&#39; immediate; <br /><br /> Or Alter system kill session &#39;sid, serial #&#39;; <br /><br /> Either <br /><br /> SQL&gt; drop user aa; <br /> drop user aa <br /> * <br /> ERROR at line 1: <br /> ORA-01940: cannot drop a user that is currently connected <br /><br /> SQL&gt; select sid, serial # from v $ session <br /> 2 where username = &#39;AA&#39;; <br /><br /> SID SERIAL # <br /> ---------- ---------- <br /> 13633 <br /><br /> SQL&gt; alter system kill session &#39;136, 33 &#39;; <br /><br /> System altered. <br /><br /> 2, by setting in the initial file, set the initial parameters JOB_QUEUE_PROCESSES = 0 to make Oracle will kill CJQ0 and the corresponding job processes; <br /><br /> Modify the init.ora file, and then restart the database, or the implementation of the ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 0; <br /><br /> Modified the initial parameters set JOB_QUEUE_PROCESSES = 0, restart the database after the logical backup into operation, remove users, this time deleted successfully!				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sql-optimization-4-table-of-the-three-connections/" title="SQL optimization (4) - Table of the three connections">SQL optimization (4) - Table of the three connections</a> 2009-03-29 23:13:41</li>
					<li><a href="http://www.kods.netwww.kods.net/sql-optimization-3-four-index/" title="SQL optimization (3) - four index">SQL optimization (3) - four index</a> 2009-03-28 13:10:06</li>
					<li><a href="http://www.kods.netwww.kods.net/use-sqlldr-1-introduction/" title="use sqlldr 1 Introduction">use sqlldr 1 Introduction</a> 2009-03-27 19:39: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>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/ora-01940-error-resolution-process/</wfw:commentRss>
	</item>
		<item>
		<title>sqlldr guide data</title>
		<link>http://www.kods.netwww.kods.net/sqlldr-guide-data/</link>
		<comments>http://www.kods.netwww.kods.net/sqlldr-guide-data/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 15:15:40+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[parameters]]></category>
<category><![CDATA[long time]]></category>
<category><![CDATA[oracle data]]></category>
<category><![CDATA[import and export]]></category>
<category><![CDATA[migration]]></category>
<category><![CDATA[c2]]></category>
<category><![CDATA[c1]]></category>
<category><![CDATA[parameter description]]></category>
<category><![CDATA[parameter control]]></category>
<category><![CDATA[alter table]]></category>
<category><![CDATA[database records]]></category>
<category><![CDATA[batches]]></category>
<category><![CDATA[nightmare]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/sqlldr-guide-data/</guid>
		<description><![CDATA[In the Oracle database, we usually between tables in different database records, copy or migration will use the following methods: 1. A record of the table to export to a section separated by a semico ...]]></description>
		<content:encoded><![CDATA[<table cellspacing=0 cellpadding=0 width="100%" align=center border=0><tbody><tr><td align=middle bgcolor=#bbf0ff></td><tr><td><table bordercolor=#bbf0ff cellspacing=1 cellpadding=0 width="100%" border=1><tbody><tr><td align=middle><table cellspacing=0 cellpadding=0 width=650 border=0><tbody><tr><td align=middle><table cellspacing=0 cellpadding=0 width="100%" border=0><tbody><tr><td width=650><br /><br /> In the Oracle database, we usually between tables in different database records, copy or migration will use the following methods: <br /><br /> 1. A record of the table to export to a section separated by a semicolon insert statement, then execute the table inserted into the B <br /> 2. The establishment of inter-database dblink, then create table B as select * from A @ dblink where ..., or insert into B select * from A @ dblink where ... <br /> 3. Exp A table, and then imp to the B form, exp Shike Jia query <br /> 4. Procedures to achieve select from A .., and then insert into B ..., must be submitted in batches <br /> 5. Another thing is that this is to say to the Sql Loader (sqlldr) to import the data, the effect is obvious compared to insert one by one <br /><br /> 1 ways to record a long time was a nightmare, must be submitted in batches of Article San Wubai Otherwise, the client will not survive, but the import process is very slow. If Otherwise generate REDO to improve insert into the performance, it is necessary to do the following: <br /><br /><ol"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 0px 0px 1px 38px; COLOR: rgb(43,145,175); PADDING-TOP: 2px"><li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> alter table B nologging; <li> insert / * + APPEND * / into B (c1, c2) values (x, xx); <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> insert / * + APPEND * / into B select * from A @ dblink where .....; </li></ol><br /><br /> Well, briefly in front of Oracle data import and export of a variety of ways, I am sure there is more to understand. Here the focus to talk about Oracle&#39;s Sql Loader (sqlldr) usage. <br /><br /> Carried out under the command line, Oracle&#39;s sqlldr command, you can see a detailed parameter description it is necessary to focus on the following parameters: <br /><br /> <font color=#ff0000>userid</font> - Oracle&#39;s username / password [@ servicename] <br /> <font color=#ff0000>control</font> - control file may contain tables of data <br /> -------------------------------------------------- -------------------------------------------------- --- <br /> log - log import log files, the default for the control file (remove the extension). log <br /> bad - bad data file, the default for the control file (remove the extension). bad <br /> data - data files, generally in the control file. Using the parameter control file does not specify the data file is more suitable for automatic operation <br /> errors - errors allowed the number of records can be used to control a record he can not be wrong <br /> rows - the number of records submitted to time, the default is 64 <br /> skip - the number of rows to skip, for example exported data file is a header in front of a few lines, or other description <br /><br /> There are more parameters that describe the sqlldr please refer to: sql loader usage. <br /><br /> Sqlldr using examples to demonstrate the use of, there are two kinds of use: <br /><br /> 1. Only use a control file, in this control file contains the data <br /> 2. Using a control file (as a template) and a data file <br /><br /> In general in order to facilitate the separation of templates and data, and the program will use a different division of the second approach, so the first look at such usage. Data file can be CSV file or any other split-delimited data file can use PL / SQL Developer or Toad Export, SQL * Plus can also be used to format output of the spool, or the UTL_FILE package is generated. In addition, with Toad able to directly generate the control file that contains the data. <br /><br /> First of all, assuming there is such a table users, and insert 5 records: <br /><br /><ol"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 0px 0px 1px 38px; COLOR: rgb(43,145,175); PADDING-TOP: 2px"><li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> create table users ( <li> user_id number, - the user ID <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> user_name varchar2 (50), - user name <li> login_times number, - the number of landing <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> last_login date - the last login date <li> ) </li></ol><br /><br /><ol"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 0px 0px 1px 38px; COLOR: rgb(43,145,175); PADDING-TOP: 2px"><li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> insert into users values (1, &#39;Unmi&#39;, 3, sysdate); <li> insert into users values (2, NULL, 5, to_date (&#39;2008-10-15 &#39;,&#39; YYYY-MM-DD &#39;)); <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> insert into users values (3, &#39;every other leaf warbler&#39;, 8, to_date (&#39;2009-01-02 &#39;,&#39; YYYY-MM-DD &#39;)); <li> insert into users values (4, &#39;Kypfos&#39;, NULL, NULL); <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> insert into users values (5, &#39;I do not know autumn&#39;, 1, to_date (&#39;2008-12-23 &#39;,&#39; YYYY-MM-DD &#39;)); </li></ol><br /><br /> The second way: Using a control file (as a template) and a data file <br /><br /> 1) Establishing a data file, we are here with the PL / SQL Developer export table users to record users_data.csv file, reads as follows: <br /><br /><ol"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 0px 0px 1px 38px; COLOR: rgb(43,145,175); PADDING-TOP: 2px"><li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> &quot;&quot;, &quot;USER_ID&quot;, &quot;USER_NAME&quot;, &quot;LOGIN_TIMES&quot;, &quot;LAST_LOGIN&quot; <li> &quot;1&quot;, &quot;1&quot;, &quot;Unmi&quot;, &quot;3&quot;, &quot;2009-1-5 20:34:44&quot; <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> , &quot;2&quot;, &quot;2 &quot;,&quot;&quot;,&quot; 5&quot;, &quot;2008-10-15&quot; <li> , &quot;3&quot;, &quot;3&quot;, &quot;every other leaf warbler&quot;, &quot;8&quot;, &quot;2009-1-2&quot; <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> &quot;4&quot;, &quot;4&quot;, &quot;Kypfos &quot;,&quot;&quot;,&quot;&quot; <li> , &quot;5&quot;, &quot;5&quot;, &quot;I do not know of Autumn&quot;, &quot;1&quot;, &quot;2008-12-23&quot; </li></ol><br /><br /> 2) the establishment of a control file users.ctl, reads as follows: <br /><br /><ol"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 0px 0px 1px 38px; COLOR: rgb(43,145,175); PADDING-TOP: 2px"><li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> OPTIONS (skip = 1, rows = 128) - sqlldr command displays the option to write here, edge to, skip = 1 is used to skip the first row of data <li> LOAD DATA <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> INFILE &quot;users_data.csv&quot; - specify the external data file, you can write multiple INFILE &quot;another_data_file.csv&quot; to specify multiple data files <li> - Here you can also use BADFILE, DISCARDFILE to specify the data and discard the bad data file, <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> truncate - operation type, with truncate table to clear the table in the original records <li> INTO TABLE users - To insert a table record <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> Fields terminated by &quot;,&quot; - the data recorded on each line to use &quot;,&quot; separated <li> Optionally enclosed by &#39; &quot;&#39; - data in each field with the &#39;&quot;&#39; box effect, such as the field of &quot;,&quot; separator <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> trailing nullcols - table fields are not allowed when the value of the corresponding empty <li> ( <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> virtual_column FILLER, - it is a virtual field, is used to skip from the PL / SQL Developer generated the first column number <li> user_id number, - the field you can specify the type, otherwise considered to be CHARACTER type, log file showing the <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> user_name, <li> login_times, <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> last_login DATE &quot;YYYY-MM-DD HH24: MI: SS&quot; - designated to receive the date format, rather with the to_date () function is converted <li> ) </li></ol><br /><br /> Description: The type of truncate operation in one location using the following values: <br /><br /> 1) insert - as the default way of loading the beginning of the data requirements table is empty <br /> 2) append - Append a new record in the table <br /> 3) replace - delete the old records (using delete from table statement), replace the load into a new record <br /> 4) truncate - delete the old records (using the truncate table statement), replace the load into a new record <br /><br /> 3) execute the command: <br /><br /> sqlldr dbuser / dbpass @ dbservice control = users.ctl <br /><br /> The dbservice instructions recorded in a database table users and data files on the same. <br /><br /> After the implementation of the End sqlldr would like to look at the generated several documents, such as users.log log files, users.bad bad data files. In particular, to take a look at the log file, from which allows you to better understand the Sql Loader, inside the control file parsing, list the type of each field, loading statistics records, the cause of errors and other information. <br /><br /> The first approach, using only one control file in this control file contains the data <br /><br /> 1) the users_data.cvs the contents of the supplement to the users.ctl in and to BEGINDATA connection, but also the INFILE &quot;users_data.csv&quot; read INFILE *. Meanwhile, in order of description of a larger problem, the data-processing a bit. At this point, the complete users.ctl content of the document are: <br /><br /><ol"PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 0px 0px 1px 38px; COLOR: rgb(43,145,175); PADDING-TOP: 2px"><li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> OPTIONS (skip = 1, rows = 128) - sqlldr command displays the option to write here, edge to, skip = 1 is used to skip the first row of data <li> LOAD DATA <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> INFILE * - because the data together with the control file, so use * indicates <li> append - there used to append operation, the additional records in the table users <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> INTO TABLE users <li> when LOGIN_TIMES &lt;&gt; &#39;8 &#39;- can also be used when qualifying clause, choose to import the records <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> Fields terminated by &quot;,&quot; <li> trailing nullcols <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> ( <li> virtual_column FILLER, - skipped by the PL / SQL Developer generated the first column number <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> user_id &quot;user_seq.nextval&quot;, - direct access to this column the next sequence value, rather than the value of the data provided in the <li> user_name &quot; &#39;Hi&#39; | | upper (: user_name )&quot;,--, can also use SQL functions or operations for data processing <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> login_times terminated by &quot;,&quot;, NULLIF (login_times = &#39;NULL&#39;) - can be individually specified for the column separator <li> last_login DATE &quot;YYYY-MM-DD HH24: MI: SS&quot; NULLIF (last_login = &quot;NULL&quot;) - When the field is &quot;NULL&quot; when it was NULL <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> ) <li> BEGINDATA - data from here <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> , USER_ID, USER_NAME, LOGIN_TIMES, LAST_LOGIN <li> 1,1, Unmi ,3,2009-1-5 20:34 <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> 2,2, Fantasia ,5,2008-10-15 <li> 3,3, separated leaf warbler ,8,2009-1-2 <li"PADDING-LEFT: 10px; BORDER-LEFT: rgb(209,215,220) 1px solid; LINE-HEIGHT: 18px; BACKGROUND-COLOR: rgb(255,255,255)"> 4,4, Kypfos, NULL, NULL <li> 5,5, I wonder if Autumn ,1,2008-12-23 </li></ol><br /><br /> 2) To implement the same command: <br /><br /> sqlldr dbuser / dbpass @ dbservice control = users.ctl <br /><br /> For example, the console will show this information: <br /><br /> <font color=#ffffff>C: \&gt; sqlldr dbuser / dbpass @ dbservice control = users.ctl</font> <br /><br /> <font color=#ffffff>SQL * Loader: Release 9.2.0.1.0 - Production on Wednesday, January 7 22:26:25 2009</font> <br /><br /> <font color=#ffffff>Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.</font> <br /><br /> <font color=#ffffff>Reach commit point, the logical record count 4 <br /> Reach commit point, the logical record count 5 <br /></font> <br /> The above control file contains the contents of the more complex (demonstration purposes), please understand that according to notes the significance of each parameter. Can also use this to explore more. <br /><br /> Concluded by saying that under the relevant SQL * Loader performance and concurrent operation <br /><br /> 1) ROWS The default value is 64, you can specify a more appropriate based on the actual ROWS parameter to specify the number of records for each submission. (Experienced in the PL / SQL Developer in the implementation of a few to more than one insert statement that the case right?) <br /><br /> 2) Conventional import by using INSERT statement to import the data. Direct import can skip the database-related logic (DIRECT = TRUE), data directly into the data file, you can import the data to improve performance. Of course, in many cases, can not use this parameter (if the primary key to repeat the words of the state of the index will become UNUSABLE!). <br /><br /> 3) by specifying UNRECOVERABLE option, you can close the database log (whether or not to alter table table1 nologging it?). This option can only be used in conjunction with direct. <br /><br /> 4) For very large data files to import must use concurrent operation, and that is to run multiple import tasks. <br /><br /> sqlldr userid = / control = result1.ctl direct = true parallel = true <br /> sqlldr userid = / control = result2.ctl direct = true parallel = true <br /> sqlldr userid = / control = result2.ctl direct = true parallel = true <br /><br /> When loading large amounts of data (approximately more than 10GB), the best inhibiting the production log: <br /><br /> SQL&gt; ALTER TABLE RESULTXT nologging; <br /><br /> This does not produce REDO LOG, can improve efficiency. And then load data in the CONTROL file, add the above line: unrecoverable, this option must be connected with shared use of DIRECT. <br /><br /> Concurrent operation, ORACLE saying that they could handle 100GB of data per hour capacity! In fact, it is estimated to go to 1-10G even pretty good, the structure began to be used the same file, but only a small amount of data, after the success of start loading large amounts of data, so that to avoid waste of time. <br /><br /> <font face=黑体 color=#ff0000 size=3>(Note: in general can only use ASCII code form, remember to convert code, or import the data is empty)</font> <br /><br /> References: 1. Oracle SQL * Loader - English, Sql Loader official instructions, including multiple types of Demo <br /> 2. Sql loader usage - lists the choice of parameters sql loader Chinese specifications <br /> 3. Use SQL Loader to import large amounts of data, to avoid the frequent use of SQL to write library - a simple example, fast with the usage of about Sql Loader <br /> 4. Oracle SQL Loader syntax details <br /> 5. Oracle sql loader full-Gong Lue - fairly genuine. And talk about how to use SQL * Plus or UTL_FILE package of the spool data file is generated <br /> 6. SQL * Loader Control File Reference - English, control file to use for reference <br /> 7. To learn the use of oracle sql loader <br /> 8. With sqlloader (sqlldr) load LOB data - LOB inner class is an external file into a database using sql loader <br /> 9. SQLLDR loaded directly several parameters of the test <br /> 10.Maximizing SQL * Loader Performance <br /><br /></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></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/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/sqlldr-guide-data/</wfw:commentRss>
	</item>
		<item>
		<title>sqlplus can execute PL / SQL procedure written</title>
		<link>http://www.kods.netwww.kods.net/sqlplus-can-execute-pl-sql-procedure-written/</link>
		<comments>http://www.kods.netwww.kods.net/sqlplus-can-execute-pl-sql-procedure-written/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 15:07:06+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[sql procedure]]></category>
<category><![CDATA[pl sql]]></category>
<category><![CDATA[data mining]]></category>
<category><![CDATA[lt]]></category>
<category><![CDATA[olap data]]></category>
<category><![CDATA[application testing]]></category>
<category><![CDATA[oracle sql]]></category>
<category><![CDATA[number 1]]></category>
<category><![CDATA[insertion]]></category>
<category><![CDATA[t1]]></category>
<category><![CDATA[pairs]]></category>
<category><![CDATA[sql program]]></category>
<category><![CDATA[sql programs]]></category>
<category><![CDATA[exit statement]]></category>
<category><![CDATA[loop body]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/sqlplus-can-execute-pl-sql-procedure-written/</guid>
		<description><![CDATA[sqlplus can execute PL / SQL to write programs. SQL * Plus: Release 10.2.0.1.0 - Production on Wednesday, February 3 09:59:25 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connect to: Or ...]]></description>
		<content:encoded><![CDATA[sqlplus can execute PL / SQL to write programs. <br /><br /> <font color=#ffffff>SQL * Plus: Release 10.2.0.1.0 - Production on Wednesday, February 3 09:59:25 2010</font> <br /><br /> <font color=#ffffff>Copyright (c) 1982, 2005, Oracle. All rights reserved.</font> <br /><br /> <font color=#ffffff>Connect to: <br /> Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production <br /> With the Partitioning, OLAP, Data Mining and Real Application Testing options</font> <br /><br /> <font color=#ffffff>1 DECLARE <br /> 2 <br /> 3 a NUMBER: = 3; <br /> 4 <br /> 5 BEGIN <br /> 6 <br /> 7 a: = a + 1; <br /> 8 <br /> 9 END; <br /> 10 *</font> <br /><br /> <font color=#ffffff>PL / SQL procedure successfully completed.</font> <br /><br /> As with <font color=#800080>Oracle</font> SQL programs, we can invoke a PL / SQL program either by typing it in <font face=新宋体><tt>sqlplus</tt></font> or by putting the code in a file and invoking the file in the various ways we learned in <font color=#800080>Getting Started With</font> Oracle. <br /><br /> PL / SQL allows you to branch and create loops in a fairly familiar way. <br /><br /><p> An <font face=新宋体><tt>IF</tt></font> statement looks like: <pre>IF &lt;condition&gt; THEN &lt;statement_list&gt; ELSE &lt;statement_list&gt; END IF;</pre> The <font face=新宋体><tt>ELSE</tt></font> part is optional. If you want a multiway branch, use: <pre>IF &lt;condition_1&gt; THEN ...

ELSIF &lt;condition_2&gt; THEN ...

... ...

ELSIF &lt;condition_n&gt; THEN ...

ELSE ...

END IF;</pre> The following is an example, slightly modified from the previous one, where now we only do the insertion if the second component is 1. If not, we first add 10 to each component and then insert: <pre>DECLARE

    a NUMBER;

    b NUMBER;

BEGIN

    SELECT e,f INTO a,b FROM T1 WHERE e&gt;1;

    IF b=1 THEN

        INSERT INTO T1 VALUES(b,a);

    ELSE

        INSERT INTO T1 VALUES(b+10,a+10);

    END IF;

END;

.

run;</pre> Loops are created with the following: <pre>LOOP

    &lt;loop_body&gt; /* A list of statements. */

END LOOP;</pre> At least one of the statements <font face=新宋体><tt>in</tt></font> &lt;loop_body&gt; should be an <font face=新宋体><tt>EXIT</tt></font> statement of the form <pre>EXIT WHEN &lt;condition&gt;;</pre> The loop breaks if <font face=新宋体><tt>&lt;condition&gt;</tt></font> is true. For example, here is a way to insert each of the pairs (1, 1) through (100, 100) into <font face=新宋体><tt>T1</tt></font> of the above two examples: <pre>DECLARE

    i NUMBER := 1;

BEGIN

    LOOP

        INSERT INTO T1 VALUES(i,i);

        i := i+1;

        EXIT WHEN i&gt;100;

    END LOOP;

END;

.

run;</pre> Some other useful loop-forming statements are: <ul><li> <font face=新宋体><tt>EXIT</tt></font> by itself is an unconditional loop break. Use it inside a conditional if you like. <li> A <font face=新宋体><tt>WHILE</tt></font> loop can be formed with <pre>    WHILE &lt;condition&gt; LOOP

        &lt;loop_body&gt;

    END LOOP;</pre> <li> A simple <font face=新宋体><tt>FOR</tt></font> loop can be formed with: <pre>    FOR &lt;var&gt; IN &lt;start&gt;..&lt;finish&gt; LOOP

        &lt;loop_body&gt;

    END LOOP;</pre> Here, <font face=新宋体><tt>&lt;var&gt;</tt></font> can be any variable; it is local to the for-loop <font face=新宋体><tt>and</tt></font> need not be declared. Also, <font face=新宋体><tt>&lt;start&gt;</tt></font> and &lt;finish&gt; are constants. </li></ul>				<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/sqlplus-can-execute-pl-sql-procedure-written/</wfw:commentRss>
	</item>
		<item>
		<title>Oracle Wait Interface</title>
		<link>http://www.kods.netwww.kods.net/oracle-wait-interface/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-wait-interface/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 14:46:48+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[interface]]></category>
<category><![CDATA[rar]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-wait-interface/</guid>
		<description><![CDATA[File: Oracle Wait Interface.rar Size: 2522KB Download: Download]]></description>
		<content:encoded><![CDATA[<table bordercolor=#dddddd cellspacing=0 cellpadding=0 width=360 align=center border=1><tbody><tr height=60><td align=middle width=60></td><td><table cellspacing=0 cellpadding=0 width="100%" border=0><tbody><tr height=20><td align=middle width=40> File: </td><td> Oracle Wait Interface.rar </td></tr><tr height=20><td align=middle width=40> Size: </td><td> 2522KB </td></tr><tr height=20><td align=middle width=40> Download: </td><td> Download </td></tr></tbody></table></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/oracle-wait-interface/</wfw:commentRss>
	</item>
		<item>
		<title>sqlldr use of the whole</title>
		<link>http://www.kods.netwww.kods.net/sqlldr-use-of-the-whole/</link>
		<comments>http://www.kods.netwww.kods.net/sqlldr-use-of-the-whole/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 13:27:57+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[indexes]]></category>
<category><![CDATA[oracle data]]></category>
<category><![CDATA[oracle corporation]]></category>
<category><![CDATA[database sql]]></category>
<category><![CDATA[data warehouse]]></category>
<category><![CDATA[bind]]></category>
<category><![CDATA[logical records]]></category>
<category><![CDATA[valid keywords]]></category>
<category><![CDATA[parallel load]]></category>
<category><![CDATA[index maintenance]]></category>
<category><![CDATA[loading tools]]></category>
<category><![CDATA[data loading]]></category>
<category><![CDATA[discards]]></category>
<category><![CDATA[command line parameters]]></category>
<category><![CDATA[sql loader]]></category>
<category><![CDATA[parameter specification]]></category>
<category><![CDATA[direct parallel]]></category>
<category><![CDATA[password control]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/sqlldr-use-of-the-whole/</guid>
		<description><![CDATA[SQL * LOADER is the ORACLE data loading tools normally used to operating system files to migrate to ORACLE database. SQL * LOADER is the option of using a large data warehouse loading, because it prov ...]]></description>
		<content:encoded><![CDATA[<table cellspacing=0 cellpadding=0 width="100%" align=center border=0><tbody><tr><td align=middle bgcolor=#bbf0ff></td><tr><td><table bordercolor=#bbf0ff cellspacing=1 cellpadding=0 width="100%" border=1><tbody><tr><td align=middle><table cellspacing=0 cellpadding=0 width=650 border=0><tbody><tr><td align=middle><table cellspacing=0 cellpadding=0 width="100%" border=0><tbody><tr><td width=650><br /> <font size=2>SQL * LOADER is the ORACLE data loading tools normally used to operating system files to migrate to ORACLE database. <br /></font> <table"FONT: 12px Verdana, Arial, Helvetica, 宋体, sans-serif; COLOR: rgb(51,51,51)" cellspacing=0 cellpadding=0 width=160 align=left border=0><tbody><tr><td"BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px auto; PADDING-TOP: 0px; BORDER-RIGHT-WIDTH: 0px"><font size=2></font></td></tr></tbody></table> SQL * LOADER is the option of using a large data warehouse loading, because it provides the fastest route (DIRECT, PARALLEL). Now, we put aside the theory aside, using examples to enable you to quickly master the SQL * LOADER is used. <br /> First of all, we recognize that what SQL * LOADER. <br /> In the NT,, SQL * LOADER command for SQLLDR, under the UNIX generally sqlldr / sqlload. <br /> Such as the implementation: d: \ oracle&gt; sqlldr <br /> SQL * Loader: Release 8.1.6.0.0 - Production on Tuesday January 8 11:06:42 2002 <br /> (c) Copyright 1999 Oracle Corporation. All rights reserved. <br /><br /> Usage: SQLLOAD keyword = value [, keyword = value ,...] <br /> Valid keywords: <br /> userid - ORACLE username / password <br /> control - Control file name <br /> log - Log file name <br /> bad - Bad file name <br /> data - Data file name <br /> discard - Discard file name <br /> discardmax - Number of discards to allow (all default) <br /> skip - Number of logical records to skip (Default 0) <br /> load - Number of logical records to load (all default) <br /> errors - Number of errors to allow (Default 50) <br /> rows - Number of rows in conventional path bind array or between direct p <br /> ath data saves <br /> (Default: Conventional path 64, all direct paths) <br /> bindsize - Size of conventional path bind array in bytes (default 65536) <br /> silent - Supdivss messages during run (header, feedback, errors, discards, part <br /> itions) <br /> direct - use direct path (Default FALSE) <br /> parfile - parameter file: name of file that contains parameter specification <br /> s <br /> parallel - do parallel load (Default FALSE) <br /> file - File to allocate extents from <br /> skip_unusable_indexes - disallow / allow unusable indexes or index partitions (Default FALSE) <br /> skip_index_maintenance - do not maintain indexes, mark affected indexes as unusable (Default FALSE) <br /> commit_discontinued - commit loaded rows when load is discontinued (Default FALSE) <br /> readsize - Size of Read buffer (Default 1048576) <br /> PLEASE NOTE: command-line parameters can be specified by a location or keyword. <br /> <font size=2>Examples of the former &#39;sqlload scott / tiger foo&#39;; <br /> Examples of the latter is the &#39;sqlload control = foo userid = scott / tiger&#39;. <br /> Location of the specified parameters of time must be earlier than but not later than the parameters specified by the keyword. For example, the <br /> &#39;SQLLOAD SCott / tiger control = foo logfile = log&#39;, <br /> But the &#39;not allowed sqlload scott / tiger control = foo log&#39;, <br /> Even if permitted to parameter &#39;log&#39; of the correct location. <br /> d: \ oracle&gt; <br /> We can see some basic help information, here, I used the Chinese WIN2000 ADV SERVER. <br /> We know, SQL * LOADER can only import plain text, so we now begin to explain examples of its usage. <br /> <strong>First, existing data sources result.csv, want to pour in FANCY user under ORACLE. <br /></strong> result.csv content: <br /> 1, the default Web site, 192.168.2.254:80:, RUNNING <br /> 2, other, 192.168.2.254:80: test.com, STOPPED <br /> 3, third, 192.168.2.254:81: thirdabc.com, RUNNING <br /> From this, we see that 4, respectively, separated by commas, for variable-length strings. <br /> <strong>Second, in formulating control file result.ctl</strong> <br /> result.ctl content: <br /> load data <br /> infile &#39;result.csv&#39; <br /> into table resultxt <br /> (resultid char terminated by &#39;,&#39;, <br /> website char terminated by &#39;,&#39;, <br /> ipport char terminated by &#39;,&#39;, <br /> status char terminated by whitespace) <br /> Description: <br /> infile refers to the data source file where we omitted the default discardfile result.dsc badfile result.bad <br /> into table resultxt default is INSERT, also into table resultxt APPEND to append mode or REPLACE <br /> terminated by &#39;,&#39; refers to a comma-separated terminated by whitespace at the end separated by a space &lt;br /&gt; <strong>3, this time the implementation of our load:</strong></font><br /> D: \&gt; sqlldr userid = fancy / testpass control = result.ctl log = resulthis.out <br /> SQL * Loader: Release 8.1.6.0.0 - Production on Tuesday January 8 10:25:42 2002 <br /> (c) Copyright 1999 Oracle Corporation. All rights reserved. <br /> SQL * Loader-941: In describing the error when the table RESULTXT <br /> ORA-04043: Object does not exist RESULTXT prompt error, because the database does not correspond to the table. <br /> <strong>Fourth, the establishment of the database table</strong> create table resultxt <br /> (resultid varchar2 (500), <br /> website varchar2 (500), <br /> ipport varchar2 (500), <br /> status varchar2 (500)) <br /> / <br /> <strong>5, re-implementation of the load <br /></strong> D: \&gt; sqlldr userid = fancy/k1i7l6l8 control = result.ctl log = resulthis.out <br /> SQL * Loader: Release 8.1.6.0.0 - Production on Tuesday January 8 10:31:57 2002 <br /> (c) Copyright 1999 Oracle Corporation. All rights reserved. <br /> Reach commit point, the logical record count 2 <br /> Reach commit point, the logical record count 3 <br /> Has been successfully! We can process the log files to analyze: resulthis.out reads as follows: <br /> SQL * Loader: Release 8.1.6.0.0 - Production on Tuesday January 8 10:31:57 2002 <br /> (c) Copyright 1999 Oracle Corporation. All rights reserved. <br /> Control file: result.ctl <br /> Data File: result.csv <br /> Error File: result.bad <br /> Obsolete documents: the absence of the designated <br /> : <br /> (Which can waste all the records) <br /> Load Number: ALL <br /> Skip count: 0 <br /> Allowed error: 50 <br /> Bind array: 64 rows, maximum 65536 bytes to continue: have not been used in the specified path: General table RESULTXT <br /> Have been loaded from every logical record into the table INSERT option to force column names to this position of the length of the suspension package data types <br /> ------------------------------ ---------- ----- ---- -- --- --------------------- <br /> RESULTID FIRST *, CHARACTER <br /> WEBSITE NEXT *, CHARACTER <br /> IPPORT NEXT *, CHARACTER <br /> STATUS NEXT * WHT CHARACTER <br /><br /> Table RESULTXT: <br /> 3 rows loaded successfully due to data errors, 0 lines did not load. <br /> Since all WHEN clauses failed, 0 lines did not load. <br /> Since all fields are empty, the 0-line did not load. <br /><br /> The space allocated for the integration of the array: 65016 bytes (63 lines) <br /> In addition to bind an array of memory outside the space allocation: 0 bytes Total logical records skipped: 0 <br /> The total number of logical records read: 3 <br /> The total number of logical records rejected: 0 <br /> The total number of logical records discarded: 0 <br /> From Tuesday January 08 10:31:57 2002 started running Tuesday January 08 10:32:00 2002 after the end of operation time: 00: 00: 02.70 <br /> CPU time: 00: 00: 00.10 (available &lt;br /&gt; <strong>6, concurrent operation <br /></strong> sqlldr userid = / control = result1.ctl direct = true parallel = true <br /> sqlldr userid = / control = result2.ctl direct = true parallel = true <br /> sqlldr userid = / control = result2.ctl direct = true parallel = true <br /> When loading large amounts of data (approximately more than 10GB), the best inhibiting the production log: <br /> SQL&gt; ALTER TABLE RESULTXT nologging; <br /> This does not produce REDO LOG, can improve efficiency. And then load data in the CONTROL file, add the above line: unrecoverable <br /> This option must be connected with shared use of DIRECT. <br /> Concurrent operation, ORACLE saying that they could handle 100GB of data per hour capacity! In fact, it is estimated to go to 1-10G even pretty good, the structure began to be used the same file, but only a small amount of data, after the success of start loading large amounts of data, so that to avoid waste of time. <font face=宋体 size=3> </font><br /></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></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/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/sqlldr-use-of-the-whole/</wfw:commentRss>
	</item>
		<item>
		<title>Export data from Excel to Oracle Method Summary - --</title>
		<link>http://www.kods.netwww.kods.net/export-data-from-excel-to-oracle-method-summary/</link>
		<comments>http://www.kods.netwww.kods.net/export-data-from-excel-to-oracle-method-summary/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 12:44:36+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[inconvenience]]></category>
<category><![CDATA[export data]]></category>
<category><![CDATA[database systems]]></category>
<category><![CDATA[odbc database]]></category>
<category><![CDATA[data sources]]></category>
<category><![CDATA[direct import]]></category>
<category><![CDATA[database software]]></category>
<category><![CDATA[errata]]></category>
<category><![CDATA[dialog box]]></category>
<category><![CDATA[corresponding service]]></category>
<category><![CDATA[database driver]]></category>
<category><![CDATA[scale database]]></category>
<category><![CDATA[small database system]]></category>
<category><![CDATA[system dsn]]></category>
<category><![CDATA[format database]]></category>
<category><![CDATA[import feature]]></category>
<category><![CDATA[odbc data source]]></category>
<category><![CDATA[twists]]></category>
<category><![CDATA[large scale]]></category>
<category><![CDATA[information system]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/export-data-from-excel-to-oracle-method-summary/</guid>
		<description><![CDATA[We all generally like to use Excel to save a variety of commonly used forms of data, but If you want information system with data stored in Excel is not very realistic and will bring a lot of operatio ...]]></description>
		<content:encoded><![CDATA[<table cellspacing=0 cellpadding=0 width="100%" align=center border=0><tbody><tr><td align=middle bgcolor=#bbf0ff></td><tr><td><table bordercolor=#bbf0ff cellspacing=1 cellpadding=0 width="100%" border=1><tbody><tr><td align=middle><table cellspacing=0 cellpadding=0 width=650 border=0><tbody><tr><td align=middle><table cellspacing=0 cellpadding=0 width="100%" border=0><tbody><tr><td width=650><br /> We all generally like to use Excel to save a variety of commonly used forms of data, but If you want information system with data stored in Excel is not very realistic and will bring a lot of operational inconvenience. This is necessary to Excel into a variety of popular database software for the development use. These commonly used software has a small database system Access, medium and large database systems SQL Server and Oracle and other large-scale database systems. <br /> So how easily import Excel data to these databases as well? <br /><br /> 1, Access, and SQL Server itself as Microsoft&#39;s products, provide information on, including Excel, including direct import feature. <br /><br /> Second, while Oracle will need to spend more points, twists and turns, where I used the method and method of online search to be described below. <br /><br /> The first step, the Excel data into Access, here, should be explained that, due to the restrictions Excel data format, database software, compared with the relatively loose, so the process of importing the data may occur in some of the data into a cell is incorrect. Access will generate an errata, can be against the table to see is how can I import more data are generated in the problem. <br /><br /> The second step, establishing ODBC data source, through the control panel - &quot;Data Sources (ODBC), create a system DSN, in the establishment of DSN&#39;s time to select the database driver, please select the corresponding driver, my machine is Oracle in OraHome92, and then will pop up a dialog box, do further configuration, the TNS Service Name will be listed on this machine available in the &quot;Local Net Service Name&quot;, please select the corresponding service name entered to access the database after the user (in the import can be modified), and to this ODBC data source, different name on it. <br /><br /> The third step, through the Access export to Oracle. In the export of &quot;Save as type&quot; drop-down box, select &quot;ODBC Database (),&quot; ODBC Data Source dialog box will pop up to select the data source, followed by a pop-up on the corresponding data source, database connection information, the default user name is to build ODBC data source specified in the export can be revised to provide other users. <br /><br /> Shows that this can be seen, through the Access to export to other database systems are very convenient, as long as the machine on the target database system, ODBC driver, and set up ODBC data source, you can successfully exported. <br /><br /> Method 2: <br /><br /> Import into sql server, using SQL Server provides tools for import export Oracle, but for some image field in support of good, if you do not this field is on the line. <br /><br /> Method 3: <br /><br /> Advanced users can adopt the following methods (only a text field): <br /><br /> Excel should first save as. Csv format file, this format is a comma-delimited text file data fields, such as test.csv, and then write a insert.ctl <br /> To use sqlldr to import! <br /> insert.ctl reads as follows: <br /> load data - 1, control file identifies <br /> infile &#39;test.csv&#39; - 2, to enter the data file is named test.csv <br /> append into table table_name - 3, the additional records to the table table_name <br /> fields terminated by &#39;,&#39; - 4, field terminated in &#39;,&#39; is a comma <br /> (field1, <br /> field2, <br /> field3, <br /> ... <br /> fieldn )----- column corresponds to the order of the definition of <br /><br /> Note that the order field in parentheses with the csv file, and then you can correspond to execute the following commands: <br /> sqlldr user / password control = insert.ctl <br /><br /> Method 4 (only text field): <br /><br /> In fact, if you is not the case of a single file (less than 100,000 lines), you can Select COPY, and then use PL / SQL Developer: first, the establishment of a good table, pay attention to the source table and destination table fields in the corresponding sequence, and then run SQL statement select * from table for update or in the left tree menu, select the appropriate forms, right-click in the pop-up menu, click &quot;Edit Data&quot;. and then open the form data at the top of the lock, and then click the plus sign, add The new line of blank lines. click of the mouse to the first space and then paste. COMMIT can be. (small tips, Oracle does not support, but is useful, there will be no problem) <br /><br /></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle-database-exp-imp-import-export-by-user-examples/" title="Oracle Database exp imp Import Export by user examples">Oracle Database exp imp Import Export by user examples</a> 2009-04-06 18:58:52</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-database-exp-imp-tools-for-performance-tuning/" title="Oracle Database Exp / Imp tools for performance tuning">Oracle Database Exp / Imp tools for performance tuning</a> 2009-04-06 11:12:24</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-database-backup-and-restore/" title="oracle database backup and restore">oracle database backup and restore</a> 2009-04-03 18:35:52</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-database-backup-and-recovery/" title="oracle database backup and recovery">oracle database backup and recovery</a> 2009-04-03 10:09:46</li>
					<li><a href="http://www.kods.netwww.kods.net/sqlplus-skills/" title="SQLPlus skills">SQLPlus skills</a> 2009-04-01 09:37:29</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/export-data-from-excel-to-oracle-method-summary/</wfw:commentRss>
	</item>
		<item>
		<title>On the oracle of the four log</title>
		<link>http://www.kods.netwww.kods.net/on-the-oracle-of-the-four-log/</link>
		<comments>http://www.kods.netwww.kods.net/on-the-oracle-of-the-four-log/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 06:04:52+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[adump]]></category>
<category><![CDATA[log database]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/on-the-oracle-of-the-four-log/</guid>
		<description><![CDATA[Database in their daily work is that we often use the log file, oracle log file is as follows. background_dump_dest = / opt / oracle / admin / modl / bdump user_dump_dest = / opt / oracle / admin / mo ...]]></description>
		<content:encoded><![CDATA[Database in their daily work is that we often use the log file, oracle log file is as follows. <br /> background_dump_dest = / opt / oracle / admin / modl / bdump <br /> user_dump_dest = / opt / oracle / admin / modl / udump <br /> core_dump_dest = / opt / oracle / admin / modl / cdump <br /> audit_file_dest = / opt / oracle / admin / modl / adump				<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/on-the-oracle-of-the-four-log/</wfw:commentRss>
	</item>
		<item>
		<title>RMAN said, I can back up (9) - RMAN incremental backup and the backup retention policy</title>
		<link>http://www.kods.netwww.kods.net/rman-said-i-can-back-up-9-rman-incremental-backup-and-the-backup-retention-policy/</link>
		<comments>http://www.kods.netwww.kods.net/rman-said-i-can-back-up-9-rman-incremental-backup-and-the-backup-retention-policy/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 20:51:00+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[backup set]]></category>
<category><![CDATA[disk space]]></category>
<category><![CDATA[incremental backups]]></category>
<category><![CDATA[incremental backup]]></category>
<category><![CDATA[database backup]]></category>
<category><![CDATA[target database]]></category>
<category><![CDATA[backup command]]></category>
<category><![CDATA[open archive]]></category>
<category><![CDATA[backup options]]></category>
<category><![CDATA[enhancements]]></category>
<category><![CDATA[chapter 8]]></category>
<category><![CDATA[retention policy]]></category>
<category><![CDATA[multiple choice questions]]></category>
<category><![CDATA[backup feature]]></category>
<category><![CDATA[model archive]]></category>
<category><![CDATA[suitable locations]]></category>
<category><![CDATA[actual size]]></category>
<category><![CDATA[adjective]]></category>
<category><![CDATA[exercises]]></category>
<category><![CDATA[conscientiously]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/rman-said-i-can-back-up-9-rman-incremental-backup-and-the-backup-retention-policy/</guid>
		<description><![CDATA[Advanced exercises chapter 8.5 RMAN backup Previous chapter describes how to use various RMAN backup, advanced articles are mainly RMAN some of the extensions and enhancements, learning the content of ...]]></description>
		<content:encoded><![CDATA[<h2> Advanced exercises chapter 8.5 RMAN backup </h2><br /> Previous chapter describes how to use various RMAN backup, advanced articles are mainly RMAN some of the extensions and enhancements, learning the content of your front end can be completed in <a"javascript:tagshow(event, '%CA%FD%BE%DD%BF%E2');" href="javascript:;" target=_self> The backup of the <font color=#800080><strong><u>database,</u></strong></font> but by learning that this is, you can better, faster, more scientific and more reasonable ... ... (Cloze, please conscientiously at suitable locations to add 80000 more at the beginning of the adjective) to complete the database backup. <br /><br /> The contents of this section are many and mixed, for convenience in reading, the following will be introduced one by one in the form of multiple-choice questions, if you rush that Han, you can look that part of his concern. <br /><br /><h3> 8.5.1 has chosen an incremental backup </h3><br /> Although the backup with the BACKUP command generates a backup only focused on those who use the data blocks, the actual size of the backup set has been lower than the target database&#39;s data files much smaller. But to modify the data files are not frequent, but larger database, perform a backup certainly hope that there is a feature that backup if they can only back up those modified data to a backup set is not so much smaller will do. This is naturally thought of Oracle, incremental backup feature is designed to meet this need arose. <br /><br /> If the database is running in non-archive mode, then you can only clean off in the database (in NORMAL, IMMEDIATE, TRANSACTIONAL mode off) and take place under conditions consistent incremental backups, if the database is running in archive mode, then either closed state in the database, you can also open in the database back up (again illustrates the advantages of open archive model, archive logs but much of the more disk space, the benefits are not some, many, but also added a layer of the database is equivalent to Youji Insurance ). <br /><br /><h4> 8.5.1.1 Incremental backup options </h4><br /> The establishment of an incremental backup is quite simple in essence is to specify a parameter INCREMENTAL LEVEL = n, in the implementation of the BACKUP command with the can, you can create two levels of incremental backups, with integer numbers 0 ... n, said (n largest not more than 4 ), from level 0, all incremental backups must first create a level 0 backup. 0 backup is equivalent to a full backup of the database. <br /><br /> Note, by BACKUP DATABASE are also created a full backup of the database, but this is not the same as a full backup of the incremental backup level 0 backup (although it is a full backup of the database), because the conventional full backup does not contain additional the amount of backup strategy, do not support on its basis to create an incremental backup set. <br /><br /> When you create an incremental backup, either to back up the entire database, you can also only the table space or even to create an incremental backup of the data file level, such as: <br /><br /> The establishment of full incremental level 0 database backup: <br /><br /><ul> RMAN&gt; <strong>BACKUP INCREMENTAL LEVEL = 0 DATABASE;</strong> </ul><br /><br /> For the data file user01.dbf Level 1 incremental backup of the establishment: <br /><br /><ul> RMAN&gt; <strong>BACKUP INCREMENTAL LEVEL = 1 DATAFILE &#39;F: \ ORAHOME1 \ ORADATA \ JSSWEB \ USERS01.DBF&#39;;</strong> </ul><br /><br /> USERS tablespace to establish the level of an incremental backup: <br /><br /><ul> RMAN&gt; <strong>BACKUP INCREMENTAL LEVEL = 1 TABLESPACE USERS;</strong> </ul><br /><h4> 8.5.1.2 Incremental Backup Type </h4><br /> RMAN provides two types of incremental backup: DIFFERENTIAL (difference), and CUMULATIVE (cumulative), these two types of incremental backup set is created when the algorithm is not the same. By default, RMAN creates an incremental backup is a DIFFERENTIAL way, if you want to build CUMULATIVE the way incremental backups, you need to implement explicitly specify the BACKUP command. <br /><br /> For example, incremental backups CUMULATIVE create a full backup of the database: <br /><br /><ul> RMAN&gt; BACKUP INCREMENTAL LEVEL = 1 CUMULATIVE DATABASE; </ul><br /><br /> With regard to the conceptual interpretation of incremental backups, such as the DIFFERENTIAL and CUMULATIVE are two ways to see that this is the difference between the rumor, in parentheses, rumored finishing, if you see that this is not a time to rumor, this ... ... Do not worry, be patient wait, bread and milk will be there. <br /><br /><h4> 8.5.1.3 Incremental Backup Notes </h4><br /> Many friends of the RMAN&#39;s incremental backup recognize there is some misunderstanding that the adoption of incremental backups, not only can reduce the backup set size, but also to improve the efficiency of the backup, saving backup time, and I would like to say, some very special circumstances This is not entirely wrong. <br /><br /> In 9i and earlier versions, regardless of whether it is an incremental backup, RMAN backups in the implementation, we need to first read all the data blocks of all the memory, checking each of the SCN of a data block header information, and the parent with the backup set incremental backups compared to determine whether the block has been modified. If you find that block has been modified, then the block where the data file to be re-backup (yes, check at the block level, but the backup is the data file level). It can be seen, unless you change the system are very frequent (too frequent changes whether the system is also necessary to create an incremental backup, this is a problem), or I / O devices with remarkable efficiency (I mean, amazing slow), Otherwise incremental backups only save storage space, we can not reduce the backup time, can not meet the purpose of improving the efficiency of the backup, and even may lead to a longer backup time (because more data block checking operation). <br /><br /> In <font color=#800080><strong><u>10g,</u></strong></font> Oracle offers a new feature: block change tracking (Block Change Tracking). Enable block change tracking, RMAN not have to go scan the data file for each block, and directly through the block you can modify the trace file which blocks access to the information changes have taken place. <br /><br /><ul> Tip: <br /><br /> Can enable block change tracking the following statement: <br /><br /> SQL&gt; <strong>ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE &#39;/ LOACTION / TRK_FILENAME&#39;;</strong> <br /><br /> If you use the OMF feature (Oracle-Managed Files), Oracle will automatically create a block change tracking file. <br /><br /> Available through the following statement to disable block change tracking: <br /><br /> SQL&gt; <strong>ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;</strong> <br /><br /> You can check whether the following statements to enable block change tracking: <br /><br /> SQL&gt; <strong>SELECT STATUS FROM V $ BLOCK_CHANGE_TRACKING;</strong> </ul><br /><br /> Need to remind one, be sure to recognize that, although the backup time may be shortened, and the backup set size may be smaller, but the recovery operation, the time required may increase, because the database recovery, they have to read more the backup set to complete the restore operation. <br /><br /> Backup and restore itself is relative, there&#39;s idiom is called the Consumer He rose only fitting to describe the relationship between Talia. <br /><br /><h3> 8.5.2 Set whether to use RMAN backup retention policy </h3><br /> Strategy, tut, never thought咱could say such a professional word, ah, they said experts, is to be able to describe in any affair, very professional, I have to learn a few more similar words, to make their own distance from the experts More recently, some, or, I moved to the experts directly to the edge of bed to go live. <br /><br /> If you are <a"javascript:tagshow(event, '%B9%DC%C0%ED');" href="javascript:;" target=_self> The <font color=#800080><strong><u>management</u></strong></font> of very large databases, and backup implementation is also more frequent (nonsense, are also not infrequent in such a dry, excellent DBA must have a corresponding identity of good work habits), it is necessary for you to save these backup files formulate a reasonable strategy. The Norwegian&#39;s Norwegian, the move of the move, the removal of the deletion, reasonable release, to maximize use of limited disk space Well. <br /><br /> Created through RMAN backup pieces, because the backup file is created and maintained by RMAN, so manual deletion is not wise, and also provides a backup RMAN retention policies, rational design, by the RMAN automatically delete old backup files are also more secure more convenient. <br /><br /> Provides two kinds of RMAN backup retention policy: Based on the time and the number of redundancy-based backup retention policies. <br /><br /><h4> 8.5.2.1 Time-based backup retention policy </h4><br /> To put it more simply, that is, you want the database to restore to the earliest days ago. Example, recovery time will be set to 7, then the RMAN backup is retained can guarantee that you will recover the database to any time within a week, under those documents. <br /><br /> Set time-based backup retention policies can be CONFIGURE command, for example: <br /><br /><ul> RMAN&gt; CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF n DAYS; </ul><br /><br /> Note: n = a positive integer greater than 0. <br /><br /> After the implementation of the command, RMAN will always be those who will recover the database to retain n days before the state need to use a backup, for example, recovery time is set to 7 days, then the backup of all data files must meet the following conditions: <br /><br /><ul> SYSDATE - BACKUP CHECKPOINT TIME&gt; = 7 </ul><br /><br /> Does not satisfy the above conditions any of the backup will be obsolete RMAN and can be removed through the DELETE OBSOLETE command. OK, finished the basic knowledge, here you have the time to test, question: If you meet the conditions you want to delete the backup, Zezheng? Han? So soon forgotten? Quickly and then go back and take a look at 8.3. <br /><br /><ul> Tip: <br /><br /> Control file in the record-keeping time to the backup retention policy is likely to impact! <br /><br /> For NOCATALOG create a backup, RMAN backup set of information is stored in the target-side control file, but should be noted that, Oracle database control file is not an unlimited extension, which can save the records is limited, for RMAN The backup information, the control files saved in this part of the information subject to initialization parameters: CONTROL_FILE_RECORD_KEEP_TIME. <br /><br /> Initialization parameter CONTROL_FILE_RECORD_KEEP_TIME recorded in the control file is used to specify the minimum retention time in days as a unit, the default value is 7. By default, the backup set that is the shortest of information stored in the control file 7 days, more than 7 days later, due to lack of space if the control file (control file, not just only the backup set is stored information) need to re-record, then beyond the 7 days of records may be automatically covered, in the re-record it and whatever you set in the RMAN backup retention time is long (control file in Oracle database, the status of that is very high). <br /><br /> So for time-based backup retention policies, the general recommendations CONTROL_FILE_RECORD_ KEEP_TIME initialization parameter value is not less than your RMAN backup set retention time. <br /><br /> In addition, CONTROL_FILE_RECORD_KEEP_TIME initialization parameters may also be based on the number of redundant backup strategy affect the number of redundancies but can not be directly compared with the time for, so set the value, DBA can only depending on the actual situation, according to the backup created when you Backup sets are likely to occupy the space to estimate the value of the parameter initialization parameters CONTROL_FILE_RECORD_KEEP_TIME had. <br /><br /> The current control file in the allocated space, can be stored records and the number of records already stored, you can query the view V $ CONTROLFILE_RECORD_SECTION access. </ul><br /><h4> 8.5.2.2 Based on the number of redundant backup retention policy </h4><br /> Based on the number of redundancy is essentially a data file in various forms (including the backup sets and image copies) exist in the number of backups. If a redundant backup of data files exceeds the number of a specified number, RMAN backup will be obsolete the oldest. <br /><br /> Similarly, volume-based backup retention policy is through the CONFIGURE command to set, for example: <br /><br /><ul> RMAN&gt; CONFIGURE RETENTION POLICY TO REDUNDANCY n; </ul><br /><br /> n = a positive integer greater than 0. <br /><br /> DBA can also set the following command does not use any backup retention policy: <br /><br /><ul> RMAN&gt; CONFIGURE RETENTION POLICY TO NONE; </ul><br /><br /> If you do not set up any backup retention policy, use the REPORT OBSOLETE and DELETE OBSOLETE command will not be any matching records, but the REPORT OBSOLETE and DELETE OBSOLETE command also supports the REDUNDANCY and RECOVERY WINDOW parameters, parameter values correspond to the rules and CONFIGURE commands to configure a backup retention policies are identical, so if you decide to display and delete expired orders written in the script on a regular basis, I do not through the backup retention policies, but rather directly through the REPORT and DELETE commands itself to achieve this is feasible. <br /><br /><h4> 8.5.2.3 according to backup strategy to maintain a backup set </h4><br /> For the RMAN backup retention policy is set, after, RMAN will automatically determine which backup set or image copy files no longer retained. These backup files will be marked as &quot;obsolete&quot; (Obsolete), through the REPORT OBSOLETE command to view the current state of the backup files are obsolete, or through the DELETE OBSOLETE command to delete these obsolete backups. For example: <br /><br /><ul> RMAN&gt; REPORT OBSOLETE; <br /><br /> Are using target database control file instead of recovery catalog <br /><br /> RMAN retention policy will be applied to the order <br /><br /> RMAN retention policy will be set to 3-day recovery window <br /><br /> Backups and copies have been abandoned <a"javascript:tagshow(event, '%B1%A8%B1%ED');" href="javascript:;" target=_self> <font color=#800080><strong><u>Report</u></strong></font> <br /><br /> Type keyword completion time of the file name / handle <br /><br /> -------------------- ------ ------------------ ------ -------------- <br /><br /> Backup set 2104-7 months -07 <br /><br /> Backup Section 2104-7 dated -07 D: \ BACKUP \ C-3391142503-20070704-01 <br /><br /> RMAN&gt; DELETE OBSOLETE; <br /><br /> RMAN retention policy will be applied to the order <br /><br /> RMAN retention policy will be set to 3-day recovery window <br /><br /> The distribution channel: ORA_DISK_1 <br /><br /> Channel ORA_DISK_1: sid = 14 devtype = DISK <br /><br /> Remove the following obsolete backups and copies: <br /><br /> Type keyword completion time of the file name / handle <br /><br /> -------------------- ------ ------------------ ------ -------------- <br /><br /> Backup set 2104-7 months -07 <br /><br /> Backup Section 2104-7 dated -07 D: \ BACKUP \ C-3391142503-20070704-01 <br /><br /> Are you sure you want to delete the above objects (enter YES or NO)? Y <br /><br /> Backup paragraph has been deleted <br /><br /> Backup segment handle = D: \ BACKUP \ C-3391142503-20070704-01 recid = 21 stamp = 627061645 <br /><br /> An object has been deleted </ul><br /><br /> Delete command in the implementation of two things need to know: <br /><br /><ul><li> If you have been judged to waste a single data file backup is a mirror copy, then the implementation of the DELETE command to delete this image directly copy the files. <li> If judged as obsolete backup is one part of the backup set, you must wait until the entire backup set all the other files are obsolete before they could delete the backup set. </li></ul><br /> For the incremental backup, whether it is time-based or based on the number of redundancy, RMAN backups are testing whether the 0 to meet the demand.				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle-database-backup-and-restore/" title="oracle database backup and restore">oracle database backup and restore</a> 2009-04-03 18:35:52</li>
					<li><a href="http://www.kods.netwww.kods.net/rman-incremental-backups/" title="rman incremental backups">rman incremental backups</a> 2009-04-02 15:10:17</li>
					<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/block-oracle-paragraph-reprint/" title="Block Oracle paragraph (reprint)">Block Oracle paragraph (reprint)</a> 2009-03-26 17:41:14</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/rman-said-i-can-back-up-9-rman-incremental-backup-and-the-backup-retention-policy/</wfw:commentRss>
	</item>
		<item>
		<title>RMAN said, I can back up (8) - RMAN commonly used commands Continued</title>
		<link>http://www.kods.netwww.kods.net/rman-said-i-can-back-up-8-rman-commonly-used-commands-continued/</link>
		<comments>http://www.kods.netwww.kods.net/rman-said-i-can-back-up-8-rman-commonly-used-commands-continued/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 18:09:11+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[logs]]></category>
<category><![CDATA[backup set]]></category>
<category><![CDATA[disk space]]></category>
<category><![CDATA[incremental backups]]></category>
<category><![CDATA[incremental backup]]></category>
<category><![CDATA[database backup]]></category>
<category><![CDATA[target database]]></category>
<category><![CDATA[backup command]]></category>
<category><![CDATA[open archive]]></category>
<category><![CDATA[backup options]]></category>
<category><![CDATA[enhancements]]></category>
<category><![CDATA[chapter 8]]></category>
<category><![CDATA[multiple choice questions]]></category>
<category><![CDATA[backup feature]]></category>
<category><![CDATA[model archive]]></category>
<category><![CDATA[suitable locations]]></category>
<category><![CDATA[actual size]]></category>
<category><![CDATA[adjective]]></category>
<category><![CDATA[exercises]]></category>
<category><![CDATA[conscientiously]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/rman-said-i-can-back-up-8-rman-commonly-used-commands-continued/</guid>
		<description><![CDATA[Advanced exercises chapter 8.5 RMAN backup Previous chapter describes how to use various RMAN backup, advanced articles are mainly RMAN some of the extensions and enhancements, learning the content of ...]]></description>
		<content:encoded><![CDATA[<h2> Advanced exercises chapter 8.5 RMAN backup </h2><br /> Previous chapter describes how to use various RMAN backup, advanced articles are mainly RMAN some of the extensions and enhancements, learning the content of your front end can be completed in <a"javascript:tagshow(event, '%CA%FD%BE%DD%BF%E2');" href="javascript:;" target=_self> The backup of the <font color=#800080><strong><u>database,</u></strong></font> but by learning that this is, you can better, faster, more scientific and more reasonable ... ... (Cloze, please conscientiously at suitable locations to add 80000 more at the beginning of the adjective) to complete the database backup. <br /><br /> The contents of this section are many and mixed, for convenience in reading, the following will be introduced one by one in the form of multiple-choice questions, if you rush that Han, you can look that part of his concern. <br /><br /><h3> 8.5.1 has chosen an incremental backup </h3><br /> Although the backup with the BACKUP command generates a backup only focused on those who use the data blocks, the actual size of the backup set has been lower than the target database&#39;s data files much smaller. But to modify the data files are not frequent, but larger database, perform a backup certainly hope that there is a feature that backup if they can only back up those modified data to a backup set is not so much smaller will do. This is naturally thought of Oracle, incremental backup feature is designed to meet this need arose. <br /><br /> If the database is running in non-archive mode, then you can only clean off in the database (in NORMAL, IMMEDIATE, TRANSACTIONAL mode off) and take place under conditions consistent incremental backups, if the database is running in archive mode, then either closed state in the database, you can also open in the database back up (again illustrates the advantages of open archive model, archive logs but much of the more disk space, the benefits are not some, many, but also added a layer of the database is equivalent to Youji Insurance ). <br /><br /><h4> 8.5.1.1 Incremental backup options </h4><br /> The establishment of an incremental backup is quite simple in essence is to specify a parameter INCREMENTAL LEVEL = n, in the implementation of the BACKUP command with the can, you can create two levels of incremental backups, with integer numbers 0 ... n, said (n largest not more than 4 ), from level 0, all incremental backups must first create a level 0 backup. 0 backup is equivalent to a full backup of the database. <br /><br /> Note, by BACKUP DATABASE are also created a full backup of the database, but this is not the same as a full backup of the incremental backup level 0 backup (although it is a full backup of the database), because the conventional full backup does not contain additional the amount of backup strategy, do not support on its basis to create an incremental backup set. <br /><br /> When you create an incremental backup, either to back up the entire database, you can also only the table space or even to create an incremental backup of the data file level, such as: <br /><br /> The establishment of full incremental level 0 database backup: <br /><br /><ul> RMAN&gt; <strong>BACKUP INCREMENTAL LEVEL = 0 DATABASE;</strong> </ul><br /><br /> For the data file user01.dbf Level 1 incremental backup of the establishment: <br /><br /><ul> RMAN&gt; <strong>BACKUP INCREMENTAL LEVEL = 1 DATAFILE &#39;F: \ ORAHOME1 \ ORADATA \ JSSWEB \ USERS01.DBF&#39;;</strong> </ul><br /><br /> USERS tablespace to establish the level of an incremental backup: <br /><br /><ul> RMAN&gt; <strong>BACKUP INCREMENTAL LEVEL = 1 TABLESPACE USERS;</strong> </ul><br /><h4> 8.5.1.2 Incremental Backup Type </h4><br /> RMAN provides two types of incremental backup: DIFFERENTIAL (difference), and CUMULATIVE (cumulative), these two types of incremental backup set is created when the algorithm is not the same. By default, RMAN creates an incremental backup is a DIFFERENTIAL way, if you want to build CUMULATIVE the way incremental backups, you need to implement explicitly specify the BACKUP command. <br /><br /> For example, incremental backups CUMULATIVE create a full backup of the database: <br /><br /><ul> RMAN&gt; BACKUP INCREMENTAL LEVEL = 1 CUMULATIVE DATABASE; </ul><br /><br /> With regard to the conceptual interpretation of incremental backups, such as the DIFFERENTIAL and CUMULATIVE are two ways to see that this is the difference between the rumor, in parentheses, rumored finishing, if you see that this is not a time to rumor, this ... ... Do not worry, be patient wait, bread and milk will be there. <br /><br /><h4> 8.5.1.3 Incremental Backup Notes </h4><br /> Many friends of the RMAN&#39;s incremental backup recognize there is some misunderstanding that the adoption of incremental backups, not only can reduce the backup set size, but also to improve the efficiency of the backup, saving backup time, and I would like to say, some very special circumstances This is not entirely wrong. <br /><br /> In 9i and earlier versions, regardless of whether it is an incremental backup, RMAN backups in the implementation, we need to first read all the data blocks of all the memory, checking each of the SCN of a data block header information, and the parent with the backup set incremental backups compared to determine whether the block has been modified. If you find that block has been modified, then the block where the data file to be re-backup (yes, check at the block level, but the backup is the data file level). It can be seen, unless you change the system are very frequent (too frequent changes whether the system is also necessary to create an incremental backup, this is a problem), or I / O devices with remarkable efficiency (I mean, amazing slow), Otherwise incremental backups only save storage space, we can not reduce the backup time, can not meet the purpose of improving the efficiency of the backup, and even may lead to a longer backup time (because more data block checking operation). <br /><br /> In <font color=#800080><strong><u>10g,</u></strong></font> Oracle offers a new feature: block change tracking (Block Change Tracking). Enable block change tracking, RMAN not have to go scan the data file for each block, and directly through the block you can modify the trace file which blocks access to the information changes have taken place. <br /><br /><ul> Tip: <br /><br /> Can enable block change tracking the following statement: <br /><br /> SQL&gt; <strong>ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE &#39;/ LOACTION / TRK_FILENAME&#39;;</strong> <br /><br /> If you use the OMF feature (Oracle-Managed Files), Oracle will automatically create a block change tracking file. <br /><br /> Available through the following statement to disable block change tracking: <br /><br /> SQL&gt; <strong>ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;</strong> <br /><br /> You can check whether the following statements to enable block change tracking: <br /><br /> SQL&gt; <strong>SELECT STATUS FROM V $ BLOCK_CHANGE_TRACKING;</strong> </ul><br /><br /> Need to remind one, be sure to recognize that, although the backup time may be shortened, and the backup set size may be smaller, but the recovery operation, the time required may increase, because the database recovery, they have to read more the backup set to complete the restore operation. <br /><br /> Backup and restore itself is relative, there&#39;s idiom is called the Consumer He rose only fitting to describe the relationship between Talia. <br /><br /><h3> 8.5.2 Set whether to use RMAN backup retention policy </h3><br /> Strategy, tut, never thought咱could say such a professional word, ah, they said experts, is to be able to describe in any affair, very professional, I have to learn a few more similar words, to make their own distance from the experts More recently, some, or, I moved to the experts directly to the edge of bed to go live. <br /><br /> If you are <a"javascript:tagshow(event, '%B9%DC%C0%ED');" href="javascript:;" target=_self> The <font color=#800080><strong><u>management</u></strong></font> of very large databases, and backup implementation is also more frequent (nonsense, are also not infrequent in such a dry, excellent DBA must have a corresponding identity of good work habits), it is necessary for you to save these backup files formulate a reasonable strategy. The Norwegian&#39;s Norwegian, the move of the move, the removal of the deletion, reasonable release, to maximize use of limited disk space Well. <br /><br /> Created through RMAN backup pieces, because the backup file is created and maintained by RMAN, so manual deletion is not wise, and also provides a backup RMAN retention policies, rational design, by the RMAN automatically delete old backup files are also more secure more convenient. <br /><br /> Provides two kinds of RMAN backup retention policy: Based on the time and the number of redundancy-based backup retention policies. <br /><br /><h4> 8.5.2.1 Time-based backup retention policy </h4><br /> To put it more simply, that is, you want the database to restore to the earliest days ago. Example, recovery time will be set to 7, then the RMAN backup is retained can guarantee that you will recover the database to any time within a week, under those documents. <br /><br /> Set time-based backup retention policies can be CONFIGURE command, for example: <br /><br /><ul> RMAN&gt; CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF n DAYS; </ul><br /><br /> Note: n = a positive integer greater than 0. <br /><br /> After the implementation of the command, RMAN will always be those who will recover the database to retain n days before the state need to use a backup, for example, recovery time is set to 7 days, then the backup of all data files must meet the following conditions: <br /><br /><ul> SYSDATE - BACKUP CHECKPOINT TIME&gt; = 7 </ul><br /><br /> Does not satisfy the above conditions any of the backup will be obsolete RMAN and can be removed through the DELETE OBSOLETE command. OK, finished the basic knowledge, here you have the time to test, question: If you meet the conditions you want to delete the backup, Zezheng? Han? So soon forgotten? Quickly and then go back and take a look at 8.3. <br /><br /><ul> Tip: <br /><br /> Control file in the record-keeping time to the backup retention policy is likely to impact! <br /><br /> For NOCATALOG create a backup, RMAN backup set of information is stored in the target-side control file, but should be noted that, Oracle database control file is not an unlimited extension, which can save the records is limited, for RMAN The backup information, the control files saved in this part of the information subject to initialization parameters: CONTROL_FILE_RECORD_KEEP_TIME. <br /><br /> Initialization parameter CONTROL_FILE_RECORD_KEEP_TIME recorded in the control file is used to specify the minimum retention time in days as a unit, the default value is 7. By default, the backup set that is the shortest of information stored in the control file 7 days, more than 7 days later, due to lack of space if the control file (control file, not just only the backup set is stored information) need to re-record, then beyond the 7 days of records may be automatically covered, in the re-record it and whatever you set in the RMAN backup retention time is long (control file in Oracle database, the status of that is very high). <br /><br /> So for time-based backup retention policies, the general recommendations CONTROL_FILE_RECORD_ KEEP_TIME initialization parameter value is not less than your RMAN backup set retention time. <br /><br /> In addition, CONTROL_FILE_RECORD_KEEP_TIME initialization parameters may also be based on the number of redundant backup strategy affect the number of redundancies but can not be directly compared with the time for, so set the value, DBA can only depending on the actual situation, according to the backup created when you Backup sets are likely to occupy the space to estimate the value of the parameter initialization parameters CONTROL_FILE_RECORD_KEEP_TIME had. <br /><br /> The current control file in the allocated space, can be stored records and the number of records already stored, you can query the view V $ CONTROLFILE_RECORD_SECTION access. </ul><br /><h4> 8.5.2.2 Based on the number of redundant backup retention policy </h4><br /> Based on the number of redundancy is essentially a data file in various forms (including the backup sets and image copies) exist in the number of backups. If a redundant backup of data files exceeds the number of a specified number, RMAN backup will be obsolete the oldest. <br /><br /> Similarly, volume-based backup retention policy is through the CONFIGURE command to set, for example: <br /><br /><ul> RMAN&gt; CONFIGURE RETENTION POLICY TO REDUNDANCY n; </ul><br /><br /> n = a positive integer greater than 0. <br /><br /> DBA can also set the following command does not use any backup retention policy: <br /><br /><ul> RMAN&gt; CONFIGURE RETENTION POLICY TO NONE; </ul><br /><br /> If you do not set up any backup retention policy, use the REPORT OBSOLETE and DELETE OBSOLETE command will not be any matching records, but the REPORT OBSOLETE and DELETE OBSOLETE command also supports the REDUNDANCY and RECOVERY WINDOW parameters, parameter values correspond to the rules and CONFIGURE commands to configure a backup retention policies are identical, so if you decide to display and delete expired orders written in the script on a regular basis, I do not through the backup retention policies, but rather directly through the REPORT and DELETE commands itself to achieve this is feasible. <br /><br /><h4> 8.5.2.3 according to backup strategy to maintain a backup set </h4><br /> For the RMAN backup retention policy is set, after, RMAN will automatically determine which backup set or image copy files no longer retained. These backup files will be marked as &quot;obsolete&quot; (Obsolete), through the REPORT OBSOLETE command to view the current state of the backup files are obsolete, or through the DELETE OBSOLETE command to delete these obsolete backups. For example: <br /><br /><ul> RMAN&gt; REPORT OBSOLETE; <br /><br /> Are using target database control file instead of recovery catalog <br /><br /> RMAN retention policy will be applied to the order <br /><br /> RMAN retention policy will be set to 3-day recovery window <br /><br /> Backups and copies have been abandoned <a"javascript:tagshow(event, '%B1%A8%B1%ED');" href="javascript:;" target=_self> <font color=#800080><strong><u>Report</u></strong></font> <br /><br /> Type keyword completion time of the file name / handle <br /><br /> -------------------- ------ ------------------ ------ -------------- <br /><br /> Backup set 2104-7 months -07 <br /><br /> Backup Section 2104-7 dated -07 D: \ BACKUP \ C-3391142503-20070704-01 <br /><br /> RMAN&gt; DELETE OBSOLETE; <br /><br /> RMAN retention policy will be applied to the order <br /><br /> RMAN retention policy will be set to 3-day recovery window <br /><br /> The distribution channel: ORA_DISK_1 <br /><br /> Channel ORA_DISK_1: sid = 14 devtype = DISK <br /><br /> Remove the following obsolete backups and copies: <br /><br /> Type keyword completion time of the file name / handle <br /><br /> -------------------- ------ ------------------ ------ -------------- <br /><br /> Backup set 2104-7 months -07 <br /><br /> Backup Section 2104-7 dated -07 D: \ BACKUP \ C-3391142503-20070704-01 <br /><br /> Are you sure you want to delete the above objects (enter YES or NO)? Y <br /><br /> Backup paragraph has been deleted <br /><br /> Backup segment handle = D: \ BACKUP \ C-3391142503-20070704-01 recid = 21 stamp = 627061645 <br /><br /> An object has been deleted </ul><br /><br /> Delete command in the implementation of two things need to know: <br /><br /><ul><li> If you have been judged to waste a single data file backup is a mirror copy, then the implementation of the DELETE command to delete this image directly copy the files. <li> If judged as obsolete backup is one part of the backup set, you must wait until the entire backup set all the other files are obsolete before they could delete the backup set. </li></ul><br /> For the incremental backup, whether it is time-based or based on the number of redundancy, RMAN backups are testing whether the 0 to meet the demand. <br /><br /><ul> Tip: <br /><br /> Here Note that RMAN for OBSOLETE and EXPIRED definition, for deleted files manually, physically no longer exist after the implementation of the CROSSCHECK command, RMAN will mark it as EXPIRED; for those beyond the backup of the backup set backup retention policies fragments is marked as OBSOLETE. </ul>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/rman-incremental-backups/" title="rman incremental backups">rman incremental backups</a> 2009-04-02 15:10:17</li>
					<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/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/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/rman-said-i-can-back-up-8-rman-commonly-used-commands-continued/</wfw:commentRss>
	</item>
		<item>
		<title>Hash join algorithm principle</title>
		<link>http://www.kods.netwww.kods.net/hash-join-algorithm-principle/</link>
		<comments>http://www.kods.netwww.kods.net/hash-join-algorithm-principle/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 16:51:22+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[principle]]></category>
<category><![CDATA[oracle]]></category>
<category><![CDATA[hash table]]></category>
<category><![CDATA[partition]]></category>
<category><![CDATA[assumption]]></category>
<category><![CDATA[cbo]]></category>
<category><![CDATA[memory]]></category>
<category><![CDATA[hash function]]></category>
<category><![CDATA[oracle connection]]></category>
<category><![CDATA[presence]]></category>
<category><![CDATA[partitions]]></category>
<category><![CDATA[algorithm]]></category>
<category><![CDATA[vector]]></category>
<category><![CDATA[probe input]]></category>
<category><![CDATA[3 years]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/hash-join-algorithm-principle/</guid>
		<description><![CDATA[Hash join algorithm principle Since the oracke 7.3 years, oracle provides a new join techniques, that is, hash join. Hash Join can only be used for the same connection, and only in the CBO optimizer m ...]]></description>
		<content:encoded><![CDATA[<strong><font face="Times New Roman">Hash join</font> algorithm principle</strong> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Since the <font face="Times New Roman">oracke 7.3</font> years, <font face="Times New Roman">oracle</font> provides a <font face="Times New Roman">new</font> join techniques, <font face="Times New Roman">that is, hash join. Hash Join</font> can only be used for the same connection, and only in the <font face="Times New Roman">CBO</font> optimizer mode. Relative to the <font face="Times New Roman">nested loop join, hash join</font> is more suited to deal with large result sets. <font face="Times New Roman">Hash join</font> do not need to drive the table there is no index. <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <strong><font face="Times New Roman">1. Hash Join</font> an overview of</strong> <o:p></o:p><br /><br /> <font face="Times New Roman">Hash join</font> algorithm is a basic idea is that according to a small <font face="Times New Roman">row sources (called</font> the <font face="Times New Roman">build input,</font> we recorded a smaller table for <font face="Times New Roman">S,</font> a larger table for the <font face="Times New Roman">B)</font> to create a presence in the <font face="Times New Roman">hash area</font> memory <font face="Times New Roman">hash table,</font> and then use a large <font face="Times New Roman">row sources (called</font> the <font face="Times New Roman">probe input)</font> to detect the previously built in <font face="Times New Roman">hash table.</font> If the <font face="Times New Roman">hash area</font> memory is not big enough, <font face="Times New Roman">hash table</font> can not be completely stored in the <font face="Times New Roman">hash area</font> memory. In view of this situation, <font face="Times New Roman">Oracle</font> connection keys using a <font face="Times New Roman">hash</font> function will <font face="Times New Roman">build input</font> and <font face="Times New Roman">probe input</font> is not connected to split into multiple partitions (respectively denoted by <font face="Times New Roman">S <sub>i</sub></font> and <font face="Times New Roman">B <sub>i),</sub></font> this stage is called the partition phase; and their corresponding partition, namely, <font face="Times New Roman">S <sub>i</sub></font> and <font face="Times New Roman">B <sub>i</sub></font> do <font face="Times New Roman">Hash join,</font> at this stage is called the <font face="Times New Roman">join</font> phase. <o:p></o:p><br /><br /> If the partition for a partition of the <font face="Times New Roman">hash table</font> is built too much, then, <font face="Times New Roman">oracle</font> on the use of <font face="Times New Roman">nested-loops hash join.</font> The so-called <font face="Times New Roman">nested-loops hash join</font> is the right part of the <font face="Times New Roman">S <sub>i</sub></font> build <font face="Times New Roman">hash table,</font> and then read all of the <font face="Times New Roman">B <sub>i</sub></font> with the built in <font face="Times New Roman">hash table</font> to do to connect, and then the remaining <font face="Times New Roman">S <sub>i</sub></font> build <font face="Times New Roman">hash table,</font> and then all of the <font face="Times New Roman">B <sub>i</sub></font> with the The <font face="Times New Roman">hash table</font> was built to do connections, until all of the <font face="Times New Roman">S <sub>i</sub></font> are connected finished. <o:p></o:p><br /><br /> <font face="Times New Roman">Hash Join</font> algorithm has a limit, it is because the assumption that two keys on the table connection is uniform, meaning that each partition has a similar data. However, in practice data is uneven, in order to properly solve this problem, <font face="Times New Roman">oracle</font> has introduced several technologies, bitmap vector filtering, roles were reversed, histogram, the specific meaning of these terms will be detailed later. <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <strong><font face="Times New Roman">二.</font> Principles of <font face="Times New Roman">Hash Join</font></strong> <o:p></o:p><br /><br /> We use an example to explain the principles of <font face="Times New Roman">Hash Join</font> algorithm, as well as the above-mentioned terms. <o:p></o:p><br /><br /> Consider the following two data sets. <o:p></o:p><br /><br /> <font face="Times New Roman">S = (1,1,1,3,3,4,4,4,4,5,8,8,8,8,10)</font> <o:p></o:p><br /><br /> <font face="Times New Roman">B = (0,0,1,1,1,1,2,2,2,2,2,2,3,8,9,9,9,10,10,11)</font> <o:p></o:p><br /><br /> <font face="Times New Roman">Hash Join</font> The first step is to determine the small table (that is, <font face="Times New Roman">build input)</font> is fully stored in the <font face="Times New Roman">hash area</font> memory. If we can completely stored in memory in the memory, to create <font face="Times New Roman">hash table,</font> this is the most simple <font face="Times New Roman">hash join.</font> <o:p></o:p><br /><br /> If you can not all be stored in memory, you need to <font face="Times New Roman">build input</font> partition. The number of partitions is called <font face="Times New Roman">fan-out. Fan-out</font> is <font face="Times New Roman">hash_area_size</font> and the <font face="Times New Roman">cluster size</font> to decide. One <font face="Times New Roman">cluster size</font> is equal to <font face="Times New Roman">db_block_size * hash_multiblock_io_count,</font> hash_multiblock_io_count is implicit in <font face="Times New Roman">oracle9i</font> parameter. It should be noted that the <font face="Times New Roman">fan-out</font> is not the <font face="Times New Roman">build input</font> size <font face="Times New Roman">/ hash_ara_size,</font> that the decision <font face="Times New Roman">oracle</font> partition size may still not be fully stored in the <font face="Times New Roman">hash area</font> memory. A large <font face="Times New Roman">fan-out</font> led to many small district, affecting performance, while a small <font face="Times New Roman">fan-out</font> led to a small number of large partitions, so that each partition can not all be stored in memory, which also affects the performance of <font face="Times New Roman">hash join.</font> <o:p></o:p><br /><br /> <font face="Times New Roman">Oracle</font> uses a <font face="Times New Roman">hash</font> function is applied to the internal link button on the <font face="Times New Roman">S</font> and <font face="Times New Roman">B</font> will be split into multiple partitions, where we assume for the sake of this <font face="Times New Roman">hash</font> function is more than a function, that is, <font face="Times New Roman">Mod (join_column_value, 10).</font> This produces 10 partitions, the following table. <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /><table"BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellspacing=0 cellpadding=0 border=1><tbody><tr><td valign=top width=35 rowspan=2><br /> Zoning <o:p></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=59><br /> <font face="Times New Roman">B0</font> <o:p></o:p><br /><br /></td><td valign=top width=62><br /> <font face="Times New Roman">B1</font> <o:p></o:p><br /><br /></td><td valign=top width=65><br /> <font face="Times New Roman">B2</font> <o:p></o:p><br /><br /></td><td valign=top width=35><br /> <font face="Times New Roman">B3</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">B4</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">B5</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">B6</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">B7</font> <o:p></o:p><br /><br /></td><td valign=top width=35><br /> <font face="Times New Roman">B8</font> <o:p></o:p><br /><br /></td><td valign=top width=42><br /> <font face="Times New Roman">B9</font> <o:p></o:p><br /><br /></td></tr><tr><td valign=top width=47><br /> Value <o:p></o:p><br /><br /></td><td valign=top width=59><br /> <font face="Times New Roman">0,0,10,10</font> <o:p></o:p><br /><br /></td><td valign=top width=62><br /> <font face="Times New Roman">1,1,1,1,11</font> <o:p></o:p><br /><br /></td><td valign=top width=65><br /> <font face="Times New Roman">2,2,2,2,2,2</font> <o:p></o:p><br /><br /></td><td valign=top width=35><br /> <font face="Times New Roman">3</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">NULL</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">NULL</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">NULL</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">NULL</font> <o:p></o:p><br /><br /></td><td valign=top width=35><br /> <font face="Times New Roman">8</font> <o:p></o:p><br /><br /></td><td valign=top width=42><br /> <font face="Times New Roman">9,9,9</font> <o:p></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S0</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">10</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /> √ <o:p></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S1</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">1,1,1</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /> √ <o:p></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S2</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">Null</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S3</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">3,3</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /> √ <o:p></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S4</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">4,4,4,4</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S5</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">5</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S6</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">NULL</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S7</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">NULL</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S8</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">8,8,8,8</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /> √ <o:p></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr><tr><td valign=top width=35><br /> <font face="Times New Roman">S9</font> <o:p></o:p><br /><br /></td><td valign=top width=47><br /> <font face="Times New Roman">NULL</font> <o:p></o:p><br /><br /></td><td valign=top width=59><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=62><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=65><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=47><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=35><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td><td valign=top width=42><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /></td></tr></tbody></table><br /> After this partition, there is only need to <font face="Times New Roman">join</font> the corresponding partitions can be made between (that is, the so-called <font face="Times New Roman">partition pairs),</font> if there is a partition as a <font face="Times New Roman">NULL,</font> then <font face="Times New Roman">join</font> the corresponding partitions can be ignored. <o:p></o:p><br /><br /> In the <font face="Times New Roman">S</font> table is read into memory partition, <font face="Times New Roman">oracle</font> that is the only key values of records connections to build a so-called bitmap vector, it needs to account for <font face="Times New Roman">hash area</font> memory about <font face="Times New Roman">5%.</font> Here, namely, <font face="Times New Roman">(1,3,4,5,8,10).</font> <o:p></o:p><br /><br /> When the partition table <font face="Times New Roman">B,</font> it will be a connection for each key value on a bitmap vector comparison, if not one of them, it will discard its record. In our example, <font face="Times New Roman">B</font> in the table the following data will be discarded <o:p></o:p><br /><br /> <font face="Times New Roman">(0,0,2,2,2,2,2,2,9,9,9,9,9).</font> This process is a bitmap vector filtering. <o:p></o:p><br /><br /> When the <font face="Times New Roman">S1, B1</font> finished connection, and then pairs of <font face="Times New Roman">Si, Bi</font> connected, where <font face="Times New Roman">oracle</font> will compare two partitions, select the little that do <font face="Times New Roman">build input,</font> is the dynamic roles were reversed, the roles were reversed this dynamic occurs in addition to the first pair of partition partition other than the above. <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <strong><font face="Times New Roman">三. Hash Join</font> Algorithm</strong> <o:p></o:p><br /><br /> Step <font face="Times New Roman">1:</font> to determine whether all of the small tables stored in the <font face="Times New Roman">hash area</font> memory and, if so, then do the memory <font face="Times New Roman">hash join.</font> If not, switch to the second step. <o:p></o:p><br /><br /> Step <font face="Times New Roman">2:</font> determine the number of <font face="Times New Roman">fan-out.</font> <o:p></o:p><br /><br /> <font face="Times New Roman">(Number of Partitions) * C &lt;= F <sub>avm</sub> * M</font> <o:p></o:p><br /><br /><font face="Times New Roman">        </font> Where <font face="Times New Roman">C</font> is <font face="Times New Roman">Cluster size,</font> <o:p></o:p><br /><br /> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Step <font face="Times New Roman">3:</font> Read the small table <font face="Times New Roman">S,</font> using an internal <font face="Times New Roman">hash</font> function <font face="Times New Roman">(referred</font> to here as <font face="Times New Roman">hash_fun_1),</font> will connect key mapped to a partition at the same time to connect with <font face="Times New Roman">hash_fun_2</font> function key produces another <font face="Times New Roman">hash</font> value, this <font face="Times New Roman">hash</font> value is used create a <font face="Times New Roman">hash table</font> in use, and the keys stored together with the connection. <o:p></o:p><br /><br /> Step <font face="Times New Roman">4:</font> To <font face="Times New Roman">build input</font> to establish the bitmap vectors. <o:p></o:p><br /><br /> Step <font face="Times New Roman">5:</font> If there is no room in memory, and will partition to write to the disk. <o:p></o:p><br /><br /> Step <font face="Times New Roman">6:</font> Read the rest of the small table <font face="Times New Roman">S,</font> repeat the third step, until all of the small table <font face="Times New Roman">S</font> read. <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Step <font face="Times New Roman">7:</font> The partition sorted by size, select the establishment of several geographical <font face="Times New Roman">hash table (select</font> the partition where the principle is to select the largest <font face="Times New Roman">number).</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Step <font face="Times New Roman">8:</font> According to the previous calculation using <font face="Times New Roman">hash_fun_2</font> a good <font face="Times New Roman">hash</font> function values, the establishment of <font face="Times New Roman">hash table.</font> <o:p></o:p><br /><br /> Step <font face="Times New Roman">9:</font> Read the table <font face="Times New Roman">B,</font> using the bitmap bitmap vectors vector filtering. <o:p></o:p><br /><br /> Step <font face="Times New Roman">10:</font> The data used by filtering the data mapped to the <font face="Times New Roman">hash_fun_1</font> function corresponding to the partition, and calculate the <font face="Times New Roman">hash</font> value of <font face="Times New Roman">hash_fun_2.</font> <o:p></o:p><br /><br /> Step <font face="Times New Roman">11:</font> If the drop-divisions in the memory, will be in front of the function by <font face="Times New Roman">hash_fun_2</font> calculated <font face="Times New Roman">hash</font> value already exists in memory <font face="Times New Roman">hash table</font> to do connections, <font face="Times New Roman"> </font> The result was caused by disk. If the fall of the partition is not memory, the corresponding value will be the corresponding <font face="Times New Roman">S</font> partition table together. <o:p></o:p><br /><br /> Step <font face="Times New Roman">12:</font> Continue to read the table <font face="Times New Roman">B,</font> repeat Step <font face="Times New Roman">9</font> until the completion of Form <font face="Times New Roman">B</font> to read. <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Step <font face="Times New Roman">13:</font> Read the corresponding <font face="Times New Roman">(Si, Bi)</font> to do <font face="Times New Roman">hash</font> connection. Dynamic role in the swap will happen here. <o:p></o:p><br /><br /> Step <font face="Times New Roman">14:</font> If the partition after the partition than the smallest memory, large, occurred <font face="Times New Roman">nested-loop hash join.</font> <o:p></o:p><br /><br /> <strong><font face="Times New Roman">四. Hash Join</font> the cost of</strong> <o:p></o:p><br /><br /> <strong><font face="Times New Roman">1. In-Memory Hash Join</font></strong> <o:p></o:p><br /><br /> <font face="Times New Roman">Cost (HJ) = Read (S) + build hash table in memory (CPU) + Read (B) +</font> <o:p></o:p><br /><br /> <font face="Times New Roman">Perform In memory Join (CPU)</font> <o:p></o:p><br /><br /> Ignore the <font face="Times New Roman">cpu</font> time, then the <o:p></o:p><br /><br /> <font face="Times New Roman">Cost (HJ) = Read (S) + Read (B)</font> <o:p></o:p><br /><br /> <strong><font face="Times New Roman">2. On-Disk Hash Join</font></strong> <o:p></o:p><br /><br /> Based on the above description of the steps, we can see that <o:p></o:p><br /><br /> <font face="Times New Roman">Cost (HJ) = Cost (HJ1) + Cost (HJ2)</font> <o:p></o:p><br /><br /> Where <font face="Times New Roman">Cost (HJ1)</font> is the cost of scanning <font face="Times New Roman">S, B</font> list, and can not be placed in memory on the part of the write-back disk, corresponding to the previous Step <font face="Times New Roman">2</font> to Step <font face="Times New Roman">12. Cost (HJ2)</font> shall be done <font face="Times New Roman">nested-loop hash join</font> costs, corresponding to the previous step <font face="Times New Roman">13</font> to step <font face="Times New Roman">14.</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Where <font face="Times New Roman">Cost (HJ1)</font> is approximately equal to <font face="Times New Roman">Read (S) + Read (B) + Write ((SM) + (BB * M / S)).</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Because in doing <font face="Times New Roman">nested-loop hash join,</font> the right of each <font face="Times New Roman">chunk</font> of the <font face="Times New Roman">build input,</font> all need to read the entire <font face="Times New Roman">probe input,</font> so <o:p></o:p><br /><br /> <font face="Times New Roman">Cost (HJ2)</font> is approximately equal to <font face="Times New Roman">Read ((SM) + n * (BB * M / S))</font> <o:p></o:p><br /><br /> Where <font face="Times New Roman">n</font> is the <font face="Times New Roman">nested-loop hash join</font> need to loop through the number of times. <o:p></o:p><br /><br /> <font face="Times New Roman">n = (S / F) / M</font> <o:p></o:p><br /><br /> In general, if <font face="Times New Roman">n</font> is <font face="Times New Roman">10,</font> then, <font face="Times New Roman">hash join</font> performance would be greatly diminished. From the formula for calculating <font face="Times New Roman">n</font> can be seen, <font face="Times New Roman">n</font> and <font face="Times New Roman">Fan-out</font> in inverse proportion to improve the <font face="Times New Roman">fan-out,</font> can be reduced <font face="Times New Roman">n.</font> When the <font face="Times New Roman">hash_area_size</font> is fixed, we can reduce the <font face="Times New Roman">cluster size</font> to increase the <font face="Times New Roman">fan-out.</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> From here we can see that, improve <font face="Times New Roman">hash_multiblock_io_count</font> value of the parameter does not necessarily improve the performance of <font face="Times New Roman">hash join.</font> <o:p></o:p><br /><br /> <strong><font face="Times New Roman">五.</font> Other</strong> <o:p></o:p><br /><br /> <font face="Times New Roman">1.</font> Confirmed that the small table is the table-driven <o:p></o:p><br /><br /> <font face="Times New Roman">2.</font> Confirmed that involves analysis of the tables and connection keys before. <o:p></o:p><br /><br /> <font face="Times New Roman">3.</font> If the connection key data on non-uniform, then suggested a histogram. <o:p></o:p><br /><br /> <font face="Times New Roman">4.</font> If you can, adjusting the size of large <font face="Times New Roman">hash_area_size</font> or <font face="Times New Roman">pga_aggregate_target</font> value. <o:p></o:p><br /><br /> <font face="Times New Roman">5. Hash Join</font> is suitable for small tables and large table join returns a large result set connections. <o:p></o:p><br /><br /><o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p>				<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/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/hash-join-algorithm-principle/</wfw:commentRss>
	</item>
		<item>
		<title>oracle 10g em to change</title>
		<link>http://www.kods.netwww.kods.net/oracle-10g-em-to-change/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-10g-em-to-change/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 14:43:17+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle 11g]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-10g-em-to-change/</guid>
		<description><![CDATA[The oracle10g in, em access address: http://ip:1158/em In oracle 11g in, em access to the address changed to: https: / / ip: 1158/em]]></description>
		<content:encoded><![CDATA[The oracle10g in, em access address: http://ip:1158/em <br /><br /> In oracle 11g in, em access to the address changed to: https: / / ip: 1158/em				<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-10g-em-to-change/</wfw:commentRss>
	</item>
		<item>
		<title>ORACLE Application recovery SCN</title>
		<link>http://www.kods.netwww.kods.net/oracle-application-recovery-scn/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-application-recovery-scn/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:48:39+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[data recovery]]></category>
<category><![CDATA[oracle product]]></category>
<category><![CDATA[scn]]></category>
<category><![CDATA[database backup]]></category>
<category><![CDATA[database files]]></category>
<category><![CDATA[oracle application]]></category>
<category><![CDATA[bkp]]></category>
<category><![CDATA[mf]]></category>
<category><![CDATA[d1]]></category>
<category><![CDATA[release channel]]></category>
<category><![CDATA[database release]]></category>
<category><![CDATA[cancel]]></category>
<category><![CDATA[application recovery]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-application-recovery-scn/</guid>
		<description><![CDATA[Check the database backup RMAN&gt; LIST BACKUP OF DATABASE; FULL SCN = 26905728480 Check the archive log backup RMAN&gt; LIST BACKUP OF ARCHIVELOG ALL; 635 (26,905,725,274) - &quot;638 (26,928,633,424 ...]]></description>
		<content:encoded><![CDATA[Check the database backup <br /> RMAN&gt; LIST BACKUP OF DATABASE; <br /> FULL SCN = 26905728480 <br /><br /> Check the archive log backup <br /> RMAN&gt; LIST BACKUP OF ARCHIVELOG ALL; <br /> 635 (26,905,725,274) - &quot;638 (26,928,633,424) <br /><br /> A local archive log file list is: 639 --- 763, after a problem 765 - 770 <br /><br /> The current database SCN = 35441074539 <br /><br /> CONTROL backup <br /> RMAN&gt; LIST BACKUP OF CONTROLFILE <br /> 2006-09-08 backup SCN = 26928866676 <br /><br /> Began to recover: <br /><br /> 1. To restore archived log files <br /> RMAN&gt; RUN ( <br /> ALLOCATE CHANNEL D1 TYPE DISK; <br /> SET ARCHIVELOG DESTINATION TO &#39;/ ORACLE / ORADATA / ARCHIVELOG&#39;; <br /> RESTORE ARCHIVELOG SEQUENCE BETWEEN 635 AND 638; <br /> RELEASE CHANNEL D1;) <br /><br /> 2. To restore the old control file <br /> SQL&gt; STARTUP NOMOUNT; <br /> RMAN&gt; restore controlfile from &#39;Z: \ oracle \ product \ 10.2.0 \ flash_recovery_area \ ORCL \ AUTOBACKUP \ 2006_09_08 \ O1_MF_S_600573612_2J0QKFTK_.BKP&#39;; <br /><br /> 3. To restore database files <br /> run ( <br /> allocate channel d1 type disk; <br /> restore database; <br /> release channel d1;) 15:00 began. <br /><br /> 4. Data Recovery <br /> SQL&gt; RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL <br /> AUTO <br /><br /> SQL&gt; ALTER DATABASE OPEN RESETLOGS; <br /><br /> 5. Backup the database <br /> RMAN&gt; BACKUP FULL DAETABASE FORMAT &#39;E: / RMAN / DB_% U. BAK&#39;;				<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-application-recovery-scn/</wfw:commentRss>
	</item>
		<item>
		<title>oracle-archive mode</title>
		<link>http://www.kods.netwww.kods.net/oracle-archive-mode/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-archive-mode/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 01:10:44+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[configuration database]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[oracle product]]></category>
<category><![CDATA[select name]]></category>
<category><![CDATA[incremental backups]]></category>
<category><![CDATA[database log]]></category>
<category><![CDATA[database name]]></category>
<category><![CDATA[log sequence]]></category>
<category><![CDATA[disaster recovery]]></category>
<category><![CDATA[oracle databases]]></category>
<category><![CDATA[oracle archive]]></category>
<category><![CDATA[archive directory]]></category>
<category><![CDATA[destination data]]></category>
<category><![CDATA[command database]]></category>
<category><![CDATA[directory copy]]></category>
<category><![CDATA[system error]]></category>
<category><![CDATA[database archive]]></category>
<category><![CDATA[mode changes]]></category>
<category><![CDATA[error data]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-archive-mode/</guid>
		<description><![CDATA[oracle model of an archive. See whether the oracle database archive mode: 1.select name, log_mode from v $ database; NAME LOG_MODE ------------------ ------------------------ QUERY NOARCHIVELOG 2. Usi ...]]></description>
		<content:encoded><![CDATA[oracle model of an archive. See whether the oracle database archive mode: <br /> 1.select name, log_mode from v $ database; <br /> NAME LOG_MODE <br /> ------------------ ------------------------ <br /> QUERY NOARCHIVELOG <br /> 2. Using the ARCHIVE LOG LIST command <br /> Database log mode No Archive Mode <br /> Automatic archival Disabled <br /> Archive destination / data/oracle/product/10.2.0/db_1 / / dbs / arch <br /> Oldest online log sequence 739 <br /> Current log sequence 741 <br />二. What is the Oracle archive mode? <br /> Oracle databases online redo logs, this log is to record the changes made to the database, such as insert, delete, update data on these operations are recorded in online redo log inside. General database at least two online redo log group. When an online redo log group is filled, when log switch occurs, when the online redo log group 2 as the current use of the log, when the filled online redo log group 2 when the log switch will happen , to write the online redo log group 1, it is so repeatedly. <br /> If the database is in non archive mode, on-line will be discarded when you log in the switch. While in archive mode, when the log switch occurs when the logs will be switched archiving. For example, the current use of online redo log 1, when a filled at a time when the log switch, start writing online redo log 2, when the contents of an online redo log will be copied to another specified directory. This directory is called the archive directory, copy the file called archived redo log. <br /> When it is running a database using the archive can be disaster recovery. <br /> 1. Archive log mode and non-archive log mode of the difference between the non-archive log mode can only do cold backup, and recovery can only do a full backup. The latest full backup to the system error data for the period can not be restored. <br /> Archiving can be done hot backup mode, and can do incremental backups can be done partially. <br /> With the ARCHIVE LOG LIST can see a view mode state, or non-archive mode archive log mode. <br /><br />三. Configuration database archiving mode <br /><br /> Changes in the non-archive mode to archive mode: <br /> 1) SQL&gt; SHUTDOWN NORMAL / IMMEDIATE; <br /> 2) SQL&gt; START MOUNT; <br /> 3) SQL&gt; ALTER DATABASE ARCHIVELOG; <br /> 4) SQL&gt; ALTER DATABASE OPEN; <br /><br /> 5) SQL&gt; do a full backup, as non-archive log mode for the resulting backup archive log mode no longer be used. This step is very important to the non-! <br /><br /> To change the archive mode to non-archive mode: <br /> 1) SQL&gt; SHUTDOWN NORMAL / IMMEDIATE; <br /> 2) SQL&gt; START MOUNT; <br /> 3) SQL&gt; ALTER DATABASE NOARCHIVELOG; <br /> 4) SQL&gt; ALTER DATABASE OPEN; <br /><br /> 3. Enable automatic archiving: LOG_ARCHIVE_START = TRUE <br /> Archiving mode, the log file group not allowed to be overwritten (rewritten), when filled, after the log file, without manual archiving, then the system will hang, know that archiving is completed. <br /> At this time can only be read but not write. <br /> During operation shut down and restart the process of archiving logs <br /> SQL&gt; ARCHIVE LOG STOP <br /> SQL&gt; ARCHIVE LOG START <br /><br /> 4. Manual archiving: LOG_ARCHIVE_START = FALSE <br /> Archive the current log file <br /> SQL&gt; ALTER SYSTEM ARCHIVE LOG CURRENT; <br /> Archive log files serial number 052 <br /> SQL&gt; ALTER SYSTEM ARCHIVE LOG SEQUENCE 052; <br /> Archiving of all log files <br /> SQL&gt; ALTER SYSTEM ARCHIVE LOG ALL; <br /> To change the archive log target <br /> SQL&gt; ALTER SYSTEM ARCHIVE LOG CURRENT TO &#39;&amp; PATH&#39;; <br /><br /> 5. Archive mode and non-archive mode conversion <br /><br /> The reverse process of Step 4. <br /><br /> 6. Configure multiple archive processes <br /> Q: When do you need to use multiple archiving process? <br /> A: If the archive process will consume a large amount of time, you can start multiple archiving process, which is a dynamic parameter, you can use ALTER SYSTEM dynamic modification. <br /> SQL&gt; ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES = 10; <br /> Oracle9i can specify up to 10 archiving process and the archiving process-related dynamic performance views <br /> v $ bgprocess, v $ archive_processes <br /><br /> 7. Configuration archiving target, multi-archiving target, remote archiving goals, objectives LOG_ARCHIVE_DEST_n archive log format archive <br /> Local archiving objectives: <br /> SQL&gt; LOG_ARCHIVE_DEST_1 = &quot;LOCATION = D: ORACLEARCHIVEDLOG&quot;; <br /> Remote archive target: <br /> SQL&gt; LOG_ARCHIVE_DEST_2 = &quot;SERVICE = STANDBY_DB1&quot;; <br /> Mandatory archiving objectives, and if an error, 600 seconds and try again: <br /> SQL&gt; ALTER SYSTEM SET LOG_ARCHIVE_DEST_4 = &quot;LOCATION = E: ORACLEARCHIVEDLOG MANDATORY REOPEN = 600&quot;; <br /> Optional archiving objectives, and if wrong, abandon the archive: <br /> SQL&gt; ALTER SYSTEM SET LOG_ARCHIVE_DEST_3 = &quot;LOCATION = E: ORACLEARCHIVEDLOG OPTIONAL&quot;; <br /><br /> Filed target state: the goals and turn off archiving archiving archiving goals off target 1 <br /> SQL&gt; ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1 = DEFER <br /> Open the archive target 2 <br /> SQL&gt; ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2 = ENABLE <br /><br /> Archive log format <br /> LOG_ARCHIVE_FORMAT <br /><br /> 8. Access to archived log information <br /> V $ ARCHVIED_LOG <br /> V $ ARCHVIE_DEST <br /> V $ LOG_HISTORY <br /> V $ DATABASE <br /> V $ ARCHIVE_PROCESSES <br /><br /> ARCHIVE LOG LIST;				<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/data-gurad-use-dbms-file-transfer-and-cloning-configuration-database/" title="DATA GURAD use DBMS_FILE_TRANSFER and cloning configuration database">DATA GURAD use DBMS_FILE_TRANSFER and cloning configuration database</a> 2009-02-23 19:07:40</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-mode/</wfw:commentRss>
	</item>
		<item>
		<title>How to start Oracle service in UNIX</title>
		<link>http://www.kods.netwww.kods.net/how-to-start-oracle-service-in-unix/</link>
		<comments>http://www.kods.netwww.kods.net/how-to-start-oracle-service-in-unix/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 23:30:23+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[sid]]></category>
<category><![CDATA[oracle user]]></category>
<category><![CDATA[oracle product]]></category>
<category><![CDATA[environment variables]]></category>
<category><![CDATA[unix]]></category>
<category><![CDATA[oracle server]]></category>
<category><![CDATA[bin directory]]></category>
<category><![CDATA[environment variable]]></category>
<category><![CDATA[instances]]></category>
<category><![CDATA[multiple users]]></category>
<category><![CDATA[oracle service]]></category>
<category><![CDATA[unix type]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/how-to-start-oracle-service-in-unix/</guid>
		<description><![CDATA[A. In order to start Oracle service in UNIX you need to login as a Oracle user. Use su - command to login as oracle user. Start Oracle server in UNIX Type the following command, enter: $ Su - oracle N ...]]></description>
		<content:encoded><![CDATA[A. In order to start Oracle service in UNIX you need to login as a Oracle user. <br /> Use su - command to login as oracle user. <br /> Start Oracle server in UNIX <br /><br /> Type the following command, enter: <br /> $ Su - oracle <br /> Now use lsnrctl command to start service (usually located at / home/oracle/oracle/product/10.2.0/db_1/bin directory): <br /> $ Lsnrctl start <br /><br /> Next start database: <br /><br /> $ Dbstart <br /> Stop Oracle service in UNIX <br /><br /> To stop Oracle servuice type following two commands: <br /> $ Lsnrctl stop <br /> $ Dbshut <br /><br /> NOTE: Note that the start of the sid is specified by the environment variable, this is very important. If you think of multiple instances, one is by modifying the environment variables, start over. Or is to create multiple users, each user environment variables does not make sense to start a different sid.				<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/how-to-start-oracle-service-in-unix/</wfw:commentRss>
	</item>
		<item>
		<title>linux install oracle10G</title>
		<link>http://www.kods.netwww.kods.net/linux-install-oracle10g/</link>
		<comments>http://www.kods.netwww.kods.net/linux-install-oracle10g/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 22:30:03+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle database]]></category>
<category><![CDATA[oracle user]]></category>
<category><![CDATA[red hat enterprise]]></category>
<category><![CDATA[database oracle]]></category>
<category><![CDATA[oracle enterprise manager]]></category>
<category><![CDATA[oracle rac]]></category>
<category><![CDATA[rhel]]></category>
<category><![CDATA[automatic storage]]></category>
<category><![CDATA[kernel parameter]]></category>
<category><![CDATA[oracle group]]></category>
<category><![CDATA[linux x86]]></category>
<category><![CDATA[oracle application server]]></category>
<category><![CDATA[john smiley]]></category>
<category><![CDATA[sles]]></category>
<category><![CDATA[grid control]]></category>
<category><![CDATA[configuration storage]]></category>
<category><![CDATA[intel x86 hardware]]></category>
<category><![CDATA[linux distributions]]></category>
<category><![CDATA[step demonstration]]></category>
<category><![CDATA[fundamental goal]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/linux-install-oracle10g/</guid>
		<description><![CDATA[In the Linux x86 to install Oracle Database 10 g Author: John Smiley rn Learning in RHEL 2.1, RHEL 3 or SLES 8 on a scratch installation of Oracle Database 10 g of basic knowledge (only for evaluation ...]]></description>
		<content:encoded><![CDATA[In the Linux x86 to install Oracle Database 10 <em>g</em> <br /> Author: John Smiley rn <br /><br /> Learning in RHEL 2.1, RHEL 3 or SLES 8 on a scratch installation of Oracle Database 10 <em>g</em> of basic knowledge (only for evaluation) rn <br /><br /> Contents Overview Part 1: Install Linux <br /> RHEL 2.1 <br /> RHEL 3 <br /> SLES 8 <br /> Part 2: Configure Linux for Oracle <br /> Verify the system requirements to create the directory to create Oracle group and user accounts to configure Linux kernel parameter settings for the Oracle User Shell restrictions prevent errors! (Only SLES 8) <br /> Oracle user&#39;s environment variables Part 3: Installing Oracle <br /> Install the software Part 4: Configuration Storage File System Automatic Storage Management Conclusion Appendix <br /> rn <br /> rn <br /><br /><hr> rnrn <br /> Overview rn <br /><br /> This is the Linux software is installed on Oracle 10 <em>g&#39;s</em> Guide series, the main components of the first part. These articles described in detail all three Linux-distributions have been certified in English (no description Asianux), and assuming the use of low-cost Intel x86 hardware. The same time, step by step demonstration for the assessment of key Oracle 10 <em>g</em> product in the common hardware installation and configuration process. rn <br /><br /> The fundamental goal of the series is to demonstrate step by step how to install and configure the 10 <em>g</em> of the grid all the components. Through this series, you will learn how to install and configure a single instance of Oracle 10 <em>g</em> database (this), two-node Oracle RAC 10 <em>g</em> database, Oracle Application Server 10 <em>g</em> and Oracle Enterprise Manager 10 <em>g</em> Grid Control for all major components. rn <br /><br /> The series provides a method to use the most simple way (the least number of steps) to complete the task. This method usually means that the selected configuration will only apply in the assessment. Therefore, the series is neither applicable to build production-quality environment, nor do they reflect best practices. rn <br /><br /> The following is described in these articles, access to Oracle 10 <em>g</em> certified three Linux distributions: rn <br /><br /><ul><li> Red Hat Enterprise Linux 2.1 rn </li><li> Red Hat Enterprise Linux 3 rn </li><li> Novell SUSE Linux Enterprise Server 8 rn </li></ul> If you are new to Linux and / or Oracle, that this first article specially for you. It first describes the basics from scratch and then gradually demonstrates how to install Oracle Database 10 <em>g.</em> rn <br /> This paper consists of four parts: Part 1 describes how to install the Linux operating system, Part 2 describes how to configure Oracle for Linux, Part 3 describes the Oracle Database installed the main points of Part 4 describes how to create other file systems and describes the Automatic Storage Management (ASM) (Oracle Database 10 <em>g</em> in a great new feature, which dramatically simplifies storage management). Appendix provides a new database to help you understand the usage of information, including how to interactively access the database, how to stop and start the database and related services. <br /><br /> rn <br /><br /><hr> rnrn <br /> Part 1: Install Linux rn <br /><br /> This guide uses the following hardware configuration of the server: rn <br /><br /><ul><li> Two 800MHz Pentium III CPU rn </li><li> 512MB RAM rn </li><li> 2 SCSI host adapter (Ultra SCSI 160) rn </li><li> Eight SCSI disk drives (2 x 9GB + 6 x 36GB) rn </li><li> A 100Base-T Ethernet Adapter rn </li><li> 1 1000Base-T Ethernet Adapter </li></ul> rn <br /> Disk can be configured so that each SCSI host adapter to connect to a 9GB disk and three 36GB disks. rn <br /><br /> Please note that, although it hardly is a &quot;powerful&quot; the setting, but even using the low setting and then be able to complete most of the tasks described in this guide. Basic database installation requires only one CPU, 512MB memory and a free space of at least 6.5GB of disk drives (IDE, SCSI or FireWire). rn <br /><br /> Now, we will demonstrate step by step Linux operating system installed on the server process. This hypothesis of a new installation of Linux systems (as opposed to upgrade), and assuming the dedicated Oracle server, and the server, no other operating systems or data. rn <br /><br /> Red Hat Enterprise Linux 2.1 rn <br /><br /> Oracle 10 <em>g</em> certified in Red Hat Enterprise Linux 2.1 (Advanced Server and Enterprise Server) (Update 3) or later to run. Red Hat Network (RHN) to provide updates that can be used as used to create the ISO file or CD as a single package to update to download. rn <br /><br /> To install the application on the new Linux updates, the easiest and fastest way is to use the updated CD installation. If Linux is already installed, or CD, do not update, you can apply these updates through the RHN. Because this guide is for a new Linux installation, so you will use the updated CD. rn <br /><br /><ol><li> Use the updated CD concentration of the first CD to start the server. rn <ul><li> You may need to change the BIOS settings to allow boot from the CD. </li></ul> rn </li><li> Startup screen appears on display at the bottom of the <tt>boot:.</tt> rn <ul><li> Choose <strong>Enter,</strong> from the console on the implementation of the graphical installation. (For other installation methods and options, please refer to <em>Red Hat Installation Guide.)</em> </li></ul> rn <ul><li> Installation program scans the hardware, Red Hat splash screen is displayed briefly, and then began to show a series of screen prompts. </li></ul> rn </li><li> Select Language rn <ul><li> Accept the default values. </li></ul> rn </li><li> Configure the keyboard rn <ul><li> Accept the default values. </li></ul> rn </li><li> Configure the mouse rn <ul><li> Accept the default values. </li></ul> rn </li><li> Type of installation rn <ul><li> Accept the default values. </li></ul> rn </li><li> Set disk partition rn <ul><li> This article does not describe the detailed method of disk partitions, but assumes you are familiar with disk partitioning methods. rn <br /> (Warning: an error on the disk partition <strong>on the hard disk</strong> is to <strong>delete all the contents</strong> of the most reliable and most efficient methods. If you are unsure how to partition, please stop, find someone Bang Bang you, or you will risk the danger of losing data !) rn <br /><br /> This article uses the following partition scheme (file systems are ext3): <br /><br /> The first controller (/ dev / sda) on a 9GB disk contains the following partition, used to store all Linux and Oracle software: <br /> - 100MB / boot partition (for RHEL 2.1, minimum 50MB) <br /> -1,500 MB swap partition - the size of this partition is set for the system at least twice the RAM, but no more than 2GB (32-bit systems do not support more than 2GB swap file). If you need more than 2GB of swap space, you create more than one swap partition. <br /> -7,150 MB root partition - the partition will be used for all directories, including / usr, / tmp, / var, / opt, / home and so on. This is simply to explain and simplify the installation of this guide. A more reliable partitioning scheme is to bring these directories to a separate file system. </li></ul> rn </li><li> Configure the boot loader rn <ul><li> Accept the default values. </li></ul> rn </li><li> Configure the boot loader password rn <ul><li> If you want to set a password for GRUB, please enter here. For the evaluation system, without setting up of such. </li></ul> rn </li><li> Configure the network rn <ul><li> Under normal circumstances, it is best to use a static IP address configuration database server. To do this, uncheck <strong>Configure using DHCP</strong> and enter the server&#39;s network configuration. Be sure to enter the host name and has been selected <strong>Activate on boot.</strong> rn </li></ul> rn </li><li> Configure the firewall rn <ul><li> For this demonstration needs, will not configure the firewall. Select <strong>No firewall</strong> (security administrator, please do not angry). </li></ul> rn </li><li> Other language support rn <ul><li> Accept the default values. </li></ul> rn </li><li> Select Time Zone rn <ul><li> Choose your time zone settings. The system clock set to UTC on the server is usually in terms of a good practice. To do this, click the <strong>System clock uses UTC.</strong> </li></ul> rn </li><li> Configure Account rn <ul><li> For the root user to select a password, and enter the given domain. Create an account for themselves. (Do not at this time to create oracle account; we will create it later.) </li></ul> rn </li><li> Select the package group rn <ul><li> Select Gnome or KDE (or both options) graphical user interface (default Gnome). Note: These two are very popular GUI, which Gnomern more common in the United States to use. Personally, I prefer KDE, it is because it is a terminal emulator can be easily cut and paste, which can be copied to multiple input connections (for example, when you configure rnRAC multiple nodes, this will save type operation) . </li></ul> rn <ul><li> Select <strong>Software Development</strong> </li></ul> rn </li><li> The relevance of unresolved rn <ul><li> If you see this screen, simply select the <strong>Install packages to satisfy dependencies</strong> (default) and continue. </li></ul> rn </li><li> Configuration graphical interface (X) rn <ul><li> Accept the default values, unless the installer does not recognize your video card. If your video card can not be identified will not be able to continue. </li></ul> rn </li><li> Ready to install rn <ul><li> Click <strong>Next</strong> </li></ul> rn </li><li> Installation package rn <ul><li> Software will be copied to the hard disk was installed. Prompted to change disks, and then when the installation is complete click <strong>Next.</strong> </li></ul> rn </li><li> Create a boot disk rn <ul><li> If you need to create a boot disk, or select <strong>Skip boot disk creation.</strong> </li></ul> rn </li><li> Configuration Monitor rn <ul><li> If the installation program correctly identify your monitor, you accept the default values. Otherwise, from the list, select a compatible monitor. </li></ul> rn </li><li> Congratulations rn <ul><li> Removed from the system installation media, and then click <strong>Next.</strong> </li></ul></li></ol> The system automatically restarts, and displays a graphical login screen. If you are using the basic product CD instead of updating the implementation of the installation CD, then proceed through the RHN applications before updating. rn <br /> Verify that your installation rnrn <br /><br /> If you complete the above steps, you should have Oracle 10 <em>g</em> all necessary packages and updates. You can perform the following steps to verify your installation. rn <br /><br /> The required kernel version :2.4.9-e .25 (or later) rn <br /><br /> By running the following command to check the kernel version: rn <br /><br /> <pre><font color="#0000ff">uname -r</font><br /><br />例如：<br /># <font color="#0000ff">uname -r</font><br />2.4.9-e.27smp<br /></pre> other required package versions (or later): rn <ul><li> gcc-2.96-124 rn </li><li> make-3.79 rn </li><li> binutils-2.11 rn </li><li> openmotif-2.1.30-11 rn </li><li> glibc-2.2.4-31 </li></ul> To view the system is installed on which version of these packages, run the following command: <pre><font color="#0000ff">rpm -q gcc make binutils openmotif glibc</font><br /><br />例如：  <br /># <font color="#0000ff">rpm -q gcc make binutils openmotif glibc</font><br />gcc-2.96-118.7.2<br />make-3.79.1-8<br />binutils-2.11.90.0.8-12<br />openmotif-2.1.30-11<br />glibc-2.2.4-32.8<br /></pre> if the system on the lack of any package version, or versions older than the version specified above, you can from the Red Hat Network to download and install the update. rn <br /> Red Hat Enterprise Linux 3 rn <br /><br /> Oracle 10 <em>g</em> certified in the update of the situation without running Red Hat Enterprise Linuxrn3 (Advanced Server and Enterprise Server) the basic version. If you have updated CD, you can use the updated version of the boot rather than the basic version of CDrn start CD during the installation process automatically applied all updates. Oracle support for Red Hat all updates. <br /><br /><ol><li> Using the first CD to start the server. rn <ul><li> You may need to change the BIOS settings to allow boot from the CD. </li></ul> rn </li><li> Startup screen appears on display at the bottom of the <tt>boot:.</tt> rn <ul><li> Choose <strong>Enter,</strong> from the console on the implementation of the graphical installation. (For other installation methods and options, please refer to <em>Red Hat Installation Guide.)</em> </li></ul> rn <ul><li> Installation program scans the hardware, Red Hat splash screen is displayed briefly, and then began to show a series of screen prompts. </li></ul> rn </li><li> Select Language rn <ul><li> Accept the default values. </li></ul> rn </li><li> Configure the keyboard rn <ul><li> Accept the default values. </li></ul> rn </li><li> Welcome Screen rn <ul><li> Click <strong>Next.</strong> </li></ul> rn </li><li> Configure the mouse rn <ul><li> Accept the default values. </li></ul> rn </li><li> Type of installation rn <ul><li> Select <strong>Custom.</strong> </li></ul> rn </li><li> Set disk partition rn <ul><li> This article does not describe the detailed method of disk partitions, but assumes you are familiar with disk partitioning methods. rn <br /> (Warning: an error on the disk partition <strong>on the hard disk</strong> is to <strong>delete all the contents</strong> of the most reliable and most efficient methods. If you are unsure how to partition, please stop, find someone Bang Bang you, or you will risk the danger of losing data !) rn <br /><br /> This article uses the following partition scheme (file systems are ext3): <br /><br /> The first controller (/ dev / sda) on a 9GB disk contains the following partition, used to store all Linux and Oracle software: <br /> - 100MB / boot partition <br /> -1,500 MB swap partition - the size of this partition is set for the system at least twice the RAM, but no more than 2GB (32-bit systems do not support more than 2GB swap file). If you need more than 2GB of swap space, you create more than one swap partition. <br /> -7,150 MB root partition - the partition will be used for all directories, including / usr, / tmp, / var, / opt, / home and so on. This is simply to explain and simplify the installation of this guide. A more reliable partitioning scheme is to bring these directories to a separate file system. </li></ul> rn </li><li> Configure the boot loader rn <ul><li> Accept the default values. </li></ul> rn </li><li> Configure the network rn <ul><li> Under normal circumstances, it is best to use a static IP address configuration database server. To do this, click <strong>Edit.</strong> </li></ul> rn <ul><li> The emergence of a pop-up window. Uncheck the <strong>Configure using DHCP</strong> check box, and enter the server&#39;s IP address and network mask. Make sure that <strong>Activate on boot,</strong> and then click <strong>OK.</strong> </li></ul> rn <ul><li> In the Hostname box, select <strong>manually</strong> and enter the host name. </li></ul> rn <ul><li> In the Miscellaneous Settings box, enter the other network settings. </li></ul> rn </li><li> Configure the firewall rn <ul><li> For this demonstration needs, will not configure the firewall. Select <strong>No firewall.</strong> </li></ul> rn </li><li> Other language support rn <ul><li> Accept the default values. </li></ul> rn </li><li> Select Time Zone rn <ul><li> Choose your time zone settings. The system clock set to UTC on the server is usually in terms of a good practice. To do this, click the <strong>System clock uses UTC.</strong> </li></ul> rn </li><li> Set Root Password rn <ul><li> Enter the root password, and enter it again to confirm it. </li></ul> rn </li><li> Select the package group rn <ul><li> Choose only the package assembly shown here, other options not to vote for. </li></ul> rn <ul><li> Desktop <br /> - X Window System <br /> - Gnome <br /> - KDE <br /> - Please refer to me RHES 2.1 parts provided on the GUI choice views. </li></ul> rn <ul><li> Application <br /> - Editor <br /> - Graphical Internet </li></ul> rn <ul><li> Servers <br /> - Do not select any of the options in this group. </li></ul> rn <ul><li> Development <br /> - Development Tools </li></ul> rn <ul><li> System <br /> - Management Tools </li></ul> rn <ul><li> Red Hat Enterprise Linux <br /> - Do not select any of the options in this group. </li></ul> rn <ul><li> Miscellaneous <br /> - The original software development rn </li><li> Click <strong>Next</strong> to continue. </li></ul> rn </li><li> Ready to install rn <ul><li> Click <strong>Next.</strong> </li></ul> rn </li><li> Installation package rn <ul><li> Software will be copied to the hard disk was installed. Prompted to change disks, and then when the installation is complete click <strong>Next.</strong> </li></ul> rn </li><li> Configuration graphical interface (X) rn <ul><li> Accept the default values, unless the installer does not recognize your video card. If your video card can not be identified will not be able to continue. </li></ul> rn </li><li> Configuration Monitor rn <ul><li> If the installation program correctly identify your monitor, you accept the default values. Otherwise, from the list, select a compatible monitor. </li></ul> rn </li><li> Custom graphics configuration rn <ul><li> Accept the default values. </li></ul> rn </li><li> Congratulations rn <ul><li> Removed from the system installation media, and then click <strong>Next.</strong> </li></ul> rn </li><li> The system automatically restarts and displays a new Welcome screen. rn <ul><li> Click <strong>Next.</strong> </li></ul> rn </li><li> License rn <ul><li> Read the license agreement. If you agree to these terms, select <strong>Yes, I agree to the License Agreement</strong> and click <strong>Next.</strong> </li></ul> rn </li><li> Date and time rn <ul><li> Set the date and time. </li></ul> rn <ul><li> If you want to use the NTP server (recommended), select <strong>Enable Network Time Protocol</strong> and enter the NTP server&#39;s name. </li></ul> rn </li><li> User Account rn <ul><li> Create an account for themselves. </li></ul> rn <ul><li> At this time not to oracle create an account. Described later in this section how to create oracle account. </li></ul> rn </li><li> Red Hat Networkrn <ul><li> If you want to immediately use or activate the Red Hat Network account, you accept the default values, click <strong>Next</strong> and follow the Red Hat product activation instructions included with the product. </li></ul> rn </li><li> Other CDrn <ul><li> Click <strong>Next.</strong> </li></ul> rn </li><li> Complete the setup rn <ul><li> Click <strong>Next.</strong> </li></ul> rn </li><li> The emergence of a graphical login screen. rn </li><li> Congratulations! Your Linux software is now installed. </li></ol> Verify that your installation rn <br /> If you complete the above steps, you should have Oracle 10 <em>g</em> all necessary packages and updates. You can perform the following steps to verify your installation. rn <br /><br /> The required kernel version :2.4.21-4. EL (which is the basic version of RHEL 3 with kernel version. This provided the kernel or update any version of the kernel are applicable to Oracle 10 <em>g.)</em> Rn <br /><br /> By running the following command to check the kernel version: rn <br /><br /> <pre><font color="#0000ff">uname -r</font><br /><br />例如：<br /># <font color="#0000ff">uname -r</font><br />2.4.21-4.0.1.ELsmp<br /></pre> other required package versions (or later): rn <ul><li> gcc-3.2.3-2rn </li><li> make-3.79 rn </li><li> binutils-2.11 rn </li><li> openmotif-2.2.2-16 rn </li><li> setarch-1.3-1 rn </li><li> compat-gcc-7.3-2.96.122 rn </li><li> compat-gcc-c + + -7.3-2.96.122 rn </li><li> compat-libstdc + + -7.3-2.96.122 rn </li><li> compat-libstdc + +-devel-7.3-2.96.122 rn </li><li> compat-db-4.0.14.5 <em>(Oracle 10g Database Installation Guide</em> will be listed it as is necessary, but where it was not required) </li></ul> To view the system is installed on which version of these packages in order to root user run the following command: <br /> <pre><font color="#0000ff">rpm -q gcc make binutils openmotif setarch compat-db compat-gcc \<br />compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel</font><br /><br />例如：<br /># <font color="#0000ff">rpm -q gcc make binutils openmotif setarch compat-db compat-gcc \</font><br />&gt;      <font color="#0000ff">openmotif compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel</font><br />gcc-3.2.3-20<br />make-3.79.1-17<br />binutils-2.14.90.0.4-26<br />openmotif-2.2.2-16<br />setarch-1.3-1<br />package compat-db is not installed<br />compat-gcc-7.3-2.96.122<br />compat-gcc-c++-7.3-2.96.122<br />compat-libstdc++-7.3-2.96.122<br />compat-libstdc++-devel-7.3-2.96.122<br /></pre> Please note that is not installed package compat-dbrn. During installation packages are available to any group not included in this package must be installed in a separate step. If the system on the lack of any other package versions, or versions older than the version specified above rn (compat-db exception), you can from the Red Hat Network to download and install the update. <br /> Install compat-db rn <br /><br /> Insert the original Red Hat Enterprise Linux media, the second CD. (Update 2 is not included in the package, it exists only in the original media.) Rn <br /><br /> The CD automatically mount. rn <br /><br /> In order to root user run the following command: <br /><br /> <pre><font color="#0000ff">rpm -ivh /mnt/cdrom/RedHat/RPMS/compat-db-4.0.14-5.i386.rpm</font><br /><br />例如：<br /># <font color="#0000ff">rpm -ivh /mnt/cdrom/RedHat/RPMS/compat-db-4.0.14-5.i386.rpm</font><br />Preparing...         ########################################### [100%]<br />1:compat-db       ########################################### [100%]<br /></pre> rn <br /> rn <br /><br /> SUSE Linux Enterprise Server 8 rn <br /><br /> Oracle 10 <em>g</em> certified in Novell SUSE Linux Enterprise Serverrn (SLES) 8 on the run. Novell via CD or through their support portal available online and package updates Service Pack. In this guide, we will rnCD install SLES 8 (Service Pack 3). <br /><br /><ol><li> To start the server using the SLES 8 CD. rn <ul><li> You may need to change the BIOS settings to allow boot from the CD. </li></ul> rn </li><li> There SUSE Linux Enterprise Server Setup screen appears. rn <ul><li> Select <strong>Installation.</strong> </li></ul> rn <ul><li> Setup scans your hardware and display YaST interface. </li></ul> rn </li><li> Select Language rn <ul><li> Accept the license agreement. </li></ul> rn <ul><li> Accept the default value is <strong>English (US).</strong> rn </li></ul> rn </li><li> Installation settings rn <ul><li> Choose <strong>New Installation.</strong> </li></ul> rn </li><li> Zoning rn <ul><li> This article does not describe the detailed method of disk partitions, but assumes you are familiar with disk partitioning methods. rn <br /> (Warning: an error on the disk partition <strong>on the hard disk</strong> is to <strong>delete all the contents</strong> of the most reliable and most efficient methods. If you are unsure how to partition, please stop, find someone Bang Bang you, or you will risk the danger of losing data !) rn <br /><br /> This article uses the following partition scheme (file systems are ext3): <br /><br /> The first controller (/ dev / sda) on a 9GB disk contains the following partition, used to store all Linux and Oracle software: <br /> - 100MB / boot partition <br /> -1,500 MB swap partition - the size of this partition is set for the system at least twice the RAM, but no more than 2GB (32-bit systems do not support more than 2GB swap file). If you need more than 2GB of swap space, you create more than one swap partition. <br /> -7,150 MB root partition - the partition will be used for all directories, including / usr, / tmp, / var, / opt, / home and so on. This is simply to explain and simplify the installation of this guide. A more reliable partitioning scheme is to bring these directories to a separate file system. </li></ul> rn </li><li> Software rn <ul><li> Click the <strong>Software</strong> link. </li></ul> rn <ul><li> Software Selection screen appears. </li></ul> rn <ul><li> Click <strong>Detailed Selection.</strong> </li></ul> rn <ul><li> On the left window displays the software selection list. Click the check box next to each option to select / deselect. </li></ul> rn <ul><li> Select the following software (this is the recommended software set; do not select other software): <br /> - C / C + + compilers and tools <br /> - KDE (or Gnome) <br /> - LSB Runtime Environment <br /> - Help and Support Documentation <br /> - Graphical Base System <br /> - YaST2 to configure the module <br /> - SLES management tools </li></ul> rn <ul><li> We do not recommend installing the following items, as they may provide the same services to Oracle products conflict: <br /> - Simple Web Server <br /> - Authentication Server (NIS, LDAP, Kerberos) </li></ul> rn </li><li> Time Zone rn <ul><li> Set your time zone. </li></ul> rn </li><li> Click <strong>Accept.</strong> rn </li><li> A warning dialog box appears. Are ready to continue, click <strong>Yes, install.</strong> rn </li><li> Depending on the installation program prompts the replacement CD. rn </li><li> After installing this software, will display a window, suggesting that the basic system has been installed successfully. rn <ul><li> Remove the installation CD, and then <strong>click</strong> OK. </li></ul> rn </li><li> The system restart. rn </li><li> Enter the root user&#39;s password, and enter it again to confirm it. rn </li><li> Create an account for themselves. Do not at this time to create oracle account; we will create it at a later date. rn </li><li> Desktop settings rn <ul><li> Accept the default values. </li></ul> rn </li><li> Automatically detect the emergence of a local printer on the warning window. rn <ul><li> Click <strong>Skip detection.</strong> </li></ul> rn </li><li> Configure the network interface, and are ready to continue operations and click <strong>Next.</strong> rn <ul><li> Proposal to set a static IP address for the server. </li></ul> rn <ul><li> Construction of the database without the need to configure printers, modems, ISDN adapter or sound card. </li></ul> rn </li><li> The emergence of a graphical login screen. rn </li><li> Now, you need to install Service Pack 3. Log on to your own. rn </li><li> Insert update CD, and then <strong>click the Patch CD Update.</strong> rn </li><li> Start YaST2 (SUSE&#39;s system management tools). rn <ul><li> Choose SUSE&gt; System&gt; YaST2. (SUSE is located in the Department of the screen bottom left side faces of the green lizard with a smile, a round button. It is equivalent to &quot;Start.&quot;) </li></ul> rn <ul><li> A window appears that prompts users to enter the root password. Enter a password, and then click <strong>OK.</strong> </li></ul> rn <ul><li> There YaST Control Center. </li></ul> rn </li><li> YaST Online Update window appears. rn <ul><li> Accept the default values, and then <strong>click</strong> Next. </li></ul> rn </li><li> A window appears that displays an updated list of patches. rn <ul><li> YaST before updating the rest of the system need to be updated on its own. The required package has been selected. At this point do not select any other package. </li></ul> rn <ul><li> Click <strong>Accept.</strong> </li></ul> rn </li><li> A window appears that prompts to re-start the online update. rn <ul><li> Click <strong>OK.</strong> </li></ul> rn </li><li> A window appears that prompts to install successfully. rn <ul><li> Click <strong>OK.</strong> </li></ul> rn </li><li> In the YaST Online Update window, click <strong>Finish.</strong> rn </li><li> In the YaST Control Center window, click <strong>Close.</strong> rn </li><li> Repeat steps 21 and 22. rn </li><li> A window appears that displays an updated list of patches. rn <ul><li> Click <strong>Accept</strong> to accept the default values. </li></ul> rn <ul><li> Likely contain a variety of tips (such as &quot;Make sure you update sendmail&quot;) a small pop-up window. Click <strong>OK</strong> to close them. </li></ul> rn <ul><li> This step will take some time. Hover your cursor at the <strong>Next</strong> button. If the update is still running, it displays a clock icon. </li></ul> rn </li><li> A window appears that prompts to install successfully. rn <ul><li> Click <strong>OK.</strong> </li></ul> rn </li><li> In the YaST Online Update screen, click <strong>Next.</strong> rn <ul><li> Installation program to write the system configuration. </li></ul> rn </li><li> In the YaST Control Center, click <strong>Close.</strong> rn </li><li> Write-off. rn <ul><li> SUSE&gt; Logout. </li></ul> rn </li><li> Remove the update CD. rn </li><li> Restart the system. rn <ul><li> In the graphical login screen, click <strong>Menu.</strong> </li></ul> rn <ul><li> Select <strong>Shutdown.</strong> </li></ul> rn <ul><li> Select <strong>Restart computer.</strong> </li></ul> rn <ul><li> Enter the root password. </li></ul> rn <ul><li> Click <strong>OK.</strong> </li></ul> rn </li><li> Congratulations! Your Linux software is now installed. </li></ol> Verify that your installation rn <br /> If you complete the above steps, you should have Oracle 10 <em>g</em> all necessary packages and updates. You can perform the following steps to verify your installation. rn <br /><br /> The required kernel version :2.4.21-138 (or later) rn <br /><br /> By running the following command to check the kernel version: rn <br /><br /> <pre><font color="#0000ff">uname -r</font><br /><br />例如：<br /># <font color="#0000ff">uname -r</font><br />k_smp-2.4.21-138<br /></pre> other required package versions (or later): rn <ul><li> gcc-3.2.2-38 rn </li><li> make-3.79 rn </li><li> binutils-2.12 rn </li><li> openmotif-2.2.2-124 </li></ul> To view the system is installed on which version of these packages in order to root user run the following command: <br /> <pre><font color="#0000ff">rpm -q gcc make binutils openmotif</font><br /><br />例如：  <br /># <font color="#0000ff">rpm rpm -q gcc make binutils openmotif</font><br />gcc-3.2.2-38<br />make-3.79.1-407<br />binutils-2.12.90.0.15-50<br />openmotif-2.2.2-124<br /></pre> If the system on the lack of any package version, or versions older than the version specified above, from the SUSE Linux Portal, you can download and install the update. rn <br /> rn <br /><br /><hr> rnrn <br /> Part 2: For Oracle Configuration Linuxrn <br /><br /> Linux software has been installed, you need to configure it for Oracle. This section will explain step by step for Oracle Database 10 <em>g</em> configure Linux process. rn <br /><br /> Verify the system requirements rn <br /><br /> To verify that the system meets the Oracle 10 <em>g</em> database, the minimum requirements in order to root user to log in and run the following command. rn <br /><br /> To view the available RAM and swap space, run the following command: <pre><font color="#0000ff">grep MemTotal /proc/meminfo<br />grep SwapTotal /proc/meminfo</font><br /><br />例如：<br /># <font color="#0000ff">grep MemTotal /proc/meminfo</font><br />MemTotal:512236 kB<br /># <font color="#0000ff">grep SwapTotal /proc/meminfo</font><br />SwapTotal:1574360 kB<br /></pre> rn <br /> The minimum required RAM for the 512MB, while the minimum required swap space is 1GB. For the RAM is less than or equal to 2GB system, swap space should be twice the amount of RAM; for more than 2GB of system RAM, swap space should be one to two times the number of RAM. rn <br /><br /> Oracle 10 <em>g</em> software also needs 2.5GB of free disk space, and the database will require an additional 1.2GB of free disk space. / tmp directory needs at least 400MB of free space. To check the available disk space on the system, run the following command: <br /><br /> <pre><font color="#0000ff">df -h</font><br /><br />例如：<br /># <font color="#0000ff">df -h</font><br />Filesystem        Size  Used Avail Use% Mounted on<br />/dev/sda3         6.8G  1.3G  5.2G  20% /<br />/dev/sda1         99M   17M   77M  18% /boot<br /></pre> rn <br /> This example shows that, / tmp directory not have their own file system. (For this guide, it is the root file system part of it.) Root file system available space is 5.2 GB, in addition to meet the installation (2.5 + 1.2 + 0.4 = 4.1GB) things, there is a small surplus. rn <br /><br /> Create Oracle group and user accounts rn <br /><br /> Next, create for the installation and maintenance of Oracle 10 <em>g</em> software for Linux groups and user accounts. The user account will be known as the oracle, and the group will be called oinstall and dba. In order to root user execute the following command: <br /><br /> <pre><font color="#0000ff">/usr/sbin/groupadd oinstall<br />/usr/sbin/groupadd dba<br />/usr/sbin/useradd -m -g oinstall -G dba oracle<br />id oracle</font><br /><br />例如：<br /># <font color="#0000ff">/usr/sbin/groupadd oinstall</font><br /># <font color="#0000ff">/usr/sbin/groupadd dba</font><br /># <font color="#0000ff">/usr/sbin/useradd -m -g oinstall -G dba oracle</font><br /># <font color="#0000ff">id oracle</font><br />uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)<br /></pre> rn <br /> Set oracle account password: <br /><br /> <pre><font color="#0000ff">passwd oracle</font><br /><br />例如：<br /># <font color="#0000ff">passwd oracle</font><br />Changing password for user oracle.<br />New password:<br />Retype new password:<br />passwd:all authentication tokens updated successfully.<br /></pre> rn <br /> Create a directory rn <br /><br /> Now, create a stored Oracle 10g software and database files. This guide when creating the directory structure, naming conventions in line with the Optimal Flexible Architecture (OFA) specifications. For more information on OFA standards, see the <em>Oracle Database for UNIX Systems Installation Guide 10g</em> Appendix D. rn <br /><br /> The following assumptions in the root file system, create the directory. This is the sake of simplicity is not recommended as a universal practice. These directories are usually created as a separate file system. rnrn <br /><br /> In order to root user execute the following command: <br /><br /> <pre><font color="#0000ff">mkdir -p /u01/app/oracle<br />mkdir -p /u02/oradata<br />chown -R oracle:oinstall /u01/app/oracle /u02/oradata<br />chmod -R 775 /u01/app/oracle /u02/oradata</font><br /><br />例如：<br /># <font color="#0000ff">mkdir -p /u01/app/oracle</font><br /># <font color="#0000ff">mkdir -p /u02/oradata</font><br /># <font color="#0000ff">chown -R oracle:oinstall /u01/app/oracle /u02/oradata</font><br /># <font color="#0000ff">chmod -R 775 /u01/app/oracle /u02/oradata</font><br /></pre> rn <br /> Configure Linux kernel parameters rn <br /><br /> Linux kernel very well. Unlike most other * NIX systems are different, Linux allows the system up and running most of the kernel parameters to modify. After the completion of the kernel parameter changes do not have to restart the system. Oracle Database 10 <em>g</em> requires the following kernel parameter settings as shown. Which gives the minimum, so if your system uses the value of the larger, do not change it. <br /><br /> <pre><font color="#0000ff">kernel.shmall = 2097152<br />kernel.shmmax = 2147483648<br />kernel.shmmni = 4096<br />kernel.sem = 250 32000 100 128<br />fs.file-max = 65536<br />net.ipv4.ip_local_port_range = 1024 65000</font><br /></pre> rn <br /> If you follow the above instructions to install the Linux, and kernel parameters used in all default values, you can simply log in with root user after the next command. <br /><br /> <pre><font color="#0000ff">cat &gt;&gt; /etc/sysctl.conf &lt;&lt;EOF<br />kernel.shmall = 2097152<br />kernel.shmmax = 2147483648<br />kernel.shmmni = 4096<br />kernel.sem = 250 32000 100 128<br />fs.file-max = 65536<br />net.ipv4.ip_local_port_range = 1024 65000<br />EOF<br />/sbin/sysctl -p</font><br /><br />例如：<br /># <font color="#0000ff">cat &gt;&gt; /etc/sysctl.conf &lt;&lt;EOF</font><br />&gt; <font color="#0000ff">kernel.shmall = 2097152</font><br />&gt; <font color="#0000ff">kernel.shmmax = 2147483648<br /></font>&gt; <font color="#0000ff">kernel.shmmni = 4096</font><br />&gt; <font color="#0000ff">kernel.sem = 250 32000 100 128</font><br />&gt; <font color="#0000ff">fs.file-max = 65536</font><br />&gt; <font color="#0000ff">net.ipv4.ip_local_port_range = 1024 65000</font><br />&gt; <font color="#0000ff">EOF</font><br /># <font color="#0000ff">/sbin/sysctl -p</font><br />net.ipv4.ip_forward = 0<br />net.ipv4.conf.default.rp_filter = 1<br />kernel.sysrq = 0<br />kernel.shmall = 2097152<br />kernel.shmmax = 2147483648<br />kernel.shmmni = 4096<br />kernel.sem = 250 32000 100 128<br />fs.file-max = 65536<br />net.ipv4.ip_local_port_range = 1024 65000<br /></pre> rn <br /> In order to root user run the following command to verify your settings: rn <br /><br /> <pre><font color="#0000ff">/sbin/sysctl -a | grep shm<br />/sbin/sysctl -a | grep sem<br />/sbin/sysctl -a | grep file-max<br />/sbin/sysctl -a | grep ip_local_port_range</font><br /><br />例如：<br /># <font color="#0000ff">/sbin/sysctl -a | grep shm</font><br />kernel.shmmni = 4096<br />kernel.shmall = 2097152<br />kernel.shmmax = 2147483648<br />kernel.shm-use-bigpages = 0<br /># <font color="#0000ff">/sbin/sysctl -a | grep sem</font><br />kernel.sem = 250        32000   100     128<br /># <font color="#0000ff">/sbin/sysctl -a | grep file-max</font><br />fs.file-max = 65536<br /># <font color="#0000ff">/sbin/sysctl -a | grep ip_local_port_range</font><br />net.ipv4.ip_local_port_range = 1024     65000<br /></pre> rn <br /> If the system parameter settings, parameter values smaller than the above, then edit the / etc / sysctl.conf file, add or change these parameters. Is complete, run the following command to activate the changes: <br /><br /> <pre><font color="#0000ff">/sbin/sysctl -p</font><br /></pre> rn <br /> <strong>For SLES 8,</strong> after the completion of the above steps to run the following command. <br /><br /> <pre><font color="#0000ff">/sbin/chkconfig boot.sysctl on</font><br /></pre> rn <br /> Shell limits for the oracle user settings rn <br /><br /> Oracle recommends that each Linux account, the process can be used to open the file number and the number of set limits. To make these changes to root user run the following command: <br /><br /> <pre><font color="#0000ff">cat &gt;&gt; /etc/security/limits.conf &lt;&lt;EOF<br />oracle               soft    nproc   2047<br />oracle               hard    nproc   16384<br />oracle               soft    nofile  1024<br />oracle               hard    nofile  65536<br />EOF<br /><br />cat &gt;&gt; /etc/pam.d/login &lt;&lt;EOF<br />session    required     /lib/security/pam_limits.so<br />EOF</font><br /></pre> rn <br /> <strong>For RHEL 2.1 and RHEL 3,</strong> use the following command: <br /><br /> <pre><font color="#0000ff">cat &gt;&gt; /etc/profile &lt;&lt;EOF<br />if [ \$USER = "oracle" ]; then  <br />if [ \$SHELL = "/bin/ksh" ]; then<br />ulimit -p 16384<br />ulimit -n 65536<br />else<br />ulimit -u 16384 -n 65536<br />fi<br />umask 022<br />fi<br />EOF<br /><br />cat &gt;&gt; /etc/csh.login &lt;&lt;EOF<br />if ( \$USER == "oracle" ) then<br />limit maxproc 16384<br />limit descriptors 65536<br />umask 022<br />endif<br />EOF</font><br /></pre> rn <br /> <strong>For SLES 8,</strong> use the following command: <br /><br /> <pre><font color="#0000ff">cat &gt;&gt; /etc/profile.local &lt;&lt;EOF<br />if [ \$USER = "oracle" ]; then  <br />if [ \$SHELL = "/bin/ksh" ]; then<br />ulimit -p 16384<br />ulimit -n 65536<br />else<br />ulimit -u 16384 -n 65536<br />fi<br />umask 022<br />fi<br />EOF<br /><br />cat &gt;&gt; /etc/csh.login.local &lt;&lt;EOF<br />if ( \$USER == "oracle" ) then<br />limit maxproc 16384<br />limit descriptors 65536<br />umask 022<br />endif<br />EOF</font><br /></pre> rn <br /> Avoid the error! (Only SLES 8) rn <br /><br /> In SLES 8 install Oracle Enterprise Manager 10 <em>g</em> when there is an error-rn Because the required ports that the / etc / services as a reservation to cause installation failures. OEM DBConsole need to port 1830, and in SLES8rn environment, this port has / etc / services reservations. This error in MetaLink on the error number is 3513603. rn <br /><br /> To avoid problems during installation in order to root user to log on and install the Oracle 10 <em>g</em> before the software / etc / services file port 1830-1849 correspond to the line commented out. (Note: At this point, you may want to restart the server to ensure that the above changes take effect.) Rn <br /><br /> oracle user&#39;s environment variables rn <br /><br /> To use the Oracle product, should or must be set a few environment variables. For the database server, it is recommended to set the following environment variables: rn <br /><br /> ORACLE_BASE <br /> ORACLE_HOME <br /> ORACLE_SID <br /> PATH rn <br /><br /> If you are on the same server you have multiple Oracle product or a database, then the ORACLE_HOME, ORACLE_SID, and PATHrn variables may change. ORACLE_BASE variable should not be changed, and can when needed in your login configuration file to set it. Oracle provides a utility called oraenvrn to set other variables. <br /><br /> Log in to oracle and through. Bash_profile or. Profile (bash or ksh), add the following lines will be added to the registry ORACLE_BASE configuration file: <br /><br /> <pre><font color="#0000ff">ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE</font><br /></pre> rn <br /> Or. Login (csh), add the following lines: <br /><br /> <pre><font color="#0000ff">setenv ORACLE_BASE /u01/app/oracle</font><br /></pre> rn <br /> This change will be the next time you log on to the oracle account the entry into force. To make changes to the current session is active, simply run this command from the command line. rn <br /><br /> rn <br /><br /><hr> rnrn <br /> Part 3: Installing Oracle rn <br /><br /> OTN download from the Oracle Database 10 <em>g.</em> Oracle offers a development and testing license free of charge. But does not provide support, and that the license does not allow for productive purposes. OTN provides a complete license agreement. rn <br /><br /> For Oracle 10 <em>g</em> distributions media can be used on a server, the easiest way is to download it directly to the server. rn <br /><br /> Using a graphical login to oracle log. rn <br /><br /> Create a directory to store Oracle 10 <em>g</em> distributions: <br /><br /> <pre><font color="#0000ff">mkdir 10g_db</font><br /></pre> rn <br /> From the OTN download Oracle Database 10g, your browser (Mozilla relatively easy to use) point http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/linuxsoft.html. Fill Eligibility Export Restrictions page, and read the OTN License Agreement. If you accept the restrictions and the license agreement, click <strong>I Accept.</strong> rnrn <br /><br /> Click ship.db.cpio.gz link, and save the file in the directory created for this purpose (10g_db) in - If you have not logged on to OTN, you may be prompted to log on at this time. rn <br /><br /> Extract this file: <br /><br /> <pre><font color="#0000ff">cd 10g_db<br />gunzip ship.db.cpio.gz<br />cpio -idmv &lt; ship.db.cpio</font><br /></pre> rn <br /> Install the software rn <br /><br /> Using the oracle account. rn <br /><br /> Specify the database name (ORACLE_SID). The name is usually not more than five characters. This installation <strong>demo1.</strong> rn <br /><br /> Set environment variables: rn <br /><br /><ul><li> Borne shell and Korn shell <br /> <pre><font color="#0000ff">ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE<br />ORACLE_SID=demo1; export ORACLE_SID</font><br /></pre> rn </li><li> C shell <br /> <pre><font color="#0000ff">setenv ORACLE_BASE /u01/app/oracle<br />setenv ORACLE_SID demo1</font><br /></pre> </li></ul> Change the directory to Oracle 10 <em>g</em> to extract the location of the software. rn <pre>例如：<br />$ <font color="#0000ff">cd $HOME/10g_db</font><br /></pre> rn <br /> Change the directory to Disk1. <br /><br /> <pre>例如：<br />$ <font color="#0000ff">cd Disk1</font><br /></pre> rn <br /> Start Oracle Universal Installer. <br /><br /> <pre>$ <font color="#0000ff">./runInstaller</font><br /></pre> rn <br /> rn <br /><br /><ol><li> Welcome rn <ul><li> Click <strong>Next.</strong> </li></ul> rn </li><li> Specify the list of directories and certificate rn <ul><li> If you&#39;ve been to follow the steps in this guide, you can use the default values. Otherwise, edit the list of the directory path to point to the correct directory. </li></ul> rn <ul><li> The operating system group name should be <strong>oinstall.</strong> </li></ul> rn </li><li> If this is the first time on this machine to install Oracle, then you will receive a pop-up window prompts need to be root user to run orainstRoot.sh script. Root user to log on, change to the window in the specified directory, the implementation of the script, and then continue. rn </li><li> Specify the file location rn <ul><li> If you&#39;ve been to follow the steps in this guide, you can use the default values. Otherwise, before continuing to ensure that the correct source path and destination path. </li></ul> rn </li><li> Choose the type of installation rn <ul><li> Accept the default value of <strong>Enterprise Edition.</strong> </li></ul> rn </li><li> With a specific product related prerequisite checks rn <ul><li> If you&#39;ve been to follow the steps in this guide, all checks should be passed smoothly. If one or more of the check fails, then correct the problem before continuing. </li></ul> rn </li><li> Select Database Configuration rn <ul><li> Accept the default value is <strong>Create a starter database</strong> and <strong>General Purpose.</strong> </li></ul> rn </li><li> Specify the database configuration options rn <ul><li> The global database name entered into the database. The name should include the ORACLE_SID and the server domain name (for example, demo1.orademo.org, which demo1 yes ORACLE_SID, orademo.org is a domain name). </li></ul> rn <ul><li> Enter the global database name, SID frame will be automatically filled. </li></ul> rn <ul><li> Accept the default database character set. </li></ul> rn <ul><li> Select <strong>Create database with sample schemas.</strong> </li></ul> rn </li><li> Select Database Management Option rn <ul><li> Select <strong>Use Database Control for Database Management.</strong> </li></ul> rn </li><li> Specify the database file storage options rn <ul><li> Select <strong>File System,</strong> and then enter the database file you want to use the path name (in this case, / u02/oradata). </li></ul> rn </li><li> Designated backup and recovery options rn <ul><li> Select <strong>Do not enable Automated backups.</strong> </li></ul> rn </li><li> Specify the database schema password rn <ul><li> Select <strong>Use the same password for all the accounts.</strong> </li></ul> rn <ul><li> Choose a password, then enter twice to confirm. </li></ul> rn </li><li> Abstract rn <ul><li> Shows a summary of the installed product. </li></ul> rn <ul><li> Click <strong>Install.</strong> </li></ul> rn </li><li> Installation rn <ul><li> This screen after installation of Oracle software, and links to several stages. </li></ul> rn <ul><li> The end of the installation process a pop-up window displays configuration information. Note the Enterprise Manager URL, and then click <strong>OK</strong> to close the window. </li></ul> rn <ul><li> Pop-up a &quot;Setup Privileges&quot; window prompts need to be root user to run the configuration script. Root user to log on, switch to the window in the direction of the directory, then run the root.sh script. The script prompts for the location of the local bin directory. Press <strong>Enter</strong> key to accept the default value. When the script is complete, return to the Setup Privileges window and click <strong>OK.</strong> (As shown below.) </li></ul> rn <table align="center" width="40%"> rn <tbody> rn <tr> rn <td align="middle"> <a href="http://www.kods.net/upload/l/linux-install-oracle10g.gif" class="lightbox"><img src="http://www.kods.net/upload/l/linux-install-oracle10g.gif"   alt="linux install oracle10G" title="linux install oracle10G" /></a> </td></tr></tbody></table> rn </li><li> The installation is complete rn <ul><li> Note the summary display URL, and ready when you click <strong>Exit.</strong> </li></ul> rn </li><li> Congratulations! Your new Oracle 10 <em>g</em> database has been launched and can be used. </li></ol> rn <table align="center" width="40%"> rn <tbody> rn <tr> rn <td align="middle"> <a href="http://www.kods.net/upload/l/linux-install-oracle10g_1.gif" title="linux install oracle10G" class="lightbox"><img src="http://www.kods.net/upload/l/linux-install-oracle10g_1.gif"  /></a> </td></tr></tbody></table> rn <br /> rn <br /><br /><hr> rnrn <br /> Part 4: Configure Storage rn <br /><br /> Part 3, we created a database using a single file system (/ u02/oradata) to disk storage. But for the Oracle database configuration is stored in different ways. rn <br /><br /> Part 4 describes the database configuration for this disk storage of other methods. In particular, it describes how to create other file systems, and how to use Automatic Storage Management rn (ASM). How to use the raw devices and Oracle Cluster File System (OCFS) will be in this series, is described in another article, the article describes how to use Oraclern Real Application Clusters (RAC) to create cluster database. <br /><br /> File System rn <br /><br /> The file system is the Oracle database to store data files, redo logs and control files are the most commonly used method. File system, easy to implement, and no third-party software to manage it. rn <br /><br /> In most cases, the file system in Linux, created during the initial installation. But sometimes in the initial installation (for example, after installing a new disk drive) to create a new file system. rn <br /><br /> This section describes how to build a new file system, Oracle database and how to use it. Unless otherwise stated, must be root user to run all commands. rn <br /><br /> To partition the disk rn <br /><br /> You must use an empty disk partition to create the file system. If you already have an empty disk partition available, then skip to the next step. rn <br /><br /> The following is a file system for Linux to create a new partition example. (Warning: an error on the disk partition <strong>on the hard disk</strong> is to <strong>delete all the contents</strong> of the most reliable and most efficient methods. If you are unsure how to partition, please stop, find someone Bang Bang you, or you will risk the danger of losing data .) rn <br /><br /> This example uses / dev / sdb (one is not an empty SCSI disk partition) for the entire disk (36 GB) to create a single partition. <br /><br /> <pre>例如：<br /># <font color="#0000ff">fdisk /dev/sdb</font><br />Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel<br />Building a new DOS disklabel.Changes will remain in memory only,<br />until you decide to write them.After that, of course, the previous<br />content won't be recoverable.<br /><br />The number of cylinders for this disk is set to 4427.<br />There is nothing wrong with that, but this is larger than 1024,<br />and could in certain setups cause problems with:<br />1) software that runs at boot time (e.g., old versions of LILO)<br />2) booting and partitioning software from other OSs<br />(e.g., DOS FDISK, OS/2 FDISK)<br /><br />Command (m for help):<font color="#0000ff">p</font><br /><br />Disk /dev/sdb:255 heads, 63 sectors, 4427 cylinders<br />Units = cylinders of 16065 * 512 bytes<br /><br />Device Boot    Start       End    Blocks   Id  System<br /><br />Command (m for help):<font color="#0000ff">n</font><br />Command action<br />e   extended<br />p   primary partition (1-4)<br /><font color="#0000ff">p</font><br />Partition number (1-4): <font color="#0000ff">1</font><br />First cylinder (1-4427, default 1):<br />Using default value 1<br />Last cylinder or +size or +sizeM or +sizeK (1-4427, default 4427):<br />Using default value 4427<br /><br />Command (m for help):<font color="#0000ff">w</font><br />The partition table has been altered!<br /><br />Calling ioctl() to re-read partition table.<br /><br />WARNING:If you have created or modified any DOS 6.x<br />partitions, please see the fdisk manual page for additional<br />information.<br />Syncing disks.<br /></pre> rn <br /> Now verify the new partition: <br /><br /> <pre><font size="-1">例如：<br /></font># <font color="#0000ff">fdisk /dev/sdb</font><br /><br />The number of cylinders for this disk is set to 4427.<br />There is nothing wrong with that, but this is larger than 1024,<br />and could in certain setups cause problems with:<br />1) software that runs at boot time (e.g., old versions of LILO)<br />2) booting and partitioning software from other OSs<br />(e.g., DOS FDISK, OS/2 FDISK)<br /><br />Command (m for help):<font color="#0000ff">p</font><br /><br />Disk /dev/sdb:255 heads, 63 sectors, 4427 cylinders<br />Units = cylinders of 16065 * 512 bytes<br /><br />Device Boot    Start       End    Blocks   Id  System<br />/dev/sdb1             1      4427  35559846   83  Linux<br /><br />Command (m for help):<font color="#0000ff">q</font><br /></pre> rn <br /> Create a file system rn <br /><br /> Use ext3 to create the new file system. You can also use other file systems, but ext3 crash in the system provides the fastest recovery. <br /><br /> <pre>例如：<br /># <font color="#0000ff">mke2fs -j /dev/sdb1</font><br />mke2fs 1.26 (3-Feb-2002)<br />Filesystem label=<br />OS type:Linux<br />Block size=4096 (log=2)<br />Fragment size=4096 (log=2)<br />4447744 inodes, 8889961 blocks<br />444498 blocks (5.00%) reserved for the super user<br />First data block=0<br />272 block groups<br />32768 blocks per group, 32768 fragments per group<br />16352 inodes per group<br />Superblock backups stored on blocks:<br />        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,<br />        2654208, 4096000, 7962624<br /><br />Writing inode tables:done<br />Creating journal (8192 blocks):done<br />Writing superblocks and filesystem accounting information:done<br /><br />This filesystem will be automatically checked every 23 mounts or<br />180 days, whichever comes first.Use tune2fs -c or -i to override.<br /></pre> rn <br /> Create a mount point rn <br /><br /> The file system must have a mount point, it&#39;s just an empty directory, the new file system here with the system directory tree &quot;connected.&quot; Mount point naming should follow the Oracle Flexible Architecture (OFA) standard. For more information on OFA standards, see the <em>Oracle 10g Database Installation Guide</em> Appendix D. rn <br /><br /> Because you have already used in Part 1 of / u01 and / u02 directory name, and therefore used in this example / u03. <br /><br /> <pre>例如：<br /># <font color="#0000ff">mkdir /u03</font><br /></pre> rn <br /> The new file system will be added to / etc / fstab rn <br /><br /> So the new file system will be mounted automatically at boot time, you need to describe the new file system and its installation location of the / etc / fstab file, add a line. Use a text editor to / etc / fstab add the following line as shown. <br /><br /> <pre><font color="#0000ff">/dev/sdb1         /u03           ext3    defaults       1 1</font><br /></pre> rn <br /> Mount the new file system rn <br /><br /> Mount the file system after use. Only mount the file system before you can store files. Use the following command to mount the file system and verify that it is available. <br /><br /> <pre><font color="#0000ff">mount /u03<br />df -h /u03</font><br /><br />例如：<br /># <font color="#0000ff">mount /u03</font><br /># <font color="#0000ff">df -h /u03</font><br />Filesystem            Size  Used Avail Use% Mounted on<br />/dev/sdb1             33G   33M  31G   1%   /u03<br /></pre> rn <br /> Create Oracle directory and set permissions rn <br /><br /> Now, create a directory used to store Oracle files. The sample used in the OFA database directory name to follow the standard naming conventions, that is, ORACLE_SID = demo1. <br /><br /> <pre><font color="#0000ff">mkdir -p /u03/oradata/demo1<br />chown -R oracle:oinstall /u03/oradata<br />chmod -R 775 /u03/oradata</font><br /></pre> rn <br /> In the new file system to create a new table space rn <br /><br /> The new file system is available. Next, in the file system to store database objects to create a new tablespace. To SYSTEM user to connect to the database, then run the <tt>CREATE TABLESPACE</tt> statement, and in the new file system specified in the data file. <br /><br /> <pre>例如：<br />$ <font color="#0000ff">sqlplus</font><br /><br />SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 15:01:08 2004<br /><br />Copyright (c) 1982, 2004, Oracle.All rights reserved.<br /><br />Enter user-name:<font color="#0000ff">system</font><br />Enter password:<br /><br />Connected to:<br />Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production<br />With the Partitioning, OLAP and Data Mining options<br /><br />SQL&gt; <font color="#0000ff">create tablespace data1</font><br />2  <font color="#0000ff">datafile '/u03/oradata/demo1/data1_01.dbf' size 100M</font><br />3  <font color="#0000ff">extent management local</font><br />4  <font color="#0000ff">segment space management auto;</font><br /><br />Tablespace created.<br /></pre> rn <br /> Now, you can use this new table space to store database objects such as tables and indexes. rn <br /><br /> <pre>例如：<br />SQL&gt; <font color="#0000ff">create table demotab (id number(5) not null primary key,</font><br />2  <font color="#0000ff">name varchar2(50) not null,</font><br />3  <font color="#0000ff">amount number(9,2)</font>)<br />4  <font color="#0000ff">tablespace data1;</font><br /><br />Table created.<font size="-1"><br /></font><br /></pre> rn <br /> Automatic Storage Management (ASM) rn <br /><br /> I put the most important elements remain in the final. ASM is Oracle Database 10 <em>g</em> rn in a very good new features, it provides a platform-independent way the file system, logical volume manager as well as software RAID services. ASMrn can be striped and mirrored disks, enabling database is loaded in the case of add or remove disks, as well as self-balancing I / O to remove &quot;hot spots.&quot; It also supports direct and asynchronous I / O and use the rnOracle9 <em>i</em> introduced in the Oracle Data Manager API (simplified I / O system call interface). rn <br /><br /> ASM is not a common file system, and can only be used for Oracle data files, redo logs and control files. ASMrn files in either the database is automatically created and named (by using the Oracle managed file properties), or you can manually create and name from the DBA. ASMrn can not be accessed because the operating system stored in files, so the use of ASM database files to perform backup and restore operations only way is through Recovery Manager (RMAN). <br /><br /> ASM as a separate instance of the implementation of Oracle, and only when it is running other databases in order to access it. In Linux, only to run OCSSD services (from Oracle Universal Installer is installed by default) to use ASM. ASM needs little memory: For most systems, only 64 MB. rn <br /><br /> Install ASM rn <br /><br /> In the Linux platform, ASM can use raw devices, or through ASMLib interface management device. For ease of use and performance reasons, Oracle recommends the use of original equipment ASMLib. ASMLib now available for free download from OTN. This section explain step by step to configure a simple to use ASMLib build an ASM instance and ASM for disk storage using the database as a whole. rn <br /><br /> To determine the required ASMLib version of the rn <br /><br /> ASMLib to the package consisting of three Linux packages assembly provides: rn <br /><br /><ul><li> oracleasmlib - ASM library rn </li><li> oracleasm-support - for managing ASMLib utility rn </li><li> oracleasm - ASM database kernel module rn </li></ul> Each Linux distro has its own ASMLib package assembly. Each distributions, each kernel version has a corresponding oracleasm package. The following section describes how to determine the required package set. rn <br /> First, using the root user to log in and run the following command to determine the use of cores: <br /><br /> <pre><font color="#0000ff">uname -rm</font><br /><br />例如：<br /># <font color="#0000ff">uname -rm</font><br />2.4.9-e.27smp i686<br /></pre> rn <br /> This example shows that this is an Intel i686 CPU to use the SMP (multi-processor) systems 2.4.9 kernel. rn <br /><br /> Use this information to find the corresponding ASMLib on OTN package: rn <br /><br /><ol><li> The Web browser to http://www.oracle.com/global/cn/technology/tech/linux/asmlib rnrn </li><li> Choose the appropriate link for your Linux version. rn </li><li> Download for your Linux version of oracleasmlib and oracleasm-support package rn </li><li> Download to your kernel corresponds oracleasm package. For the example above, download oracleasm-2.4.9-e-smp-1.0.0-1.i686.rpm package. rn <br /> Next, in order to root user execute the following command to install the package: <br /><br /> <pre><font color="#0000ff">rpm -Uvh oracleasm-kernel_version-asmlib_version.cpu_type.rpm \<br />oracleasmlib-asmlib_version.cpu_type.rpm \<br />oracleasm-support-asmlib_version.cpu_type.rpm</font><br /><br />例如：<br /># <font color="#0000ff">rpm -Uvh \</font><br />&gt; <font color="#0000ff">oracleasm-2.4.9-e-smp-1.0.0-1.i686.rpm \</font><br />&gt; <font color="#0000ff">oracleasmlib-1.0.0-1.i386.rpm \</font><br />&gt; <font color="#0000ff">oracleasm-support-1.0.0-1.i386.rpm</font><br />Preparing...                #################################### [100%]<br />1:oracleasm-support      #################################### [ 33%]<br />2:oracleasm-2.4.9-e-smp  #################################### [ 66%]<br />Linking module oracleasm.o into the module path [  OK  ]<br />3:oracleasmlib           #################################### [100%]</pre> </li></ol> rn <br /> Configuration ASMLib rn <br /><br /> The use of ASMLib, you must run the configuration script to prepare the driver. In order to root user run the following command, and respond to the following examples shown in the prompts. <br /><br /> <pre># <font color="#0000ff">/etc/init.d/oracleasm configure</font><br />Configuring the Oracle ASM library driver.<br /><br />This will configure the on-boot properties of the Oracle ASM library<br />driver.The following questions will determine whether the driver is<br />loaded on boot and what permissions it will have.The current values<br />will be shown in brackets ('[]').Hitting &lt;ENTER&gt; without typing an<br />answer will keep that current value.Ctrl-C will abort.<br /><br />Default user to own the driver interface []:<font color="#0000ff">oracle</font><br />Default group to own the driver interface []:<font color="#0000ff">dba</font><br />Start Oracle ASM library driver on boot (y/n) [n]:<font color="#0000ff">y</font><br />Fix permissions of Oracle ASM disks on boot (y/n) [y]:<font color="#0000ff">y</font><br />Writing Oracle ASM library driver configuration            [  OK  ]<br />Creating /dev/oracleasm mount point                        [  OK  ]<br />Loading module "oracleasm"                                 [  OK  ]<br />Mounting ASMlib driver filesystem                          [  OK  ]<br />Scanning system for ASM disks                              [  OK  ]<br /></pre> rn <br /> Now, as shown below to enable ASMLib driver. rn <br /><br /> <pre># <font color="#0000ff">/etc/init.d/oracleasm enable</font><br />Writing Oracle ASM library driver configuration            [  OK  ]<br />Scanning system for ASM disks                              [  OK  ]<br /></pre> rn <br /> Configuration for the ASM disk rn <br /><br /> Next, tell the driver you want to use ASM disk. Please note that these disks do not contain any content (or does not contain a partition) of disk space. Disk partition can be used for ASM, but recommended that you do not do this. rn <br /><br /> Through a root user run the following command to mark the disk used by the ASMLib: <br /><br /> <pre><font color="#0000ff">/etc/init.d/oracleasm createdisk DISK_NAME device_name</font><br /></pre> rn <br /> (Hint: DISK_NAME shall be composed of capital letters. The current version has an error, that is, if you use lower case letters, ASM instance will not recognize the disk.) <br /><br /> <pre>例如：<br /># <font color="#0000ff">/etc/init.d/oracleasm createdisk VOL1 /dev/sdb</font><br />Marking disk "/dev/sdb" as an ASM disk                     [  OK  ]<br /># <font color="#0000ff">/etc/init.d/oracleasm createdisk VOL2 /dev/sdc</font><br />Marking disk "/dev/sdc" as an ASM disk                     [  OK  ]<br /># <font color="#0000ff">/etc/init.d/oracleasm createdisk VOL3 /dev/sdd</font><br />Marking disk "/dev/sdd" as an ASM disk                     [  OK  ]<br /># <font color="#0000ff">/etc/init.d/oracleasm createdisk VOL4 /dev/sdf</font><br />Marking disk "/dev/sdf" as an ASM disk                     [  OK  ]<br /># <font color="#0000ff">/etc/init.d/oracleasm createdisk VOL5 /dev/sdg</font><br />Marking disk "/dev/sdg" as an ASM disk                     [  OK  ]<br /># <font color="#0000ff">/etc/init.d/oracleasm createdisk VOL6 /dev/sdh</font><br />Marking disk "/dev/sdh" as an ASM disk                     [  OK  ]<br /></pre> rn <br /> The following example demonstrates how to set out the grounds of ASMLib tag access to all disks. <br /><br /> <pre># <font color="#0000ff">/etc/init.d/oracleasm listdisks</font><br />VOL1<br />VOL2<br />VOL3<br />VOL4<br />VOL5<br />VOL6<br /></pre> rn <br /> Now that you have installed the ASMLib, and the disk has been marked as available, the following, you can create an ASM instance, and build one using ASM for disk storage database. The easiest way is to use the Database Configuration Assistant (DBCA) to complete this operation. rn <br /><br /> Log in to oracle and start DBCA: <br /><br /> <pre>$ dbca<br /></pre> rn <br /> rn <br /><br /><ol><li> Welcome rn <ul><li> Click <strong>Next.</strong> </li></ul> rn </li><li> Operation rn <ul><li> Select <strong>Create a Database.</strong> </li></ul> rn </li><li> Database Template rn <ul><li> Select <strong>General Purpose.</strong> </li></ul> rn </li><li> Database ID rn <ul><li> Enter the global database name. </li></ul> rn </li><li> Management options rn <ul><li> Select <strong>Configure the Database with Enterprise Manager.</strong> </li></ul> rn <ul><li> Select <strong>Use Database Control for Database Management.</strong> </li></ul> rn </li><li> Database Certificate rn <ul><li> Select <strong>Use Same Password for All Accounts.</strong> </li></ul> rn <ul><li> Enter a password and confirm. </li></ul> rn </li><li> Storage options rn <ul><li> Select <strong>Automatic Storage Management (ASM).</strong> </li></ul> rn </li><li> Create ASM instance rn <ul><li> Enter the password and confirm the ASM instance. </li></ul> rn </li><li> Pop up a window, suggesting that DBCA will immediately create and start the ASM instance. rn <ul><li> Click <strong>OK.</strong> </li></ul> rn </li><li> ASM instance to create a pop-up window with a gear box. rn </li><li> ASM disk group rn <ul><li> Since this is a new ASM instance, and you have not created any ASM instance, so the window does not display the available disk group. </li></ul> rn <ul><li> Click <strong>Create New.</strong> </li></ul> rn </li><li> Create Disk Group rn <ul><li> Disk group name <br /> - Enter the disk group name, such as DATA1. </li></ul> rn <ul><li> Redundancy <br /> - <strong>High</strong> mirrors data twice. <br /> - <strong>Normal</strong> image data once. <br /> - <strong>External</strong> does not mirror the data in the ASM. If the external RAID arrays to provide redundancy, you normally use this option. rn </li><li> Select members of the disk <br /> - You must manually direct ASM where to find ASMLib disk, therefore, click <strong>Change Disk Discovery Path <br /> -</strong> Pop up a window that prompts the disk discovery path. As shown below will be found to change the path to the disk &quot;ORCL: *&quot;. <br /> - Click <strong>OK</strong> to continue. </li></ul> rn <table align="center" width="40%"> rn <tbody> rn <tr> rn <td align="middle"> <a href="http://www.kods.net/upload/l/linux-install-oracle10g_2.gif" title="linux install oracle10G" class="lightbox"><img src="http://www.kods.net/upload/l/linux-install-oracle10g_2.gif"  /></a> </td></tr></tbody></table> rn <ul><li> You will return to the Select Member Disks window. All of your ASMLib disks should now be displayed in this window. <br /> Click the OK at the beginning of the box, select the disk group by adding disks. Are finished, click <strong>OK.</strong> </li></ul> rn <table align="center" width="40%"> rn <tbody> rn <tr> rn <td align="middle"> <a href="http://www.kods.net/upload/l/linux-install-oracle10g_3.gif" title="linux install oracle10G" class="lightbox"><img src="http://www.kods.net/upload/l/linux-install-oracle10g_3.gif"  /></a> </td></tr></tbody></table> rn </li><li> ASM disk group rn <ul><li> You will return to the ASM Disk Groups window. At this point, appears in the previous step to create the disk group. </li></ul> rn <ul><li> Click the OK at the beginning of the box to select the disk group. (In this instance the use of a single disk group.) </li></ul> rn <ul><li> Click <strong>Next.</strong> </li></ul> rn </li><li> Database File Location rn <ul><li> Select <strong>Use Oracle-Managed Files.</strong> </li></ul> rn <ul><li> Make sure that the Database Area is set for you to create a disk group. It contains a leading plus sign - for example, + DATA1. </li></ul> rn </li><li> Restore Configuration rn <ul><li> Select <strong>Specify Flash Recovery Area.</strong> <br /> - Fast recovery area - Enter the ASM for fast recovery disk group. <br /> - Fast recovery area size - Accept the default value is 2048. </li></ul> rn <ul><li> If you want to use the archive log mode, then select <strong>Enable Archiving.</strong> For the assessment of the database, you can not vote for that. </li></ul> rn </li><li> Database contents rn <ul><li> Select <strong>Sample Schemas.</strong> </li></ul> rn <ul><li> We do not use custom scripts, so click <strong>Next.</strong> </li></ul> rn </li><li> Initialization parameters rn <ul><li> Accept the default values, and then <strong>click</strong> Next. </li></ul> rn </li><li> Database storage rn <ul><li> Accept the default values, and then <strong>click</strong> Next. </li></ul> rn </li><li> Creating Options rn <ul><li> Select <strong>Create Database</strong> (default) and click <strong>Finish.</strong> </li></ul> rn </li><li> Confirmed rn <ul><li> Ends For more information check the database and click <strong>OK.</strong> </li></ul> rn </li><li> DBCA displays an action list and a progress bar. According to the different hardware, database creation may take several minutes to several hours of time. rn </li><li> When the database is created, it will show a summary window displays. Note the Enterprise Manager URL, and then <strong>click Exit.</strong> </li></ol> rn <table align="center" width="40%"> rn <tbody> rn <tr> rn <td align="middle"> <a href="http://www.kods.net/upload/l/linux-install-oracle10g_4.gif" title="linux install oracle10G" class="lightbox"><img src="http://www.kods.net/upload/l/linux-install-oracle10g_4.gif"  /></a> </td></tr></tbody></table> rn <br /> rn <br /><br /><hr> rnrn <br /> Conclusion rn <br /><br /> Now that your database is up and running, you can start using Oracle 10 <em>g</em> provides many new features. Preferably from the Oracle Enterprise Manager to start using, it is because it is completely rewritten, using Web-based interface. If you are unsure where to start, <em>Oracle concepts guide</em> and <em>a two-day DBA Quick guide</em> will help you become familiar with the new database. OTN also provides some designed to help you take full advantage of 10 <em>g</em> article. My favorite was prepared by Arup Nanda series of articles &quot;Oracle Database 10 <em>g:</em> for the DBA to provide 20 of the most important feature.&quot; Rn <br /><br /> In the next article, we will explain step by step how to install and configure a fully functional two-node Oracle RAC 10 <em>g</em> database. rn <br /><br /> rn <br /><br /><hr> rnrn <br /> Appendix rn <br /><br /> rn <br /><br /> Use SQL * Plus to access the database rn <br /><br /> To oracle Log in to Linux. Set the environment. <br /><br /> rn <br /> Set Oracle environment variables: <br /><br /> <pre>$ <font color="#0000ff">export ORACLE_BASE=/u01/app/oracle</font><br />$ <font color="#0000ff">export ORACLE_SID=demo1</font><br />$ <font color="#0000ff">export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1</font><br />$ <font color="#0000ff">export PATH=$PATH:$ORACLE_HOME/bin</font><br /></pre> rn <br /> Run SQL * Plus: <br /><br /> <pre>$ <font color="#0000ff">sqlplus</font><br /><br />SQL*Plus:Release 10.1.0.2.0 - Production on Sat Jun 5 16:59:21 2004<br /><br />Copyright (c) 1982, 2004, Oracle.All rights reserved.<br /><br />Enter user-name:<font color="#0000ff">/ as sysdba</font><br /><br />Connected to:<br />Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production<br />With the Partitioning, OLAP and Data Mining options<br /><br />SQL&gt; <br /></pre> rn <br /> Use Oracle Enterprise Manager 10 <em>g</em> Database Control <br /><br /> rn <br /> In the Web browser, connect to the installation process provided in the URL. <br /><br /> rn <br /> For example: <br /> <font color="#0000ff">http://ds1.orademo.org:5500/em</font> (If the server is not DNS, then you must use IP addresses instead of host name.) <br /><br /> rn <br /> User Name: <font color="#0000ff">SYS</font> <br /> Password: <font color="#0000ff">&quot;Install the password selected during&quot;</font> <br /> Connect to: <font color="#0000ff">SYSDBA</font> rn <br /><br /> Click &lt;Login&gt; <br /><br /> rn <table align="center" width="40%"> rn <tbody> rn <tr> rn <td align="middle"> <a href="http://www.kods.net/upload/l/linux-install-oracle10g_5.gif" title="linux install oracle10G" class="lightbox"><img src="http://www.kods.net/upload/l/linux-install-oracle10g_5.gif"  /></a> </td></tr></tbody></table> rn <br /> Welcome into the Oracle Enterprise Manager 10 <em>g</em> database control, wonderful world! <br /><br /> rn <br /> Start and stop Oracle Enterprise Manager Database Control: <br /><br /> <pre>$ <font color="#0000ff">emctl start dbconsole</font><br />$ <font color="#0000ff">emctl stop dbconsole</font><br /></pre> rn <br /> Access to the database using iSQL * Plus <br /><br /> rn <br /> iSQL * Plus is a long history of SQL * Plus an interactive Web-based versions of tools used to access the database. To use the iSQL * Plus, please click the Related Links section of the console rnOEM the iSQL * Plus link, or pointing your browser to the installation process provided in the iSQL * Plus URL. <br /><br /> rn <br /> For example: <br /> <font color="#0000ff">http://ds1.orademo.org:5560/isqlplus</font> (If the database server is not DNS, then you must use IP addresses instead of host name.) <br /><br /> rn <br /> User Name: <font color="#0000ff">SYSTEM</font> <br /> Password: <font color="#0000ff">&quot;Install the password selected during&gt;</font> rn <br /><br /> Click &lt;Login&gt;. <br /><br /> rn <br /> In the Workspace box, type the SQL command, and then click <strong>Execute.</strong> <br /><br /> rn <table align="center" width="40%"> rn <tbody> rn <tr> rn <td align="middle"> <a href="http://www.kods.net/upload/l/linux-install-oracle10g_6.gif" title="linux install oracle10G" class="lightbox"><img src="http://www.kods.net/upload/l/linux-install-oracle10g_6.gif"  /></a> </td></tr></tbody></table> rn <br /> Start and stop iSQL * Plus: <br /><br /> <pre>$ <font color="#0000ff">isqlplusctl start</font><br />$ <font color="#0000ff">isqlplusctl stop</font><br /></pre> rn <br /> Start and stop the listener: <br /><br /> rn <br /> Listener to accept client connection requests, and verify that certificate to create a database connection. To use the OEM or iSQL * Plus, you must first start the listener. <br /><br /> <pre>$ <font color="#0000ff">lsnrctl start</font><br />$ <font color="#0000ff">lsnrctl stop</font><br /></pre> rn <br /> Start and stop the database: <br /><br /> rn <br /> To start and stop the database, the easiest way is to start and stop the console from the OEM. To do this from the command line, please log in to oracle after the use of SQL * Plus, as follows: <br /><br /> rn <br /> Start: <br /><br /> <pre>$ <font color="#0000ff">sqlplus</font><br /><br />SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 22:27:48 2004<br /><br />Copyright (c) 1982, 2004, Oracle.All rights reserved.<br /><br />Enter user-name:<font color="#0000ff">/ as sysdba</font><br />Connected to an idle instance.<br /><br />SQL&gt; <font color="#0000ff">startup</font><br />ORACLE instance started.<br /><br />Total System Global Area  188743680 bytes<br />Fixed Size                   778036 bytes<br />Variable Size             162275532 bytes<br />Database Buffers           25165824 bytes<br />Redo Buffers                 524288 bytes<br />Database mounted.<br />Database opened.<br />SQL&gt; <font color="#0000ff">exit</font><br /></pre> rn <br /> Shutdown: <br /><br /> <pre>$ <font color="#0000ff">sqlplus</font><br /><br />SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 22:25:55 2004<br /><br />Copyright (c) 1982, 2004, Oracle.All rights reserved.<br /><br />Enter user-name:<font color="#0000ff">/ as sysdba</font><br /><br />Connected to:<br />Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production<br />With the Partitioning, OLAP and Data Mining options<br /><br />SQL&gt; <font color="#0000ff">shutdown immediate</font><br />Database closed.<br />Database dismounted.<br />ORACLE instance shut down.<br />SQL&gt; <font color="#0000ff">exit</font><br /></pre> rn <br /> Oracle processes are listed: <br /><br /> <pre>$ <font color="#0000ff">ps a&#8364;“fuoracle</font><br /></pre> rn <br /> What is the ocssd.bin process? <br /><br /> rn <br /> Oracle Cluster Synchronization Services (OCSSD) is the Oracle Cluster Ready Services (CRS), a component for the RAC and the use of a single instance database ASMrn. It is installed by default, uses very few system resources, and / etc / inittabrn in the configuration. These processes start automatically when the system starts every time. Oracle is not recommended to disable OCSSD, even if you are not running ASM. <br /><br /> rn rn rn				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<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/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/ax3-0-oracle-10g-rac-installation/" title="AX3.0 + Oracle 10G RAC installation">AX3.0 + Oracle 10G RAC installation</a> 2009-03-12 19:19:31</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/linux-install-oracle10g/</wfw:commentRss>
	</item>
	</channel>
</rss>
