<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
>

<channel>
	<title>2009/05</title>
	<atom:link href="http://www.kods.net/feed/archive/2009/05/" rel="self" type="application/rss+xml" />
	<link>http://www.kods.netwww.kods.net/</link>
	<description>Oracle Jobs, Oracle Database, Oracle 9i, Oracle SQL, Oracle at Delphi, Oracle Greek, Learn Oracle, Oracle ERP</description>
	<pubDate>Fri, 12 Mar 2010 22:55:08+0000</pubDate>
	<generator>http://www.kods.netwww.kods.net/</generator>
	<language>en</language>
		<item>
		<title>insert all</title>
		<link>http://www.kods.netwww.kods.net/insert-all/</link>
		<comments>http://www.kods.netwww.kods.net/insert-all/#comments</comments>
		<pubDate>Wed, 27 May 2009 22:05:02+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sql procedure]]></category>
<category><![CDATA[pl sql]]></category>
<category><![CDATA[lt]]></category>
<category><![CDATA[orcl]]></category>
<category><![CDATA[number 8]]></category>
<category><![CDATA[rn 20]]></category>
<category><![CDATA[rn 10]]></category>
<category><![CDATA[loop 5]]></category>
<category><![CDATA[loop 3]]></category>
<category><![CDATA[number 39]]></category>
<category><![CDATA[buf]]></category>
<category><![CDATA[number 9]]></category>
<category><![CDATA[a8]]></category>
<category><![CDATA[a3]]></category>
<category><![CDATA[a2]]></category>
<category><![CDATA[a1]]></category>
<category><![CDATA[a5]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/insert-all/</guid>
		<description><![CDATA[9i increased from the beginning insert all, the data can be inserted into multiple tables at the same time, this can greatly reduce the disk IO, as well as the length of the code. rn ADMIN @ orcl&gt;  ...]]></description>
		<content:encoded><![CDATA[9i increased from the beginning insert all, the data can be inserted into multiple tables at the same time, this can greatly reduce the disk IO, as well as the length of the code. <br /> rn <br /><BR> ADMIN @ orcl&gt; create table inser_test_all (a varchar2 (20), b number); <br /> rn <br /> Table created. <br /> rn <br /> ADMIN @ orcl&gt; begin <BR> 2 for i in 1 .. 10 loop <BR> 3 insert into inser_test_all values ( &#39;a&#39; | | i, i); <BR> 4 end loop; <BR> 5 end; <BR> 6 / <br /> rn <br /> PL / SQL procedure successfully completed. <BR> ADMIN @ orcl&gt; create table inser_test_when1 (a varchar2 (20)); <br /> rn <br /> Table created. <br /> rn <br /> ADMIN @ orcl&gt; create table inser_test_when2 (b number); <br /> rn <br /> Table created. <br /> rn <br /> ADMIN @ orcl&gt; create table inser_test (a varchar2 (20), b number); <br /> rn <br /> Table created. <br /> rn <br /> ADMIN @ orcl&gt; insert all <BR> 2 into inser_test values ( &#39;number&#39;, b) <BR> 3 into inser_test values (a, 888) <BR> 4 selecdt a, b from inser_test_all; <BR> selecdt a, b from inser_test_all <BR> * <BR> ERROR at line 4: <BR> ORA-00928: missing SELECT keyword <br /> rn <br /><BR> ADMIN @ orcl&gt; ed <BR> Wrote file afiedt.buf <br /> rn <br /> 1 insert all <BR> 2 into inser_test values ( &#39;number&#39;, b) <BR> 3 into inser_test values (a, 888) <BR> 4 * select a, b from inser_test_all <BR> ADMIN @ orcl&gt; / <br /> rn <br /> 20 rows created. <br /> rn <br /> ADMIN @ orcl&gt; select * from inser_test; <br /> rn <br /> AB <BR> -------------------- ---------- <BR> number 1 <BR> number 2 <BR> number 3 <BR> number 4 <BR> number 5 <BR> number 6 <BR> number 7 <BR> number 8 <BR> number 9 <BR> number 10 <BR> a1 888 <br /> rn <br /> AB <BR> -------------------- ---------- <BR> a2 888 <BR> a3 888 <BR> a4 888 <BR> a5 888 <BR> a6 888 <BR> a7 888 <BR> a8 888 <BR> a9 888 <BR> a10 888 <br /> rn <br /> 20 rows selected. <br /> rn <br /> ADMIN @ orcl&gt; <BR><br /> rn <br /> In fact, there can also be inserted into a different form, respectively. There is no insert all conditions <br /> rn <br /> Look at the following conditional insert all <br /> rn <br /><br /> rn <br /> &gt; ed <BR> Wrote file afiedt.buf <br /> rn <br /> 1 insert all <BR> 2 when b&gt; = 1 and b &lt;= 5 then into inser_test_when1 values (a) <BR> 3 when b&gt; = 6 and b &lt;= 10 then into inser_test_when2 values (b) <BR> 4 * select a, b from inser_test_all <BR> ADMIN @ orcl&gt; / <br /> rn <br /> 10 rows created. <br /> rn <br /><BR> ADMIN @ orcl&gt; select * from inser_test_when1; <br /> rn <br /> A <BR> -------------------- <BR> a1 <BR> a2 <BR> a3 <BR> a4 <BR> a5 <br /> rn <br /><BR> ADMIN @ orcl&gt; select * from inser_test_when2; <br /> rn <br /> B <BR> ---------- <BR> 6 <BR> 7 <BR> 8 <BR> 9 <BR> 10 <br /> rn <br /><BR><br /> rn <br /><br /> rn <br /><BR>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle-deadlock-related/" title="Oracle deadlock related">Oracle deadlock related</a> 2009-03-30 16:46:54</li>
					<li><a href="http://www.kods.netwww.kods.net/proc-will-select-the-data-on-the-two-dimensional-array/" title="ProC will select the data on the two-dimensional array">ProC will select the data on the two-dimensional array</a> 2009-03-30 11:50:27</li>
					<li><a href="http://www.kods.netwww.kods.net/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/insert-all/</wfw:commentRss>
	</item>
		<item>
		<title>oracle order of 2 commonly used</title>
		<link>http://www.kods.netwww.kods.net/oracle-order-of-2-commonly-used/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-order-of-2-commonly-used/#comments</comments>
		<pubDate>Sun, 24 May 2009 19:55:20+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[data dictionary]]></category>
<category><![CDATA[1c]]></category>
<category><![CDATA[file group]]></category>
<category><![CDATA[dcl]]></category>
<category><![CDATA[database error]]></category>
<category><![CDATA[database query]]></category>
<category><![CDATA[error code 39]]></category>
<category><![CDATA[query statistics]]></category>
<category><![CDATA[query statements]]></category>
<category><![CDATA[group statement]]></category>
<category><![CDATA[cc1]]></category>
<category><![CDATA[ocos]]></category>
<category><![CDATA[server manager]]></category>
<category><![CDATA[error codes]]></category>
<category><![CDATA[rights management]]></category>
<category><![CDATA[database management]]></category>
<category><![CDATA[2c]]></category>
<category><![CDATA[tid]]></category>
<category><![CDATA[oracle order]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-order-of-2-commonly-used/</guid>
		<description><![CDATA[5. Rights Management (DCL) statements 1.GRANT giving permission Commonly used in the collection system has the following three rights: CONNECT (basic connection), RESOURCE (Programming), DBA (database ...]]></description>
		<content:encoded><![CDATA[<font face=宋体>5. Rights Management</font> (DCL) <font face=宋体>statements</font> <br /><br /> 1.GRANT <font face=宋体>giving permission</font> <br /> <font face=宋体>Commonly used in the collection system has the following three rights:</font> <br /> CONNECT <font face=宋体>(basic connection),</font> RESOURCE <font face=宋体>(Programming),</font> DBA <font face=宋体>(database management)</font> <br /> <font face=宋体>Commonly used data objects have the following five rights:</font> <br /> ALL ON <font face=宋体>data object name,</font> SELECT ON <font face=宋体>data object name,</font> UPDATE ON <font face=宋体>data object name,</font> <br /> DELETE ON <font face=宋体>object name data,</font> INSERT ON <font face=宋体>data object name,</font> ALTER ON <font face=宋体>data object name</font> <br /><br /> GRANT CONNECT, RESOURCE TO <font face=宋体>username;</font> <br /> GRANT SELECT ON <font face=宋体>table</font> TO <font face=宋体>user name;</font> <br /> GRANT SELECT, INSERT, DELETE ON <font face=宋体>table</font> TO <font face=宋体>user name</font> 1, <font face=宋体>User Name</font> 2; <br /><br /> 2.REVOKE <font face=宋体>recovery authority</font> <br /><br /> REVOKE CONNECT, RESOURCE FROM <font face=宋体>username;</font> <br /> REVOKE SELECT ON <font face=宋体>table</font> FROM <font face=宋体>user name;</font> <br /> REVOKE SELECT, INSERT, DELETE ON <font face=宋体>table</font> FROM <font face=宋体>user name</font> 1, <font face=宋体>User Name</font> 2; <br /><br /> <font face=宋体>Query the database Error</font> No. <font face=宋体>63:</font> <br /> select orgaddr, destaddr from sm_histable0116 where error_code =&#39;63 &#39;; <br /><br /> <font face=宋体>Users query the database to open an account to submit the largest and the largest number of issued:</font> select MSISDN, TCOS, OCOS from <font face=宋体>ms_usertable;</font> <br /><br /> <font face=宋体>Query the database in the sum of a variety of error codes:</font> <br /> select error_code, count (*) from sm_histable0513 group by error_code order <br /> by error_code; <br /><br /> <font face=宋体>If the database query statements for a single type of query statistics.</font> <br /> select sum (Successcount) from tbl_MiddleMt0411 where ServiceType2 = 111 <br /> select sum (successcount), servicetype from tbl_middlemt0411 group by servicetype <br /><br /> <font face=宋体>Original <font color=#003366>Address:</font> http://www.cnoug.org/viewthread.php?tid=60293</font> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><br /> / / Create a control file to trace file command <br /> alter database backup controlfile to trace; <br /><br /> / / Add a new log file group statement <br /> connect internal as sysdba <br /> alter database <br /> add logfile group 4 <br /> ( &#39;/ db01/oracle/CC1/log_ <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C"> 1c </st1:chmetcnv> . dbf &#39;, <br /> &#39;/ db02/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C"> 2c </st1:chmetcnv> . dbf &#39;) size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="m"> 5M </st1:chmetcnv> ; <br /><br /> alter database <br /> add logfile member &#39;/ db03/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C"> 3c </st1:chmetcnv> . dbf &#39; <br /> to group 4; <br /> / / MOUNT in the Server Manager and open a database: <br /> connect internal as sysdba <br /> startup mount ORA1 exclusive; <br /> alter database open; <br /><br /> / / Generate data dictionary <br /> @ catalog <br /> @ catproc <br /><br /> / / In the init.ora of the location of backup database <br /> log_archive_dest_1 = &#39;/ db00/arch&#39; <br /> log_archive_dest_state_1 = enable <br /> log_archive_dest_2 = &quot;service = stby.world mandatory reopen = 60&quot; <br /> log_archive_dest_state_2 = enable <br /> / / The table to the user of the designation and management of space-related statements <br /> create user USERNAME identified by PASSWORD <br /> default tablespace TABLESPACE_NAME; <br /> alter user USERNAME default tablespace TABLESPACE_NAME; <br /> alter user SYSTEM quota 0 on SYSTEM; <br /> alter user SYSTEM quota <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv> on TOOLS; <br /> create user USERNAME identified by PASSWORD <br /> default tablespace DATA <br /> temporary tablespace TEMP; <br /> alter user USERNAME temporary tablespace TEMP; <br /><br /> / / Re-designation of a data file size: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv> ; <br /><br /> / / Create an automatic extension of data files: <br /> create tablespace DATA<br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv><br /> autoextend ON <br /> next <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="m"> 10M </st1:chmetcnv><br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="250" unitname="m"> 250M </st1:chmetcnv> ; <br /><br /> / / In the table space automatically extended for an additional data file: <br /> alter tablespace DATA <br /> add datafile &#39;/ db05/oracle/CC1/data02.dbf&#39; <br /> size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv><br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / Modify parameters: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / In the data files during the rename: <br /> alter database rename file <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter tablespace DATA rename datafile <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter database rename file <br /> &#39;/ db05/oracle/CC1/redo01CC1.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/redo01CC1.dbf&#39;; <br /><br /> alter database datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="80" unitname="m"> 80M </st1:chmetcnv> ; <br /><br /> / / Create and use the role: <br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> grant APPLICATION_USER to username; <br /><br /> / / Rollback segment management <br /> create rollback segment SEGMENT_NAME <br /> tablespace RBS; <br /><br /> alter rollback segment SEGMENT_NAME offline; <br /><br /> drop rollback segment SEGMENT_NAME; <br /><br /> alter rollback segment SEGMENT_NAME online; <br /> / / Rollback segment on the specified services <br /> commit; <br /> set transaction use rollback segment ROLL_BATCH; <br /> insert into TABLE_NAME <br /> select * from DATA_LOAD_TABLE; <br /> commit; <br /><br /> / / Query the size of rollback segment and optimize the parameters <br /> select * from DBA_SEGMENTS <br /> where Segment_Type = &#39;ROLLBACK&#39;; <br /> select N. Name, / * rollback segment name * / <br /> S. OptSize / * rollback segment OPTIMAL size * / <br /> from V $ ROLLNAME N, V $ ROLLSTAT S <br /> where N. USN = S. USN; <br /><br /> / / Recovery rollback segment <br /> alter rollback segment R1 shrink to <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="15" unitname="m"> 15M </st1:chmetcnv> ; <br /> alter rollback segment R1 shrink; <br /><br /> / / Example <br /> set transaction use rollback segment SEGMENT_NAME <br /><br /> alter tablespace RBS <br /> default storage <br /> (initial 125K next 125K minextents 18 maxextents 249) <br /><br /> create rollback segment R4 tablespace RBS <br /> storage (optimal 2250K); <br /> alter rollback segment R4 online; <br /><br /> select Sessions_Highwater from V $ LICENSE; <br /> grant select on EMPLOYEE to PUBLIC; <br /><br /> / / Users and the role of <br /> create role ACCOUNT_CREATOR; <br /> grant CREATE SESSION, CREATE USER, ALTER USER <br /> to ACCOUNT_CREATOR; <br /><br /> alter user THUMPER default role NONE; <br /> alter user THUMPER default role CONNECT; <br /> alter user THUMPER default role all except ACCOUNT_CREATOR; <br /><br /> alter profile DEFAULT <br /> limit idle_time 60; <br /><br /> create profile LIMITED_PROFILE limit <br /> FAILED_LOGIN_ATTEMPTS 5; <br /> create user JANE identified by EYRE <br /> profile LIMITED_PROFILE; <br /> grant CREATE SESSION to JANE; <br /><br /> alter user JANE account unlock; <br /> alter user JANE account lock; <br /><br /> alter profile LIMITED_PROFILE limit <br /> PASSWORD_LIFE_TIME 30; <br /><br /> alter user jane password expire; <br /><br /> / / Create the operating system user <br /> REM Creating OPS $ accounts <br /> create user OPS $ FARMER <br /> identified by SOME_PASSWORD <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> REM Using identified externally <br /> create user OPS $ FARMER <br /> identified externally <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> / / Implementation of ORAPWD <br /> ORAPWD FILE = filename PASSWORD = password ENTRIES = max_users <br /><br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> create role DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.EMPLOYEE to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.TIME_CARDS to DATA_ENTRY_CLERK;<br /> grant select, insert on THUMPER.DEPARTMENT to DATA_ENTRY_CLERK; <br /> grant APPLICATION_USER to DATA_ENTRY_CLERK; <br /> grant DATA_ENTRY_CLERK to MCGREGOR; <br /> grant DATA_ENTRY_CLERK to BPOTTER with admin option; <br /><br /> / / Set role <br /> set role DATA_ENTRY_CLERK; <br /> set role NONE; <br /><br /> / / Recovery of the right to: <br /> revoke delete on EMPLOYEE from PETER; <br /> revoke all on EMPLOYEE from MCGREGOR; <br /><br /> / / Recovery of the role: <br /> revoke ACCOUNT_CREATOR from HELPDESK; <br /><br /> drop user USERNAME cascade; <br /><br /> grant SELECT on EMPLOYEE to MCGREGOR with grant option; <br /> grant SELECT on THUMPER.EMPLOYEE to BPOTTER with grant option; <br /> revoke SELECT on EMPLOYEE from MCGREGOR; <br /><br /> create user MCGREGOR identified by VALUES &#39; <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="a"> 1A </st1:chmetcnv> 2DD3CCEE354DFA &#39;; <br /><br /> alter user OPS $ FARMER identified by VALUES &#39;no way&#39;; <br /><br /> / / Backup and recovery procedures for the use of export <br /> exp system / manager file = expdat.dmp compress = Y owner = (HR, THUMPER) <br /> exp system / manager file = hr.dmp owner = HR indexes = Y compress = Y <br /> imp system / manager file = hr.dmp full = Y buffer = 64000 commit = Y <br /><br /> / / Back-up table <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES) <br /> / / Backup partition <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES: Part1) <br /><br /> / / Input example <br /> imp system / manager file = expdat.dmp <br /> imp system / manager file = expdat.dmp buffer = 64000 commit = Y <br /><br /> exp system / manager file = thumper.dat owner = thumper grants = N <br /> indexes = Y compress = Y rows = Y <br /> imp system / manager file = thumper.dat FROMUSER = thumper TOUSER = flower <br /> rows = Y indexes = Y <br /> imp system / manager file = expdat.dmp full = Y commit = Y buffer = 64000 <br /> imp system / manager file = expdat.dmp ignore = N rows = N commit = Y buffer = 64000 <br /><br /> / / Use the operating system backup command <br /> REM TAR examples <br /> tar-cvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 <br /> tar-rvf / dev/rmt/0hc / orasw/app/oracle/CC1/pfile/initcc1.ora <br /> tar-rvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 / orasw/app/oracle/CC1/pfile/initcc1.ora <br /><br /> / / Offline backup shell script <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOF1 <br /> connect internal as sysdba <br /> shutdown immediate; <br /> exit <br /> EOF1 <br /> insert backup commands like the &quot;tar&quot; commands here <br /> svrmgrl &lt;&lt;EOF2 <br /> connect internal as sysdba <br /> startup <br /> EOF2 <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database archivelog; <br /> archive log start; <br /> alter database open; <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database noarchivelog; <br /> alter database open; <br /><br /> select Name, <br /> Value <br /> from V $ PARAMETER <br /> where Name like &#39;log_archive%&#39;; <br /><br /> / / Online backup script <br /> # <br /> # Sample Hot Backup Script for a UNIX File System database <br /> # <br /> # Set up environment variables: <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> REM <br /> SYSTEM tablespace backup REM <br /> REM <br /> alter tablespace SYSTEM begin backup; <br /> ! tar-cvf / dev/rmt/0hc / db01/oracle/CC1/sys01.dbf <br /> alter tablespace SYSTEM end backup; <br /> REM <br /> REM The SYSTEM tablespace has now been written to a <br /> REM tar saveset on the tape device / dev/rmt/0hc. The <br /> REM rest of the tars must use the &quot;-rvf&quot; clause to append <br /> REM to that saveset. <br /> REM <br /> RBS tablespace backup REM <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db02/oracle/CC1/rbs01.dbf <br /> alter tablespace RBS end backup; <br /> REM <br /> DATA tablespace backup REM <br /> REM For the purposes of this example, this tablespace <br /> REM will contain two files, data01.dbf and data02.dbf. <br /> REM The * wildcard will be used in the filename. <br /> REM <br /> alter tablespace DATA begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db03/oracle/CC1/data0 *. dbf <br /> alter tablespace DATA end backup; <br /> REM <br /> INDEXES tablespace backup REM <br /> REM <br /> alter tablespace INDEXES begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db04/oracle/CC1/indexes01.dbf <br /> alter tablespace INDEXES end backup; <br /> REM <br /> TEMP tablespace backup REM <br /> REM <br /> alter tablespace TEMP begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db05/oracle/CC1/temp01.dbf <br /> alter tablespace TEMP end backup; <br /> REM <br /> REM Follow the same pattern to back up the rest <br /> REM of the tablespaces. <br /> REM <br /> REM <br /> REM Step 2. Backup archive log files. <br /> archive log stop <br /> REM<br /> REM Exit Server Manager, using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Record which files are in the destination directory. <br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Now go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Now back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # You may choose to compress them instead. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> rm-f $ FILES <br /> # <br /> # Step 3. Backup control file to disk. <br /> # <br /> svrmgrl &lt;&lt;EOFarch3 <br /> connect internal <br /> alter database backup controlfile to <br /> &#39;db01/oracle/CC1/CC1controlfile.bck&#39;; <br /> exit <br /> EOFarch3 <br /> # <br /> # Backup control file to tape. <br /> # <br /> tar-rvf / dev/rmt/0hc / db01/oracle/CC1/CC1controlfile.bck <br /> # <br /> # End of hot backup script. <br /> / / Automatically generated script to start the backup <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;begin backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_begin.sql <br /> / <br /> spool off <br /><br /> / / Automatically generated script to back up the end of <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;end backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_end.sql <br /> / <br /> spool off <br /><br /> / / Backup script log file archiving. <br /> REM See text for alternatives. <br /> # Step 1: Stop the archiving process. This will keep <br /> # Additional archived redo log files from being written <br /> # To the destination directory during this process. <br /> # <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> archive log stop; <br /> REM <br /> REM Exit Server Manager using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Step 2: Record which files are in the destination <br /> # Directory. <o:p></o:p><br /><br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Step 3: Go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Step 4. Back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> # <br /> # Step 5. Delete those files from the destination directory. <br /> # <br /> rm-f $ FILES <br /> # <br /> # End of archived redo log file backup script. <br /><br /> REM disk-to-disk backup <br /> REM <br /> REM Back up the RBS tablespace - to another disk (UNIX) <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! cp / db02/oracle/CC1/rbs01.dbf / db10/oracle/CC1/backups <br /> alter tablespace RBS end backup; <br /> REM <br /><br /> REM mobile shell archive script log file <br /> # <br /> # Procedure for moving archived redo logs to another device <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log stop; <br /> ! mv / db01/oracle/arch/CC1 / db10/oracle/arch/CC1 <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # End of archived redo log directory move. <br /><br /> / / Generate command to create control file <br /> alter database backup controlfile to trace; <br /><br /> / / Time to resume the example of <br /> connect internal as sysdba <br /> startup mount instance_name; <br /> recover database until time &#39; <st1:chsdate w:st="on" year="1999" month="8" day="7" islunardate="False" isrocdate="False"> 1999-08-07 </st1:chsdate> : 14:40: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="’"> 00 &#39; </st1:chmetcnv> ; <br /><br /> / / Create the restoration of Contents <br /> rman rcvcat rman / rman @ &lt;database_service_name&gt; <br /><br /> / / In the (UNIX) directory to create the restoration of <br /> RMAN&gt; create catalog tablespace rcvcat; <br /><br /> / / In (NT) to create the restoration of directory<br /> RMAN&gt; create catalog tablespace &quot;RCVCAT&quot;; <br /><br /> / / Connect descriptor example <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora entry entry <o:p></o:p><br /><br /> / / Listener.ora <font face="Times New Roman">entry</font> entry <br /> LISTENER = <br /> (ADDRESS_LIST = <br /> (ADDRESS = <br /> (PROTOCOL = IPC) <br /> (KEY = loc.world) <br /> ) <br /> ) <br /> SID_LIST_LISTENER = <br /> (SID_LIST = <br /> (SID_DESC = <br /> (SID_NAME = loc) <br /> (ORACLE_HOME = / orasw / app / oracle / product / <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 8.1.5 </st1:chsdate> .1) <br /> ) <br /> ) <br /><br /> / / Tnsnames.ora <font face="Times New Roman">entry</font> <br /> LOC = <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = loc) <br /> (INSTANCE_NAME = loc) <br /> ) <br /> ) <br /><br /> / / <font face="Times New Roman">Set connection parameters (sql</font> * <font face="Times New Roman">net)</font> <br /> LOC = (DESCRIPTION = <br /> (ADDRESS = <br /> (COMMUNITY = TCP.HQ.COMPANY) <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /> / / <font face="Times New Roman">Parameter File Configuration Example</font> <br /> / / Tnsnames.ora <br /> HQ = (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora <br /> LISTENER = <br /> (ADDRESS_LIST = <br /> (ADDRESS = <br /> (PROTOCOL = IPC) <br /> (KEY = loc) <br /> ) <br /> ) <br /> SID_LIST_LISTENER = <br /> (SID_LIST = <br /> (SID_DESC = <br /> (SID_NAME = loc) <br /> (ORACLE_HOME = / orasw/app/oracle/product/8.1.5.1) <br /> ) <br /> ) <br /><br /> / / Oracle8I tnsnames.ora <br /> LOC = <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = loc) <br /> (INSTANCE_NAME = loc) <br /> ) <br /> ) <br /><br /> / / <font face="Times New Roman">Use</font> COPY <font face="Times New Roman">database replication between</font> <br /> copy from <br /> remote_username / remote_password @ service_name <br /> to <br /> username / password @ service_name <br /> [append | create | insert | replace] <br /> TABLE_NAME <br /> using subquery; <br /><br /> REM COPY example <br /> set copycommit 1 <br /> set arraysize 1000 <br /> copy from HR / PUFFINSTUFF @ loc -- <br /> create EMPLOYEE -- <br /> using -- <br /> select * from EMPLOYEE <br /><br /> / / <font face="Times New Roman">Monitor the management of</font> <br /> lsnrctl start <br /> lsnrctl start my_lsnr <br /> lsnrctl status <br /> lsnrctl status hq <br /><br /> <font face="Times New Roman">Monitor the process of inspection</font> <br /> ps-ef | grep tnslsnr <br /> / / Lsnrctl <font face="Times New Roman">stop in the Monitor</font> <br /> set password lsnr_password <br /> stop <br /><br /> / / Lsnrctl <font face="Times New Roman">set out in all the services</font> <br /> set password lsnr_password <br /> services <br /> / / <font face="Times New Roman">Start or stop the</font> listener <font face="Times New Roman">a</font> NT <br /> net start Oracle &lt;version_name&gt; TNSListener <br /> net stop Oracle &lt;version_name&gt; TNSListener <br /><br /> / / Tnsnames.ora <font face="Times New Roman">document</font> <br /> fld1 = <br /> (DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) <br /> (HOST = server1.fld.com) (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SID = fld1) <br /> ) <br /> ) <br /> / / <font face="Times New Roman">Operating system, network management</font> <br /><br /> telnet host_name <br /> ping host_name <br /> / etc / hosts <font face="Times New Roman">file</font> <br /> 130.110.238.109 nmhost <br /> 130.110.238.101 txhost <br /> 130.110.238.102 azhost arizona <br /> / / oratab <font face="Times New Roman">table entry</font> <br /> loc: / orasw/app/oracle/product/8.1.5.1: Y <br /> cc1: / orasw/app/oracle/product/8.1.5.1: N <br /> old: / orasw/app/oracle/product/8.1.5.0: Y <o:p></o:p><br /><br /><o:p></o:p><br /><br /> / / Create a control file to trace file command <br /> alter database backup controlfile to trace; <br /><br /> / / Add a new log file group statement <br /> connect internal as sysdba <br /> alter database <br /> add logfile group 4 <br /> ( &#39;/ db01/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C"> 1c </st1:chmetcnv> . dbf &#39;, <br /> &#39;/ db02/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C"> 2c </st1:chmetcnv> . dbf &#39;) size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="m"> 5M </st1:chmetcnv> ; <br /><br /> alter database<br /> add logfile member &#39;/ db03/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C"> 3c </st1:chmetcnv> . dbf &#39; <br /> to group 4; <br /> / / MOUNT in the Server Manager and open a database: <br /> connect internal as sysdba <br /> startup mount ORA1 exclusive; <br /> alter database open; <br /><br /> / / Generate data dictionary <br /> @ catalog <br /> @ catproc <br /><br /> / / In the init.ora of the location of backup database <br /> log_archive_dest_1 = &#39;/ db00/arch&#39; <br /> log_archive_dest_state_1 = enable <br /> log_archive_dest_2 = &quot;service = stby.world mandatory reopen = 60&quot; <br /> log_archive_dest_state_2 = enable <br /> / / The table to the user of the designation and management of space-related statements <br /> create user USERNAME identified by PASSWORD <br /> default tablespace TABLESPACE_NAME; <br /> alter user USERNAME default tablespace TABLESPACE_NAME; <br /> alter user SYSTEM quota 0 on SYSTEM; <br /> alter user SYSTEM quota <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv> on TOOLS; <br /> create user USERNAME identified by PASSWORD <br /> default tablespace DATA <br /> temporary tablespace TEMP; <br /> alter user USERNAME temporary tablespace TEMP; <br /><br /> / / Re-designation of a data file size: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv> ; <br /><br /> / / Create an automatic extension of data files: <br /> create tablespace DATA <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv><br /> autoextend ON <br /> next <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="m"> 10M </st1:chmetcnv><br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="250" unitname="m"> 250M </st1:chmetcnv> ; <br /><br /> / / In the table space automatically extended for an additional data file: <br /> alter tablespace DATA <br /> add datafile &#39;/ db05/oracle/CC1/data02.dbf&#39; <br /> size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv><br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / Modify parameters: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / In the data files during the rename: <br /> alter database rename file <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter tablespace DATA rename datafile <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter database rename file <br /> &#39;/ db05/oracle/CC1/redo01CC1.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/redo01CC1.dbf&#39;; <br /><br /> alter database datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="80" unitname="m"> 80M </st1:chmetcnv> ; <br /><br /> / / Create and use the role: <br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> grant APPLICATION_USER to username; <br /><br /> / / Rollback segment management <br /> create rollback segment SEGMENT_NAME <br /> tablespace RBS; <br /><br /> alter rollback segment SEGMENT_NAME offline; <br /><br /> drop rollback segment SEGMENT_NAME; <br /><br /> alter rollback segment SEGMENT_NAME online; <br /> / / Rollback segment on the specified services <br /> commit; <br /> set transaction use rollback segment ROLL_BATCH; <br /> insert into TABLE_NAME <br /> select * from DATA_LOAD_TABLE; <br /> commit; <br /><br /> / / Query the size of rollback segment and optimize the parameters <br /> select * from DBA_SEGMENTS <br /> where Segment_Type = &#39;ROLLBACK&#39;; <br /> select N. Name, / * rollback segment name * / <br /> S. OptSize / * rollback segment OPTIMAL size * / <br /> from V $ ROLLNAME N, V $ ROLLSTAT S <br /> where N. USN = S. USN; <br /><br /> / / Recovery rollback segment <br /> alter rollback segment R1 shrink to <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="15" unitname="m"> 15M </st1:chmetcnv> ; <br /> alter rollback segment R1 shrink; <br /><br /> / / Example <br /> set transaction use rollback segment SEGMENT_NAME <br /><br /> alter tablespace RBS <br /> default storage <br /> (initial 125K next 125K minextents 18 maxextents 249) <br /><br /> create rollback segment R4 tablespace RBS <br /> storage (optimal 2250K); <br /> alter rollback segment R4 online; <br /><br /> select Sessions_Highwater from V $ LICENSE; <br /> grant select on EMPLOYEE to PUBLIC; <br /><br /> / / Users and the role of <br /> create role ACCOUNT_CREATOR; <br /> grant CREATE SESSION, CREATE USER, ALTER USER <br /> to ACCOUNT_CREATOR; <br /><br /> alter user THUMPER default role NONE; <br /> alter user THUMPER default role CONNECT; <br /> alter user THUMPER default role all except ACCOUNT_CREATOR; <br /><br /> alter profile DEFAULT <br /> limit idle_time 60; <br /><br /> create profile LIMITED_PROFILE limit <br /> FAILED_LOGIN_ATTEMPTS 5; <br /> create user JANE identified by EYRE <br /> profile LIMITED_PROFILE; <br /> grant CREATE SESSION to JANE; <br /><br /> alter user JANE account unlock; <br /> alter user JANE account lock; <br /><br /> alter profile LIMITED_PROFILE limit <br /> PASSWORD_LIFE_TIME 30; <br /><br /> alter user jane password expire; <br /><br /> / / Create the operating system user <br /> REM Creating OPS $ accounts <br /> create user OPS $ FARMER <br /> identified by SOME_PASSWORD <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> REM Using identified externally <br /> create user OPS $ FARMER <br /> identified externally <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> / / Implementation of ORAPWD <br /> ORAPWD FILE = filename PASSWORD = password ENTRIES = max_users <br /><br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> create role DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.EMPLOYEE to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.TIME_CARDS to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.DEPARTMENT to DATA_ENTRY_CLERK; <br /> grant APPLICATION_USER to DATA_ENTRY_CLERK; <br /> grant DATA_ENTRY_CLERK to MCGREGOR; <br /> grant DATA_ENTRY_CLERK to BPOTTER with admin option; <br /><br /> / / Set role <br /> set role DATA_ENTRY_CLERK; <br /> set role NONE; <br /><br /> / / Recovery of the right to: <br /> revoke delete on EMPLOYEE from PETER; <br /> revoke all on EMPLOYEE from MCGREGOR; <br /><br /> / / Recovery of the role: <br /> revoke ACCOUNT_CREATOR from HELPDESK; <br /><br /> drop user USERNAME cascade; <br /><br /> grant SELECT on EMPLOYEE to MCGREGOR with grant option; <br /> grant SELECT on THUMPER.EMPLOYEE to BPOTTER with grant option; <br /> revoke SELECT on EMPLOYEE from MCGREGOR; <br /><br /> create user MCGREGOR identified by VALUES &#39; <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="a"> 1A </st1:chmetcnv> 2DD3CCEE354DFA &#39;; <br /><br /> alter user OPS $ FARMER identified by VALUES &#39;no way&#39;; <br /><br /> / / Backup and recovery procedures for the use of export <br /> exp system / manager file = expdat.dmp compress = Y owner = (HR, THUMPER) <br /> exp system / manager file = hr.dmp owner = HR indexes = Y compress = Y <br /> imp system / manager file = hr.dmp full = Y buffer = 64000 commit = Y <br /><br /> / / Back-up table <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES) <br /> / / Backup partition <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES: Part1) <br /><br /> / / Input example <br /> imp system / manager file = expdat.dmp <br /> imp system / manager file = expdat.dmp buffer = 64000 commit = Y <br /><br /> exp system / manager file = thumper.dat owner = thumper grants = N <br /> indexes = Y compress = Y rows = Y <br /> imp system / manager file = thumper.dat FROMUSER = thumper TOUSER = flower <br /> rows = Y indexes = Y <br /> imp system / manager file = expdat.dmp full = Y commit = Y buffer = 64000 <br /> imp system / manager file = expdat.dmp ignore = N rows = N commit = Y buffer = 64000 <br /><br /> / / Use the operating system backup command <br /> REM TAR examples <br /> tar-cvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 <br /> tar-rvf / dev/rmt/0hc / orasw/app/oracle/CC1/pfile/initcc1.ora <br /> tar-rvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 / orasw/app/oracle/CC1/pfile/initcc1.ora <br /><br /> / / Offline backup shell script <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOF1 <br /> connect internal as sysdba <br /> shutdown immediate; <br /> exit <br /> EOF1 <br /> insert backup commands like the &quot;tar&quot; commands here <br /> svrmgrl &lt;&lt;EOF2 <br /> connect internal as sysdba <br /> startup <br /> EOF2 <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database archivelog; <br /> archive log start; <br /> alter database open; <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database noarchivelog; <br /> alter database open; <br /><br /> select Name, <br /> Value <br /> from V $ PARAMETER <br /> where Name like &#39;log_archive%&#39;; <br /><br /> / / Online backup script <br /> # <br /> # Sample Hot Backup Script for a UNIX File System database <br /> # <br /> # Set up environment variables: <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> REM<br /> SYSTEM tablespace backup REM <br /> REM <br /> alter tablespace SYSTEM begin backup; <br /> ! tar-cvf / dev/rmt/0hc / db01/oracle/CC1/sys01.dbf <br /> alter tablespace SYSTEM end backup; <br /> REM <br /> REM The SYSTEM tablespace has now been written to a <br /> REM tar saveset on the tape device / dev/rmt/0hc. The <br /> REM rest of the tars must use the &quot;-rvf&quot; clause to append <br /> REM to that saveset. <br /> REM <br /> RBS tablespace backup REM <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db02/oracle/CC1/rbs01.dbf <br /> alter tablespace RBS end backup; <br /> REM <br /> DATA tablespace backup REM <br /> REM For the purposes of this example, this tablespace <br /> REM will contain two files, data01.dbf and data02.dbf. <br /> REM The * wildcard will be used in the filename. <br /> REM <br /> alter tablespace DATA begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db03/oracle/CC1/data0 *. dbf <br /> alter tablespace DATA end backup; <br /> REM <br /> INDEXES tablespace backup REM <br /> REM <br /> alter tablespace INDEXES begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db04/oracle/CC1/indexes01.dbf <br /> alter tablespace INDEXES end backup; <br /> REM <br /> TEMP tablespace backup REM <br /> REM <br /> alter tablespace TEMP begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db05/oracle/CC1/temp01.dbf <br /> alter tablespace TEMP end backup; <br /> REM <br /> REM Follow the same pattern to back up the rest <br /> REM of the tablespaces. <br /> REM <br /> REM <br /> REM Step 2. Backup archive log files. <br /> archive log stop <br /> REM <br /> REM Exit Server Manager, using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Record which files are in the destination directory. <br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Now go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Now back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # You may choose to compress them instead. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> rm-f $ FILES <br /> # <br /> # Step 3. Backup control file to disk. <br /> # <br /> svrmgrl &lt;&lt;EOFarch3 <br /> connect internal <br /> alter database backup controlfile to <br /> &#39;db01/oracle/CC1/CC1controlfile.bck&#39;; <br /> exit <br /> EOFarch3 <br /> # <br /> # Backup control file to tape. <br /> # <br /> tar-rvf / dev/rmt/0hc / db01/oracle/CC1/CC1controlfile.bck <br /> # <br /> # End of hot backup script. <br /> / / Automatically generated script to start the backup <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;begin backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_begin.sql <br /> / <br /> spool off <br /><br /> / / Automatically generated script to back up the end of <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;end backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_end.sql <br /> / <br /> spool off <br /><br /> / / Backup script log file archiving. <br /> REM See text for alternatives. <br /> # Step 1: Stop the archiving process. This will keep <br /> # Additional archived redo log files from being written <br /> # To the destination directory during this process. <br /> # <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> archive log stop; <br /> REM <br /> REM Exit Server Manager using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Step 2: Record which files are in the destination <br /> # Directory. <o:p></o:p><br /><br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Step 3: Go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Step 4. Back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> #<br /> # Step 5. Delete those files from the destination directory. <br /> # <br /> rm-f $ FILES <br /> # <br /> # End of archived redo log file backup script. <br /><br /> REM disk-to-disk backup <br /> REM <br /> REM Back up the RBS tablespace - to another disk (UNIX) <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! cp / db02/oracle/CC1/rbs01.dbf / db10/oracle/CC1/backups <br /> alter tablespace RBS end backup; <br /> REM <br /><br /> REM mobile shell archive script log file <br /> # <br /> # Procedure for moving archived redo logs to another device <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log stop; <br /> ! mv / db01/oracle/arch/CC1 / db10/oracle/arch/CC1 <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # End of archived redo log directory move. <br /><br /> / / Generate command to create control file <br /> alter database backup controlfile to trace; <br /><br /> / / Time to resume the example of <br /> connect internal as sysdba <br /> startup mount instance_name; <br /> recover database until time &#39; <st1:chsdate w:st="on" year="1999" month="8" day="7" islunardate="False" isrocdate="False"> 1999-08-07 </st1:chsdate> : 14:40: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="’"> 00 &#39; </st1:chmetcnv> ; <br /><br /> / / Create the restoration of Contents <br /> rman rcvcat rman / rman @ &lt;database_service_name&gt; <br /><br /> / / In the (UNIX) directory to create the restoration of <br /> RMAN&gt; create catalog tablespace rcvcat; <br /><br /> / / In (NT) to create the restoration of directory <br /> RMAN&gt; create catalog tablespace &quot;RCVCAT&quot;; <br /><br /> / / Connect descriptor example <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora entry entry <o:p></o:p><br /><br /><o:p></o:p><br /><br /><o:p></o:p><br /><br /> / / Create a control file to trace file command <br /> alter database backup controlfile to trace; <br /><br /> / / Add a new log file group statement <br /> connect internal as sysdba <br /> alter database <br /> add logfile group 4 <br /> ( &#39;/ db01/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C"> 1c </st1:chmetcnv> . dbf &#39;, <o:p></o:p><br /><br /> &#39;/ db02/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C"> 2c </st1:chmetcnv> . dbf &#39;) size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="m"> 5M </st1:chmetcnv> ; <br /><br /> alter database <br /> add logfile member &#39;/ db03/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C"> 3c </st1:chmetcnv> . dbf &#39; <br /> to group 4; <br /> / / MOUNT in the Server Manager and open a database: <br /> connect internal as sysdba <br /> startup mount ORA1 exclusive; <br /> alter database open; <br /><br /> / / Generate data dictionary <br /> @ catalog <br /> @ catproc <br /><br /> / / In the init.ora of the location of backup database <br /> log_archive_dest_1 = &#39;/ db00/arch&#39; <br /> log_archive_dest_state_1 = enable <br /> log_archive_dest_2 = &quot;service = stby.world mandatory reopen = 60&quot; <br /> log_archive_dest_state_2 = enable <br /> / / The table to the user of the designation and management of space-related statements <br /> create user USERNAME identified by PASSWORD <br /> default tablespace TABLESPACE_NAME; <br /> alter user USERNAME default tablespace TABLESPACE_NAME; <br /> alter user SYSTEM quota 0 on SYSTEM; <br /> alter user SYSTEM quota <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv> on TOOLS; <br /> create user USERNAME identified by PASSWORD <br /> default tablespace DATA <br /> temporary tablespace TEMP; <br /> alter user USERNAME temporary tablespace TEMP; <br /><br /> / / Re-designation of a data file size: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv> ; <br /><br /> / / Create an automatic extension of data files: <br /> create tablespace DATA <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv><br /> autoextend ON <br /> next <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="m"> 10M </st1:chmetcnv><br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="250" unitname="m"> 250M </st1:chmetcnv> ; <br /><br /> / / In the table space automatically extended for an additional data file: <br /> alter tablespace DATA <br /> add datafile &#39;/ db05/oracle/CC1/data02.dbf&#39;<br /> size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv><br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / Modify parameters: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / In the data files during the rename: <br /> alter database rename file <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter tablespace DATA rename datafile <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter database rename file <br /> &#39;/ db05/oracle/CC1/redo01CC1.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/redo01CC1.dbf&#39;; <br /><br /> alter database datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="80" unitname="m"> 80M </st1:chmetcnv> ; <br /> / / Create and use the role: <br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> grant APPLICATION_USER to username; <br /><br /> / / Rollback segment management <br /> create rollback segment SEGMENT_NAME <o:p></o:p><br /><br /> tablespace RBS; <br /><br /> alter rollback segment SEGMENT_NAME offline; <br /><br /> drop rollback segment SEGMENT_NAME; <br /><br /> alter rollback segment SEGMENT_NAME online; <br /> / / Rollback segment on the specified services <br /> commit; <br /> set transaction use rollback segment ROLL_BATCH; <br /> insert into TABLE_NAME <br /> select * from DATA_LOAD_TABLE; <br /> commit; <br /><br /> / / Query the size of rollback segment and optimize the parameters <br /> select * from DBA_SEGMENTS <br /> where Segment_Type = &#39;ROLLBACK&#39;; <br /> select N. Name, / * rollback segment name * / <br /> S. OptSize / * rollback segment OPTIMAL size * / <br /> from V $ ROLLNAME N, V $ ROLLSTAT S <br /> where N. USN = S. USN; <br /><br /> / / Recovery rollback segment <br /> alter rollback segment R1 shrink to <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="15" unitname="m"> 15M </st1:chmetcnv> ; <br /> alter rollback segment R1 shrink; <br /><br /> / / Example <br /> set transaction use rollback segment SEGMENT_NAME <br /><br /> alter tablespace RBS <br /> default storage <br /> (initial 125K next 125K minextents 18 maxextents 249) <br /><br /> create rollback segment R4 tablespace RBS <br /> storage (optimal 2250K); <br /> alter rollback segment R4 online; <br /><br /> select Sessions_Highwater from V $ LICENSE; <br /> grant select on EMPLOYEE to PUBLIC; <br /><br /> / / Users and the role of <br /> create role ACCOUNT_CREATOR; <br /> grant CREATE SESSION, CREATE USER, ALTER USER <br /> to ACCOUNT_CREATOR; <br /><br /> alter user THUMPER default role NONE; <br /> alter user THUMPER default role CONNECT; <br /> alter user THUMPER default role all except ACCOUNT_CREATOR; <br /><br /> alter profile DEFAULT <br /> limit idle_time 60; <br /><br /> create profile LIMITED_PROFILE limit <br /> FAILED_LOGIN_ATTEMPTS 5; <br /> create user JANE identified by EYRE <br /> profile LIMITED_PROFILE; <br /> grant CREATE SESSION to JANE; <br /><br /> alter user JANE account unlock; <br /> alter user JANE account lock; <br /><br /> alter profile LIMITED_PROFILE limit <br /> PASSWORD_LIFE_TIME 30; <br /><br /> alter user jane password expire; <br /><br /> / / Create the operating system user <br /> REM Creating OPS $ accounts <br /> create user OPS $ FARMER <br /> identified by SOME_PASSWORD <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> REM Using identified externally <o:p></o:p><br /><br /> create user OPS $ FARMER <br /> identified externally <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> / / Implementation of ORAPWD <br /> ORAPWD FILE = filename PASSWORD = password ENTRIES = max_users <br /><br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> create role DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.EMPLOYEE to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.TIME_CARDS to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.DEPARTMENT to DATA_ENTRY_CLERK; <br /> grant APPLICATION_USER to DATA_ENTRY_CLERK; <br /> grant DATA_ENTRY_CLERK to MCGREGOR; <br /> grant DATA_ENTRY_CLERK to BPOTTER with admin option; <br /><br /> / / Set role <br /> set role DATA_ENTRY_CLERK; <br /> set role NONE; <br /><br /> / / Recovery of the right to: <br /> revoke delete on EMPLOYEE from PETER; <br /> revoke all on EMPLOYEE from MCGREGOR; <br /><br /> / / Recovery of the role: <br /> revoke ACCOUNT_CREATOR from HELPDESK; <br /><br /> drop user USERNAME cascade; <br /><br /> grant SELECT on EMPLOYEE to MCGREGOR with grant option; <br /> grant SELECT on THUMPER.EMPLOYEE to BPOTTER with grant option;<br /> revoke SELECT on EMPLOYEE from MCGREGOR; <br /><br /> create user MCGREGOR identified by VALUES &#39; <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="a"> 1A </st1:chmetcnv> 2DD3CCEE354DFA &#39;; <br /><br /> alter user OPS $ FARMER identified by VALUES &#39;no way&#39;; <br /><br /> / / Backup and recovery procedures for the use of export <br /> exp system / manager file = expdat.dmp compress = Y owner = (HR, THUMPER) <br /> exp system / manager file = hr.dmp owner = HR indexes = Y compress = Y <br /> imp system / manager file = hr.dmp full = Y buffer = 64000 commit = Y <br /><br /> / / Back-up table <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES) <br /> / / Backup partition <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES: Part1) <br /><br /> / / Input example <br /> imp system / manager file = expdat.dmp <br /> imp system / manager file = expdat.dmp buffer = 64000 commit = Y <br /><br /> exp system / manager file = thumper.dat owner = thumper grants = N <br /> indexes = Y compress = Y rows = Y <br /> imp system / manager file = thumper.dat FROMUSER = thumper TOUSER = flower <br /> rows = Y indexes = Y <br /> imp system / manager file = expdat.dmp full = Y commit = Y buffer = 64000 <br /> imp system / manager file = expdat.dmp ignore = N rows = N commit = Y buffer = 64000 <br /><br /> / / Use the operating system backup command <br /> REM TAR examples <o:p></o:p><br /><br /> tar-cvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 <br /> tar-rvf / dev/rmt/0hc / orasw/app/oracle/CC1/pfile/initcc1.ora <br /> tar-rvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 / orasw/app/oracle/CC1/pfile/initcc1.ora <br /><br /> / / Offline backup shell script <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOF1 <br /> connect internal as sysdba <br /> shutdown immediate; <br /> exit <br /> EOF1 <br /> insert backup commands like the &quot;tar&quot; commands here <br /> svrmgrl &lt;&lt;EOF2 <br /> connect internal as sysdba <br /> startup <br /> EOF2 <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database archivelog; <br /> archive log start; <br /> alter database open; <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database noarchivelog; <br /> alter database open; <br /><br /> select Name, <br /> Value <br /> from V $ PARAMETER <br /> where Name like &#39;log_archive%&#39;; <br /><br /> / / Online backup script <br /> # <br /> # Sample Hot Backup Script for a UNIX File System database <br /> # <br /> # Set up environment variables: <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> REM <br /> SYSTEM tablespace backup REM <br /> REM <br /> alter tablespace SYSTEM begin backup; <br /> ! tar-cvf / dev/rmt/0hc / db01/oracle/CC1/sys01.dbf <br /> alter tablespace SYSTEM end backup; <br /> REM <br /> REM The SYSTEM tablespace has now been written to a <br /> REM tar saveset on the tape device / dev/rmt/0hc. The <br /> REM rest of the tars must use the &quot;-rvf&quot; clause to append <br /> REM to that saveset. <br /> REM <br /> RBS tablespace backup REM <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db02/oracle/CC1/rbs01.dbf <br /> alter tablespace RBS end backup; <br /> REM <br /> DATA tablespace backup REM <o:p></o:p><br /><br /> REM For the purposes of this example, this tablespace <br /> REM will contain two files, data01.dbf and data02.dbf. <br /> REM The * wildcard will be used in the filename. <o:p></o:p><br /><br /> REM <br /> alter tablespace DATA begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db03/oracle/CC1/data0 *. dbf <br /> alter tablespace DATA end backup; <br /> REM <br /> INDEXES tablespace backup REM <br /> REM <br /> alter tablespace INDEXES begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db04/oracle/CC1/indexes01.dbf <br /> alter tablespace INDEXES end backup; <br /> REM <br /> TEMP tablespace backup REM <br /> REM <br /> alter tablespace TEMP begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db05/oracle/CC1/temp01.dbf <br /> alter tablespace TEMP end backup; <br /> REM <br /> REM Follow the same pattern to back up the rest <br /> REM of the tablespaces. <br /> REM <br /> REM <br /> REM Step 2. Backup archive log files. <br /> archive log stop <br /> REM <br /> REM Exit Server Manager, using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Record which files are in the destination directory. <br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Now go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> #<br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Now back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # You may choose to compress them instead. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> rm-f $ FILES <br /> # <br /> # Step 3. Backup control file to disk. <br /> # <br /> svrmgrl &lt;&lt;EOFarch3 <br /> connect internal <br /> alter database backup controlfile to <br /> &#39;db01/oracle/CC1/CC1controlfile.bck&#39;; <o:p></o:p><br /><br /> exit <br /> EOFarch3 <br /> # <br /> # Backup control file to tape. <br /> # <br /> tar-rvf / dev/rmt/0hc / db01/oracle/CC1/CC1controlfile.bck <br /> # <br /> # End of hot backup script. <br /> / / Automatically generated script to start the backup <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;begin backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_begin.sql <br /> / <br /> spool off <br /><br /> / / Automatically generated script to back up the end of <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;end backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_end.sql <br /> / <br /> spool off <br /><br /> / / Backup script log file archiving. <br /> REM See text for alternatives. <br /> # Step 1: Stop the archiving process. This will keep <br /> # Additional archived redo log files from being written <br /> # To the destination directory during this process. <br /> # <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> archive log stop; <br /> REM <br /> REM Exit Server Manager using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Step 2: Record which files are in the destination <br /> # Directory. <br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Step 3: Go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Step 4. Back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <o:p></o:p><br /><br /> # From the destination device via the &quot;rm&quot; command. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> # <br /> # Step 5. Delete those files from the destination directory. <br /> # <br /> rm-f $ FILES <br /> # <br /> # End of archived redo log file backup script. <br /><br /> REM disk-to-disk backup <br /> REM <br /> REM Back up the RBS tablespace - to another disk (UNIX) <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! cp / db02/oracle/CC1/rbs01.dbf / db10/oracle/CC1/backups <br /> alter tablespace RBS end backup; <br /> REM <br /><br /> REM mobile shell archive script log file <br /> # <br /> # Procedure for moving archived redo logs to another device <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log stop; <br /> ! mv / db01/oracle/arch/CC1 / db10/oracle/arch/CC1 <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # End of archived redo log directory move. <br /><br /> / / Generate command to create control file <br /> alter database backup controlfile to trace; <br /><br /> / / <font color=#003366>Time</font> to resume the example of <br /> connect internal as sysdba <br /> startup mount instance_name; <br /> recover database until time &#39; <st1:chsdate w:st="on" year="1999" month="8" day="7" islunardate="False" isrocdate="False"> 1999-08-07 </st1:chsdate> : 14:40: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="’"> 00 &#39; </st1:chmetcnv> ; <br /><br /> / / Create the restoration of Contents <br /> rman rcvcat rman / rman @ &lt;database_service_name&gt; <br /><br /> / / In the (UNIX) directory to create the restoration of <br /> RMAN&gt; create catalog tablespace rcvcat; <br /><br /> / / In (NT) to create the restoration of directory <br /> RMAN&gt; create catalog tablespace &quot;RCVCAT&quot;; <br /><br /> / / Connect descriptor example <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora entry entry <br /> LISTENER = <br /> (ADDRESS_LIST = <br /> (ADDRESS = <br /> (PROTOCOL = IPC) <br /> Posted on the net school students http:// <o:p></o:p><br /><br /> (KEY = loc.world) <br /> ) <br /> ) <br /> SID_LIST_LISTENER = <br /> (SID_LIST = <br /> (SID_DESC = <o:p></o:p><br /><br /> (SID_NAME = loc) <br /> (ORACLE_HOME = / orasw / app / oracle / product / <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 8.1.5 </st1:chsdate> .1) <br /> ) <br /> ) <br /><br /> / / Tnsnames.ora entry <br /> LOC = <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = loc) <br /> (INSTANCE_NAME = loc) <br /> ) <br /> ) <br /><br /> / / Set connection parameters (sql * net) <br /> LOC = (DESCRIPTION = <br /> (ADDRESS = <br /> (COMMUNITY = TCP.HQ.COMPANY) <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /> / / Parameter File Configuration Example <br /> / / Tnsnames.ora <br /> HQ = (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora <br /> LISTENER = <br /> (ADDRESS_LIST = <br /> (ADDRESS = <br /> (PROTOCOL = IPC) <br /> (KEY = loc) <br /> ) <br /> ) <br /> SID_LIST_LISTENER = <br /> (SID_LIST = <br /> (SID_DESC = <br /> (SID_NAME = loc) <br /> (ORACLE_HOME = / orasw/app/oracle/product/8.1.5.1) <br /> ) <br /> ) <br /><br /> / / Oracle8I tnsnames.ora <br /> LOC = <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <o:p></o:p><br /><br /> (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = loc) <br /> (INSTANCE_NAME = loc) <br /> ) <br /> ) <br /><br /> / / Use COPY database replication between <br /> copy from <br /> remote_username / remote_password @ service_name <br /> to <br /> username / password @ service_name <br /> [append | create | insert | replace] <br /> TABLE_NAME <br /> using subquery; <br /><br /> REM COPY example <br /> set copycommit 1 <br /> set arraysize 1000 <br /> copy from HR / PUFFINSTUFF @ loc -- <br /> create EMPLOYEE -- <br /> using -- <br /> select * from EMPLOYEE <br /><br /> / / Monitor the management of <br /> lsnrctl start <br /> lsnrctl start my_lsnr <br /> lsnrctl status <br /> lsnrctl status hq <br /><br /> Monitor the process of inspection <br /> ps-ef | grep tnslsnr <br /> / / Lsnrctl stop in the Monitor <br /> set password lsnr_password <br /> stop <br /><br /> / / Lsnrctl set out in all the services <br /> set password lsnr_password <br /> services <br /> / / Start or stop the listener a NT <br /> net start Oracle &lt;version_name&gt; TNSListener <br /> net stop Oracle &lt;version_name&gt; TNSListener <br /><br /> / / Tnsnames.ora document <br /> fld1 = <br /> (DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) <br /> (HOST = server1.fld.com) (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SID = fld1) <br /> ) <br /> ) <br /> / / Operating system, network management <br /><br /> telnet host_name <br /> ping host_name <br /> / etc / hosts file <br /> 130.110.238.109 nmhost <br /> 130.110.238.101 txhost <br /> 130.110.238.102 azhost arizona <br /> / / oratab table entry <br /> loc: / orasw / app / oracle / product / <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 8.1.5 </st1:chsdate> .1: Y <br /> cc1: / orasw/app/oracle/product/8.1.5.1: N <br /> old: / orasw/app/oracle/product/8.1.5.0: Y <br /><o:p></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/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-order-of-2-commonly-used/</wfw:commentRss>
	</item>
		<item>
		<title>oracle commands commonly used 2</title>
		<link>http://www.kods.netwww.kods.net/oracle-commands-commonly-used-2/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-commands-commonly-used-2/#comments</comments>
		<pubDate>Sun, 24 May 2009 17:45:55+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[data dictionary]]></category>
<category><![CDATA[1c]]></category>
<category><![CDATA[file group]]></category>
<category><![CDATA[dcl]]></category>
<category><![CDATA[database error]]></category>
<category><![CDATA[database query]]></category>
<category><![CDATA[error code 39]]></category>
<category><![CDATA[query statistics]]></category>
<category><![CDATA[query statements]]></category>
<category><![CDATA[group statement]]></category>
<category><![CDATA[cc1]]></category>
<category><![CDATA[ocos]]></category>
<category><![CDATA[server manager]]></category>
<category><![CDATA[error codes]]></category>
<category><![CDATA[rights management]]></category>
<category><![CDATA[database management]]></category>
<category><![CDATA[2c]]></category>
<category><![CDATA[tid]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-commands-commonly-used-2/</guid>
		<description><![CDATA[5. Rights Management (DCL) statements 1.GRANT giving permission Commonly used in the collection system has the following three rights: CONNECT (basic connection), RESOURCE (Programming), DBA (database ...]]></description>
		<content:encoded><![CDATA[<font face=宋体>5. Rights Management</font> (DCL) <font face=宋体>statements</font> <br /><br /> 1.GRANT <font face=宋体>giving permission</font> <br /> <font face=宋体>Commonly used in the collection system has the following three rights:</font> <br /> CONNECT <font face=宋体>(basic connection),</font> RESOURCE <font face=宋体>(Programming),</font> DBA <font face=宋体>(database management)</font> <br /> <font face=宋体>Commonly used data objects have the following five rights:</font> <br /> ALL ON <font face=宋体>data object name,</font> SELECT ON <font face=宋体>data object name,</font> UPDATE ON <font face=宋体>data object name,</font> <br /> DELETE ON <font face=宋体>object name data,</font> INSERT ON <font face=宋体>data object name,</font> ALTER ON <font face=宋体>data object name</font> <br /><br /> GRANT CONNECT, RESOURCE TO <font face=宋体>username;</font> <br /> GRANT SELECT ON <font face=宋体>table</font> TO <font face=宋体>user name;</font> <br /> GRANT SELECT, INSERT, DELETE ON <font face=宋体>table</font> TO <font face=宋体>user name</font> 1, <font face=宋体>User Name</font> 2; <br /><br /> 2.REVOKE <font face=宋体>recovery authority</font> <br /><br /> REVOKE CONNECT, RESOURCE FROM <font face=宋体>username;</font> <br /> REVOKE SELECT ON <font face=宋体>table</font> FROM <font face=宋体>user name;</font> <br /> REVOKE SELECT, INSERT, DELETE ON <font face=宋体>table</font> FROM <font face=宋体>user name</font> 1, <font face=宋体>User Name</font> 2; <br /><br /> <font face=宋体>Query the database Error</font> No. <font face=宋体>63:</font> <br /> select orgaddr, destaddr from sm_histable0116 where error_code =&#39;63 &#39;; <br /><br /> <font face=宋体>Users query the database to open an account to submit the largest and the largest number of issued:</font> select MSISDN, TCOS, OCOS from <font face=宋体>ms_usertable;</font> <br /><br /> <font face=宋体>Query the database in the sum of a variety of error codes:</font> <br /> select error_code, count (*) from sm_histable0513 group by error_code order <br /> by error_code; <br /><br /> <font face=宋体>If the database query statements for a single type of query statistics.</font> <br /> select sum (Successcount) from tbl_MiddleMt0411 where ServiceType2 = 111 <br /> select sum (successcount), servicetype from tbl_middlemt0411 group by servicetype <br /><br /> <font face=宋体>Original <font color=#003366>Address:</font> http://www.cnoug.org/viewthread.php?tid=60293</font> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><br /> / / Create a control file to trace file command <br /> alter database backup controlfile to trace; <br /><br /> / / Add a new log file group statement <br /> connect internal as sysdba <br /> alter database <br /> add logfile group 4 <br /> ( &#39;/ db01/oracle/CC1/log_ <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C"> 1c </st1:chmetcnv> . dbf &#39;, <br /> &#39;/ db02/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C"> 2c </st1:chmetcnv> . dbf &#39;) size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="m"> 5M </st1:chmetcnv> ; <br /><br /> alter database <br /> add logfile member &#39;/ db03/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C"> 3c </st1:chmetcnv> . dbf &#39; <br /> to group 4; <br /> / / MOUNT in the Server Manager and open a database: <br /> connect internal as sysdba <br /> startup mount ORA1 exclusive; <br /> alter database open; <br /><br /> / / Generate data dictionary <br /> @ catalog <br /> @ catproc <br /><br /> / / In the init.ora of the location of backup database <br /> log_archive_dest_1 = &#39;/ db00/arch&#39; <br /> log_archive_dest_state_1 = enable <br /> log_archive_dest_2 = &quot;service = stby.world mandatory reopen = 60&quot; <br /> log_archive_dest_state_2 = enable <br /> / / The table to the user of the designation and management of space-related statements <br /> create user USERNAME identified by PASSWORD <br /> default tablespace TABLESPACE_NAME; <br /> alter user USERNAME default tablespace TABLESPACE_NAME; <br /> alter user SYSTEM quota 0 on SYSTEM; <br /> alter user SYSTEM quota <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv> on TOOLS; <br /> create user USERNAME identified by PASSWORD <br /> default tablespace DATA <br /> temporary tablespace TEMP; <br /> alter user USERNAME temporary tablespace TEMP; <br /><br /> / / Re-designation of a data file size: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv> ; <br /><br /> / / Create an automatic extension of data files: <br /> create tablespace DATA<br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv><br /> autoextend ON <br /> next <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="m"> 10M </st1:chmetcnv><br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="250" unitname="m"> 250M </st1:chmetcnv> ; <br /><br /> / / In the table space automatically extended for an additional data file: <br /> alter tablespace DATA <br /> add datafile &#39;/ db05/oracle/CC1/data02.dbf&#39; <br /> size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv><br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / Modify parameters: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / In the data files during the rename: <br /> alter database rename file <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter tablespace DATA rename datafile <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter database rename file <br /> &#39;/ db05/oracle/CC1/redo01CC1.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/redo01CC1.dbf&#39;; <br /><br /> alter database datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="80" unitname="m"> 80M </st1:chmetcnv> ; <br /><br /> / / Create and use the role: <br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> grant APPLICATION_USER to username; <br /><br /> / / Rollback segment management <br /> create rollback segment SEGMENT_NAME <br /> tablespace RBS; <br /><br /> alter rollback segment SEGMENT_NAME offline; <br /><br /> drop rollback segment SEGMENT_NAME; <br /><br /> alter rollback segment SEGMENT_NAME online; <br /> / / Rollback segment on the specified services <br /> commit; <br /> set transaction use rollback segment ROLL_BATCH; <br /> insert into TABLE_NAME <br /> select * from DATA_LOAD_TABLE; <br /> commit; <br /><br /> / / Query the size of rollback segment and optimize the parameters <br /> select * from DBA_SEGMENTS <br /> where Segment_Type = &#39;ROLLBACK&#39;; <br /> select N. Name, / * rollback segment name * / <br /> S. OptSize / * rollback segment OPTIMAL size * / <br /> from V $ ROLLNAME N, V $ ROLLSTAT S <br /> where N. USN = S. USN; <br /><br /> / / Recovery rollback segment <br /> alter rollback segment R1 shrink to <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="15" unitname="m"> 15M </st1:chmetcnv> ; <br /> alter rollback segment R1 shrink; <br /><br /> / / Example <br /> set transaction use rollback segment SEGMENT_NAME <br /><br /> alter tablespace RBS <br /> default storage <br /> (initial 125K next 125K minextents 18 maxextents 249) <br /><br /> create rollback segment R4 tablespace RBS <br /> storage (optimal 2250K); <br /> alter rollback segment R4 online; <br /><br /> select Sessions_Highwater from V $ LICENSE; <br /> grant select on EMPLOYEE to PUBLIC; <br /><br /> / / Users and the role of <br /> create role ACCOUNT_CREATOR; <br /> grant CREATE SESSION, CREATE USER, ALTER USER <br /> to ACCOUNT_CREATOR; <br /><br /> alter user THUMPER default role NONE; <br /> alter user THUMPER default role CONNECT; <br /> alter user THUMPER default role all except ACCOUNT_CREATOR; <br /><br /> alter profile DEFAULT <br /> limit idle_time 60; <br /><br /> create profile LIMITED_PROFILE limit <br /> FAILED_LOGIN_ATTEMPTS 5; <br /> create user JANE identified by EYRE <br /> profile LIMITED_PROFILE; <br /> grant CREATE SESSION to JANE; <br /><br /> alter user JANE account unlock; <br /> alter user JANE account lock; <br /><br /> alter profile LIMITED_PROFILE limit <br /> PASSWORD_LIFE_TIME 30; <br /><br /> alter user jane password expire; <br /><br /> / / Create the operating system user <br /> REM Creating OPS $ accounts <br /> create user OPS $ FARMER <br /> identified by SOME_PASSWORD <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> REM Using identified externally <br /> create user OPS $ FARMER <br /> identified externally <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> / / Implementation of ORAPWD <br /> ORAPWD FILE = filename PASSWORD = password ENTRIES = max_users <br /><br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> create role DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.EMPLOYEE to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.TIME_CARDS to DATA_ENTRY_CLERK;<br /> grant select, insert on THUMPER.DEPARTMENT to DATA_ENTRY_CLERK; <br /> grant APPLICATION_USER to DATA_ENTRY_CLERK; <br /> grant DATA_ENTRY_CLERK to MCGREGOR; <br /> grant DATA_ENTRY_CLERK to BPOTTER with admin option; <br /><br /> / / Set role <br /> set role DATA_ENTRY_CLERK; <br /> set role NONE; <br /><br /> / / Recovery of the right to: <br /> revoke delete on EMPLOYEE from PETER; <br /> revoke all on EMPLOYEE from MCGREGOR; <br /><br /> / / Recovery of the role: <br /> revoke ACCOUNT_CREATOR from HELPDESK; <br /><br /> drop user USERNAME cascade; <br /><br /> grant SELECT on EMPLOYEE to MCGREGOR with grant option; <br /> grant SELECT on THUMPER.EMPLOYEE to BPOTTER with grant option; <br /> revoke SELECT on EMPLOYEE from MCGREGOR; <br /><br /> create user MCGREGOR identified by VALUES &#39; <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="a"> 1A </st1:chmetcnv> 2DD3CCEE354DFA &#39;; <br /><br /> alter user OPS $ FARMER identified by VALUES &#39;no way&#39;; <br /><br /> / / Backup and recovery procedures for the use of export <br /> exp system / manager file = expdat.dmp compress = Y owner = (HR, THUMPER) <br /> exp system / manager file = hr.dmp owner = HR indexes = Y compress = Y <br /> imp system / manager file = hr.dmp full = Y buffer = 64000 commit = Y <br /><br /> / / Back-up table <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES) <br /> / / Backup partition <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES: Part1) <br /><br /> / / Input example <br /> imp system / manager file = expdat.dmp <br /> imp system / manager file = expdat.dmp buffer = 64000 commit = Y <br /><br /> exp system / manager file = thumper.dat owner = thumper grants = N <br /> indexes = Y compress = Y rows = Y <br /> imp system / manager file = thumper.dat FROMUSER = thumper TOUSER = flower <br /> rows = Y indexes = Y <br /> imp system / manager file = expdat.dmp full = Y commit = Y buffer = 64000 <br /> imp system / manager file = expdat.dmp ignore = N rows = N commit = Y buffer = 64000 <br /><br /> / / Use the operating system backup command <br /> REM TAR examples <br /> tar-cvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 <br /> tar-rvf / dev/rmt/0hc / orasw/app/oracle/CC1/pfile/initcc1.ora <br /> tar-rvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 / orasw/app/oracle/CC1/pfile/initcc1.ora <br /><br /> / / Offline backup shell script <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOF1 <br /> connect internal as sysdba <br /> shutdown immediate; <br /> exit <br /> EOF1 <br /> insert backup commands like the &quot;tar&quot; commands here <br /> svrmgrl &lt;&lt;EOF2 <br /> connect internal as sysdba <br /> startup <br /> EOF2 <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database archivelog; <br /> archive log start; <br /> alter database open; <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database noarchivelog; <br /> alter database open; <br /><br /> select Name, <br /> Value <br /> from V $ PARAMETER <br /> where Name like &#39;log_archive%&#39;; <br /><br /> / / Online backup script <br /> # <br /> # Sample Hot Backup Script for a UNIX File System database <br /> # <br /> # Set up environment variables: <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> REM <br /> SYSTEM tablespace backup REM <br /> REM <br /> alter tablespace SYSTEM begin backup; <br /> ! tar-cvf / dev/rmt/0hc / db01/oracle/CC1/sys01.dbf <br /> alter tablespace SYSTEM end backup; <br /> REM <br /> REM The SYSTEM tablespace has now been written to a <br /> REM tar saveset on the tape device / dev/rmt/0hc. The <br /> REM rest of the tars must use the &quot;-rvf&quot; clause to append <br /> REM to that saveset. <br /> REM <br /> RBS tablespace backup REM <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db02/oracle/CC1/rbs01.dbf <br /> alter tablespace RBS end backup; <br /> REM <br /> DATA tablespace backup REM <br /> REM For the purposes of this example, this tablespace <br /> REM will contain two files, data01.dbf and data02.dbf. <br /> REM The * wildcard will be used in the filename. <br /> REM <br /> alter tablespace DATA begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db03/oracle/CC1/data0 *. dbf <br /> alter tablespace DATA end backup; <br /> REM <br /> INDEXES tablespace backup REM <br /> REM <br /> alter tablespace INDEXES begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db04/oracle/CC1/indexes01.dbf <br /> alter tablespace INDEXES end backup; <br /> REM <br /> TEMP tablespace backup REM <br /> REM <br /> alter tablespace TEMP begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db05/oracle/CC1/temp01.dbf <br /> alter tablespace TEMP end backup; <br /> REM <br /> REM Follow the same pattern to back up the rest <br /> REM of the tablespaces. <br /> REM <br /> REM <br /> REM Step 2. Backup archive log files. <br /> archive log stop <br /> REM<br /> REM Exit Server Manager, using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Record which files are in the destination directory. <br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Now go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Now back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # You may choose to compress them instead. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> rm-f $ FILES <br /> # <br /> # Step 3. Backup control file to disk. <br /> # <br /> svrmgrl &lt;&lt;EOFarch3 <br /> connect internal <br /> alter database backup controlfile to <br /> &#39;db01/oracle/CC1/CC1controlfile.bck&#39;; <br /> exit <br /> EOFarch3 <br /> # <br /> # Backup control file to tape. <br /> # <br /> tar-rvf / dev/rmt/0hc / db01/oracle/CC1/CC1controlfile.bck <br /> # <br /> # End of hot backup script. <br /> / / Automatically generated script to start the backup <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;begin backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_begin.sql <br /> / <br /> spool off <br /><br /> / / Automatically generated script to back up the end of <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;end backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_end.sql <br /> / <br /> spool off <br /><br /> / / Backup script log file archiving. <br /> REM See text for alternatives. <br /> # Step 1: Stop the archiving process. This will keep <br /> # Additional archived redo log files from being written <br /> # To the destination directory during this process. <br /> # <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> archive log stop; <br /> REM <br /> REM Exit Server Manager using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Step 2: Record which files are in the destination <br /> # Directory. <o:p></o:p><br /><br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Step 3: Go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Step 4. Back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> # <br /> # Step 5. Delete those files from the destination directory. <br /> # <br /> rm-f $ FILES <br /> # <br /> # End of archived redo log file backup script. <br /><br /> REM disk-to-disk backup <br /> REM <br /> REM Back up the RBS tablespace - to another disk (UNIX) <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! cp / db02/oracle/CC1/rbs01.dbf / db10/oracle/CC1/backups <br /> alter tablespace RBS end backup; <br /> REM <br /><br /> REM mobile shell archive script log file <br /> # <br /> # Procedure for moving archived redo logs to another device <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log stop; <br /> ! mv / db01/oracle/arch/CC1 / db10/oracle/arch/CC1 <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # End of archived redo log directory move. <br /><br /> / / Generate command to create control file <br /> alter database backup controlfile to trace; <br /><br /> / / Time to resume the example of <br /> connect internal as sysdba <br /> startup mount instance_name; <br /> recover database until time &#39; <st1:chsdate w:st="on" year="1999" month="8" day="7" islunardate="False" isrocdate="False"> 1999-08-07 </st1:chsdate> : 14:40: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="’"> 00 &#39; </st1:chmetcnv> ; <br /><br /> / / Create the restoration of Contents <br /> rman rcvcat rman / rman @ &lt;database_service_name&gt; <br /><br /> / / In the (UNIX) directory to create the restoration of <br /> RMAN&gt; create catalog tablespace rcvcat; <br /><br /> / / In (NT) to create the restoration of directory<br /> RMAN&gt; create catalog tablespace &quot;RCVCAT&quot;; <br /><br /> / / Connect descriptor example <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora entry entry <o:p></o:p><br /><br /> / / Listener.ora <font face="Times New Roman">entry</font> entry <br /> LISTENER = <br /> (ADDRESS_LIST = <br /> (ADDRESS = <br /> (PROTOCOL = IPC) <br /> (KEY = loc.world) <br /> ) <br /> ) <br /> SID_LIST_LISTENER = <br /> (SID_LIST = <br /> (SID_DESC = <br /> (SID_NAME = loc) <br /> (ORACLE_HOME = / orasw / app / oracle / product / <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 8.1.5 </st1:chsdate> .1) <br /> ) <br /> ) <br /><br /> / / Tnsnames.ora <font face="Times New Roman">entry</font> <br /> LOC = <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = loc) <br /> (INSTANCE_NAME = loc) <br /> ) <br /> ) <br /><br /> / / <font face="Times New Roman">Set connection parameters (sql</font> * <font face="Times New Roman">net)</font> <br /> LOC = (DESCRIPTION = <br /> (ADDRESS = <br /> (COMMUNITY = TCP.HQ.COMPANY) <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /> / / <font face="Times New Roman">Parameter File Configuration Example</font> <br /> / / Tnsnames.ora <br /> HQ = (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora <br /> LISTENER = <br /> (ADDRESS_LIST = <br /> (ADDRESS = <br /> (PROTOCOL = IPC) <br /> (KEY = loc) <br /> ) <br /> ) <br /> SID_LIST_LISTENER = <br /> (SID_LIST = <br /> (SID_DESC = <br /> (SID_NAME = loc) <br /> (ORACLE_HOME = / orasw/app/oracle/product/8.1.5.1) <br /> ) <br /> ) <br /><br /> / / Oracle8I tnsnames.ora <br /> LOC = <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = loc) <br /> (INSTANCE_NAME = loc) <br /> ) <br /> ) <br /><br /> / / <font face="Times New Roman">Use</font> COPY <font face="Times New Roman">database replication between</font> <br /> copy from <br /> remote_username / remote_password @ service_name <br /> to <br /> username / password @ service_name <br /> [append | create | insert | replace] <br /> TABLE_NAME <br /> using subquery; <br /><br /> REM COPY example <br /> set copycommit 1 <br /> set arraysize 1000 <br /> copy from HR / PUFFINSTUFF @ loc -- <br /> create EMPLOYEE -- <br /> using -- <br /> select * from EMPLOYEE <br /><br /> / / <font face="Times New Roman">Monitor the management of</font> <br /> lsnrctl start <br /> lsnrctl start my_lsnr <br /> lsnrctl status <br /> lsnrctl status hq <br /><br /> <font face="Times New Roman">Monitor the process of inspection</font> <br /> ps-ef | grep tnslsnr <br /> / / Lsnrctl <font face="Times New Roman">stop in the Monitor</font> <br /> set password lsnr_password <br /> stop <br /><br /> / / Lsnrctl <font face="Times New Roman">set out in all the services</font> <br /> set password lsnr_password <br /> services <br /> / / <font face="Times New Roman">Start or stop the</font> listener <font face="Times New Roman">a</font> NT <br /> net start Oracle &lt;version_name&gt; TNSListener <br /> net stop Oracle &lt;version_name&gt; TNSListener <br /><br /> / / Tnsnames.ora <font face="Times New Roman">document</font> <br /> fld1 = <br /> (DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) <br /> (HOST = server1.fld.com) (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SID = fld1) <br /> ) <br /> ) <br /> / / <font face="Times New Roman">Operating system, network management</font> <br /><br /> telnet host_name <br /> ping host_name <br /> / etc / hosts <font face="Times New Roman">file</font> <br /> 130.110.238.109 nmhost <br /> 130.110.238.101 txhost <br /> 130.110.238.102 azhost arizona <br /> / / oratab <font face="Times New Roman">table entry</font> <br /> loc: / orasw/app/oracle/product/8.1.5.1: Y <br /> cc1: / orasw/app/oracle/product/8.1.5.1: N <br /> old: / orasw/app/oracle/product/8.1.5.0: Y <o:p></o:p><br /><br /><o:p></o:p><br /><br /> / / Create a control file to trace file command <br /> alter database backup controlfile to trace; <br /><br /> / / Add a new log file group statement <br /> connect internal as sysdba <br /> alter database <br /> add logfile group 4 <br /> ( &#39;/ db01/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C"> 1c </st1:chmetcnv> . dbf &#39;, <br /> &#39;/ db02/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C"> 2c </st1:chmetcnv> . dbf &#39;) size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="m"> 5M </st1:chmetcnv> ; <br /><br /> alter database<br /> add logfile member &#39;/ db03/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C"> 3c </st1:chmetcnv> . dbf &#39; <br /> to group 4; <br /> / / MOUNT in the Server Manager and open a database: <br /> connect internal as sysdba <br /> startup mount ORA1 exclusive; <br /> alter database open; <br /><br /> / / Generate data dictionary <br /> @ catalog <br /> @ catproc <br /><br /> / / In the init.ora of the location of backup database <br /> log_archive_dest_1 = &#39;/ db00/arch&#39; <br /> log_archive_dest_state_1 = enable <br /> log_archive_dest_2 = &quot;service = stby.world mandatory reopen = 60&quot; <br /> log_archive_dest_state_2 = enable <br /> / / The table to the user of the designation and management of space-related statements <br /> create user USERNAME identified by PASSWORD <br /> default tablespace TABLESPACE_NAME; <br /> alter user USERNAME default tablespace TABLESPACE_NAME; <br /> alter user SYSTEM quota 0 on SYSTEM; <br /> alter user SYSTEM quota <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv> on TOOLS; <br /> create user USERNAME identified by PASSWORD <br /> default tablespace DATA <br /> temporary tablespace TEMP; <br /> alter user USERNAME temporary tablespace TEMP; <br /><br /> / / Re-designation of a data file size: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv> ; <br /><br /> / / Create an automatic extension of data files: <br /> create tablespace DATA <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv><br /> autoextend ON <br /> next <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="m"> 10M </st1:chmetcnv><br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="250" unitname="m"> 250M </st1:chmetcnv> ; <br /><br /> / / In the table space automatically extended for an additional data file: <br /> alter tablespace DATA <br /> add datafile &#39;/ db05/oracle/CC1/data02.dbf&#39; <br /> size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv><br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / Modify parameters: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / In the data files during the rename: <br /> alter database rename file <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter tablespace DATA rename datafile <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter database rename file <br /> &#39;/ db05/oracle/CC1/redo01CC1.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/redo01CC1.dbf&#39;; <br /><br /> alter database datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="80" unitname="m"> 80M </st1:chmetcnv> ; <br /><br /> / / Create and use the role: <br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> grant APPLICATION_USER to username; <br /><br /> / / Rollback segment management <br /> create rollback segment SEGMENT_NAME <br /> tablespace RBS; <br /><br /> alter rollback segment SEGMENT_NAME offline; <br /><br /> drop rollback segment SEGMENT_NAME; <br /><br /> alter rollback segment SEGMENT_NAME online; <br /> / / Rollback segment on the specified services <br /> commit; <br /> set transaction use rollback segment ROLL_BATCH; <br /> insert into TABLE_NAME <br /> select * from DATA_LOAD_TABLE; <br /> commit; <br /><br /> / / Query the size of rollback segment and optimize the parameters <br /> select * from DBA_SEGMENTS <br /> where Segment_Type = &#39;ROLLBACK&#39;; <br /> select N. Name, / * rollback segment name * / <br /> S. OptSize / * rollback segment OPTIMAL size * / <br /> from V $ ROLLNAME N, V $ ROLLSTAT S <br /> where N. USN = S. USN; <br /><br /> / / Recovery rollback segment <br /> alter rollback segment R1 shrink to <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="15" unitname="m"> 15M </st1:chmetcnv> ; <br /> alter rollback segment R1 shrink; <br /><br /> / / Example <br /> set transaction use rollback segment SEGMENT_NAME <br /><br /> alter tablespace RBS <br /> default storage <br /> (initial 125K next 125K minextents 18 maxextents 249) <br /><br /> create rollback segment R4 tablespace RBS <br /> storage (optimal 2250K); <br /> alter rollback segment R4 online; <br /><br /> select Sessions_Highwater from V $ LICENSE; <br /> grant select on EMPLOYEE to PUBLIC; <br /><br /> / / Users and the role of <br /> create role ACCOUNT_CREATOR; <br /> grant CREATE SESSION, CREATE USER, ALTER USER <br /> to ACCOUNT_CREATOR; <br /><br /> alter user THUMPER default role NONE; <br /> alter user THUMPER default role CONNECT; <br /> alter user THUMPER default role all except ACCOUNT_CREATOR; <br /><br /> alter profile DEFAULT <br /> limit idle_time 60; <br /><br /> create profile LIMITED_PROFILE limit <br /> FAILED_LOGIN_ATTEMPTS 5; <br /> create user JANE identified by EYRE <br /> profile LIMITED_PROFILE; <br /> grant CREATE SESSION to JANE; <br /><br /> alter user JANE account unlock; <br /> alter user JANE account lock; <br /><br /> alter profile LIMITED_PROFILE limit <br /> PASSWORD_LIFE_TIME 30; <br /><br /> alter user jane password expire; <br /><br /> / / Create the operating system user <br /> REM Creating OPS $ accounts <br /> create user OPS $ FARMER <br /> identified by SOME_PASSWORD <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> REM Using identified externally <br /> create user OPS $ FARMER <br /> identified externally <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> / / Implementation of ORAPWD <br /> ORAPWD FILE = filename PASSWORD = password ENTRIES = max_users <br /><br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> create role DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.EMPLOYEE to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.TIME_CARDS to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.DEPARTMENT to DATA_ENTRY_CLERK; <br /> grant APPLICATION_USER to DATA_ENTRY_CLERK; <br /> grant DATA_ENTRY_CLERK to MCGREGOR; <br /> grant DATA_ENTRY_CLERK to BPOTTER with admin option; <br /><br /> / / Set role <br /> set role DATA_ENTRY_CLERK; <br /> set role NONE; <br /><br /> / / Recovery of the right to: <br /> revoke delete on EMPLOYEE from PETER; <br /> revoke all on EMPLOYEE from MCGREGOR; <br /><br /> / / Recovery of the role: <br /> revoke ACCOUNT_CREATOR from HELPDESK; <br /><br /> drop user USERNAME cascade; <br /><br /> grant SELECT on EMPLOYEE to MCGREGOR with grant option; <br /> grant SELECT on THUMPER.EMPLOYEE to BPOTTER with grant option; <br /> revoke SELECT on EMPLOYEE from MCGREGOR; <br /><br /> create user MCGREGOR identified by VALUES &#39; <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="a"> 1A </st1:chmetcnv> 2DD3CCEE354DFA &#39;; <br /><br /> alter user OPS $ FARMER identified by VALUES &#39;no way&#39;; <br /><br /> / / Backup and recovery procedures for the use of export <br /> exp system / manager file = expdat.dmp compress = Y owner = (HR, THUMPER) <br /> exp system / manager file = hr.dmp owner = HR indexes = Y compress = Y <br /> imp system / manager file = hr.dmp full = Y buffer = 64000 commit = Y <br /><br /> / / Back-up table <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES) <br /> / / Backup partition <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES: Part1) <br /><br /> / / Input example <br /> imp system / manager file = expdat.dmp <br /> imp system / manager file = expdat.dmp buffer = 64000 commit = Y <br /><br /> exp system / manager file = thumper.dat owner = thumper grants = N <br /> indexes = Y compress = Y rows = Y <br /> imp system / manager file = thumper.dat FROMUSER = thumper TOUSER = flower <br /> rows = Y indexes = Y <br /> imp system / manager file = expdat.dmp full = Y commit = Y buffer = 64000 <br /> imp system / manager file = expdat.dmp ignore = N rows = N commit = Y buffer = 64000 <br /><br /> / / Use the operating system backup command <br /> REM TAR examples <br /> tar-cvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 <br /> tar-rvf / dev/rmt/0hc / orasw/app/oracle/CC1/pfile/initcc1.ora <br /> tar-rvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 / orasw/app/oracle/CC1/pfile/initcc1.ora <br /><br /> / / Offline backup shell script <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOF1 <br /> connect internal as sysdba <br /> shutdown immediate; <br /> exit <br /> EOF1 <br /> insert backup commands like the &quot;tar&quot; commands here <br /> svrmgrl &lt;&lt;EOF2 <br /> connect internal as sysdba <br /> startup <br /> EOF2 <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database archivelog; <br /> archive log start; <br /> alter database open; <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database noarchivelog; <br /> alter database open; <br /><br /> select Name, <br /> Value <br /> from V $ PARAMETER <br /> where Name like &#39;log_archive%&#39;; <br /><br /> / / Online backup script <br /> # <br /> # Sample Hot Backup Script for a UNIX File System database <br /> # <br /> # Set up environment variables: <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> REM<br /> SYSTEM tablespace backup REM <br /> REM <br /> alter tablespace SYSTEM begin backup; <br /> ! tar-cvf / dev/rmt/0hc / db01/oracle/CC1/sys01.dbf <br /> alter tablespace SYSTEM end backup; <br /> REM <br /> REM The SYSTEM tablespace has now been written to a <br /> REM tar saveset on the tape device / dev/rmt/0hc. The <br /> REM rest of the tars must use the &quot;-rvf&quot; clause to append <br /> REM to that saveset. <br /> REM <br /> RBS tablespace backup REM <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db02/oracle/CC1/rbs01.dbf <br /> alter tablespace RBS end backup; <br /> REM <br /> DATA tablespace backup REM <br /> REM For the purposes of this example, this tablespace <br /> REM will contain two files, data01.dbf and data02.dbf. <br /> REM The * wildcard will be used in the filename. <br /> REM <br /> alter tablespace DATA begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db03/oracle/CC1/data0 *. dbf <br /> alter tablespace DATA end backup; <br /> REM <br /> INDEXES tablespace backup REM <br /> REM <br /> alter tablespace INDEXES begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db04/oracle/CC1/indexes01.dbf <br /> alter tablespace INDEXES end backup; <br /> REM <br /> TEMP tablespace backup REM <br /> REM <br /> alter tablespace TEMP begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db05/oracle/CC1/temp01.dbf <br /> alter tablespace TEMP end backup; <br /> REM <br /> REM Follow the same pattern to back up the rest <br /> REM of the tablespaces. <br /> REM <br /> REM <br /> REM Step 2. Backup archive log files. <br /> archive log stop <br /> REM <br /> REM Exit Server Manager, using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Record which files are in the destination directory. <br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Now go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Now back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # You may choose to compress them instead. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> rm-f $ FILES <br /> # <br /> # Step 3. Backup control file to disk. <br /> # <br /> svrmgrl &lt;&lt;EOFarch3 <br /> connect internal <br /> alter database backup controlfile to <br /> &#39;db01/oracle/CC1/CC1controlfile.bck&#39;; <br /> exit <br /> EOFarch3 <br /> # <br /> # Backup control file to tape. <br /> # <br /> tar-rvf / dev/rmt/0hc / db01/oracle/CC1/CC1controlfile.bck <br /> # <br /> # End of hot backup script. <br /> / / Automatically generated script to start the backup <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;begin backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_begin.sql <br /> / <br /> spool off <br /><br /> / / Automatically generated script to back up the end of <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;end backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_end.sql <br /> / <br /> spool off <br /><br /> / / Backup script log file archiving. <br /> REM See text for alternatives. <br /> # Step 1: Stop the archiving process. This will keep <br /> # Additional archived redo log files from being written <br /> # To the destination directory during this process. <br /> # <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> archive log stop; <br /> REM <br /> REM Exit Server Manager using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Step 2: Record which files are in the destination <br /> # Directory. <o:p></o:p><br /><br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Step 3: Go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Step 4. Back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> #<br /> # Step 5. Delete those files from the destination directory. <br /> # <br /> rm-f $ FILES <br /> # <br /> # End of archived redo log file backup script. <br /><br /> REM disk-to-disk backup <br /> REM <br /> REM Back up the RBS tablespace - to another disk (UNIX) <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! cp / db02/oracle/CC1/rbs01.dbf / db10/oracle/CC1/backups <br /> alter tablespace RBS end backup; <br /> REM <br /><br /> REM mobile shell archive script log file <br /> # <br /> # Procedure for moving archived redo logs to another device <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log stop; <br /> ! mv / db01/oracle/arch/CC1 / db10/oracle/arch/CC1 <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # End of archived redo log directory move. <br /><br /> / / Generate command to create control file <br /> alter database backup controlfile to trace; <br /><br /> / / Time to resume the example of <br /> connect internal as sysdba <br /> startup mount instance_name; <br /> recover database until time &#39; <st1:chsdate w:st="on" year="1999" month="8" day="7" islunardate="False" isrocdate="False"> 1999-08-07 </st1:chsdate> : 14:40: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="’"> 00 &#39; </st1:chmetcnv> ; <br /><br /> / / Create the restoration of Contents <br /> rman rcvcat rman / rman @ &lt;database_service_name&gt; <br /><br /> / / In the (UNIX) directory to create the restoration of <br /> RMAN&gt; create catalog tablespace rcvcat; <br /><br /> / / In (NT) to create the restoration of directory <br /> RMAN&gt; create catalog tablespace &quot;RCVCAT&quot;; <br /><br /> / / Connect descriptor example <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora entry entry <o:p></o:p><br /><br /><o:p></o:p><br /><br /><o:p></o:p><br /><br /> / / Create a control file to trace file command <br /> alter database backup controlfile to trace; <br /><br /> / / Add a new log file group statement <br /> connect internal as sysdba <br /> alter database <br /> add logfile group 4 <br /> ( &#39;/ db01/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C"> 1c </st1:chmetcnv> . dbf &#39;, <o:p></o:p><br /><br /> &#39;/ db02/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C"> 2c </st1:chmetcnv> . dbf &#39;) size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="m"> 5M </st1:chmetcnv> ; <br /><br /> alter database <br /> add logfile member &#39;/ db03/oracle/CC1/log_ <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C"> 3c </st1:chmetcnv> . dbf &#39; <br /> to group 4; <br /> / / MOUNT in the Server Manager and open a database: <br /> connect internal as sysdba <br /> startup mount ORA1 exclusive; <br /> alter database open; <br /><br /> / / Generate data dictionary <br /> @ catalog <br /> @ catproc <br /><br /> / / In the init.ora of the location of backup database <br /> log_archive_dest_1 = &#39;/ db00/arch&#39; <br /> log_archive_dest_state_1 = enable <br /> log_archive_dest_2 = &quot;service = stby.world mandatory reopen = 60&quot; <br /> log_archive_dest_state_2 = enable <br /> / / The table to the user of the designation and management of space-related statements <br /> create user USERNAME identified by PASSWORD <br /> default tablespace TABLESPACE_NAME; <br /> alter user USERNAME default tablespace TABLESPACE_NAME; <br /> alter user SYSTEM quota 0 on SYSTEM; <br /> alter user SYSTEM quota <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv> on TOOLS; <br /> create user USERNAME identified by PASSWORD <br /> default tablespace DATA <br /> temporary tablespace TEMP; <br /> alter user USERNAME temporary tablespace TEMP; <br /><br /> / / Re-designation of a data file size: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv> ; <br /><br /> / / Create an automatic extension of data files: <br /> create tablespace DATA <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="200" unitname="m"> 200M </st1:chmetcnv><br /> autoextend ON <br /> next <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="m"> 10M </st1:chmetcnv><br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="250" unitname="m"> 250M </st1:chmetcnv> ; <br /><br /> / / In the table space automatically extended for an additional data file: <br /> alter tablespace DATA <br /> add datafile &#39;/ db05/oracle/CC1/data02.dbf&#39;<br /> size <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="50" unitname="m"> 50M </st1:chmetcnv><br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / Modify parameters: <br /> alter database <br /> datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> autoextend ON <br /> maxsize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="300" unitname="m"> 300M </st1:chmetcnv> ; <br /><br /> / / In the data files during the rename: <br /> alter database rename file <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter tablespace DATA rename datafile <br /> &#39;/ db01/oracle/CC1/data01.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/data01.dbf&#39;; <br /><br /> alter database rename file <br /> &#39;/ db05/oracle/CC1/redo01CC1.dbf&#39; to <br /> &#39;/ db02/oracle/CC1/redo01CC1.dbf&#39;; <br /><br /> alter database datafile &#39;/ db05/oracle/CC1/data01.dbf&#39; <br /> resize <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="80" unitname="m"> 80M </st1:chmetcnv> ; <br /> / / Create and use the role: <br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> grant APPLICATION_USER to username; <br /><br /> / / Rollback segment management <br /> create rollback segment SEGMENT_NAME <o:p></o:p><br /><br /> tablespace RBS; <br /><br /> alter rollback segment SEGMENT_NAME offline; <br /><br /> drop rollback segment SEGMENT_NAME; <br /><br /> alter rollback segment SEGMENT_NAME online; <br /> / / Rollback segment on the specified services <br /> commit; <br /> set transaction use rollback segment ROLL_BATCH; <br /> insert into TABLE_NAME <br /> select * from DATA_LOAD_TABLE; <br /> commit; <br /><br /> / / Query the size of rollback segment and optimize the parameters <br /> select * from DBA_SEGMENTS <br /> where Segment_Type = &#39;ROLLBACK&#39;; <br /> select N. Name, / * rollback segment name * / <br /> S. OptSize / * rollback segment OPTIMAL size * / <br /> from V $ ROLLNAME N, V $ ROLLSTAT S <br /> where N. USN = S. USN; <br /><br /> / / Recovery rollback segment <br /> alter rollback segment R1 shrink to <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="15" unitname="m"> 15M </st1:chmetcnv> ; <br /> alter rollback segment R1 shrink; <br /><br /> / / Example <br /> set transaction use rollback segment SEGMENT_NAME <br /><br /> alter tablespace RBS <br /> default storage <br /> (initial 125K next 125K minextents 18 maxextents 249) <br /><br /> create rollback segment R4 tablespace RBS <br /> storage (optimal 2250K); <br /> alter rollback segment R4 online; <br /><br /> select Sessions_Highwater from V $ LICENSE; <br /> grant select on EMPLOYEE to PUBLIC; <br /><br /> / / Users and the role of <br /> create role ACCOUNT_CREATOR; <br /> grant CREATE SESSION, CREATE USER, ALTER USER <br /> to ACCOUNT_CREATOR; <br /><br /> alter user THUMPER default role NONE; <br /> alter user THUMPER default role CONNECT; <br /> alter user THUMPER default role all except ACCOUNT_CREATOR; <br /><br /> alter profile DEFAULT <br /> limit idle_time 60; <br /><br /> create profile LIMITED_PROFILE limit <br /> FAILED_LOGIN_ATTEMPTS 5; <br /> create user JANE identified by EYRE <br /> profile LIMITED_PROFILE; <br /> grant CREATE SESSION to JANE; <br /><br /> alter user JANE account unlock; <br /> alter user JANE account lock; <br /><br /> alter profile LIMITED_PROFILE limit <br /> PASSWORD_LIFE_TIME 30; <br /><br /> alter user jane password expire; <br /><br /> / / Create the operating system user <br /> REM Creating OPS $ accounts <br /> create user OPS $ FARMER <br /> identified by SOME_PASSWORD <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> REM Using identified externally <o:p></o:p><br /><br /> create user OPS $ FARMER <br /> identified externally <br /> default tablespace USERS <br /> temporary tablespace TEMP; <br /><br /> / / Implementation of ORAPWD <br /> ORAPWD FILE = filename PASSWORD = password ENTRIES = max_users <br /><br /> create role APPLICATION_USER; <br /> grant CREATE SESSION to APPLICATION_USER; <br /> create role DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.EMPLOYEE to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.TIME_CARDS to DATA_ENTRY_CLERK; <br /> grant select, insert on THUMPER.DEPARTMENT to DATA_ENTRY_CLERK; <br /> grant APPLICATION_USER to DATA_ENTRY_CLERK; <br /> grant DATA_ENTRY_CLERK to MCGREGOR; <br /> grant DATA_ENTRY_CLERK to BPOTTER with admin option; <br /><br /> / / Set role <br /> set role DATA_ENTRY_CLERK; <br /> set role NONE; <br /><br /> / / Recovery of the right to: <br /> revoke delete on EMPLOYEE from PETER; <br /> revoke all on EMPLOYEE from MCGREGOR; <br /><br /> / / Recovery of the role: <br /> revoke ACCOUNT_CREATOR from HELPDESK; <br /><br /> drop user USERNAME cascade; <br /><br /> grant SELECT on EMPLOYEE to MCGREGOR with grant option; <br /> grant SELECT on THUMPER.EMPLOYEE to BPOTTER with grant option;<br /> revoke SELECT on EMPLOYEE from MCGREGOR; <br /><br /> create user MCGREGOR identified by VALUES &#39; <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="a"> 1A </st1:chmetcnv> 2DD3CCEE354DFA &#39;; <br /><br /> alter user OPS $ FARMER identified by VALUES &#39;no way&#39;; <br /><br /> / / Backup and recovery procedures for the use of export <br /> exp system / manager file = expdat.dmp compress = Y owner = (HR, THUMPER) <br /> exp system / manager file = hr.dmp owner = HR indexes = Y compress = Y <br /> imp system / manager file = hr.dmp full = Y buffer = 64000 commit = Y <br /><br /> / / Back-up table <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES) <br /> / / Backup partition <br /> exp system / manager FILE = expdat.dmp TABLES = (Thumper.SALES: Part1) <br /><br /> / / Input example <br /> imp system / manager file = expdat.dmp <br /> imp system / manager file = expdat.dmp buffer = 64000 commit = Y <br /><br /> exp system / manager file = thumper.dat owner = thumper grants = N <br /> indexes = Y compress = Y rows = Y <br /> imp system / manager file = thumper.dat FROMUSER = thumper TOUSER = flower <br /> rows = Y indexes = Y <br /> imp system / manager file = expdat.dmp full = Y commit = Y buffer = 64000 <br /> imp system / manager file = expdat.dmp ignore = N rows = N commit = Y buffer = 64000 <br /><br /> / / Use the operating system backup command <br /> REM TAR examples <o:p></o:p><br /><br /> tar-cvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 <br /> tar-rvf / dev/rmt/0hc / orasw/app/oracle/CC1/pfile/initcc1.ora <br /> tar-rvf / dev/rmt/0hc / db0 [1-9] / oracle/CC1 / orasw/app/oracle/CC1/pfile/initcc1.ora <br /><br /> / / Offline backup shell script <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOF1 <br /> connect internal as sysdba <br /> shutdown immediate; <br /> exit <br /> EOF1 <br /> insert backup commands like the &quot;tar&quot; commands here <br /> svrmgrl &lt;&lt;EOF2 <br /> connect internal as sysdba <br /> startup <br /> EOF2 <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database archivelog; <br /> archive log start; <br /> alter database open; <br /><br /> / / Set up in Server Manager to archivelog mode: <br /> connect internal as sysdba <br /> startup mount cc1; <br /> alter database noarchivelog; <br /> alter database open; <br /><br /> select Name, <br /> Value <br /> from V $ PARAMETER <br /> where Name like &#39;log_archive%&#39;; <br /><br /> / / Online backup script <br /> # <br /> # Sample Hot Backup Script for a UNIX File System database <br /> # <br /> # Set up environment variables: <br /> ORACLE_SID = cc1; export ORACLE_SID <br /> ORAENV_ASK = NO; export ORAENV_ASK <br /> . Oraenv <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> REM <br /> SYSTEM tablespace backup REM <br /> REM <br /> alter tablespace SYSTEM begin backup; <br /> ! tar-cvf / dev/rmt/0hc / db01/oracle/CC1/sys01.dbf <br /> alter tablespace SYSTEM end backup; <br /> REM <br /> REM The SYSTEM tablespace has now been written to a <br /> REM tar saveset on the tape device / dev/rmt/0hc. The <br /> REM rest of the tars must use the &quot;-rvf&quot; clause to append <br /> REM to that saveset. <br /> REM <br /> RBS tablespace backup REM <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db02/oracle/CC1/rbs01.dbf <br /> alter tablespace RBS end backup; <br /> REM <br /> DATA tablespace backup REM <o:p></o:p><br /><br /> REM For the purposes of this example, this tablespace <br /> REM will contain two files, data01.dbf and data02.dbf. <br /> REM The * wildcard will be used in the filename. <o:p></o:p><br /><br /> REM <br /> alter tablespace DATA begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db03/oracle/CC1/data0 *. dbf <br /> alter tablespace DATA end backup; <br /> REM <br /> INDEXES tablespace backup REM <br /> REM <br /> alter tablespace INDEXES begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db04/oracle/CC1/indexes01.dbf <br /> alter tablespace INDEXES end backup; <br /> REM <br /> TEMP tablespace backup REM <br /> REM <br /> alter tablespace TEMP begin backup; <br /> ! tar-rvf / dev/rmt/0hc / db05/oracle/CC1/temp01.dbf <br /> alter tablespace TEMP end backup; <br /> REM <br /> REM Follow the same pattern to back up the rest <br /> REM of the tablespaces. <br /> REM <br /> REM <br /> REM Step 2. Backup archive log files. <br /> archive log stop <br /> REM <br /> REM Exit Server Manager, using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Record which files are in the destination directory. <br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Now go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> #<br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Now back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <br /> # From the destination device via the &quot;rm&quot; command. <br /> # You may choose to compress them instead. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> rm-f $ FILES <br /> # <br /> # Step 3. Backup control file to disk. <br /> # <br /> svrmgrl &lt;&lt;EOFarch3 <br /> connect internal <br /> alter database backup controlfile to <br /> &#39;db01/oracle/CC1/CC1controlfile.bck&#39;; <o:p></o:p><br /><br /> exit <br /> EOFarch3 <br /> # <br /> # Backup control file to tape. <br /> # <br /> tar-rvf / dev/rmt/0hc / db01/oracle/CC1/CC1controlfile.bck <br /> # <br /> # End of hot backup script. <br /> / / Automatically generated script to start the backup <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;begin backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_begin.sql <br /> / <br /> spool off <br /><br /> / / Automatically generated script to back up the end of <br /> set pagesize 0 feedback off <br /> select <br /> &#39;alter tablespace&#39; | | Tablespace_Name | | &#39;end backup;&#39; <br /> from DBA_TABLESPACES <br /> where Status &lt;&gt; &#39;INVALID&#39; <br /> spool alter_end.sql <br /> / <br /> spool off <br /><br /> / / Backup script log file archiving. <br /> REM See text for alternatives. <br /> # Step 1: Stop the archiving process. This will keep <br /> # Additional archived redo log files from being written <br /> # To the destination directory during this process. <br /> # <br /> svrmgrl &lt;&lt;EOFarch1 <br /> connect internal as sysdba <br /> archive log stop; <br /> REM <br /> REM Exit Server Manager using the indicator set earlier. <br /> exit <br /> EOFarch1 <br /> # <br /> # Step 2: Record which files are in the destination <br /> # Directory. <br /> # Do this by setting an environment variable that is <br /> # Equal to the directory listing for the destination <br /> # Directory. <br /> # For this example, the log_archive_dest is <br /> # / Db01/oracle/arch/CC1. <br /> # <br /> FILES = `ls / db01/oracle/arch/CC1/arch *. dbf`; export FILES <br /> # <br /> # Step 3: Go back into Server Manager and restart the <br /> # Archiving process. Set an indicator (called EOFarch2 <br /> # In this example). <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # Step 4. Back up the archived redo logs to the tape <br /> # Device via the &quot;tar&quot; command, then delete them <o:p></o:p><br /><br /> # From the destination device via the &quot;rm&quot; command. <br /> # <br /> tar-rvf / dev/rmt/0hc $ FILES <br /> # <br /> # Step 5. Delete those files from the destination directory. <br /> # <br /> rm-f $ FILES <br /> # <br /> # End of archived redo log file backup script. <br /><br /> REM disk-to-disk backup <br /> REM <br /> REM Back up the RBS tablespace - to another disk (UNIX) <br /> REM <br /> alter tablespace RBS begin backup; <br /> ! cp / db02/oracle/CC1/rbs01.dbf / db10/oracle/CC1/backups <br /> alter tablespace RBS end backup; <br /> REM <br /><br /> REM mobile shell archive script log file <br /> # <br /> # Procedure for moving archived redo logs to another device <br /> # <br /> svrmgrl &lt;&lt;EOFarch2 <br /> connect internal as sysdba <br /> archive log stop; <br /> ! mv / db01/oracle/arch/CC1 / db10/oracle/arch/CC1 <br /> archive log start; <br /> exit <br /> EOFarch2 <br /> # <br /> # End of archived redo log directory move. <br /><br /> / / Generate command to create control file <br /> alter database backup controlfile to trace; <br /><br /> / / <font color=#003366>Time</font> to resume the example of <br /> connect internal as sysdba <br /> startup mount instance_name; <br /> recover database until time &#39; <st1:chsdate w:st="on" year="1999" month="8" day="7" islunardate="False" isrocdate="False"> 1999-08-07 </st1:chsdate> : 14:40: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="’"> 00 &#39; </st1:chmetcnv> ; <br /><br /> / / Create the restoration of Contents <br /> rman rcvcat rman / rman @ &lt;database_service_name&gt; <br /><br /> / / In the (UNIX) directory to create the restoration of <br /> RMAN&gt; create catalog tablespace rcvcat; <br /><br /> / / In (NT) to create the restoration of directory <br /> RMAN&gt; create catalog tablespace &quot;RCVCAT&quot;; <br /><br /> / / Connect descriptor example <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora entry entry <br /> LISTENER = <br /> (ADDRESS_LIST = <br /> (ADDRESS = <br /> (PROTOCOL = IPC) <br /> Posted on the net school students http:// <o:p></o:p><br /><br /> (KEY = loc.world) <br /> ) <br /> ) <br /> SID_LIST_LISTENER = <br /> (SID_LIST = <br /> (SID_DESC = <o:p></o:p><br /><br /> (SID_NAME = loc) <br /> (ORACLE_HOME = / orasw / app / oracle / product / <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 8.1.5 </st1:chsdate> .1) <br /> ) <br /> ) <br /><br /> / / Tnsnames.ora entry <br /> LOC = <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = loc) <br /> (INSTANCE_NAME = loc) <br /> ) <br /> ) <br /><br /> / / Set connection parameters (sql * net) <br /> LOC = (DESCRIPTION = <br /> (ADDRESS = <br /> (COMMUNITY = TCP.HQ.COMPANY) <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /> / / Parameter File Configuration Example <br /> / / Tnsnames.ora <br /> HQ = (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <br /> (PORT = 1521)) <br /> (CONNECT DATA = <br /> (SID = loc))) <br /><br /> / / Listener.ora <br /> LISTENER = <br /> (ADDRESS_LIST = <br /> (ADDRESS = <br /> (PROTOCOL = IPC) <br /> (KEY = loc) <br /> ) <br /> ) <br /> SID_LIST_LISTENER = <br /> (SID_LIST = <br /> (SID_DESC = <br /> (SID_NAME = loc) <br /> (ORACLE_HOME = / orasw/app/oracle/product/8.1.5.1) <br /> ) <br /> ) <br /><br /> / / Oracle8I tnsnames.ora <br /> LOC = <br /> (DESCRIPTION = <br /> (ADDRESS = <br /> (PROTOCOL = TCP) <br /> (HOST = HQ) <o:p></o:p><br /><br /> (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = loc) <br /> (INSTANCE_NAME = loc) <br /> ) <br /> ) <br /><br /> / / Use COPY database replication between <br /> copy from <br /> remote_username / remote_password @ service_name <br /> to <br /> username / password @ service_name <br /> [append | create | insert | replace] <br /> TABLE_NAME <br /> using subquery; <br /><br /> REM COPY example <br /> set copycommit 1 <br /> set arraysize 1000 <br /> copy from HR / PUFFINSTUFF @ loc -- <br /> create EMPLOYEE -- <br /> using -- <br /> select * from EMPLOYEE <br /><br /> / / Monitor the management of <br /> lsnrctl start <br /> lsnrctl start my_lsnr <br /> lsnrctl status <br /> lsnrctl status hq <br /><br /> Monitor the process of inspection <br /> ps-ef | grep tnslsnr <br /> / / Lsnrctl stop in the Monitor <br /> set password lsnr_password <br /> stop <br /><br /> / / Lsnrctl set out in all the services <br /> set password lsnr_password <br /> services <br /> / / Start or stop the listener a NT <br /> net start Oracle &lt;version_name&gt; TNSListener <br /> net stop Oracle &lt;version_name&gt; TNSListener <br /><br /> / / Tnsnames.ora document <br /> fld1 = <br /> (DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) <br /> (HOST = server1.fld.com) (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SID = fld1) <br /> ) <br /> ) <br /> / / Operating system, network management <br /><br /> telnet host_name <br /> ping host_name <br /> / etc / hosts file <br /> 130.110.238.109 nmhost <br /> 130.110.238.101 txhost <br /> 130.110.238.102 azhost arizona <br /> / / oratab table entry <br /> loc: / orasw / app / oracle / product / <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 8.1.5 </st1:chsdate> .1: Y <br /> cc1: / orasw/app/oracle/product/8.1.5.1: N <br /> old: / orasw/app/oracle/product/8.1.5.0: Y <br /><o:p></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/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-commands-commonly-used-2/</wfw:commentRss>
	</item>
		<item>
		<title>Database Backup Program</title>
		<link>http://www.kods.netwww.kods.net/database-backup-program/</link>
		<comments>http://www.kods.netwww.kods.net/database-backup-program/#comments</comments>
		<pubDate>Sun, 24 May 2009 15:38:01+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[parameter files]]></category>
<category><![CDATA[database instance]]></category>
<category><![CDATA[media failure]]></category>
<category><![CDATA[database backup]]></category>
<category><![CDATA[backup file]]></category>
<category><![CDATA[backup data]]></category>
<category><![CDATA[complete recovery]]></category>
<category><![CDATA[dmp file]]></category>
<category><![CDATA[parallel backup]]></category>
<category><![CDATA[scripting languages]]></category>
<category><![CDATA[physical storage]]></category>
<category><![CDATA[storage methods]]></category>
<category><![CDATA[redundant data]]></category>
<category><![CDATA[project application]]></category>
<category><![CDATA[backup program]]></category>
<category><![CDATA[professional tool]]></category>
<category><![CDATA[data availability]]></category>
<category><![CDATA[material resources]]></category>
<category><![CDATA[storage devices]]></category>
<category><![CDATA[single database]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/database-backup-program/</guid>
		<description><![CDATA[A foreword As there will always be unfair to the community, people will always make mistakes, the program will always be the same BUG, the database is not a problem Could have been avoided, a good bac ...]]></description>
		<content:encoded><![CDATA[<font size=2><b><a name=_Toc227867523>A</a> foreword</b></font> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><br /><br /> As there will always be unfair to the community, people will always make mistakes, the program will always be the same <font face="Times New Roman">BUG,</font> the database is not a problem <br /><br /> Could have been avoided, a good backup is the key to the success of the project application. <br /><br /> Independent of the hard disk from the backup file saved, host and slave synchronization <font face="Times New Roman">(DATA GUARD)</font> to more than a single database instance <br /><br /> Load balancing <font face="Times New Roman">(RAC),</font> in accordance with the needs of different levels of different technologies, but its simply redundant data with human and material resources to improve data availability. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /><font face="Times New Roman">       </font> <a name=_Toc227867558><b>Strongly recommended to back up to other physical storage devices, such as another hard drive to ensure that media failure can occur smoothly resumed.</b></a> <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 /> <font size=2><b><a name=_Toc227867524>Second,</a> tools for backup and recovery profile</b></font> <o:p></o:p><br /><br /> <font size=2><font face="Times New Roman" size=2><a name=_Toc227867525>1,</a></font> commonly used <font face="Times New Roman">imp / exp</font> tools</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman" size=2> </font></o:p><br /><br /> We often use <font face="Times New Roman">imp / exp</font> tools provided by <font face="Times New Roman">Oracle</font> for the client to export the data to the <font face="Times New Roman">dmp</font> file, data transfer and storage methods, is a logical backup. <font face="Times New Roman">11gR2</font> has been abandoned in the <font face="Times New Roman">exp,</font> reservations <font face="Times New Roman">imp,</font> related to the operation of mercury by the data <font face="Times New Roman">(Data Pump)</font> of <font face="Times New Roman">impdp /</font> expdp replace. <br /><br /> Advantages as follows: <br /><br /> <font face="Times New Roman">1, <font size=2>  </font></font> Using a simple. <br /><br /> <font face="Times New Roman">2, <font size=2>  </font></font> Export you can specify a logical object (the user or the entire database or table) <br /><br /> Shortcomings as follows: <br /><br /> <font face="Times New Roman">1, <font size=2>  </font></font> Can not be fully restored <font face="Times New Roman">(Complete Recovery)</font> <br /><br /> <font face="Times New Roman">2, <font size=2>  </font></font> Can only backup data files <font face="Times New Roman">(Data File)</font> <br /><br /> <font face="Times New Roman">3, <font size=2>  </font></font> Treasury-wide pressure to export the database <br /><br /> <font face="Times New Roman">4, <font size=2>  </font></font> Larger space <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <font size=2><a name=_Toc227867526><font face="Times New Roman" size=2>2,</font></a> Recovery Manager <font face="Times New Roman">(RMAN)</font></font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman" size=2> </font></o:p><br /><br /><font face="Times New Roman">       </font> Provided by the <font face="Times New Roman">Oracle</font> professional tool for backup and recovery is physical backup. <br /><br /><font face="Times New Roman">       </font> Advantages as follows: <br /><br /> <font face="Times New Roman">1, <font size=2>  </font></font> Can be fully recovered and not fully restored <br /><br /> <font face="Times New Roman">2, <font size=2>  </font></font> Can back up all database files (control files, server parameter files, archived log files, data files) <br /><br /> <font face="Times New Roman">3, <font size=2>  </font></font> Control with powerful capabilities and scripting languages <br /><br /> <font face="Times New Roman">4, <font size=2>  </font></font> Support for online hot backup <br /><br /> <font face="Times New Roman">5, <font size=2>  </font></font> Support multi-level incremental backups <br /><br /> <font face="Times New Roman">6, <font size=2>  </font></font> Support parallel backup and restore <br /><br /> <font face="Times New Roman">7, <font size=2>  </font></font> Reduce the amount of backup data (compression, block-level backup) <br /><br /> <font face="Times New Roman">8, <font size=2>  </font></font> Documents can be backed up to disk or tape <br /><br /> <font face="Times New Roman">9, <font size=2>  </font></font> Block-level support for the restoration of online <br /><br /> <font face="Times New Roman">10,</font> may limit the rate to reduce the backup on the impact of system <br /><br /> <font face="Times New Roman">11,</font> and so on. . . <br /><br /> <font size=2><b><a name=_Toc227867527>Three</a> configuration <font face="Times New Roman">RMAN</font></b></font> <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <font face="Times New Roman"><a name=_Toc227867528>1,</a></font> configuration archiving <font face="Times New Roman">(ARCHIVELOG)</font> mode <br /><br /><font face="Times New Roman">       </font> Database load <font face="Times New Roman">(MOUNT)</font> mode to open the following archive mode <br /><br /> <font face="Times New Roman">SQL&gt; ALTER DATABASE ARCHIVELOG;</font> <br /><br /><font face="Times New Roman">       </font> Placed in the database archiving mode to prevent the redo log before being covered in the archive. <br /><br /> If in a non-filing <font face="Times New Roman">(NOARCHIVELOG)</font> mode, the database can only be restored to the last backup time, the time between the current changes will be lost data. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867529><font face="Times New Roman">2,</font></a> configure automatic backup control file <br /><br /> <font face="Times New Roman">RMAN&gt; CONFIGURE CONTROLFILE AUTOBACKUP ON;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RMAN</font> information stored in the control file <font face="Times New Roman">(non-CATALOG</font> mode), if the control file is lost without a backup if the recovery of the database will cause great difficulties <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227940637><font face="Times New Roman">3,</font></a> configuration control file record keep time <br /><br /> <font face="Times New Roman">SQL&gt; ALTER SYSTEM SET</font> CONTROL_FILE_RECORD_KEEP_TIME <font face="Times New Roman">= 45;</font> <o:p></o:p><br /><br /><font face="Times New Roman">       </font> <font face="Times New Roman">RMAN</font> backup set of information stored in the control file of time, it is necessary to retain the strategy of greater than or equal to the restoration of the window. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867532><font face="Times New Roman">4,</font></a> configuration of the restoration of the window retention policies <br /><br /> <font face="Times New Roman">RMAN&gt; CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 31 DAYS;</font> <o:p></o:p><br /><br /><font face="Times New Roman">       </font> The backup file over the date marked as <font face="Times New Roman">RMAN</font> will not (OBSOLETE): <br /><br /> <font face="Times New Roman">RMAN&gt; REPORT OBSOLETE;</font> <o:p></o:p><br /><br /> Database file over the date of the report need backup <font face="Times New Roman">RMAN:</font> <br /><br /> <font face="Times New Roman">RMAN&gt; REPORT NEED <font size=2>BACKUP;</font></font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867530><font face="Times New Roman">5,</font></a> set the default save path of the backup file <br /><br /> <font face="Times New Roman">RMAN&gt; CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT &#39;D: / BACKUP /% U&#39;</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867531><font face="Times New Roman">6,</font></a> the opening of fast incremental backups <br /><br /> In <font face="Times New Roman">9i</font> in, <font face="Times New Roman">RMAN</font> incremental backup of all data files to be scanned to find out there is a change in the data block, and then back up. <br /><br /> At <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font face="Times New Roman">10g</font> </st1:chmetcnv> , Add new features <font face="Times New Roman">---</font> a block change tracking <font face="Times New Roman">(Block Change Tracking),</font> will change the data block recorded in a follow-up paper, so that when the incremental backups to avoid a full scan on the database. <br /><br /> <font face="Times New Roman">SQL&gt; ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE &#39;D: / BACKUP / BLOCK_CHANGE_TRACKING.TRC&#39;;</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867533><font face="Times New Roman">7,</font></a> configure <font face="Times New Roman">RMAN</font> to optimize the use of <font face="Times New Roman">(OPTIMIZATION)</font> mode <br /><br /> <font face="Times New Roman">RMAN&gt; CONFIGURE BACKUP OPTIMIZATION ON;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RMAN</font> optimization model to open automatically skip the document to meet certain conditions, the experiment shows that the optimization model can improve the performance of <font face="Times New Roman">10%</font> <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867534><font face="Times New Roman">8,</font></a> configure <font face="Times New Roman">RMAN</font> to back up the use of compression set <br /><br /> <font face="Times New Roman">RMAN&gt; CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;</font> <o:p></o:p><br /><br /> At <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font face="Times New Roman">10g</font> </st1:chmetcnv> Increase in <font face="Times New Roman">RMAN ---</font> characteristics of a new backup set compression, the backup set can be reduced to <font face="Times New Roman">1 / 5</font> or <font face="Times New Roman">1 / 6,</font> the price is about <font face="Times New Roman">10%</font> increase in <font face="Times New Roman">CPU</font> consumption, you can choose to use according to the actual situation. <br /><br /> If conditions permit (multiple physical hard disk, <font face="Times New Roman">multi-CPU)</font> can also be set up in parallel with the above command to back up <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 /> <font size=2><b><a name=_Toc227867535>Four</a> multi-stage backup strategy</b></font> <o:p></o:p><br /><br /><font face="Times New Roman">       </font> Backup is a multi-level recovery in order to reduce the time required to back up every day and reduce the time required for the system and have a good recovery. However, recovery time and backup time to have a trade-off. For example, as long as the beginning of a full backup and backup of all the documents in the archives have to ensure that the database can be restored to the latest state, but generally not so in fact carried out (because the recovery will require very, very long time) , multi-level backup is to solve this problem. The following is a proposed program. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Zero-order once a month to back up <br /><br /> Each week a level incremental backups <br /><br /> Make a difference every day a backup <br /><br /> When necessary (such as less than 24 hours is necessary to archive file system is full) backup archive <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867536><font face="Times New Roman">1,</font></a> zero-level backup script <br /><br /> <font face="Times New Roman">RMAN&gt; RUN (</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV1&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV2&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV3&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">BACKUP INCREMENTAL LEVEL 0 TAG &#39;LV0&#39; FORMAT &#39;D: / ORACLE / BACKUP /% U&#39; DATABASE PLUS ARCHIVELOG DELETE ALL INPUT;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">DELETE NOPROMPT OBSOLETE;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV1;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV2;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV3;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">)</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867537><font face="Times New Roman">2,</font></a> an incremental backup script <br /><br /> <font face="Times New Roman">RMAN&gt; RUN (</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV1&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV2&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV3&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">BACKUP INCREMENTAL LEVEL 1 CUMULATIVE TAG &#39;LV</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C"> <font face="Times New Roman">1C</font> </st1:chmetcnv> <font face="Times New Roman">&#39;FORMAT&#39; D: / ORACLE / BACKUP /% U &#39;DATABASE PLUS ARCHIVELOG DELETE ALL INPUT;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV1;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV2;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV3;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">)</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867538><font face="Times New Roman">3,</font></a> a differential backup script <br /><br /> <font face="Times New Roman">RMAN&gt; RUN (</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV1&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV2&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV3&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">BACKUP INCREMENTAL LEVEL 1 TAG &#39;LV1D&#39; FORMAT &#39;D: / ORACLE / BACKUP /% U&#39; DATABASE PLUS ARCHIVELOG DELETE ALL INPUT;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV1;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV2;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV3;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">)</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867539><font face="Times New Roman">4,</font></a> archiving file backup script <br /><br /> <font face="Times New Roman">RMAN&gt; RUN (</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV1&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV2&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV3&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">BACKUP FILESPERSET 3 ARCHIVELOG ALL DELETE INPUT;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV1;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV2;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV3;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">)</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Required daily amount of data to back up only changes in the volume of the day. Done to restore the most of a month as long as the restoration of zero-order three-level backup <font face="Times New Roman">+ +6</font> months level incremental backup differential backup <font face="Times New Roman">+</font> the day of the documents in the archives. If you can not accept this kind of recovery time, it can only reduce the zero-level time interval between the backup (for example, every week can be a zero-level backup, so that when the restoration of the need to restore only the amount of data a week). The system load is extremely low or even zero level for half a year to do a backup <br /><br /> <font size=2><b><a name=_Toc227867540>Five</a> management <font face="Times New Roman">RMAN</font></b></font> <o:p></o:p><br /><br /><font face="Times New Roman">       </font> <font face="Times New Roman">RMAN</font> through the <font face="Times New Roman">REPORT, LIST, CROSSCHECK, DELETE</font> command <font face="Times New Roman">RMAN</font> can manage. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867541><font face="Times New Roman">1,</font></a> if the manually delete the backup files, the need to implement cross-examination so that <font face="Times New Roman">RMAN</font> synchronization. <br /><br /> <font face="Times New Roman">RMAN&gt;</font> CROSSCHECK <font face="Times New Roman">BACKUP;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RMAN&gt;</font> CROSSCHECK ARCHIVELOG <font face="Times New Roman">ALL;</font> <o:p></o:p><br /><br /><font face="Times New Roman">       </font> Cross-examination would have been after the <font face="Times New Roman">RMAN</font> backup files manually to delete the status is set to expire (EXPIRED). <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867542><font face="Times New Roman">2,</font></a> the report has not (OBSOLETE) and expired (EXPIRED) the backup file. <br /><br /> <font face="Times New Roman">RMAN&gt; REPORT OBSOLETE;</font> <br /><br /> <font face="Times New Roman">RMAN&gt; LIST EXPIRED BACKUP;</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867543><font face="Times New Roman">3,</font></a> do not delete (OBSOLETE) and expired (EXPIRED) the backup file. <br /><br /> <font face="Times New Roman">RMAN&gt; DELETE OBSOLETE;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RMAN&gt; DELETE EXPIRED BACKUP;</font> <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 /> <font size=2><b><a name=_Toc227867544>Six</a> recovery using <font face="Times New Roman">RMAN</font></b></font> <o:p></o:p><br /><br /> <font face="Times New Roman">RMAN</font> throughout the recovery process can be divided into restore <font face="Times New Roman">(RESTORE)</font> and recovery <font face="Times New Roman">(RECOVER),</font> their meaning is very different, one is the physical meaning of the reduction of paper and copy, a means to restore database consistency. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> The recovery of the database is rather complicated, there are many different situations, we must understand the conditions of the structure of <font face="Times New Roman">ORACLE</font> database using different methods for processing. Here we will list only the most common recovery. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> Prior to the restoration of the entire database must be in a state of the state of the database <font face="Times New Roman">(MOUNT)</font> state. <br /><br /> <font face="Times New Roman">SQL&gt; STARTUP MOUNT;</font> <o:p></o:p><br /><br /> Then run <font face="Times New Roman">RMAN</font> commands to restore and recovery. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867545><font face="Times New Roman">1,</font></a> fully restored <br /><br /> <a name=_Toc227867546><font face="Times New Roman">1.1</font></a> and restore the entire database <br /><br /> <font face="Times New Roman">RMAN&gt;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RUN (</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV1&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV2&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV3&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RESTORE DATABASE;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RECOVER DATABASE;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV1;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV2;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV3;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">)</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /><font face="Times New Roman">       </font> <a name=_Toc227867547><font face="Times New Roman">1.2</font></a> and restore the specified table space or data files <br /><br /><font face="Times New Roman">       </font> In the resumption of space before the table so that the table space in an offline state <font face="Times New Roman">(OFFLINE</font> state). <br /><br /> <font face="Times New Roman">SQL&gt; ALTER TABLESPACE TBS OFFLINE;</font> <o:p></o:p><br /><br /><font face="Times New Roman">       </font> <font face="Times New Roman">RMN</font> recovery then. <br /><br /> <font face="Times New Roman">RMAN&gt;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RUN (</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV1&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV2&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">ALLOCATE CHANNEL &#39;DEV3&#39; TYPE DISK;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RESTORE TABLESPACE TBS;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RECOVER TABLESPACE TBS;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV1;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV2;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">RELEASE CHANNEL DEV3;</font> <o:p></o:p><br /><br /> <font face="Times New Roman">)</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867548><font face="Times New Roman">2,</font></a> incomplete recovery <br /><br /><font face="Times New Roman">       </font> Incomplete recovery of more complex, broadly divided into about four categories. <br /><br /> <a name=_Toc227867549><font face="Times New Roman">1, <font size=2>  </font></font> Based on the recovery time <font face="Times New Roman">(Time-based recovery)</font></a> <br /><br /> <a name=_Toc227867550><font face="Times New Roman">2, <font size=2>  </font></font> Revocation based on the recovery <font face="Times New Roman">(Cancel-based recovery)</font></a> <br /><br /> <a name=_Toc227867551><font face="Times New Roman">3, <font size=2>  </font></font> Based on changes in the recovery <font face="Times New Roman">(Change-based recovery)</font></a> <br /><br /> <a name=_Toc227867552><font face="Times New Roman">4, <font size=2>  </font></font> Log sequence to restore <font face="Times New Roman">(Log sequence recovery)</font></a> <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867553><font face="Times New Roman">3,</font></a> block-level recovery of <br /><br /> Online on the logic of <font face="Times New Roman">RMAN</font> can damage the data recovery block without affecting the operation of the database. <br /><br /> <font face="Times New Roman">RMAN&gt;</font> BLOCKRECOVER DATAFILE <font face="Times New Roman">6 BLOCK 3;</font> <o:p></o:p><br /><br /> <font size=2><b><a name=_Toc227867554>Seven</a> quick resumption of the use of <font face="Times New Roman">FLASHBACK</font></b></font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> The following types of errors occur, they usually need to use back-up the implementation of the restoration: <br /><br /> • <font face="Times New Roman"> </font> Media failure: database files due to physical problems lead to reading and writing of the document <br /><br /> • <font face="Times New Roman"> </font> User error: the data in the database to change or be mistaken for误删除<br /><br /><font face="Times New Roman">       </font> For the use of <font face="Times New Roman">RMAN</font> media recovery, the use of user error recovery <font face="Times New Roman">FLASHBACK.</font> <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <font face="Times New Roman"><a name=_Toc227867555>1,</a> 9i</font> in <font face="Times New Roman">FLASHBACK:</font> <br /><br /> Query the database changes in the <font face="Times New Roman">SCN</font> <br /><br /> <font face="Times New Roman">SQL&gt; SELECT NAME, FIRST_CHANGE # FSCN, NEXT_CHANGE # NSCN, FIRST_TIME FROM V $ ARCHIVED_LOG;</font> <o:p></o:p><br /><br /> To obtain the current <font face="Times New Roman">SCN</font> <br /><br /> <font face="Times New Roman">SQL&gt; SELECT</font> DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER <font face="Times New Roman">FSCN FROM DUAL;</font> <o:p></o:p><br /><br /> The creation of the restoration of form, choose to return to the appropriate <font face="Times New Roman">SCN</font> <br /><br /> <font face="Times New Roman">SQL&gt; INSERT INTO</font> TB_RECOVER <font face="Times New Roman">SELECT * FROM TB AS OF SCN 1999999999;</font> <o:p></o:p><br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <a name=_Toc227867556><font face="Times New Roman">2,</font></a> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font face="Times New Roman">10g</font> </st1:chmetcnv> The <font face="Times New Roman">FLASHBACK:</font> <br /><br /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font face="Times New Roman">10g</font> </st1:chmetcnv> <font face="Times New Roman">FLASHBACK</font> to the enhanced and modified, through flashback, the user can complete it is impossible to restore many of the <br /><br /> , The current <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font face="Times New Roman">10g</font> </st1:chmetcnv> Flashback of the following characteristics; <br /><br /> <font face="Times New Roman">1, oracle falshback Database.</font> <br /><br /> Characteristics allow the <font face="Times New Roman">Flashback database</font> through <font face="Times New Roman">oracle</font> statement, the database will be rolled before a point in time or <br /><br /> <font face="Times New Roman">scn,</font> the point in time without the need for the resumption of work! <br /><br /> <font face="Times New Roman">2, oracle falshback table.</font> <br /><br /> Characteristics allow the <font face="Times New Roman">oracle</font> statement through <font face="Times New Roman">flashback table</font> to table will be rolled before a point in time or on <font face="Times New Roman">scn.</font> <br /><br /> <font face="Times New Roman">3, oracle falshback drop.</font> <br /><br /> Characteristics allow the <font face="Times New Roman">oracle</font> to <font face="Times New Roman">drop</font> off the resumption of the <font face="Times New Roman">table</font> or index. <br /><br /> <font face="Times New Roman">4, oracle falshback version query.</font> <br /><br /> The characteristics of the table can be specified in a record period of time any changes! <br /><br /> <font face="Times New Roman">5, oracle falshback transaction query</font> <br /><br /> The properties can be restricted to users in a Service-level changes on the operation to check the database for diagnosis of the problem, sub - <br /><br /> Analysis of the performance of audit services. <br /><br /><o:p><font face="Times New Roman"> </font></o:p><br /><br /> <font size=2><b><a name=_Toc227867557>Eight</a> other high availability solutions <font face="Times New Roman">(High Availability)</font> Introduction</b></font> <br /><br /> • <font face="Times New Roman">Data Guard:</font> to provide a comprehensive range of services that can be used to create, maintain, manage and monitor one or more standby databases <br /><br /> • <font face="Times New Roman">Oracle Real Application Clusters (RAC):</font> multiple instances from a single database access <br /><br /> • <font face="Times New Roman">Oracle Streams:</font> can spread and manage the data in the data stream, transaction processing and event				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/day-to-day-management-of-oracle-10g-rac/" title="Day-to-day management of Oracle 10G RAC">Day-to-day management of Oracle 10G RAC</a> 2009-04-09 06:40:04</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/oracle9i-database-manually-create-specific-steps/" title="Oracle9i database manually create specific steps">Oracle9i database manually create specific steps</a> 2009-04-02 13:49:25</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>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/database-backup-program/</wfw:commentRss>
	</item>
		<item>
		<title>Unix environment explain fully optimized for Oracle database</title>
		<link>http://www.kods.netwww.kods.net/unix-environment-explain-fully-optimized-for-oracle-database/</link>
		<comments>http://www.kods.netwww.kods.net/unix-environment-explain-fully-optimized-for-oracle-database/#comments</comments>
		<pubDate>Sun, 24 May 2009 13:33:09+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[redhat]]></category>
<category><![CDATA[hp]]></category>
<category><![CDATA[unix environment]]></category>
<category><![CDATA[operating system tools]]></category>
<category><![CDATA[hp ux]]></category>
<category><![CDATA[performance optimization]]></category>
<category><![CDATA[article focus]]></category>
<category><![CDATA[generic tool]]></category>
<category><![CDATA[disk utilization]]></category>
<category><![CDATA[fundamental points]]></category>
<category><![CDATA[cpu memory]]></category>
<category><![CDATA[light of experience]]></category>
<category><![CDATA[cpu resources]]></category>
<category><![CDATA[system resources]]></category>
<category><![CDATA[emergence]]></category>
<category><![CDATA[prosecution]]></category>
<category><![CDATA[usr]]></category>
<category><![CDATA[transition]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/unix-environment-explain-fully-optimized-for-oracle-database/</guid>
		<description><![CDATA[Unix environment explain fully optimized for Oracle database Today, the optimization has been to optimize the wait (waits) in transition, and the actual performance optimization in the emergence of th ...]]></description>
		<content:encoded><![CDATA[<strong>Unix environment explain fully optimized for Oracle database</strong> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><br /><br /> Today, the optimization has been to optimize the wait (waits) in transition, and the actual performance optimization in the emergence of the most fundamental points are concentrated in the IO, this is the most important aspects of performance, by the system waiting to be discovered in the Oracle database in less than , the operating system some of the irrational use of resources is a relatively good way, this article focus on the Unix environment. <br /><br /> First, through the operating system tools to check system status, such as CPU, memory, exchange, <font color=#16387c>disk</font> utilization, or the light of experience with the system compared to the normal state at the time of right, sometimes the system may appear to look at this may not be idle a normal state, because the CPU may be waiting for IO completion. In addition we should watch those occupied system resources (CPU, memory) process. <br /><br /> 1, the operating system how to check whether there is the issue of IO? Tool used by sar, which is a more generic tool. <br /><br /> Rp1 # sar-u 2 10 <br /><br /> That is, once every two seconds prosecution, a total of 20 times, of course, these are your decision. <br /><br /> Example return: <br /><br /> HP-UX hpn2 B.11.00 U 9000/800 <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chsdate w:st="on" year="2008" month="5" day="3" islunardate="False" isrocdate="False"> 08/05/03 </st1:chsdate><br /><br /> 18:26:32% usr% sys% wio% idle <br /><br /> Note: redhat in my view is that the results, I do not know the% system is the so-called% wio. <br /><br /> Linux <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 2.4.21 </st1:chsdate> -20.ELsmp (YY075) 05/19/2005 <br /><br /> 10:36:07 AM CPU% user% nice% system% idle <br /><br /> 10:36:09 AM all 0.00 0.00 0.13 99.87 <br /><br /> 10:36:11 AM all 0.00 0.00 0.00 100.00 <br /><br /> 10:36:13 AM all 0.25 0.00 0.25 99.49 <br /><br /> 10:36:15 AM all 0.13 0.00 0.13 99.75 <br /><br /> 10:36:17 AM all 0.00 0.00 0.00 100.00 <br /><br /> 10:36:17 AM CPU% user% nice% system% idle <br /><br /> 10:36:19 AM all 0.00 0.00 0.00 100.00 <br /><br /> 10:36:21 AM all 0.00 0.00 0.00 100.00 <br /><br /> 10:36:23 AM all 0.00 0.00 0.00 100.00 <br /><br /> 10:36:25 AM all 0.00 0.00 0.00 100.00 <o:p></o:p><br /><br /> <font face="Times New Roman">% Usr</font> which refers to the process used by the user the percentage of <font face="Times New Roman">CPU resources,% sys</font> was referring to the use of system resources, the percentage of <font face="Times New Roman">CPU resources,%</font> wio refers to the percentage of waiting for <font face="Times New Roman">io</font> to complete, which is worth a watch, <font face="Times New Roman">% idle</font> a percentage of that is idle. <font face="Times New Roman">Wio</font> out if a lot of value, such as more than <font face="Times New Roman">35%</font> on your system <font face="Times New Roman">IO</font> bottlenecks, you spend a lot of <font face="Times New Roman">CPU</font> time to wait for <font face="Times New Roman">IO</font> completion. <font face="Times New Roman">Idle</font> system <font face="Times New Roman">CPU</font> busy little note. I like this example, we can see an average of <font face="Times New Roman">11</font> note <font face="Times New Roman">wio</font> no particular problem <font face="Times New Roman">io,</font> and my <font face="Times New Roman">idle</font> value is zero, that I have the <font face="Times New Roman">CPU</font> running at full capacity. <font face="Times New Roman"><br /><br /></font> When your system is the issue of <font face="Times New Roman">IO,</font> you can solve from the following <font face="Times New Roman">aspects: <br /><br /></font> * Contact the appropriate technical support to the operating system is optimized in this regard, such as <font face="Times New Roman">hp-ux</font> in a designated volume group of the strip and so on. <font face="Times New Roman"><br /><br /></font> * <font face="Times New Roman">Oracle</font> to find the <font face="Times New Roman">SQL</font> statement unreasonable, their priority. <font face="Times New Roman"><br /><br /></font> * <font face="Times New Roman">Oracle</font> in on frequent visits to build a reasonable addition to the index table, the table Then these sub-table so as not to visit the storage space to produce hot spots, and then there is a reasonable partition of the table. <font face="Times New Roman"><br /></font><br /> when more than <font face="Times New Roman">80 percent</font> utilization, then state your memory you should adjust, and generally have the following methods. <font face="Times New Roman"><br /><br /></font> * Allocated to the memory <font face="Times New Roman">Oracle</font> will not use system memory more than the <font face="Times New Roman">1 / 2,</font> the general security in the system memory for the benefit of <font face="Times New Roman">40%. <br /><br /></font> * Increased memory for the system. <font face="Times New Roman"><br /><br /></font> * If you are a particularly large number of connections, you can use the <font face="Times New Roman">MTS</font> approach. <font face="Times New Roman"><br /><br /></font> * Playing the whole patch to prevent the memory leak. <font face="Times New Roman"><br /><br /> 3,</font> how to find the point with the Department to use resources, especially large and the implementation of <font face="Times New Roman">Oracle&#39;s session</font> of the statement. <font face="Times New Roman"><br /><br /> Hp-unix</font> can <font face="Times New Roman">glance, top,</font> <font face="Times New Roman" color=#16387c>IBM</font> <font face="Times New Roman">AIX</font> can use <font face="Times New Roman">topas,</font> also can use the <font face="Times New Roman">ps</font> command. Through these procedures we can find points of system resources, especially a large number of these processes of the process, we can find the <font face="Times New Roman">sql</font> statement which the <font face="Times New Roman">pid</font> is running <font face="Times New Roman">sql,</font> the <font face="Times New Roman">sql</font> the best in the <font face="Times New Roman">pl / sql developer, toad</font> in the implementation of <font color=#16387c>software</font> to <font face="Times New Roman">&lt;&gt;</font> in your <font face="Times New Roman">spid</font> replaced <font face="Times New Roman">spid</font> it. <font face="Times New Roman"><br /><br /> SELECT a.username, a.machine, a.program, a.sid, a.serial #, <br /><br /> a.status, c.piece, c.sql_text from v $ session a, v $ process b, <br /><br /> v $ sqltext c WHERE</font> b.spid <font face="Times New Roman">= &#39;ORCL&#39; AND</font> b.addr <font face="Times New Roman">= a.paddr AND <br /><br /> a.sql_address = c.address (+) order BY</font> c.piece <font face="Times New Roman"><br /><br /></font> We will be able to get a look at the <font face="Times New Roman">sql</font> to look at whether it plans to follow the implementation of the index, its optimization to avoid scanning the entire table in order to reduce the <font face="Times New Roman">IO</font> wait, so as to speed up the pace of implementation of sentences. <font face="Times New Roman"><br /><br /></font> Tip: <font face="Times New Roman">SQL</font> Optimization of doing, we often encounter the use of <font face="Times New Roman">In</font> the statement, then we must use to replace it <font face="Times New Roman">exists,</font> because <font face="Times New Roman">Oracle</font> is in dealing with <font face="Times New Roman">In</font> accordance with the way <font face="Times New Roman">Or</font> do, even if the use of the index will be very slow. <font face="Times New Roman"><br /><br /></font> For example: <font face="Times New Roman"><br /><br /> SELECT col1, col2, col3 FROM table</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="True" sourcevalue="1" unitname="a"> <font face="Times New Roman">1 a</font> </st1:chmetcnv> <font face="Times New Roman"><br /><br /> WHERE</font> a.col1 <font face="Times New Roman">not in (SELECT col1 FROM table2) <br /><br /></font> Can be replaced by: <font face="Times New Roman"><br /><br /> SELECT col1, col2, col3 FROM table</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="True" sourcevalue="1" unitname="a"> <font face="Times New Roman">1 a</font> </st1:chmetcnv> <font face="Times New Roman"><br /><br /> WHERE not exists <br /><br /> (SELECT &#39;x&#39; FROM table2 b <br /><br /> WHERE</font> a.col1 <font face="Times New Roman">= b.col1)</font> <o:p></o:p><br /><br /> <font face="Times New Roman">4,</font> another useful script: Find the poor performance of the previous 10 <font face="Times New Roman">sql. <br /></font><br /> <font face="Times New Roman">SELECT * FROM (select PARSING_USER_ID, EXECUTIONS, SORTS, <br /><br /> COMMAND_TYPE, DISK_READS, sql_text FROM v $</font> sqlarea <font face="Times New Roman"><br /><br /> order BY</font> disk_reads <font face="Times New Roman">DESC) where ROWNUM &lt;10; <br /><br /></font> Second, the <font face="Times New Roman">Oracle Server</font> quickly found the cause of performance problems, we can resort to the view <font face="Times New Roman">v $ session_wait</font> to see the system, such as those in any <font face="Times New Roman">session,</font> the use of the number of <font face="Times New Roman">IO.</font> The following is provided for reference I Script: <font face="Times New Roman"><br /><br /></font> Script Description: <font face="Times New Roman">io</font> accounting for a larger view of the running <font face="Times New Roman">session. <br /><br /> SELECT se.sid, se.serial #, pr.SPID, se.username, se.status, <br /><br /> se.terminal, se.program, se.MODULE,, se.sql_address, st.event, st. <br /><br /> p1text, si.physical_reads, <br /><br /> si.block_changes FROM v $ session se, v $ session_wait st, <br /><br /> v $ sess_io si, v $ process pr WHERE</font> st.sid <font face="Times New Roman">= se.sid AND st. <br /><br /> sid = si.sid AND</font> se.PADDR <font face="Times New Roman">= pr.ADDR AND se.sid&gt; 6 AND st. <br /><br /> wait_time = 0 AND</font> st.event <font face="Times New Roman">NOT LIKE &#39;% SQL%&#39; ORDER BY</font> physical_reads <font face="Times New Roman">DESC <br /><br /></font> To retrieve the results of a few notes: <font face="Times New Roman"><br /><br /> 1,</font> I was waiting for each of the <font face="Times New Roman">session</font> has been scheduled in the order of physical time, because it is related to the actual <font face="Times New Roman">IO. <br /><br /> 2,</font> you can determine whether it is reasonable to wait for the statement. <font face="Times New Roman"><br /><br /> Select</font> sql_address <font face="Times New Roman">from v $ session where sid =; <br /><br /> Select * from v $ sqltext where address =; <br /><br /></font> The implementation of the above two statements could be the language of the <font face="Times New Roman">session.</font> You to use <font face="Times New Roman">alter system kill session &#39;sid, serial #&#39;;</font> to kill the <font face="Times New Roman">session. <br /><br /> 3,</font> should watch out about this <font face="Times New Roman">event,</font> which is the key to tuning one, following the <font face="Times New Roman">event</font> to do so often in order to brief Description: <font face="Times New Roman"><br /><br /> a, buffer busy waits, free buffer waits</font> by two parameters <font face="Times New Roman">dbwr</font> logo are the adequacy of the problems associated with large <font face="Times New Roman">IO, v $ session_wait</font> when the <font face="Times New Roman">free buffer wait</font> in the entry of little or no time on <font face="Times New Roman">dbwr</font> your system to use the process of decision not to adjust; <font face="Times New Roman">free buffer wait</font> a lot of entries, feel up your system must be very slow, then state your <font face="Times New Roman">dbwr</font> have enough, and it has become a <font face="Times New Roman">wio</font> generated a database of your performance bottleneck, this solution is as follows: <font face="Times New Roman"><br /><br /> a.1</font> to increase the process of writing, at the same time to adjust the parameters <font face="Times New Roman">db_block_lru_latches. <br /><br /></font> Example: to modify or add the following two parameters <font face="Times New Roman"><br /><br /> db_writer_processes = 4 <br /><br /> db_block_lru_latches =</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="8" unitname="a"> <font face="Times New Roman">8</font> </st1:chmetcnv> <font face="Times New Roman"><br /><br /> a, 2</font> open asynchronous <font face="Times New Roman">IO,</font> <font face="Times New Roman" color=#16387c>IBM</font> is much simpler in this respect, hp is some trouble, you can contact with <font face="Times New Roman">Hp</font> engineers.<br /><br /> <font face="Times New Roman">b, db file sequential read,</font> referring to the order of time, that is, full-table scan, which is that we should minimize some of the solution is to use the index, <font face="Times New Roman">sql</font> tuning, at the same time can increase this parameter <font face="Times New Roman">db_file_multiblock_read_count. <br /><br /> c, db file scattered read,</font> this parameter refers to read through the index, the same can be <font face="Times New Roman">db_file_multiblock_read_count</font> by increasing this parameter to improve performance. <font face="Times New Roman"><br /><br /> d, latch free,</font> with the bolt-related, and the need for special regulation. <font face="Times New Roman"><br /><br /> e,</font> other parameters can be inject special concept. <font face="Times New Roman"><br /><br /></font> Optimization of other means appears to be mainly concentrated in the above <font face="Times New Roman">SQL</font> query, <font face="Times New Roman">Oracle</font> itself provides the optimizer. <o:p></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/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/unix-environment-explain-fully-optimized-for-oracle-database/</wfw:commentRss>
	</item>
		<item>
		<title>Oracle learning some of operation (compared chaos)</title>
		<link>http://www.kods.netwww.kods.net/oracle-learning-some-of-operation-compared-chaos/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-learning-some-of-operation-compared-chaos/#comments</comments>
		<pubDate>Sun, 24 May 2009 10:10:59+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[database configuration]]></category>
<category><![CDATA[time format]]></category>
<category><![CDATA[database name]]></category>
<category><![CDATA[conn]]></category>
<category><![CDATA[quot quot]]></category>
<category><![CDATA[sysdate]]></category>
<category><![CDATA[aa]]></category>
<category><![CDATA[parameter domain]]></category>
<category><![CDATA[column id]]></category>
<category><![CDATA[configuration assistance]]></category>
<category><![CDATA[precision data]]></category>
<category><![CDATA[company id]]></category>
<category><![CDATA[forword]]></category>
<category><![CDATA[areacode]]></category>
<category><![CDATA[windows command]]></category>
<category><![CDATA[000000]]></category>
<category><![CDATA[column name]]></category>
<category><![CDATA[companyname]]></category>
<category><![CDATA[current date]]></category>
<category><![CDATA[ht]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-learning-some-of-operation-compared-chaos/</guid>
		<description><![CDATA[1.windows command line to start sqlplus: sqlplus-&gt; user &amp; pwd (to connect to orcal: user: system pwd: 000000) 2. See the current date: select sysdate from dual; 3. To create a user: - method 1: ...]]></description>
		<content:encoded><![CDATA[1.windows command line to start sqlplus: <br /> sqlplus-&gt; user &amp; pwd (to connect to orcal: user: system pwd: 000000) <br /> 2. See the current date: select sysdate from dual; <br /> 3. To create a user: <br /> - method 1: <br /> create user &quot;username&quot; identified by &quot;pwd (not the head-digit)&quot;; <br /> grant connect, resource to &quot;username&quot;; <br /> - method 2: <br /> grant dba to &quot;username&quot; identified by &quot;pwd&quot;; <br /> conn &quot;username&quot; / &quot;pwd&quot;; <br /> 4. Query the database name: select parameter domain; <br /><br /> *************************** <br /><br /> 2009-3-12 <br /> 1.user: system pwd: 000000 rdb <br /><br /> - create a database <br /> 22: database configuration assistance. Name: rdb <br /><br /> 2 - create a user <br /> create user ht identified by ht; <br /> grant create session, dba to ht; <br /> commit; <br /><br /> 3 - login rdb with the identification of ht <br /> user: ht pwd: ht db: rdb <br /><br /> 4 - create a table in rdb <br /> create table company ( <br /> id integer primary key, <br /> name varchar2 (50) <br /> ); <br /><br /> insert into company (id, name) values (1, &#39;ssdut&#39;); <br /> insert into company (id, name) values (1, &#39;going&#39;); <br /> commit; (********** donnot forget! *********) <br /><br /> 5 - look the user&#39;s tables <br /> select table_name, tablespace_name from user_tables; <br /> ---- from Internet: <br /> select table_name from user_tables; <br /> select table_name from all_tables; <br /><br /> 6 - look the how many databases have? <br /> orcale setup forder-&gt; admin-&gt; DB name == forder name <br /><br /> 7 - look all users in database <br /> select username from all_users; <br /><br /> 8 - look the construct of a table <br /> select column_id, column_name, data_type, data_length, data_precision, <br /><br /> data_scale, nullable, data_default from user_tab_columns where table_name <br /><br /> = &#39;Tablename&#39; order by column_id; <br /><br /> 9 - look current username: <br /> show user <br /><br /> 2009-3-13 <br /> 1 - insert into a time (format:: timestamp &#39;year-month-day <br /><br /> hour: minute: second.millisecond) <br /> insert into T_COMPANYINFO <br /><br /> (companycode, companyname, createtime, areacode) values <br /><br /> ( &#39;aa&#39;,&#39;11 &#39;, timestamp&#39;2000-03-02 18:23:23.1234&#39;,&#39;0211 &#39;); <br /><br /> 2. <br /> 1.TYPE_FORWORD_ONLY, can only roll forward; <br /> 2.TYPE_SCROLL_INSENSITIVE, two-way scroll, but not up to date, that is, if the database <br /><br /> Modified data is not reflected in the in the ResultSet. <br /> 3.TYPE_SCROLL_SENSITIVE, two-way scrolling, and timely update of tracking databases in order to change <br /><br /> The data in the ResultSet. <br /><br /> 4.ResultSet.CONCUR_READ_ONLY: This is the default value specified can not update the ResultSet <br /> 5.ResultSet.CONCUR_UPDATABLE: specified ResultSet can be updated <br /><br /> 3.remote login the oracle <br /> Net Configuration Assistance -&gt; local net service name configuration -&gt; server name: that is, the database name, <br /><br /> Hostname: remote host ip address <br /> sql * plus login interface: user: admin pwd: admin host string: rdb <br /> Log in dos command line: sqlplus -&gt; admin @ rdb -&gt; admin (format =&gt; used <br /><br /> Families: user @ database password: pwd) <br /><br /> 2009-3-16 <br /> 1.view the table structure <br /> describe table_name; <br /> desc table_name; <br /> 2.disconnect the database; <br /> disconnect <br /> relogin <br /> connect <br /> input your user name: admin # rdb <br /> input your pwd: admin <br /><br /> 3. <br /> oracle jdbc location <br /> C: \ Program Files \ Java \ jdk1.5.0_17 \ jre \ lib \ ext				<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/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/detailed-database-name-instance-name-oracle-sid-database-name/" title="Detailed: database name. Instance name. ORACLE_SID. Database name">Detailed: database name. Instance name. ORACLE_SID. Database name</a> 2009-04-06 07:22:20</li>
					<li><a href="http://www.kods.netwww.kods.net/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/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>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-learning-some-of-operation-compared-chaos/</wfw:commentRss>
	</item>
		<item>
		<title>ORACLE common command 1</title>
		<link>http://www.kods.netwww.kods.net/oracle-common-command-1/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-common-command-1/#comments</comments>
		<pubDate>Sun, 24 May 2009 05:39:31+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[sql]]></category>
<category><![CDATA[oracle user]]></category>
<category><![CDATA[root user]]></category>
<category><![CDATA[oracle instance]]></category>
<category><![CDATA[database log]]></category>
<category><![CDATA[reconstruction]]></category>
<category><![CDATA[oracle corporation]]></category>
<category><![CDATA[fri]]></category>
<category><![CDATA[offline data]]></category>
<category><![CDATA[background processes]]></category>
<category><![CDATA[sga]]></category>
<category><![CDATA[oracle system]]></category>
<category><![CDATA[svrmgrl]]></category>
<category><![CDATA[machine environment]]></category>
<category><![CDATA[mode description]]></category>
<category><![CDATA[start 1]]></category>
<category><![CDATA[several ways]]></category>
<category><![CDATA[oct 31]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-common-command-1/</guid>
		<description><![CDATA[ORACLE common command A, ORACLE startup and shut down 1, in the stand-alone environment To start or shut down ORACLE system must first switch to the ORACLE user, as su - oracle a, start the ORACLE sys ...]]></description>
		<content:encoded><![CDATA[<strong>ORACLE common command</strong> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><br /><br /> <strong><font color=#003366></font></strong> <o:p></o:p><br /><br /> <font face=宋体>A,</font> ORACLE <font face=宋体>startup and shut down</font> <br /> <font face=宋体>1, in the stand-alone environment</font> <br /> <font face=宋体>To start or shut down</font> ORACLE <font face=宋体>system must first switch to the</font> ORACLE <font face=宋体>user,</font> as <br /> su - oracle <br /><br /> <font face=宋体>a, start the</font> ORACLE <font face=宋体>system</font> <br /> oracle&gt; svrmgrl <br /> SVRMGR&gt; connect internal <br /> SVRMGR&gt; startup <br /> SVRMGR&gt; quit <br /><br /> <font face=宋体>b, shut down</font> ORACLE <font face=宋体>system</font> <br /> oracle&gt; svrmgrl <br /> SVRMGR&gt; connect internal <br /> SVRMGR&gt; shutdown <br /> SVRMGR&gt; quit <br /><br /> Oracle9i <font face=宋体>database start command:</font> <br /> $ Sqlplus / nolog <br /><br /> SQL * Plus: Release <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 9.2.0 </st1:chsdate> .1.0 - Production on Fri Oct 31 13:53:53 2003 <br /><br /> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. <br /><br /> SQL&gt; connect / as sysdba <br /> Connected to an idle instance. <br /> SQL&gt; startup ^ C <br /><br /> SQL&gt; startup <br /> ORACLE instance started. <br /><br /> <font face=宋体>2, in the two-machine environment</font> <br /> <font face=宋体>To start or shut down</font> ORACLE <font face=宋体>system must first switch to the</font> root <font face=宋体>user,</font> as <br /> su <font face=宋体>-</font> root <br /><br /> <font face=宋体>a, start the</font> ORACLE <font face=宋体>system</font> <br /> hareg <font face=宋体>-</font> y oracle <br /><br /> <font face=宋体>b, shut down</font> ORACLE <font face=宋体>system</font> <br /> hareg <font face=宋体>-</font> n oracle <br /><br /> <font face=宋体>What are the</font> Oracle <font face=宋体>database start-up mode</font> <br /><br /> <font face=宋体>Description:</font> <br /><br /> <font face=宋体>There are several ways to start:</font> <br /> <font face=宋体>1,</font> startup nomount <br /> <font face=宋体>Non-installation boot, under the executable to start this way: the reconstruction of the control file</font> and <font face=宋体>rebuild the database</font> <br /><br /> <font face=宋体>Read</font> init.ora <font face=宋体>file, restart instance, that the</font> SGA <font face=宋体>and background processes to start, which only need to activate</font> init.ora <font face=宋体>file.</font> <br /><br /> <font face=宋体>2,</font> startup mount dbname <br /> <font face=宋体>Start the installation, under the executable to start this way:</font> <br /> <font face=宋体>Database log archiving,</font> <br /> <font face=宋体>Database media recovery,</font> <br /> <font face=宋体>So that online or offline data files,</font> <br /> <font face=宋体>Re-positioning data files, redo log files.</font> <br /><br /> <font face=宋体>The implementation of &quot;nomount&quot;, and then open the control file</font> to <font face=宋体>confirm data files and online log file,</font> <br /> <font face=宋体>However, at this time not data files and log files to check to check.</font> <br /><br /> <font face=宋体>3,</font> startup open dbname <br /> <font face=宋体>First implementation of</font> &quot;nomount&quot;, <font face=宋体>then</font> &quot;mount&quot;, then <font face=宋体>open the</font> Redo log <font face=宋体>file, including all database files,</font> <br /> <font face=宋体>This way can access the data in the database.</font> <br /><br /> <font face=宋体>4, startup, equivalent to the following three command</font> <br /> startup nomount <br /> alter database mount <br /> alter database open <br /><br /> <font face=宋体>5,</font> startup restrict <br /> <font face=宋体>Constraint start</font> <br /> <font face=宋体>In this way to start the database, but only allows users with certain access privileges</font> <br /> <font face=宋体>Non-privileged user access,</font> we <font face=宋体>will have the following tips:</font> <br /> <font face=宋体>ERROR:</font> <br /> ORA-01035: ORACLE <font face=宋体>only with</font> RESTRICTED SESSION <font face=宋体>allow users to use</font> <br /><br /> <font face=宋体>6,</font> startup force <br /> <font face=宋体>Mandatory start-up mode</font> <br /> <font face=宋体>When the database is not closed, can be used to complete the database</font> startup force <font face=宋体>the closure of</font> <br /> <font face=宋体>To close the database,</font> and <font face=宋体>then the database command to start the implementation of the normal</font> <br /><br /> <font face=宋体>7, startup</font> pfile = <font face=宋体>parameter file name</font> <br /> <font face=宋体>Initialization parameter file with the start-up mode</font> <br /> <font face=宋体>Read parameter files first,</font> and <font face=宋体>then set the parameter file to start the database</font> <br /> <font face=宋体>Cases:</font> startup pfile = <font face=宋体>E: Oracleadminoradbpfileinit.ora</font> <br /><br /> <font face=宋体>8,</font> startup EXCLUSIVE <br /> <font face=宋体>Second,</font> the <font face=宋体>user how to effectively use the data dictionary</font> <br /><font face=宋体>　</font> ORACLE <font face=宋体>database&#39;s data dictionary is an important part of one, it generated with the database created, with the database changes,</font> <br /> <font face=宋体>Reflected in the number of</font> sys <font face=宋体>user tables and views. Data Dictionary of the English name is an uppercase character.</font> <br /><br /> <font face=宋体>Data dictionary are user information, the user&#39;s permission information, all data object information, table constraints, statistical analysis, such as a database view.</font> <br /> <font face=宋体>We can not manually modify data dictionary information.</font> <br /><br /> <font face=宋体>Very often,</font> ORACLE <font face=宋体>users in general do not know how to use it effectively.</font> <br /><br /><font face=宋体>　　</font> dictionary <font face=宋体>of all data dictionary table name and explained that it has a synonym</font> dict <br /> dict_column <font face=宋体>　　</font> <font face=宋体>All data dictionary table field names and explanations</font> <br /><br /> <font face=宋体>If we want to query with the index-related data dictionary can be used the following</font> SQL <font face=宋体>statement:</font> <br /><br /> SQL&gt; select * from dictionary where instr (comments, &#39;index&#39;)&gt; 0; <br /><br /> <font face=宋体>If we want to know</font> user_indexes <font face=宋体>table details the meaning of the name field,</font> you <font face=宋体>can use the following</font> SQL <font face=宋体>statement that:</font> <br /><br /> SQL&gt; select column_name, comments from dict_columns where table_name = &#39;USER_INDEXES&#39;; <br /><br /> <font face=宋体>And so on,</font> you <font face=宋体>can easily know the name of the detailed data dictionary and explanation</font> ORACLE <font face=宋体>not see the other documentation.</font> <br /><br /> <font face=宋体>Below, by category, a number of user</font> ORACLE <font face=宋体>data dictionary of commonly used methods of inquiry.</font> <br /><br /> <font face=宋体>1,</font> the <font face=宋体>user</font> <br /><br /> <font face=宋体>Show the current user&#39;s default tablespace</font> <br /> SQL&gt; select username, default_tablespace from user_users; <br /><br /> <font face=宋体>Show the current user&#39;s role</font> <br /> SQL&gt; select * from user_role_privs; <br /><br /> <font face=宋体>Show the current user of the system privileges and table-level permissions</font> <br /> SQL&gt; select * from user_sys_privs; <br /> SQL&gt; select * from user_tab_privs; <br /><br /> <font face=宋体>2, Table</font> <br /><br /> <font face=宋体>See the table of all users</font> <br /> SQL&gt; select * from user_tables; <br /><br /> <font face=宋体>Show the name of the table contains the</font> log <font face=宋体>character</font> <br /> SQL&gt; select object_name, object_id from user_objects <br /> where instr (object_name, &#39;LOG&#39;)&gt; 0; <br /><br /> <font face=宋体>See a table of the creation time</font> <br /> SQL&gt; select object_name, created from user_objects where object_name = upper ( &#39;&amp; table_name&#39;); <br /><br /> <font face=宋体>See a table of size</font> <br /> SQL&gt; select sum (bytes) / (1024 * 1024) as &quot;size (M)&quot; from user_segments <br /> where segment_name = upper ( &#39;&amp; table_name&#39;); <br /><br /> <font face=宋体>Show on the memory area</font> ORACLE <font face=宋体>table</font> <br /> SQL&gt; select table_name, cache from user_tables where instr (cache, &#39;Y&#39;)&gt; 0; <br /><br /> <font face=宋体>3, index</font> <br /><br /> <font face=宋体>View the index number and type of</font> <br /> SQL&gt; select index_name, index_type, table_name from user_indexes order by table_name; <br /><br /> <font face=宋体>View index by the index field</font> <br /> SQL&gt; select * from user_ind_columns where index_name = upper ( &#39;&amp; index_name&#39;); <br /><br /> <font face=宋体>View the index size</font> <br /> SQL&gt; select sum (bytes) / (1024 * 1024) as &quot;size (M)&quot; from user_segments <br /> where segment_name = upper ( &#39;&amp; index_name&#39;); <br /><br /> <font face=宋体>4, serial number</font> <br /><br /> <font face=宋体>Show serial number, last_number is the current value</font> <br /> SQL&gt; select * from user_sequences; <br /><br /> <font face=宋体>5, view</font> <br /><br /> <font face=宋体>See the name of view</font> <br /> SQL&gt; select view_name from user_views; <br /><br /> <font face=宋体>See the</font> select <font face=宋体>statement to create views</font> <br /> SQL&gt; set view_name, text_length from user_views; <br /> SQL&gt; set long 2000; <font face=宋体>Description:</font> text_length <font face=宋体>can view the value of setting the size of</font> set long <br /> SQL&gt; select text from user_views where view_name = upper ( &#39;&amp; view_name&#39;); <br /><br /> <font face=宋体>6, synonyms</font> <br /><br /> <font face=宋体>See the name synonymous with</font> <br /> SQL&gt; select * from user_synonyms; <br /><br /> <font face=宋体>7, constraints</font> <br /><br /> <font face=宋体>See a table of the Constraints</font> <br /> SQL&gt; select constraint_name, constraint_type, search_condition, r_constraint_name <br /> from user_constraints where table_name = upper ( &#39;&amp; table_name&#39;); <br /><br /> SQL&gt; select c.constraint_name, c.constraint_type, cc.column_name <br /> from user_constraints c, user_cons_columns cc <br /> where c.owner = upper ( &#39;&amp; table_owner&#39;) and c.table_name = upper ( &#39;&amp; table_name&#39;) <br /> and c.owner = cc.owner and c.constraint_name = cc.constraint_name <br /> order by cc.position; <br /><br /> <font face=宋体>8, memory function and the process of</font> <br /><br /> <font face=宋体>View the status of functions and procedures</font> <br /> SQL&gt; select object_name, status from user_objects where object_type = &#39;FUNCTION&#39;; <br /> SQL&gt; select object_name, status from user_objects where object_type = &#39;PROCEDURE&#39;; <br /><br /> <font face=宋体>View the function and process of source code</font> <br /> SQL&gt; select text from all_source where owner = user and name = upper ( &#39;&amp; plsql_name&#39;); <br /><br /> <font face=宋体>Third, see the</font> SQL <font face=宋体>database</font> <br /> <font face=宋体>1, see table space name and the size of</font> <br /><br /> select t.tablespace_name, round (sum (bytes / (1024 * 1024)), 0) ts_size <br /> from dba_tablespaces t, dba_data_files d <br /> where t.tablespace_name = d.tablespace_name <br /> group by t.tablespace_name; <br /><br /> <font face=宋体>2, see table space name and the physical file size</font> <br /><br /> select tablespace_name, file_id, file_name, <br /> round (bytes / (1024 * 1024), 0) total_space <br /> from dba_data_files <br /> order by tablespace_name; <br /><br /> <font face=宋体>3, view the rollback segment name and size</font> <br /><br /> select segment_name, tablespace_name, r.status, <br /> (initial_extent/1024) InitialExtent, (next_extent/1024) NextExtent, <br /> max_extents, v.curext CurExtent <br /> From dba_rollback_segs r, v $ rollstat v <br /> Where r.segment_id = v.usn (+) <br /> order by segment_name; <br /><br /> <font face=宋体>4, view the control file</font> <br /><br /> select name from v $ controlfile; <br /><br /> <font face=宋体>5, view the log file</font> <br /><br /> select member from v $ logfile; <br /><br /> <font face=宋体>6, view the use of table space</font> <br /><br /> select sum (bytes) / (1024 * 1024) as free_space, tablespace_name <br /> from dba_free_space <br /> group by tablespace_name; <br /><br /> SELECT A. TABLESPACE_NAME, A. BYTES TOTAL, B. BYTES USED, C. BYTES FREE, <br /> (B. BYTES * 100) / A. BYTES &quot;% USED&quot;, (C. BYTES * 100) / A. BYTES &quot;% FREE&quot; <br /> FROM SYS.SM $ TS_AVAIL A, SYS.SM $ TS_USED B, SYS.SM $ TS_FREE C <br /> WHERE A. TABLESPACE_NAME = B. TABLESPACE_NAME AND A. TABLESPACE_NAME = C. TABLESPACE_NAME; <br /><br /> <font face=宋体>7, view the database object library</font> <br /><br /> select owner, object_type, status, count (*) count # from all_objects group by owner, object_type, status; <br /><br /> <font face=宋体>8, see the database version</font> <br /><br /> Select version FROM Product_component_version <br /> Where SUBSTR (PRODUCT, 1,6) = &#39;Oracle&#39;; <br /><br /> <font face=宋体>9, the creation date to view the database and archiving methods</font> <br /><br /> Select Created, Log_Mode, Log_Mode From V $ Database; <br /> <font face=宋体>IV,</font> ORACLE <font face=宋体>management of user connections</font> <br /><br /> <font face=宋体>By system administrators</font> to <font face=宋体>see the current database there are several user connections:</font> <br /><br /> SQL&gt; select username, sid, serial # from v $ session; <br /><br /> <font face=宋体>If you want to stop a connection with</font> <br /><br /> SQL&gt; alter system kill session &#39;sid, serial #&#39;; <br /><br /> <font face=宋体>If this command will not do, the process of looking for it a number of</font> UNIX <br /><br /> SQL&gt; select pro.spid from v $ session ses, v $ process pro where ses.sid = 21 and ses.paddr = pro.addr; <br /><br /> <font face=宋体>Description:</font> 21 <font face=宋体>is the</font> sid <font face=宋体>of a number of connections</font> <br /><br /> <font face=宋体>And then use the</font> kill <font face=宋体>command to kill the process number.</font> <br /><br /> <font face=宋体>5,</font> SQL * PLUS <font face=宋体>using</font> <br /> <font face=宋体>a, near to the</font> SQL * Plus <br /> $ sqlplus <font face=宋体>username</font> / <font face=宋体>password</font> <br /><br /> <font face=宋体>Quit</font> SQL * Plus <br /> SQL&gt; exit <br /><br /> <font face=宋体>b, to help in the information under</font> sqlplus <br /> <font face=宋体>List of all</font> SQL <font face=宋体>commands and</font> SQL * Plus <font face=宋体>command</font> <br /> SQL&gt; help <br /> <font face=宋体>Are listed in order of a particular information</font> <br /> SQL&gt; help <font face=宋体>command name</font> <br /><br /> <font face=宋体>c, show the table structure</font> DESCRIBE <font face=宋体>command</font> <br /> SQL&gt; DESC <font face=宋体>table name</font> <br /><br /> <font face=宋体>d,</font> SQL * Plus <font face=宋体>commands in the Edit</font> <br /> <font face=宋体>Shows</font> SQL <font face=宋体>commands buffer</font> <br /> SQL&gt; L <br /><br /> <font face=宋体>Modify</font> SQL <font face=宋体>command</font> <br /> <font face=宋体>First of all, to be correct line into the current row</font> <br /> SQL&gt; n <br /> CHANGE <font face=宋体>command changes with</font> <br /> SQL&gt; c / <font face=宋体>old</font> / <font face=宋体>new</font> <br /> <font face=宋体>Re-verify that the correct</font> <br /> SQL&gt; L <br /><br /> INPUT <font face=宋体>command can be used in the</font> SQL <font face=宋体>buffer to add one or more lines of</font> <br /> SQL&gt; i <br /> SQL&gt; <font face=宋体>input</font> <br /><br /> <font face=宋体>e, call the external system editor</font> <br /> SQL&gt; edit <font face=宋体>the file name</font> <br /> DEFINE <font face=宋体>command can use the system variable</font> EDITOR <font face=宋体>to change the type of text editor in the paper are defined as follows</font> login.sql <font face=宋体>his</font> <br /> DEFINE_EDITOR = vi <br /><br /> <font face=宋体>f, run the command file</font> <br /> SQL&gt; START test <br /> SQL&gt; @ test <br /><br /> SQL * Plus <font face=宋体>statements used</font> <br /> <font face=宋体>a, the table to create, modify, delete</font> <br /> <font face=宋体>Create table orders the following format:</font> <br /> create table <font face=宋体>table name (column description list);</font> <br /><br /> <font face=宋体>Table-based commands add a new column as follows:</font> <br /> ALTER TABLE <font face=宋体>table</font> ADD <font face=宋体>(column description list)</font> <br /> <font face=宋体>Cases:</font> In order <font face=宋体>to increase</font> test <font face=宋体>Table 1 Age, used to store the age of</font> <br /> sql&gt; alter table test <br /> add <font face=宋体>(Age</font> number <font face=宋体>(3));</font> <br /><br /> <font face=宋体>Amend the definition of order-based list is as follows:</font> <br /> ALTER TABLE <font face=宋体>table name</font> <br /> MODIFY <font face=宋体>(column name data type)</font> <br /> <font face=宋体>Example:</font> Count <font face=宋体>table</font> test <font face=宋体>out the width to</font> 10 <font face=宋体>characters long</font> <br /> sql&gt; alter atble test <br /> modify <font face=宋体>(County</font> char <font face=宋体>(10));</font> <br /><br /> <font face=宋体>b, a table will delete the form of statement is as follows:</font> <br /> DORP TABLE <font face=宋体>table;</font> <br /> <font face=宋体>For example: table delete to delete table data and table definition</font> <br /> sql&gt; drop table test <br /><br /> <font face=宋体>c, table space to create, delete</font> <br /><br /> <font face=宋体>6,</font> ORACLE <font face=宋体>logical backup file of</font> SH <br /><br /> <font face=宋体>Full backup of the</font> SH <font face=宋体>file: exp_comp.sh</font> <br /><br /> rq = `date +&quot;% m% d &quot;` <br /><br /> su - oracle-c &quot;exp system / manager full = y inctype = complete file = / oracle / export / db_comp $ rq.dmp&quot; <br /><br /> SH <font face=宋体>cumulative backup file: exp_cumu.sh</font> <br /><br /> rq = `date +&quot;% m% d &quot;` <br /><br /> su - oracle-c &quot;exp system / manager full = y inctype = cumulative file = / oracle / export / db_cumu $ rq.dmp&quot; <br /><br /> <font face=宋体>Incremental backups of the</font> SH <font face=宋体>file:</font> exp_incr.sh <br /><br /> rq = `date +&quot;% m% d &quot;` <br /><br /> su - oracle-c &quot;exp system / manager full = y inctype = incremental file = / oracle / export / db_incr $ rq.dmp&quot; <br /><br /> root <font face=宋体>user</font> crontab <font face=宋体>file</font> <br /> / var / spool / cron / crontabs / root, <font face=宋体>add the following content</font> <br /><br /> 0 2 1 * * / oracle / exp_comp.sh <br /><br /> 30 2 * * 0-5 / oracle / exp_incr.sh <br /><br /> 45 2 * * 6 / oracle / exp_cumu.sh <br /><br /> <font face=宋体>Of course, this schedule can be based on different needs to change,</font> and <font face=宋体>this is just one example.</font> <br /><br /> <font face=宋体>7,</font> ORACLE <font face=宋体>common</font> SQL <font face=宋体>syntax and data objects</font> <br /><br /> <font face=宋体>1. Data Control statements</font> (DML) <font face=宋体>part of</font> <br /><br /> 1.INSERT <font face=宋体>(data table to record the statement insert)</font> <br /><br /> INSERT INTO <font face=宋体>table (field names</font> 1, <font face=宋体>Field Name</font> 2, ... ...) VALUES <font face=宋体>(value</font> 1, <font face=宋体>value</font> 2, ... ...);<br /> INSERT INTO <font face=宋体>table (field names</font> 1, <font face=宋体>Field Name</font> 2, ... ...) SELECT <font face=宋体>(field names</font> 1, <font face=宋体>Field Name</font> 2, ... ...) FROM <font face=宋体>another table;</font> <br /><br /> <font face=宋体>String type field values must be enclosed in single quotation marks,</font> for <font face=宋体>example:</font> &#39;GOOD DAY&#39; <br /> <font face=宋体>If the field value contains single quotes&#39; need to convert a string, we replace it into two single quotes&#39;&#39;.</font> <br /> <font face=宋体>String types of field values over the length of the definition to be wrong, best to check the length before insertion.</font> <br /><br /> <font face=宋体>Field values of date fields may be time for the current database system</font> SYSDATE, <font face=宋体>precise to the second</font> <br /> <font face=宋体>Or date string into a function</font> TO_DATE ( &#39; <st1:chsdate w:st="on" year="2001" month="8" day="1" islunardate="False" isrocdate="False"> 2001-08-01 </st1:chsdate> &#39;,&#39; YYYY-MM-DD &#39;) <br /> TO_DATE (), <font face=宋体>there is still a variety of date format,</font> you <font face=宋体>can see</font> ORACLE DOC. <br /> <font face=宋体>Year</font> - <font face=宋体>month</font> - <font face=宋体>day hour: minute: second format</font> YYYY-MM-DD HH24: MI: SS <br /><br /> INSERT <font face=宋体>maximum operational length of the string less than or equal to 4000 single-byte, if you want to insert a longer string, please consider using</font> CLOB <font face=宋体>type of field,</font> <br /> ORACLE <font face=宋体>methods used in the</font> DBMS_LOB <font face=宋体>own package.</font> <br /><br /> <font face=宋体>If you use</font> INSERT <font face=宋体>to automatically increase from</font> 1 <font face=宋体>to start the serial number should be the establishment of a serial number</font> <br /> CREATE SEQUENCE <font face=宋体>serial number of the name (preferably table name</font> + <font face=宋体>serial number tag)</font> INCREMENT BY 1 START WITH 1 <br /> MAXVALUE 99999 CYCLE NOCACHE; <br /> <font face=宋体>One of the biggest values to set the length field, if the definition of the serial number of automatic increase in</font> NUMBER (6), <font face=宋体>max</font> 999,999 <br /> INSERT <font face=宋体>statement to insert the field values as follows: the name of the serial number.</font> NEXTVAL <br /><br /> 2.DELETE <font face=宋体>(data table records to delete the phrase)</font> <br /><br /> DELETE FROM <font face=宋体>table</font> WHERE <font face=宋体>conditions;</font> <br /><br /> <font face=宋体>Note: the deletion of records and can not be occupied in the release of</font> ORACLE <font face=宋体>data block tablespace. Only to those who have been to delete the data blocks marked as</font> unused. <br /><br /> <font face=宋体>If you sure you want to delete a large table of all records,</font> TRUNCATE <font face=宋体>command can be used, it can block the release of the data table occupied space</font> <br /> TRUNCATE TABLE <font face=宋体>table;</font> <br /> <font face=宋体>This action can not be back.</font> <br /><br /> 3.UPDATE <font face=宋体>(modify table data recorded statement)</font> <br /><br /> UPDATE <font face=宋体>table</font> SET <font face=宋体>field name</font> 1 = <font face=宋体>value</font> 1, <font face=宋体>field</font> 2 = <font face=宋体>value of</font> 2, ... ... WHERE <font face=宋体>condition;</font> <br /><br /> <font face=宋体>If the revised value of</font> N <font face=宋体>there is no assignment or definition, will record the contents of the original clearance to</font> NULL, <font face=宋体>before the revision of the best non-empty calibration;</font> <br /> <font face=宋体>Value of</font> N <font face=宋体>more than the length of the definition to be wrong, best to check the length before inserting</font> .. <br /><br /> <font face=宋体>Note:</font> <br /> A. <font face=宋体>The above</font> SQL <font face=宋体>statement are added to the table row-level locks,</font> <br /> <font face=宋体>Confirmed after the completion of processing must be added the end of the order of things to come into effect</font> COMMIT, <br /> <font face=宋体>Otherwise, change is not necessarily written into the database.</font> <br /> <font face=宋体>If you want the withdrawal of these operations can be used to recover</font> ROLLBACK <font face=宋体>command.</font> <br /><br /> B. <font face=宋体>run the</font> INSERT, DELETE <font face=宋体>and</font> UPDATE <font face=宋体>statements about the former may be the best estimate of the scope of operation records,</font><br /> <font face=宋体>It should be limited to the smaller</font> (10,000 <font face=宋体>records) range. Otherwise</font> ORACLE <font face=宋体>used a lot of things to deal with the back of the paragraph.</font> <br /> <font face=宋体>Procedures to respond to the loss of response to slow or even. If more than the number of records in the hundreds of thousands of these operations, which were sub-sub-sub-SQL statement completed</font> <br /> COMMIT <font face=宋体>to confirm things with which to deal with.</font> <br /> <font face=宋体>II. Data Definition</font> (DDL) <font face=宋体>part of</font> <br /><br /> 1.CREATE <font face=宋体>(create tables, indexes, views, synonyms, procedures, functions, database links,</font> etc.) <br /><br /> ORACLE <font face=宋体>field types are commonly used</font> <br /> <font face=宋体>Fixed length</font> CHAR <font face=宋体>string</font> <br /> <font face=宋体>Variable-length</font> VARCHAR2 <font face=宋体>string</font> <br /> NUMBER (M, N) <font face=宋体>the number of type</font> M <font face=宋体>is the median total length,</font> N <font face=宋体>is the length of a small number of</font> <br /> DATE <font face=宋体>date type</font> <br /><br /> <font face=宋体>Create a table should not be smaller space on the front of the field may be empty on the back of the field</font> <br /><br /> <font face=宋体>Can be used to create table field names in Chinese, but the best of the field names in English</font> <br /><br /> <font face=宋体>Create table fields can be added to the default value,</font> for <font face=宋体>example,</font> DEFAULT SYSDATE <br /> <font face=宋体>This insertion and changes every time,</font> do <font face=宋体>not process the operation of the field action can be time</font> <br /><br /> <font face=宋体>Can create a table to add constraints to the field</font> <br /> <font face=宋体>For example, does not allow duplicate</font> UNIQUE, <font face=宋体>keyword</font> PRIMARY KEY <br /><br /> 2.ALTER <font face=宋体>(change table, index, view,</font> etc.) <br /><br /> <font face=宋体>Change the name of the table</font> <br /> ALTER TABLE <font face=宋体>table</font> 1 TO <font face=宋体>table</font> 2; <br /><br /> <font face=宋体>In the table after adding a field</font> <br /> ALTER TABLE <font face=宋体>table name</font> ADD <font face=宋体>paragraph description field names;</font> <br /><br /> <font face=宋体>Amend the definition of exterior field description</font> <br /> ALTER TABLE <font face=宋体>table</font> MODIFY <font face=宋体>of the fields described in paragraph names;</font> <br /><br /> <font face=宋体>Add fields to the exterior condition</font> <br /> ALTER TABLE <font face=宋体>table name</font> ADD CONSTRAINT <font face=宋体>constraint</font> PRIMARY KEY <font face=宋体>(field names);</font> <br /> ALTER TABLE <font face=宋体>table name</font> ADD CONSTRAINT <font face=宋体>constraint</font> UNIQUE <font face=宋体>(field names);</font> <br /><br /> <font face=宋体>On the table or remove the memory database</font> <br /> ALTER TABLE <font face=宋体>table</font> CACHE; <br /> ALTER TABLE <font face=宋体>table</font> NOCACHE; <br /><br /> 3.DROP <font face=宋体>(delete tables, indexes, views, synonyms, procedures, functions, database links,</font> etc.) <br /><br /> <font face=宋体>Delete table and all its constraints</font> <br /> DROP TABLE <font face=宋体>table</font> CASCADE CONSTRAINTS; <br /><br /> 4.TRUNCATE <font face=宋体>(clear all records and deeds, to retain the table structure)</font> <br /><br /> TRUNCATE <font face=宋体>table;</font> <br /><br /> <font face=宋体>III. Query</font> (SELECT) <font face=宋体>part</font> <br /><br /> SELECT <font face=宋体>fields of</font> 1, <font face=宋体>Field Name</font> 2, ... ... FROM <font face=宋体>table</font> 1, <font face=宋体>[table</font> 2, ... ...] WHERE <font face=宋体>conditions;</font> <br /><br /> <font face=宋体>Field names can be brought into the function</font> <br /> <font face=宋体>For example:</font> COUNT (*), MIN <font face=宋体>(field names),</font> MAX <font face=宋体>(field names),</font> AVG <font face=宋体>(fieldname),</font> DISTINCT <font face=宋体>(field names),</font> <br /> TO_CHAR (DATE <font face=宋体>field names,</font> &#39;YYYY-MM-DD HH24: MI: SS&#39;) <br /><br /> NVL (EXPR1, EXPR2) <font face=宋体>function</font> <br /> <font face=宋体>Explained:</font> <br /> IF EXPR1 = NULL <br /> RETURN EXPR2 <br /> ELSE <br /> RETURN EXPR1 <br /><br /> DECODE <font face=宋体>(AA, V1, R1, V2,</font> R2 ....) <font face=宋体>function</font> <br /> <font face=宋体>Explained:</font> <br /> IF AA = V1 THEN RETURN R1 <br /> IF AA = V2 THEN RETURN R2 <br /> .. ... <br /> ELSE <br /> RETURN NULL <br /><br /> LPAD (char1, n, char2) <font face=宋体>function</font> <br /> <font face=宋体>Explained:</font> <br /> Char1 <font face=宋体>character</font> n <font face=宋体>in accordance with the development of the median show that the shortage of char2-digit string with the replacement of the left side of the space</font> <br /><br /> <font face=宋体>Field names can be between the arithmetic operations</font> <br /> <font face=宋体>For example:</font> (1 * <font face=宋体>Field Name Field Name</font> 1) / 3 <br /><br /> <font face=宋体>Query can be nested</font> <br /> <font face=宋体>For example:</font> SELECT ... ... FROM <br /> (SELECT ... ... FROM <font face=宋体>table</font> 1, <font face=宋体>[table</font> 2, ... ...] WHERE <font face=宋体>conditions)</font> WHERE <font face=宋体>condition</font> 2; <br /><br /> <font face=宋体>Query results of the two can be set to operate</font> <br /> <font face=宋体>For example: and set</font> UNION <font face=宋体>(removing duplicate records), and set</font> UNION ALL <font face=宋体>(do not remove duplicate records), Difference Sets</font> MINUS, <font face=宋体>intersection</font> INTERSECT <br /><br /> <font face=宋体>Sub-query</font> <br /> SELECT <font face=宋体>fields of</font> 1, <font face=宋体>Field Name</font> 2, ... ... FROM <font face=宋体>table</font> 1, <font face=宋体>[table</font> 2, ... ...] GROUP BY <font face=宋体>field names</font> 1 <br /> [HAVING <font face=宋体>conditions];</font> <br /><br /> <font face=宋体>Between two or more table join queries</font> <br /><br /> SELECT <font face=宋体>fields of</font> 1, <font face=宋体>Field Name</font> 2, ... ... FROM <font face=宋体>table</font> 1, <font face=宋体>[table</font> 2, ... ...] WHERE <br /> <font face=宋体>Table</font> 1. <font face=宋体>Field name</font> = <font face=宋体>table name</font> 2. <font face=宋体>Fieldname</font> [AND ... ...]; <br /><br /> SELECT <font face=宋体>fields of</font> 1, <font face=宋体>Field Name</font> 2, ... ... FROM <font face=宋体>table</font> 1, <font face=宋体>[table</font> 2, ... ...] WHERE <br /> <font face=宋体>Table</font> 1. <font face=宋体>Field name</font> = <font face=宋体>table name</font> 2. <font face=宋体>Field Name</font> (+) [AND ... ...]; <br /><br /> <font face=宋体>There are</font> (+) of <font face=宋体>the field-position auto-fill empty value</font> <br /><br /> <font face=宋体>Query result set of the sort operation, the default is ascending order</font> ASC, <font face=宋体>is descending</font> DESC <br /><br /> SELECT <font face=宋体>fields of</font> 1, <font face=宋体>Field Name</font> 2, ... ... FROM <font face=宋体>table</font> 1, <font face=宋体>[table</font> 2, ... ...] <br /> ORDER BY <font face=宋体>field names</font> 1, <font face=宋体>Field Name</font> 2 DESC; <br /><br /> <font face=宋体>Fuzzy string comparison</font> <br /><br /> INSTR <font face=宋体>(field names, &#39;string&#39;)&gt;</font> 0 <br /> <font face=宋体>Field Name</font> LIKE <font face=宋体>&#39;string%&#39;</font> [ &#39;% <font face=宋体>string%&#39;]</font> <br /><br /> <font face=宋体>Each table has a hidden field</font> ROWID, <font face=宋体>it marks the uniqueness of records.</font> <br /><br /> <font face=宋体>IV.</font> ORACLE <font face=宋体>data objects in common</font> (SCHEMA) <br /><br /> 1. <font face=宋体>Index</font> (INDEX) <br /><br /> CREATE INDEX <font face=宋体>index name</font> ON <font face=宋体>table (field</font> 1, <font face=宋体>[field</font> 2, ... ...]); <br /> ALTER INDEX <font face=宋体>index name</font> REBUILD; <br /><br /> <font face=宋体>A table is best not to index more than 3 (except special pages), the best single-field index, combined with an analysis of</font> SQL <font face=宋体>statements implementation</font> <br /> <font face=宋体>Can also create a combination of multi-field index and the index based on function</font> <br /><br /> ORACLE8.1.7 <font face=宋体>string of maximum length can be indexed for</font> 1578 <font face=宋体>single-byte</font> <br /> ORACLE8.0.6 <font face=宋体>string of maximum length can be indexed as</font> 758 <font face=宋体>single-byte</font> <br /><br /> 2. <font face=宋体>View</font> (VIEW) <br /><br /> <font face=宋体>Of</font> CREATE VIEW <font face=宋体>view</font> AS SELECT .... FROM ... ..; <br /> ALTER VIEW <font face=宋体>view name</font> COMPILE; <br /><br /> <font face=宋体>View only a</font> SQL <font face=宋体>query, which can form complex relationship between the simplicity of.</font> <br /><br /> 3. <font face=宋体>Synonyms</font> (SYNONMY)<br /> CREATE SYNONYM <font face=宋体>synonym name</font> FOR <font face=宋体>table;</font> <br /> CREATE SYNONYM <font face=宋体>synonym name</font> FOR <font face=宋体>table</font> @ <font face=宋体>database link name;</font> <br /><br /> 4. <font face=宋体>Database link</font> (DATABASE LINK) <br /> <font face=宋体>Database link</font> CREATE DATABASE LINK <font face=宋体>name</font> CONNECT TO <font face=宋体>username</font> IDENTIFIED BY <font face=宋体>password</font> USING <font face=宋体>&#39;database connection string&#39;;</font> <br /><br /> <font face=宋体>Database connection string can be used directly</font> NET8 EASY CONFIG <font face=宋体>modify</font> TNSNAMES.ORA <font face=宋体>or in definition.</font> <br /><br /> <font face=宋体>Database parameters</font> global_name = true <font face=宋体>when asked the name of the database link with the remote database name</font> <br /><br /> <font face=宋体>Global database name can be identified with the following command</font> <br /> SELECT * FROM GLOBAL_NAME; <br /><br /> <font face=宋体>Query the remote database table</font> <br /> SELECT ... ... FROM <font face=宋体>table</font> @ <font face=宋体>database link name;</font>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-common-command-1/</wfw:commentRss>
	</item>
		<item>
		<title>solaris10 oracle10G EM config</title>
		<link>http://www.kods.netwww.kods.net/solaris10-oracle10g-em-config/</link>
		<comments>http://www.kods.netwww.kods.net/solaris10-oracle10g-em-config/#comments</comments>
		<pubDate>Sun, 24 May 2009 03:09:20+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle home]]></category>
<category><![CDATA[sid]]></category>
<category><![CDATA[database oracle]]></category>
<category><![CDATA[listener]]></category>
<category><![CDATA[database control]]></category>
<category><![CDATA[default settings]]></category>
<category><![CDATA[emca]]></category>
<category><![CDATA[sysman]]></category>
<category><![CDATA[information database]]></category>
<category><![CDATA[cn]]></category>
<category><![CDATA[e mail address]]></category>
<category><![CDATA[address notification]]></category>
<category><![CDATA[database host]]></category>
<category><![CDATA[pro database]]></category>
<category><![CDATA[configuration management]]></category>
<category><![CDATA[host name]]></category>
<category><![CDATA[emcp]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/solaris10-oracle10g-em-config/</guid>
		<description><![CDATA[solaris10 oracle10G EM config su - oracle emctl status dbconsole (see conditions) su - oracle emctl start dbconsole (Open Service) su - oracle emctl stop dbconsole su - oracle emca-config dbcontrol db ...]]></description>
		<content:encoded><![CDATA[solaris10 oracle10G EM config <br /><br /> su - oracle emctl status dbconsole (see conditions) <br /> su - oracle emctl start dbconsole (Open Service) <br /> su - oracle emctl stop dbconsole <br /> su - oracle emca-config dbcontrol db-repos recreate (re-configuration management oracle10g EM) <br /><br /> bash-3.00 $ emca-config dbcontrol db-repos recreate <br /><br /> EMCA began 2009-5-21 18:28:16 <br /> EM Configuration Assistant 10.2.0.1.0 official version Copyright (c) 2003, 2005, Oracle. All rights reserved. <br /><br /> Enter the following information: <br /> Database SID: ora10g <br /> Ora10g database has been configured for the Database Control <br /> You have chosen to configure Database Control, to manage the database ora10g <br /> This will remove the existing configuration and default settings, and re-run the configuration whether or not to continue? [Yes (Y) / no (N)]: <br /> Whether or not to continue? [Yes (Y) / no (N)]: y <br /> Listener port number: 1521 <br /> SYS user&#39;s password: <br /> DBSNMP the user&#39;s password: <br /> SYSMAN user password: <br /> Notification e-mail address (optional): z_wangshibo@boco.com.cn <br /> Copies of the notice (SMTP) server (optional): boco.com.cn <br /> -------------------------------------------------- --------------- <br /><br /> Has appointed the following settings <br /><br /> Database ORACLE_HOME ................ / export / home / oracle / pro <br /><br /> Database host name ................ sun450 <br /> Listener port number ................ 1521 <br /> Database SID ................ ora10g <br /> E-mail address notification ............... z_wangshibo@boco.com.cn <br /> Copies of the notice (SMTP) server ............... boco.com.cn <br /><br /> -------------------------------------------------- --------------- <br /> Whether or not to continue? [Yes (Y) / no (N)]: y <br /> 2009-5-21 18:29:26 oracle.sysman.emcp.EMConfig perform <br /> Message: this operation is recorded / export/home/oracle/pro/cfgtoollogs/emca/ora10g/emca_2009-05-21_06-28-16- afternoon. Log. <br /> 2009-5-21 18:29:34 oracle.sysman.emcp.util.DBControlUtil stopOMS <br /> Information: Stopping Database Control (this may take some time) ... <br /> 2009-5-21 18:29:51 oracle.sysman.emcp.EMReposConfig dropRepository <br /> Information: data files are deleted EM repository (this may take some time) ... <br /> 2009-5-21 18:36:26 oracle.sysman.emcp.EMReposConfig invoke <br /> Information: the information has been successfully deleted archives <br /> 2009-5-21 18:36:26 oracle.sysman.emcp.EMReposConfig createRepository <br /> Information: the information is to create EM repository (this may take some time) ... <br /><br /> 2009-5-21 18:51:15 oracle.sysman.emcp.EMReposConfig invoke <br /> Information: the information has been created archive <br /><br /> 2009-5-21 18:51:42 oracle.sysman.emcp.util.DBControlUtil startOMS <br /> Information: is to start Database Control (this may take some time) ... <br /><br /> 2009-5-21 18:53:59 oracle.sysman.emcp.EMDBPostConfig performConfiguration <br /> Information: Database Control has been the successful launch of <br /> 2009-5-21 18:53:59 oracle.sysman.emcp.EMDBPostConfig performConfiguration <br /> Information: &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Database Control URL for http://sun450:1158/em &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; <br /> Has successfully completed the configuration of Enterprise Manager <br /> EMCA at the end of 2009-5-21 18:53:59 <br /><br /> -bash-3.00 # su - oracle emctl start dbconsole <br /> Sun Microsystems Inc. SunOS 5.10 Generic January 2005 <br /> Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 <br /> Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. <br /> http://sun450:1158/em/console/aboutApplication <br /> Starting Oracle Enterprise Manager 10g Database Control ..... started. <br /> -------------------------------------------------- ---------------- <br /> Logs are generated in directory / export/home/oracle/pro/sun450_ora10g/sysman/log <br /><br /> -bash-3.00 # su - oracle emctl status dbconsole <br /> Sun Microsystems Inc. SunOS 5.10 Generic January 2005 <br /> Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 <br /> Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. <br /> http://sun450:1158/em/console/aboutApplication <br /> Oracle Enterprise Manager 10g is running. <br /> -------------------------------------------------- ---------------- <br /> Logs are generated in directory / export/home/oracle/pro/sun450_ora10g/sysman/log <br /><br /> After opening oracle10g EM can oracl10g from WEB to manage the database, in the web where you can start the database and monitoring services.				<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/solaris10-oracle10g-em-config/</wfw:commentRss>
	</item>
		<item>
		<title>solaris 10 oracle10g install</title>
		<link>http://www.kods.netwww.kods.net/solaris-10-oracle10g-install/</link>
		<comments>http://www.kods.netwww.kods.net/solaris-10-oracle10g-install/#comments</comments>
		<pubDate>Sun, 24 May 2009 02:02:42+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle 10g]]></category>
<category><![CDATA[oracle home]]></category>
<category><![CDATA[chown]]></category>
<category><![CDATA[oracle user]]></category>
<category><![CDATA[oracle product]]></category>
<category><![CDATA[kernel parameters]]></category>
<category><![CDATA[useradd]]></category>
<category><![CDATA[nls lang]]></category>
<category><![CDATA[oracle environment]]></category>
<category><![CDATA[decompression]]></category>
<category><![CDATA[products database]]></category>
<category><![CDATA[technology software products]]></category>
<category><![CDATA[directory owners]]></category>
<category><![CDATA[install solaris]]></category>
<category><![CDATA[shmmax]]></category>
<category><![CDATA[cpio]]></category>
<category><![CDATA[database directory]]></category>
<category><![CDATA[gunzip]]></category>
<category><![CDATA[directory permissions]]></category>
<category><![CDATA[base directory]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/solaris-10-oracle10g-install/</guid>
		<description><![CDATA[solaris 10 oracle10g install This is my install process: First of all, first download the ORACLE 10G Download address http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201 ...]]></description>
		<content:encoded><![CDATA[<font face=宋体 size=2></font> solaris 10 oracle10g install <br /><br /> <font size=2>This is my install process:</font> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><br /><br /> <font size=2>First of all, first download the ORACLE</font> <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font size=2>10G</font> </st1:chmetcnv> <font size=2>Download address</font> <o:p></o:p><br /><br /> <font size=2>http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201sol64soft.html</font> <o:p></o:p><br /><br /><o:p><font size=2> </font></o:p><br /><br /> <font size=2>Extract oracle</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font size=2>10g</font> </st1:chmetcnv> <font size=2>&lt;br /&gt; Installation package will be replaced by a long file name sol</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font size=2>10g</font> </st1:chmetcnv> <font size=2>. cpio.gz <br /> # cp sol</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font size=2>10g</font> </st1:chmetcnv> <font size=2>. cpio.gz / export / home / oracle <br /> # Gunzip sol in the decompression</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font size=2>10g</font> </st1:chmetcnv> <font size=2>. cpio.gz <br /> # cpio-ivmd &lt;</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font size=2>10g</font> </st1:chmetcnv> <font size=2>. cpio</font> <o:p></o:p><br /><br /> <font size=2>Users and groups must be built,</font> oinstall <font size=2>and dba groups, oracle user</font> <br /> <font size=2>groupadd oinstall <br /> groupadd dba <br /> useradd-d / export / home / oracle-g oinstall-G dba-m oracle <br /> passwd oracle (set password</font> <br /> <font size=2>The establishment of oracle base directory and database directory <br /> mkdir / export / home / oracle (look at the situation,</font> and <font size=2>sometimes will be automatically created)</font> <br /> <font size=2>mkdir / export / home / oracle /</font> oradata <font size=2><br /> Change the directory owners and groups are <br /> chown-R oracle: install / export / home / oracle <br /> # chown-R oracle: install / export / home / oracle /</font> oradata <font size=2><br /><br /> Change the directory permissions <br /> chmod-R 775 / export / home / oracle <br /> # chmod-R 775 / export / home / oracle /</font> oradata <font size=2><br /><br /> Third, set kernel parameters &lt;br /&gt; I adjusted in accordance with the following steps <br /><br /> cd / etc <br /> cp system</font> system.orig <font size=2>(a safe back-up)</font> <br /> <font size=2>vi system <br /> Add the following: <br /> set shmsys: shminfo_shmmax = 4294967296</font> <o:p></o:p><br /><br /> <font size=2>set shmsys: shminfo_shmmin = 1</font> <o:p></o:p><br /><br /> <font size=2>set shmsys: shminfo_shmmni = 200</font> <o:p></o:p><br /><br /> <font size=2>set shmsys: shminfo_shmseg = 30</font> <o:p></o:p><br /><br /> <font size=2>set semsys: seminfo_semmni = 100</font> <o:p></o:p><br /><br /> <font size=2>set semsys: seminfo_semmsl = 510</font> <o:p></o:p><br /><br /> <font size=2>set semsys: seminfo_semmns = 1520</font> <o:p></o:p><br /><br /> <font size=2>set semsys: seminfo_semopm = 100</font> <o:p></o:p><br /><br /> <font size=2>set semsys: seminfo_semvmx = 32767</font> <o:p></o:p><br /><br /> <font size=2>set</font> noexec_user_stack <font size=2>=</font> 1 <font size=2>(to eliminate</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="g"> <font face="Times New Roman"><font size=2>2G</font></font> </st1:chmetcnv> <font size=2>Limit)</font> <o:p></o:p><br /><br /> <font size=2>set</font> noexec_user_stack_log <font size=2>=</font> 1 <font size=2>(to eliminate</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="g"> <font face="Times New Roman"><font size=2>2G</font></font> </st1:chmetcnv> <font size=2>Limit)</font> <o:p></o:p><br /><br /><o:p><font size=2> </font></o:p><br /><br /> <font size=2>New start</font> <font size=2> </font><br /><br /> <font size=2>Fourth, set up oracle environment</font> <br /><br /> <font size=2>After landing in his capacity as a root <br /> su - oracle <br /> Access to / export / home / oracle <br /> Vi. Profile <br /> Reads as follows: <br /><br /> ORACLE_BASE = / export / home / oracle <br /> ORACLE_HOME = / export/home/oracle/product/10.0 <br /> ORACLE_SID = ora</font> <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"> <font size=2>10g</font> </st1:chmetcnv> <font size=2><br /> NLS_LANG = AMERICAN_AMERICA.ZHS16GBK <br /> PATH = $ ORACLE_HOME / bin: / bin: / sbin: / usr / ccs / bin: / usr / local / bin LD_LIBRARY_PATH = $ ORACLE_HOME / lib: $ ORACLE_HOME / network / lib: / usr / local / lib: / usr / lib <br /> DISPLAY = 127.0.0.1:0.0 <br /> TMPDIR = / var / tmp <br /> export</font> ORALCE_BASE <font size=2>ORACLE_HOME ORACLE_SID NLS_LANG PATH LD_LIBRARY_PATH DISPLAY TMPDIR <br /> umask 022</font><br /> <font size=2>#</font> <font face="Times New Roman">NLS_LANG = &quot;simplified chinese_china.ZHS16GBK&quot;</font> (This is a Simplified Chinese) <br /> <font size=2>To start the installation. <br /> Run the installation file</font> <br /> <font size=2>To root the implementation xhost + - this step is very important not to implement this step-by-step installation of oracle in the oracle database users will not start Xwindows graphical interface.</font> <br /><br /> <font size=2>#</font> <font face="Times New Roman"> </font> <font size=2>/ usr / openwin / bin / xhost + <br /> # Export DISPLAY <br /> # Su - oracle <br /><br /> $. / runInstaller If this implementation / export/home/db/Disk1/run * will appear this error message:</font> <br /> [color = blue] Checking installer requirements ... <br /><br /> Checking operating system version: must be 5.6, 5.7, 5.8 or 5.9. Actual 5.10 <br /> Failed &lt;&lt;&lt;&lt; <br /><br /> Exiting Oracle Universal Installer, log for this session can be found at <br /><br /> / tmp / OraInstall <st1:chsdate w:st="on" year="2004" month="10" day="26" islunardate="False" isrocdate="False"> 2004-10-26 </st1:chsdate> _09-45-32AM/installActions <st1:chsdate w:st="on" year="2004" month="10" day="26" islunardate="False" isrocdate="False"> 2004-10-26 </st1:chsdate> _09-45-32AM.log <br /> Show installActions <st1:chsdate w:st="on" year="2004" month="10" day="26" islunardate="False" isrocdate="False"> 2004-10-26 </st1:chsdate> _09-45-32AM.log [/ color] <br /><br /> $ Vi installActions <st1:chsdate w:st="on" year="2004" month="10" day="26" islunardate="False" isrocdate="False"> 2004-10-26 </st1:chsdate> _09-45-32AM.log <br /> Using paramFile: / export/home/oracle/db/Disk1/install/oraparam.ini <br /> Checking installer requirements ... <br /> Checking operating system version: must be 5.6, 5.7, 5.8 or 5.9. Actual 5.10 <br /> Failed &lt;&lt;&lt;&lt; <br /><br /> Exiting Oracle Universal Installer, log for this session can be found at / tmp / Or <br /> aInstall <st1:chsdate w:st="on" year="2004" month="10" day="26" islunardate="False" isrocdate="False"> 2004-10-26 </st1:chsdate> _09-45-32AM/installActions <st1:chsdate w:st="on" year="2004" month="10" day="26" islunardate="False" isrocdate="False"> 2004-10-26 </st1:chsdate> _09-45-32AM.log <br /><br /> Want to solve this problem should be in / export/home/db/Disk1/install, the modified oraparam.ini oraparam.var <br /><br /> Amended to read as follows: <br /> vi oraparam.ini <br /><br /> # You can customise error message shown for failure through CERTIFIED_VERSION_FAI <br /> LURE_MESSAGE <br /> Solaris = 5.6,5.7,5.8,5.9, <strong>5.10</strong> (that is to add 5.10) <br /> Linux = redhat-2.1AS <br /> # HPUX = B.11.00 <br /> Decunix = V <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5.1" unitname="a"> 5.1A </st1:chmetcnv> , V5.1 <br /> AIX = <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 5.1.0 </st1:chsdate> .0 <o:p></o:p><br /><br /> vi oraparam.var <br /><br /> # You can customise error message shown for failure through CERTIFIED_VERSION_FAI <br /> LURE_MESSAGE <br /> Solaris = 5.8,5.9, <strong>5.10</strong> (that is to add 5.10) <br /> Windows = 4.0,5.0,5.1,5.2 <br /> Linux = redhat-2.1AS <br /> HPUX = B.11.11 <br /> Decunix = V <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5.1" unitname="a"> 5.1A </st1:chmetcnv> , V5.1 <br /> AIX = <st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"> 5.1.0 </st1:chsdate> .0 <br /><br /> Preservation, in the implementation. . / runInstaller on OK. <o:p></o:p>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle10g-full-version-centos5-installed-the-installation-has-passed/" title="ORACLE10G full version centos5 installed (the installation has passed)">ORACLE10G full version centos5 installed (the installation has passed)</a> 2009-03-31 09:49:10</li>
					<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/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/solaris-10-oracle10g-install/</wfw:commentRss>
	</item>
		<item>
		<title>oracle under unix command</title>
		<link>http://www.kods.netwww.kods.net/oracle-under-unix-command/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-under-unix-command/#comments</comments>
		<pubDate>Sun, 24 May 2009 01:30:28+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[oracle user]]></category>
<category><![CDATA[root user]]></category>
<category><![CDATA[oracle instance]]></category>
<category><![CDATA[database log]]></category>
<category><![CDATA[reconstruction]]></category>
<category><![CDATA[oracle corporation]]></category>
<category><![CDATA[fri]]></category>
<category><![CDATA[offline data]]></category>
<category><![CDATA[background processes]]></category>
<category><![CDATA[sga]]></category>
<category><![CDATA[oracle system]]></category>
<category><![CDATA[svrmgrl]]></category>
<category><![CDATA[machine environment]]></category>
<category><![CDATA[mode description]]></category>
<category><![CDATA[start 1]]></category>
<category><![CDATA[several ways]]></category>
<category><![CDATA[oct 31]]></category>
<category><![CDATA[unix command]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-under-unix-command/</guid>
		<description><![CDATA[oracle under unix command A, ORACLE startup and shut down 1, in a single environment in order to activate or deactivate the ORACLE system must first switch to the ORACLE user, as su - oracle a, start  ...]]></description>
		<content:encoded><![CDATA[oracle under unix command <br /><br /> A, ORACLE startup and shut down <br /> 1, in a single environment in order to activate or deactivate the ORACLE system must first switch to the ORACLE user, as <br /> su - oracle <br /><br /> a, start the ORACLE system <br /> oracle&gt; svrmgrl <br /> SVRMGR&gt; connect internal <br /> SVRMGR&gt; startup <br /> SVRMGR&gt; quit <br /><br /> b, shut down ORACLE system <br /> oracle&gt; svrmgrl <br /> SVRMGR&gt; connect internal <br /> SVRMGR&gt; shutdown <br /> SVRMGR&gt; quit <br /><br /> Oracle9i database start command: <br /> $ Sqlplus / nolog <br /><br /> SQL * Plus: Release 9.2.0.1.0 - Production on Fri Oct 31 13:53:53 2003 <br /><br /> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. <br /><br /> SQL&gt; connect / as sysdba <br /> Connected to an idle instance. <br /> SQL&gt; startup ^ C <br /><br /> SQL&gt; startup <br /> ORACLE instance started. <br /><br /> 2, in the two-machine environment in order to activate or deactivate the ORACLE system must first switch to the root user, as <br /> su - root <br /><br /> a, start the ORACLE system <br /> hareg-y oracle <br /><br /> b, shut down ORACLE system <br /> hareg-n oracle <br /><br /> What are the Oracle database start-up mode <br /><br /> Description: <br /><br /> There are several ways to start: <br /> 1, startup nomount <br /> Non-installation boot, under the executable to start this way: the reconstruction of the control file and rebuild the database <br /><br /> Read init.ora file, restart instance, that the SGA and background processes to start, which only need to activate init.ora file. <br /><br /> 2, startup mount dbname <br /> Start the installation, under the executable to start this way: <br /> Database log archiving, <br /> Database media recovery, <br /> So that online or offline data files, <br /> Re-positioning data files, redo log files. <br /><br /> The implementation of &quot;nomount&quot;, and then open the control file to confirm data files and online log file, <br /> However, at this time not data files and log files to check to check. <br /><br /> 3, startup open dbname <br /> First implementation of &quot;nomount&quot;, then &quot;mount&quot;, then open the Redo log file, including all database files, <br /> This way can access the data in the database. <br /><br /> 4, startup, equivalent to the following three command <br /> startup nomount <br /> alter database mount <br /> alter database open <br /><br /> 5, startup restrict <br /> Bound to start in this way to start the database, but only have a certain privilege allows users to access non-privileged user access, we will have the following tips: <br /> ERROR: <br /> ORA-01035: ORACLE only with RESTRICTED SESSION allow users to use <br /><br /> 6, startup force <br /> When start-up mode can not be forced to close the database, can be used to complete the startup force the closure of the database to close the database, and then the database command to start the implementation of the normal <br /><br /> 7, startup pfile = parameter file name with initialization parameter file to read the start-up mode parameter files, parameter file and then restart the database were set up: startup pfile = Eracleadminoradbpfileinit.ora <br /><br /> 8, startup EXCLUSIVE <br /> Second, the user how to effectively make use of the ORACLE data dictionary data dictionary is an important part of the database, one that it generated with the database created, with the database changes, <br /> Reflected in the number of sys user tables and views. Data Dictionary of the English name is an uppercase character. <br /><br /> Data dictionary are user information, the user&#39;s permission information, all data object information, table constraints, statistical analysis, such as a database view. <br /> We can not manually modify data dictionary information. <br /><br /> Very often, ORACLE users in general do not know how to use it effectively. <br /><br /> dictionary of all data dictionary table name and explained that it has a synonym dict <br /> dict_column all the data dictionary table field names and interpretation of <br /><br /> If we want to query with the index-related data dictionary can be used the following SQL statement: <br /><br /> SQL&gt; select * from dictionary where instr (comments, &#39;index&#39;)&gt; 0; <br /><br /> If we want to know user_indexes table details the meaning of the name field, you can use the following SQL statement that: <br /><br /> SQL&gt; select column_name, comments from dict_columns where table_name = &#39;USER_INDEXES&#39;; <br /><br /> And so on, you can easily know the name of the detailed data dictionary and explanation ORACLE not see the other documentation. <br /><br /> Below, by category, a number of user ORACLE data dictionary of commonly used methods of inquiry. <br /><br /> 1, the user <br /><br /> Show the current user&#39;s default tablespace <br /> SQL&gt; select username, default_tablespace from user_users; <br /><br /> Show the current user&#39;s role <br /> SQL&gt; select * from user_role_privs; <br /><br /> Show the current user of the system privileges and table-level permissions <br /> SQL&gt; select * from user_sys_privs; <br /> SQL&gt; select * from user_tab_privs; <br /><br /> 2, Table <br /><br /> See the table of all users <br /> SQL&gt; select * from user_tables; <br /><br /> Show the name of the table contains the log character <br /> SQL&gt; select object_name, object_id from user_objects<br /> where instr (object_name, &#39;LOG&#39;)&gt; 0; <br /><br /> See a table of the creation time <br /> SQL&gt; select object_name, created from user_objects where object_name = upper ( &#39;&amp; table_name&#39;); <br /><br /> See a table of size <br /> SQL&gt; select sum (bytes) / (1024 * 1024) as &quot;size (M)&quot; from user_segments <br /> where segment_name = upper ( &#39;&amp; table_name&#39;); <br /><br /> Show on the memory area ORACLE table <br /> SQL&gt; select table_name, cache from user_tables where instr (cache, &#39;Y&#39;)&gt; 0; <br /><br /> 3, index <br /><br /> View the index number and type of <br /> SQL&gt; select index_name, index_type, table_name from user_indexes order by table_name; <br /><br /> View index by the index field <br /> SQL&gt; select * from user_ind_columns where index_name = upper ( &#39;&amp; index_name&#39;); <br /><br /> View the index size <br /> SQL&gt; select sum (bytes) / (1024 * 1024) as &quot;size (M)&quot; from user_segments <br /> where segment_name = upper ( &#39;&amp; index_name&#39;); <br /><br /> 4, serial number <br /><br /> Show serial number, last_number is the current value <br /> SQL&gt; select * from user_sequences; <br /><br /> 5, view <br /><br /> See the name of view <br /> SQL&gt; select view_name from user_views; <br /><br /> See the select statement to create views <br /> SQL&gt; set view_name, text_length from user_views; <br /> SQL&gt; set long 2000; Description: text_length can view the value of setting the size of set long <br /> SQL&gt; select text from user_views where view_name = upper ( &#39;&amp; view_name&#39;); <br /><br /> 6, synonyms <br /><br /> See the name synonymous with <br /> SQL&gt; select * from user_synonyms; <br /><br /> 7, constraints <br /><br /> See a table of the Constraints <br /> SQL&gt; select constraint_name, constraint_type, search_condition, r_constraint_name <br /> from user_constraints where table_name = upper ( &#39;&amp; table_name&#39;); <br /><br /> SQL&gt; select c.constraint_name, c.constraint_type, cc.column_name <br /> from user_constraints c, user_cons_columns cc <br /> where c.owner = upper ( &#39;&amp; table_owner&#39;) and c.table_name = upper ( &#39;&amp; table_name&#39;) <br /> and c.owner = cc.owner and c.constraint_name = cc.constraint_name <br /> order by cc.position; <br /><br /> 8, memory function and the process of <br /><br /> View the status of functions and procedures <br /> SQL&gt; select object_name, status from user_objects where object_type = &#39;FUNCTION&#39;; <br /> SQL&gt; select object_name, status from user_objects where object_type = &#39;PROCEDURE&#39;; <br /><br /> View the function and process of source code <br /> SQL&gt; select text from all_source where owner = user and name = upper ( &#39;&amp; plsql_name&#39;); <br /><br /> Third, see the SQL database <br /> 1, see table space name and the size of <br /><br /> select t.tablespace_name, round (sum (bytes / (1024 * 1024)), 0) ts_size <br /> from dba_tablespaces t, dba_data_files d <br /> where t.tablespace_name = d.tablespace_name <br /> group by t.tablespace_name; <br /><br /> 2, see table space name and the physical file size <br /><br /> select tablespace_name, file_id, file_name, <br /> round (bytes / (1024 * 1024), 0) total_space <br /> from dba_data_files <br /> order by tablespace_name; <br /><br /> 3, view the rollback segment name and size <br /><br /> select segment_name, tablespace_name, r.status, <br /> (initial_extent/1024) InitialExtent, (next_extent/1024) NextExtent, <br /> max_extents, v.curext CurExtent <br /> From dba_rollback_segs r, v $ rollstat v <br /> Where r.segment_id = v.usn (+) <br /> order by segment_name; <br /><br /> 4, view the control file <br /><br /> select name from v $ controlfile; <br /><br /> 5, view the log file <br /><br /> select member from v $ logfile; <br /><br /> 6, view the use of table space <br /><br /> select sum (bytes) / (1024 * 1024) as free_space, tablespace_name <br /> from dba_free_space <br /> group by tablespace_name; <br /><br /> SELECT A. TABLESPACE_NAME, A. BYTES TOTAL, B. BYTES USED, C. BYTES FREE, <br /> (B. BYTES * 100) / A. BYTES &quot;% USED&quot;, (C. BYTES * 100) / A. BYTES &quot;% FREE&quot; <br /> FROM SYS.SM $ TS_AVAIL A, SYS.SM $ TS_USED B, SYS.SM $ TS_FREE C <br /> WHERE A. TABLESPACE_NAME = B. TABLESPACE_NAME AND A. TABLESPACE_NAME = C. TABLESPACE_NAME; <br /><br /> 7, view the database object library <br /><br /> select owner, object_type, status, count (*) count # from all_objects group by owner, object_type, status; <br /><br /> 8, see the database version <br /><br /> Select version FROM Product_component_version <br /> Where SUBSTR (PRODUCT, 1,6) = &#39;Oracle&#39;; <br /><br /> 9, the creation date to view the database and archiving methods <br /><br /> Select Created, Log_Mode, Log_Mode From V $ Database; <br /><br /> IV, ORACLE management of user connections <br /><br /> By system administrators to see the current database there are several user connections: <br /><br /> SQL&gt; select username, sid, serial # from v $ session; <br /><br /> If you want to stop a connection with <br /><br /> SQL&gt; alter system kill session &#39;sid, serial #&#39;; <br /><br /> If this command will not do, the process of looking for it a number of UNIX <br /><br /> SQL&gt; select pro.spid from v $ session ses, v $ process pro where ses.sid = 21 and ses.paddr = pro.addr; <br /><br /> Description: 21 is the sid of a number of connections <br /><br /> And then use the kill command to kill the process number. <br /><br /> 5, SQL * PLUS using <br /> a, near to the SQL * Plus <br /> $ sqlplus username / password <br /><br /> Quit SQL * Plus <br /> SQL&gt; exit <br /><br /> b, in sqlplus information listed under the help of all SQL commands and SQL * Plus command <br /> SQL&gt; help <br /> Are listed in order of a particular information <br /> SQL&gt; help command name <br /><br /> c, show the table structure DESCRIBE command <br /> SQL&gt; DESC table name <br /><br /> d, SQL * Plus command to display the SQL buffer editing command <br /> SQL&gt; L <br /><br /> SQL command to modify the first line to be corrected to the current row <br /> SQL&gt; n <br /> CHANGE command changes with <br /> SQL&gt; c / old / new re-verify that the correct <br /> SQL&gt; L <br /><br /> INPUT command can be used in the SQL buffer to add one or more lines of <br /> SQL&gt; i <br /> SQL&gt; input <br /><br /> e, call the external system editor <br /> SQL&gt; edit the file name can use the DEFINE command to set the system variable EDITOR to change the type of text editor in the paper are defined as follows login.sql his <br /> DEFINE_EDITOR = vi <br /><br /> f, run the command file <br /> SQL&gt; START test <br /> SQL&gt; test <br /><br /> SQL * Plus statements used <br /> a, the table to create, modify, create a table of command to delete the following format: <br /> create table table name (column description list); <br /><br /> Table-based commands add a new column as follows: <br /> ALTER TABLE table ADD (column description list) <br /> Cases: In order to increase test Table 1 Age, used to store the age of <br /> sql&gt; alter table test <br /> add (Age number (3)); <br /><br /> Amend the definition of order-based list is as follows: <br /> ALTER TABLE table name <br /> MODIFY (column name data type) <br /> Example: Count table test out the width to 10 characters long <br /> sql&gt; alter atble test <br /> modify (County char (10)); <br /><br /> b, a table will delete the form of statement is as follows: <br /> DORP TABLE table; <br /> For example: table delete to delete table data and table definition <br /> sql&gt; rop table test <br /><br /> c, table space to create, delete <br /><br /> 6, ORACLE logical backup file of SH <br /><br /> Full backup of the SH file: exp_comp.sh <br /><br /> rq = `date +&quot;% m% d &quot;` <br /><br /> su - oracle-c &quot;exp system / manager full = y inctype = complete file = / oracle / export / db_comp $ rq.dmp&quot; <br /><br /> SH cumulative backup file: exp_cumu.sh <br /><br /> rq = `date +&quot;% m% d &quot;` <br /><br /> su - oracle-c &quot;exp system / manager full = y inctype = cumulative file = / oracle / export / db_cumu $ rq.dmp&quot; <br /><br /> Incremental backups of the SH file: exp_incr.sh <br /><br /> rq = `date +&quot;% m% d &quot;` <br /><br /> su - oracle-c &quot;exp system / manager full = y inctype = incremental file = / oracle / export / db_incr $ rq.dmp&quot; <br /><br /> root user crontab file <br /> / var / spool / cron / crontabs / root, add the following content <br /><br /> 0 2 1 * * / oracle / exp_comp.sh <br /><br /> 30 2 * * 0-5 / oracle / exp_incr.sh <br /><br /> 45 2 * * 6 / oracle / exp_cumu.sh <br /><br /> Of course, this schedule can be based on different needs to change, and this is just one example. <br /><br /> 7, ORACLE common SQL syntax and data objects <br /><br /> 1. Data Control statements (DML) part of <br /><br /> 1.INSERT (data table to record the statement insert) <br /><br /> INSERT INTO table (field names 1, Field Name 2, ... ...) VALUES (value 1, value 2, ... ...); <br /> INSERT INTO table (field names 1, Field Name 2, ... ...) SELECT (field names 1, Field Name 2, ... ...) FROM another table; <br /><br /> String type field values must be enclosed in single quotation marks, for example: &#39;GOOD DAY&#39; <br /> If the field value contains single quotes&#39; need to convert a string, we replace it into two single quotes&#39;&#39;. <br /> String types of field values over the length of the definition to be wrong, best to check the length before insertion. <br /><br /> Field values of date fields may be time for the current database system SYSDATE, precise to the second or the date into a string function TO_DATE (&#39;2001-08-01 &#39;,&#39; YYYY-MM-DD &#39;) <br /> TO_DATE (), there is still a variety of date format, you can see ORACLE DOC. <br /> Year - month - day hour: minute: second format YYYY-MM-DD HH24: MI: SS <br /><br /> INSERT maximum operational length of the string less than or equal to 4000 single-byte, if you want to insert a longer string, please consider using CLOB type of field, <br /> ORACLE methods used in the DBMS_LOB own package. <br /><br /> If you use INSERT to automatically increase from 1 to start the serial number should be the establishment of a serial number <br /> CREATE SEQUENCE serial number of the name (preferably table name + serial number tag) INCREMENT BY 1 START WITH 1 <br /> MAXVALUE 99999 CYCLE NOCACHE; <br /> One of the biggest values to set the length field, if the definition of the serial number of automatic increase in NUMBER (6), max 999,999 <br /> INSERT statement to insert the field values as follows: the name of the serial number. NEXTVAL <br /><br /> 2.DELETE (data table records to delete the phrase) <br /><br /> DELETE FROM table WHERE conditions; <br /><br /> Note: the deletion of records and can not be occupied in the release of ORACLE data block tablespace. Only to those who have been to delete the data blocks marked as unused. <br /><br /> If you sure you want to delete a large table of all records, TRUNCATE command can be used, it can block the release of the data table occupied space <br /> TRUNCATE TABLE table; <br /> This action can not be back. <br /><br /> 3.UPDATE (modify table data recorded statement) <br /><br /> UPDATE table SET field name 1 = value 1, field 2 = value of 2, ... ... WHERE condition; <br /><br /> If the revised value of N there is no assignment or definition, will record the contents of the original clearance to NULL, before the revision of the best non-empty calibration; <br /> Value of N more than the length of the definition to be wrong, best to check the length before inserting .. <br /><br /> Note: <br /> A. The above SQL statement are added to the table row-level locks, <br /> Confirmed after the completion of processing must be added the end of the order of things to come into effect COMMIT, <br /> Otherwise, change is not necessarily written into the database. <br /> If you want the withdrawal of these operations can be used to recover ROLLBACK command. <br /><br /> B. run the INSERT, DELETE and UPDATE statements about the former may be the best estimate of the scope of operation records, <br /> It should be limited to the smaller (10,000 records) range. Otherwise ORACLE used a lot of things to deal with the back of the paragraph. <br /> Procedures to respond to the loss of response to slow or even. If more than the number of records in the hundreds of thousands of these operations, which were sub-sub-sub-SQL statement completed <br /> COMMIT to confirm things with which to deal with. <br /><br /> II. Data Definition (DDL) part of <br /><br /> 1.CREATE (create tables, indexes, views, synonyms, procedures, functions, database links, etc.) <br /><br /> ORACLE field types are commonly used <br /> Fixed length CHAR string <br /> Variable-length VARCHAR2 string <br /> NUMBER (M, N) the number of type M is the median total length, N is the length of a small number of <br /> DATE date type <br /><br /> Create a table should not be smaller space on the front of the field may be empty on the back of the field <br /><br /> Can be used to create table field names in Chinese, but the best of the field names in English <br /><br /> Create table fields can be added to the default value, for example, DEFAULT SYSDATE <br /> This insertion and changes every time, do not process the operation of the field action can be time <br /><br /> Can create a table to add constraints to the field are not allowed to repeat such as UNIQUE, keyword PRIMARY KEY <br /><br /> 2.ALTER (change table, index, view, etc.) <br /><br /> Change the name of the table <br /> ALTER TABLE table 1 TO table 2; <br /><br /> In the table after adding a field <br /> ALTER TABLE table name ADD paragraph description field names; <br /><br /> Amend the definition of exterior field description <br /> ALTER TABLE table MODIFY of the fields described in paragraph names; <br /><br /> Add fields to the exterior condition <br /> ALTER TABLE table name ADD CONSTRAINT constraint PRIMARY KEY (field names); <br /> ALTER TABLE table name ADD CONSTRAINT constraint UNIQUE (field names); <br /><br /> On the table or remove the memory database <br /> ALTER TABLE table CACHE; <br /> ALTER TABLE table NOCACHE; <br /><br /> 3.DROP (delete tables, indexes, views, synonyms, procedures, functions, database links, etc.) <br /><br /> Delete table and all its constraints <br /> DROP TABLE table CASCADE CONSTRAINTS; <br /><br /> 4.TRUNCATE (clear all records and deeds, to retain the table structure) <br /><br /> TRUNCATE table; <br /><br /> III. Query (SELECT) part <br /><br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] WHERE conditions; <br /><br /> Field names such as can be brought into the function: COUNT (*), MIN (field names), MAX (field names), AVG (fieldname), DISTINCT (field names), <br /> TO_CHAR (DATE field names, &#39;YYYY-MM-DD HH24: MI: SS&#39;) <br /><br /> NVL (EXPR1, EXPR2) function explained: <br /> IF EXPR1 = NULL <br /> RETURN EXPR2 <br /> ELSE <br /> RETURN EXPR1 <br /><br /> DECODE (AA, V1, R1, V2, R2 ....) function explained: <br /> IF AA = V1 THEN RETURN R1 <br /> IF AA = V2 THEN RETURN R2 <br /><br /> ELSE <br /> RETURN NULL <br /><br /> LPAD (char1, n, char2) function explained: <br /> Char1 character n in accordance with the development of the median show that the shortage of char2-digit string with the replacement of the left side of the space <br /><br /> Field names can be between the arithmetic operations such as: (1 * Field Name Field Name 1) / 3 <br /><br /> For example, can be nested query: SELECT ... ... FROM <br /> (SELECT ... ... FROM table 1, [table 2, ... ...] WHERE conditions) WHERE condition 2; <br /><br /> The results of two query operations such as the collection can be done: and set UNION (removing duplicate records), and set UNION ALL (do not remove duplicate records), Difference Sets MINUS, intersection INTERSECT <br /><br /> Sub-query <br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] GROUP BY field names 1 <br /> [HAVING conditions]; <br /><br /> Between two or more table join queries <br /><br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] WHERE <br /> Table 1. Field name = table name 2. Fieldname [AND ... ...]; <br /><br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] WHERE <br /> Table 1. Field name = table name 2. Field Name (+) [AND ... ...]; <br /><br /> There are (+) of the field-position auto-fill empty value <br /><br /> Query result set of the sort operation, the default is ascending order ASC, is descending DESC <br /><br /> SELECT fields of 1, Field Name 2, ... ... FROM table 1, [table 2, ... ...] <br /> ORDER BY field names 1, Field Name 2 DESC; <br /><br /> Fuzzy string comparison <br /><br /> INSTR (field names, &#39;string&#39;)&gt; 0 <br /> Field Name LIKE &#39;string%&#39; [ &#39;% string%&#39;] <br /><br /> Each table has a hidden field ROWID, it marks the uniqueness of records. <br /><br /> IV. ORACLE data objects in common (SCHEMA) <br /><br /> 1. Index (INDEX) <br /><br /> CREATE INDEX index name ON table (field 1, [field 2, ... ...]); <br /> ALTER INDEX index name REBUILD; <br /><br /> A table is best not to index more than 3 (except special pages), the best single-field index, combined with an analysis of SQL statements implementation <br /> Can also create a combination of multi-field index and the index based on function <br /><br /> ORACLE8.1.7 string of maximum length can be indexed for 1578 single-byte <br /> ORACLE8.0.6 string can be indexed to the maximum length of 758 single-byte <br /><br /> 2. View (VIEW) <br /><br /> Of CREATE VIEW view AS SELECT .... FROM ... ..; <br /> ALTER VIEW view name COMPILE; <br /><br /> View only a SQL query, which can form complex relationship between the simplicity of. <br /><br /> 3. Synonyms (SYNONMY) <br /> CREATE SYNONYM synonym name FOR table; <br /> CREATE SYNONYM synonym name FOR table @ database link name; <br /><br /> 4. Database link (DATABASE LINK) <br /> Database link CREATE DATABASE LINK name CONNECT TO username IDENTIFIED BY password USING &#39;database connection string&#39;; <br /><br /> Database connection string can be used directly NET8 EASY CONFIG modify TNSNAMES.ORA or in definition. <br /><br /> Database parameters global_name = true when asked the name of the database link with the remote database name <br /><br /> Global database name can be identified with the following command <br /> SELECT * FROM GLOBAL_NAME; <br /><br /> Query the remote database table <br /> SELECT ... ... FROM table @ database link name; <br /><br /> 5. Rights Management (DCL) statements <br /><br /> Giving permission 1.GRANT common set of system privileges are the following three: <br /> CONNECT (basic connection), RESOURCE (Programming), DBA (database management) <br /> Commonly used data objects have the following five rights: <br /> ALL ON data object name, SELECT ON data object name, UPDATE ON data object name, <br /> DELETE ON object name data, INSERT ON data object name, ALTER ON data object name <br /><br /> GRANT CONNECT, RESOURCE TO username; <br /> GRANT SELECT ON table TO user name; <br /> GRANT SELECT, INSERT, DELETE ON table TO user name 1, User Name 2; <br /><br /> 2.REVOKE recovery authority <br /><br /> REVOKE CONNECT, RESOURCE FROM username; <br /> REVOKE SELECT ON table FROM user name; <br /> REVOKE SELECT, INSERT, DELETE ON table FROM user name 1, User Name 2; <br /><br /> Query the database Error No. 63: <br /> select orgaddr, destaddr from sm_histable0116 where error_code =&#39;63 &#39;; <br /><br /> Users query the database to open an account to submit the largest and the largest number of issued: select MSISDN, TCOS, OCOS from ms_usertable; <br /><br /> Query the database in the sum of a variety of error codes: <br /> select error_code, count (*) from sm_histable0513 group by error_code order <br /> by error_code; <br /><br /> If the database query statements for a single type of query statistics. <br /> select sum (Successcount) from tbl_MiddleMt0411 where ServiceType2 = 111 <br /> select sum (successcount), servicetype from tbl_middlemt0411 group by servicetype				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-under-unix-command/</wfw:commentRss>
	</item>
		<item>
		<title>DBA should have the character</title>
		<link>http://www.kods.netwww.kods.net/dba-should-have-the-character/</link>
		<comments>http://www.kods.netwww.kods.net/dba-should-have-the-character/#comments</comments>
		<pubDate>Sat, 23 May 2009 07:14:17+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[s system]]></category>
<category><![CDATA[system performance]]></category>
<category><![CDATA[root causes]]></category>
<category><![CDATA[jin yong]]></category>
<category><![CDATA[inflection point]]></category>
<category><![CDATA[natural enemies]]></category>
<category><![CDATA[dba tasks]]></category>
<category><![CDATA[career path]]></category>
<category><![CDATA[panacea]]></category>
<category><![CDATA[heroine]]></category>
<category><![CDATA[career development]]></category>
<category><![CDATA[mentors]]></category>
<category><![CDATA[technical staff]]></category>
<category><![CDATA[martial arts]]></category>
<category><![CDATA[grasp]]></category>
<category><![CDATA[habit]]></category>
<category><![CDATA[novels]]></category>
<category><![CDATA[personality]]></category>
<category><![CDATA[breakthrough]]></category>
<category><![CDATA[decades]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/dba-should-have-the-character/</guid>
		<description><![CDATA[Each DBA path of growth is different, because no one is born with the DBA, each DBA are in their own career path through the inflection point to an accidental DBA and not through their own career plan ...]]></description>
		<content:encoded><![CDATA[Each DBA path of growth is different, because no one is born with the DBA, each DBA are in their own career path through the inflection point to an accidental DBA and not through their own career planning. Now, a growing number of young technical staff of their own career development has done a very good planning, this can take a lot less of a detour. <br /> As a detour away a lot of old DBA, my feeling is the growth of DBA is a shortcut to the road, and in this way grow, not all will be paid a reasonable return. Some people will go very easily, some people are exceptionally difficult. This is the opportunities related to a person, just like the inside of Jin Yong&#39;s martial arts novels, some people need to practice for several decades in order to make a breakthrough, and the heroine are often met through some chance, the Zhengguo Xiucheng. A DBA in the growth of the road, choose the correct way to join the right team, met the right mentors, and Jin Yong&#39;s martial arts inside the welded face or eat the ice-bed is as important as the cure-all panacea. <br /><br /> To become a good DBA, effort alone is not enough, there are many factors determine the success of the DBA. Individual&#39;s personality is very important for the DBA. First of all, DBA need to calm character, failing to fear, doing things orderly. DBA work experience in a wide range of challenges facing the challenges of time, thought it is very important before taking any action, in the absence of adequate grasp before, do not do any thing, this is the criteria for iron DBA. To develop such a style, calm personality from birth is essential. Of course, some styles can be acquired habit, but some natural enemies of character is the DBA. <br /><br /> I have encountered one thing, when a customer&#39;s system there are some problems, we need to assist the analysis, the issue of system performance to identify root causes. I arranged for a DBA tasks to do, and I told him that he is only allowed to observe the system, can not do anything. Early in the morning the next day, I just boot, there is incoming customer calls, saying that how the system can not be used. And so busy I have a buddy that night when the wake from the dream, I only know that he 100G last night for a table so close to one hundred percent of the sample analysis of the entire table. The analysis of 8:00 in the morning, when not yet been completed. Later I asked the DBA, why do such a foolish. He said he is not clear when he began to be very clear that the system can not do anything, but he found that this form may be the analysis of the proportion of inadequate samples, if the re-analysis can solve this problem, so He wanted to try, even though he knew that he should not do any action, but he has a dominant impulse is to want to try, which he has done a calculation, it is estimated that before the 9:00 am to complete the analysis done so. <br /><br /> The above example is a typical example, the DBA should know what to do, but under the domination of curiosity, he has done wrong, this is the personality deficiencies caused. DBA usually late at night to work independently at this time, some non-rational decisions is a闪念have often, when you recovered, you may find has cast a big mistake, everything is too late. As a DBA, the face of the production system, any non-rational may be your career terminated, steady DBA for the importance of character can be seen on the. <br /><br /> From the previous example we can learn is that, as a DBA, can not be too confident. Self-confidence is a DBA must have the quality, in this regard, often two extremes. The first is the extreme lack of self-confidence, which is almost all DBA industry have just entered the common problem of technical personnel, in the face of customers, did not dare speak aloud, afraid to express their point of view. Mainly from lack of self-confidence in the ability of their own uncertainty, says the wrong thing is always afraid of their own. My colleagues and I always said that as long as your strong technical than customers, then you are an expert is the expert you, you said is correct. Just getting started for the DBA, the establishment of a strong self-confidence is crucial, but this process is very long, according to each person&#39;s different abilities and character, often to a few years time. A small number of DBA in a short period of time to establish self-confidence, which depends mainly on the understanding that this person, if he is able to quickly and customers from the exchanges that the level of customers, then he may be able to quickly establish a technology based on their own the capacity of self-confidence. Lack of self-confidence will become a door to your success in the outside of the DBA, so the establishment of full self-confidence is to be the best first step in DBA. <br /><br /> And compared to a lack of confidence, excessive self-confidence is very dangerous, lack of self-confidence is very easy to underestimate the customer does not have too much harm, and excessive self-confidence is the culprit of the majority of errors. DBA is always a lot of the old saying that DBA longer, less timid. Application system is very complex and can not一定之规. So the old DBA always suspected their own to determine whether entirely accurate. Excessive self-confidence and often appear in the new long-term DBA is found in a number of projects successfully completed, the self-confidence is also very fast growth, self-confidence is a good thing in general growth, but growth in the self-confidence, while maintaining the necessary care is very important. <br /><br /> In addition to stable and self-confidence, DBA the next character is the team spirit necessary. Modern society is no longer the Knights on their own times, and do anything in the work of a team. Teamwork can greatly reduce the intensity of DBA work, to alleviate the pressure DBA. As a DBA, should not be feeling lonely, because it is a company, a team in doing this. DBA in the field can be obtained through various channels, as well as other corporate headquarters team of experienced support team. Under such circumstances, will not encounter any problems feel powerless. Another aspect of team spirit is reflected in the team learning. Team learning can also speed up the growth of DBA, the so-called team learning is the same when we go to school, a group of people learning together. And school is a different era, DBA team to learn more efficient. For example, there are currently three points need to learn the knowledge, if the individual learning, the need for 3 months. Well, if there is a team, 3 individuals with learning, can be completed within one month learning a knowledge point, and then through the one month that we can exchange ideas, then 2 months to learn the team 3 months to achieve the effect of individual learning. <br /><br /> The spirit of seeking truth is to become an essential quality of senior DBA at any time, must be used to treat the spirit of seeking truth. At present, information on the DBA full of the Internet, in the learning process, we must not blindly believe that others, everything should be carefully sought, it is best able to carry out such experiments. I met many friends, have problems, whether or not it is important to test the production of the Treasury or the Treasury, are directly to the Internet to find some solutions, to find relevant information, the lack of a serious screening, they hurry to the operation, and finally led to very serious consequences. Dared to question the spirit of everything is very valuable. DBA of the learning process is an ongoing challenge, continuing the process of seeking truth, only with all the attitude of suspicion to learn before they can continue to explore the depth to reach the highest realm.				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle-is-willing-to-buy-7-4-billion-us-dollars-from-sun/" title="Oracle is willing to buy 7.4 billion US dollars from Sun">Oracle is willing to buy 7.4 billion US dollars from Sun</a> 2009-04-21 10:20:46</li>
					<li><a href="http://www.kods.netwww.kods.net/zoning-on-the-oracle/" title="Zoning on the Oracle">Zoning on the Oracle</a> 2009-04-15 00:52:26</li>
					<li><a href="http://www.kods.netwww.kods.net/the-first-part-4-based-on-the-communication-process-i/" title="The first part (4) based on the communication process (I)">The first part (4) based on the communication process (I)</a> 2009-04-09 18:56:48</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-basic-concepts-and-terminology/" title="oracle basic concepts and terminology">oracle basic concepts and terminology</a> 2009-04-06 22:17:39</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-database-used-to-maintain-day-to-day-command/" title="Oracle database used to maintain day-to-day command">Oracle database used to maintain day-to-day command</a> 2009-04-06 16:46:33</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/dba-should-have-the-character/</wfw:commentRss>
	</item>
		<item>
		<title>Oracle Exp-00003 on the solution to the problem</title>
		<link>http://www.kods.netwww.kods.net/oracle-exp-00003-on-the-solution-to-the-problem/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-exp-00003-on-the-solution-to-the-problem/#comments</comments>
		<pubDate>Fri, 22 May 2009 22:19:02+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle home]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[olap]]></category>
<category><![CDATA[data mining]]></category>
<category><![CDATA[00003]]></category>
<category><![CDATA[oracle exp]]></category>
<category><![CDATA[database server side]]></category>
<category><![CDATA[oracle corporation]]></category>
<category><![CDATA[file server]]></category>
<category><![CDATA[two solutions]]></category>
<category><![CDATA[rdbms]]></category>
<category><![CDATA[oracle system]]></category>
<category><![CDATA[oracle 9]]></category>
<category><![CDATA[dmp file]]></category>
<category><![CDATA[export line]]></category>
<category><![CDATA[initial location]]></category>
<category><![CDATA[day before yesterday]]></category>
<category><![CDATA[uet]]></category>
<category><![CDATA[character set]]></category>
<category><![CDATA[local guide]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-exp-00003-on-the-solution-to-the-problem/</guid>
		<description><![CDATA[Oracle Exp-00003 on the solution to the problem The day before yesterday in the lead when the data have taken place in the Exp-00003 error, before encountered such a problem, the solution is to the da ...]]></description>
		<content:encoded><![CDATA[<h1> <font size="5"><font face="Times New Roman">Oracle Exp-00003</font> on the solution to the problem</font> </h1><br /> <font size="3"><font face="Times New Roman">  </font> The day before yesterday in the lead when the data have taken place in the <font face="Times New Roman">Exp-00003</font> error, before encountered such a problem, the solution is to the database server on the local guide, problem solving, but this is from <font face="Times New Roman">oracle</font></font> 9.2.0.1.0 <font size="3">Export the client (and the database server is <font face="Times New Roman">10.2.0.1.0),</font> the requirements of the <font face="Times New Roman">export</font> with export <font face="Times New Roman">9.2.0.1.0,</font> because the <font face="Times New Roman">DMP</font> file to export into <font face="Times New Roman">9.2.0.1.0,</font> so that this machine derived method does not work, find the appropriate documentation after issue is resolved, the following solution for the records.</font> <br /><br /> <font size="3" color="#ff0000">D: \ hanganbuild&gt; exp hangyun /</font> hangyun <font size="3" color="#ff0000">@</font> HANGAN100 <font size="3" color="#ff0000">file = c: \ 0425.dmp tables = sys_news</font> <br /><br /> <font size="3" color="#ff0000">Export: Release</font> 9.2.0.1.0 <font size="3" color="#ff0000">- Production on Wednesday, April 25 13:24:34 2007</font> <br /><br /> <font size="3" color="#ff0000">Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.</font> <br /><br /> <font size="3" color="#ff0000">Connect to: Oracle Database 10g Enterprise Edition Release</font> 10.2.0.1.0 <font size="3" color="#ff0000">- Production <br /> With the Partitioning, OLAP and Data Mining options <br /> ZHS16GBK have been derived AL16UTF16 NCHAR character set and character set</font> <br /><br /> <font size="3" color="#ff0000">About to export specified tables by conventional path ... <br /> .. Are derived table SYS_NEWS <br /> EXP-00003: not found in paragraph (4,99363) definition of export storage to terminate, but a warning.</font> <br /><br /> <font size="3">Encountered such a situation there are two solutions: one is the above-mentioned to the server to export the machine, but at this time and the <font face="Times New Roman">DMP</font> file server on the local version of the <font face="Times New Roman">EXPORT</font> line.</font> <br /><br /> <font size="3">The second way is to change the database server-side view of the <font face="Times New Roman">oracle</font> system <font face="Times New Roman">definition:</font></font> <br /><br /> <font size="3">To view <font face="Times New Roman">specific:</font></font> EXU9TNE <br /><br /> <font size="3">The view at the time of the initial location for the creation <font face="Times New Roman">of: <font color="#0000ff">$ ORACLE_HOME / rdbms / admin / catexp.sql</font></font> Lane</font> <br /><br /> <font size="3">Initial is defined <font face="Times New Roman">as:</font></font> <br /><br /> <strong><font size="3" face="Times New Roman">CREATE</font></strong> <font size="3"><font face="Times New Roman"><strong>OR REPLACE VIEW EXU9TNE</strong> <br /> (tsno, fileno, blockno, length) <br /> <strong>AS</strong> <br /> <strong>SELECT</strong> ts #,</font></font> segfile <font size="3"><font face="Times New Roman">#,</font></font> segblock <font size="3"><font face="Times New Roman">#, length <br /> <strong>FROM sys.</strong></font></font> Uet <font size="3"><font face="Times New Roman">$ <br /> <strong>WHERE</strong> ext # = 1</font></font> <br /><br /> <font size="3"><font face="Times New Roman">Sys</font> user to log on the database server to re-establish the view: <font face="Times New Roman"> </font></font> <br /><br /> <strong><font size="3" face="Times New Roman">CREATE</font></strong> <font size="3"><font face="Times New Roman"><strong>OR REPLACE VIEW EXU9TNE</strong> <br /> (tsno, fileno, blockno, length) <br /> <strong>AS</strong> <br /> <strong>SELECT</strong> ts #,</font></font> segfile <font size="3"><font face="Times New Roman">#,</font></font> segblock <font size="3"><font face="Times New Roman">#, length <br /> <strong>FROM sys.</strong></font></font> Uet <font size="3"><font face="Times New Roman">$ <br /> <strong>WHERE</strong> ext # = 1 <br /> <font color="#ff0000">UNION ALL select &quot;TSNO&quot;, &quot;FILENO&quot;, &quot;BLOCKNO&quot;, &quot;LENGTH&quot; from</font></font></font> sys.exu9tneb <br /><br /> <font size="3">Is to increase attention to the above statement marked red</font> <br /><br /> <font size="3">And then try the next should be <font face="Times New Roman">OK.</font></font> <br /><br /> <font size="3" color="#ff0000">D: \ hanganbuild&gt; exp hangyun /</font> hangyun <font size="3" color="#ff0000">@</font> HANGAN100 <font size="3" color="#ff0000">file = c: \ 0425.dmp tables = sys_news</font> <br /><br /> <font size="3" color="#ff0000">Export: Release</font> 9.2.0.1.0 <font size="3" color="#ff0000">- Production on Wednesday, April 25 13:36:31 2007</font> <br /><br /> <font size="3" color="#ff0000">Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.</font> <br /><br /> <font size="3" color="#ff0000">Connect to: Oracle Database 10g Enterprise Edition Release</font> 10.2.0.1.0 <font size="3" color="#ff0000">- Production <br /> With the Partitioning, OLAP and Data Mining options <br /> ZHS16GBK have been derived AL16UTF16 NCHAR character set and character set</font> <br /><br /> <font size="3" color="#ff0000">About to export specified tables by conventional path ... <br /> .. Are derived table SYS_NEWS 4999 line was derived</font><br /> In the absence of warning, to terminate the export. <br /><br /> <font size="3">(Note: <font face="Times New Roman">Oracle&#39;s</font> system is better not to easily view changes to the Executive after the operation,</font> it <font size="3">is best to revert to the original view) <br /><br /></font>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle10g-full-version-centos5-installed-the-installation-has-passed/" title="ORACLE10G full version centos5 installed (the installation has passed)">ORACLE10G full version centos5 installed (the installation has passed)</a> 2009-03-31 09:49:10</li>
					<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>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-exp-00003-on-the-solution-to-the-problem/</wfw:commentRss>
	</item>
		<item>
		<title>See the "direct search results for the empty" view</title>
		<link>http://www.kods.netwww.kods.net/see-the-direct-search-results-for-the-empty-view/</link>
		<comments>http://www.kods.netwww.kods.net/see-the-direct-search-results-for-the-empty-view/#comments</comments>
		<pubDate>Fri, 22 May 2009 22:13:41+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[inquiries]]></category>
<category><![CDATA[query window]]></category>
<category><![CDATA[language environment]]></category>
<category><![CDATA[application environment]]></category>
<category><![CDATA[language film]]></category>
<category><![CDATA[direct search]]></category>
<category><![CDATA[direct access]]></category>
<category><![CDATA[occurrence]]></category>
<category><![CDATA[iew]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/see-the-direct-search-results-for-the-empty-view/</guid>
		<description><![CDATA[Direct access to a number of view will not return any results. There are two reasons for this situation would lead to the occurrence of: view the use of ou shielding, the client query, it is necessary ...]]></description>
		<content:encoded><![CDATA[Direct access to a number of view will not return any results. There are two reasons for this situation would lead to the occurrence of: <br /><br /><ol><li> <strong>view the use of ou shielding,</strong> the client query, it is necessary to simulate the operation of the application of user login before they can carry out its inquiries. (Such as purchase order summary view) <br /> The solution: run fnd_global.APPS_INITIALIZE () to initialize the environment, and then be able to query the. <li> v <strong>iew of the client the impact of language environment,</strong> not inquiries, the general view in the establishment of the statement, there will be XXX = userenv ( &#39;LANG&#39;) these conditions. <br /> The solution: run the statement in the query window: <font face=SimSun>ALTER session SET</font> NLS_LANGUAGE <font face=SimSun>= American; (in accordance with the language of your application environment to determine what language film).</font> </li></ol>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle-set-order-to-introduce/" title="oracle set order to introduce">oracle set order to introduce</a> 2009-05-20 15:09:33</li>
					<li><a href="http://www.kods.netwww.kods.net/summary-of-the-partition-table/" title="Summary of the partition table">Summary of the partition table</a> 2009-04-21 18:21:19</li>
					<li><a href="http://www.kods.netwww.kods.net/the-second-part-15-practice-to-create-table-space-level-replication-environment-1-to-initialize-the-environment/" title="The second part (15) practice to create table space-level replication environment (1) to initialize the environment">The second part (15) practice to create table space-level replication environment (1) to initialize the environment</a> 2009-04-09 04:28:38</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-to-create-data-table-space-the-user-authorization-table-index-cluster/" title="Oracle to create data table space, the user, authorization, table, index, cluster">Oracle to create data table space, the user, authorization, table, index, cluster</a> 2009-04-06 06:17:29</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-to-create-data-table-space-the-user-authorization-tables-indexes-clusters/" title="Oracle to create data table space, the user, authorization, tables, indexes, clusters">Oracle to create data table space, the user, authorization, tables, indexes, clusters</a> 2009-04-06 06:08:26</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/see-the-direct-search-results-for-the-empty-view/</wfw:commentRss>
	</item>
		<item>
		<title>Oracle Exp-00003 on the question of solution</title>
		<link>http://www.kods.netwww.kods.net/oracle-exp-00003-on-the-question-of-solution/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-exp-00003-on-the-question-of-solution/#comments</comments>
		<pubDate>Fri, 22 May 2009 21:30:55+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle home]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[olap]]></category>
<category><![CDATA[data mining]]></category>
<category><![CDATA[00003]]></category>
<category><![CDATA[oracle exp]]></category>
<category><![CDATA[database server side]]></category>
<category><![CDATA[oracle corporation]]></category>
<category><![CDATA[file server]]></category>
<category><![CDATA[two solutions]]></category>
<category><![CDATA[rdbms]]></category>
<category><![CDATA[oracle system]]></category>
<category><![CDATA[oracle 9]]></category>
<category><![CDATA[dmp file]]></category>
<category><![CDATA[export line]]></category>
<category><![CDATA[initial location]]></category>
<category><![CDATA[day before yesterday]]></category>
<category><![CDATA[uet]]></category>
<category><![CDATA[character set]]></category>
<category><![CDATA[local guide]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-exp-00003-on-the-question-of-solution/</guid>
		<description><![CDATA[Oracle Exp-00003 on the solution to the problem The day before yesterday in the lead when the data have taken place in the Exp-00003 error, before encountered such a problem, the solution is to the da ...]]></description>
		<content:encoded><![CDATA[<h1> <font size="5"><font face="Times New Roman">Oracle Exp-00003</font> on the solution to the problem</font> </h1><br /> <font size="3"><font face="Times New Roman">  </font> The day before yesterday in the lead when the data have taken place in the <font face="Times New Roman">Exp-00003</font> error, before encountered such a problem, the solution is to the database server on the local guide, problem solving, but this is from <font face="Times New Roman">oracle</font></font> 9.2.0.1.0 <font size="3">Export the client (and the database server is <font face="Times New Roman">10.2.0.1.0),</font> the requirements of the <font face="Times New Roman">export</font> with export <font face="Times New Roman">9.2.0.1.0,</font> because the <font face="Times New Roman">DMP</font> file to export into <font face="Times New Roman">9.2.0.1.0,</font> so that this machine derived method does not work, find the appropriate documentation after issue is resolved, the following solution for the records.</font> <br /><br /> <font size="3" color="#ff0000">D: \ hanganbuild&gt; exp hangyun /</font> hangyun <font size="3" color="#ff0000">@</font> HANGAN100 <font size="3" color="#ff0000">file = c: \ 0425.dmp tables = sys_news</font> <br /><br /> <font size="3" color="#ff0000">Export: Release</font> 9.2.0.1.0 <font size="3" color="#ff0000">- Production on Wednesday, April 25 13:24:34 2007</font> <br /><br /> <font size="3" color="#ff0000">Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.</font> <br /><br /> <font size="3" color="#ff0000">Connect to: Oracle Database 10g Enterprise Edition Release</font> 10.2.0.1.0 <font size="3" color="#ff0000">- Production <br /> With the Partitioning, OLAP and Data Mining options <br /> ZHS16GBK have been derived AL16UTF16 NCHAR character set and character set</font> <br /><br /> <font size="3" color="#ff0000">About to export specified tables by conventional path ... <br /> .. Are derived table SYS_NEWS <br /> EXP-00003: not found in paragraph (4,99363) definition of export storage to terminate, but a warning.</font> <br /><br /> <font size="3">Encountered such a situation there are two solutions: one is the above-mentioned to the server to export the machine, but at this time and the <font face="Times New Roman">DMP</font> file server on the local version of the <font face="Times New Roman">EXPORT</font> line.</font> <br /><br /> <font size="3">The second way is to change the database server-side view of the <font face="Times New Roman">oracle</font> system <font face="Times New Roman">definition:</font></font> <br /><br /> <font size="3">To view <font face="Times New Roman">specific:</font></font> EXU9TNE <br /><br /> <font size="3">The view at the time of the initial location for the creation <font face="Times New Roman">of: <font color="#0000ff">$ ORACLE_HOME / rdbms / admin / catexp.sql</font></font> Lane</font> <br /><br /> <font size="3">Initial is defined <font face="Times New Roman">as:</font></font> <br /><br /> <strong><font size="3" face="Times New Roman">CREATE</font></strong> <font size="3"><font face="Times New Roman"><strong>OR REPLACE VIEW EXU9TNE</strong> <br /> (tsno, fileno, blockno, length) <br /> <strong>AS</strong> <br /> <strong>SELECT</strong> ts #,</font></font> segfile <font size="3"><font face="Times New Roman">#,</font></font> segblock <font size="3"><font face="Times New Roman">#, length <br /> <strong>FROM sys.</strong></font></font> Uet <font size="3"><font face="Times New Roman">$ <br /> <strong>WHERE</strong> ext # = 1</font></font> <br /><br /> <font size="3"><font face="Times New Roman">Sys</font> user to log on the database server to re-establish the view: <font face="Times New Roman"> </font></font> <br /><br /> <strong><font size="3" face="Times New Roman">CREATE</font></strong> <font size="3"><font face="Times New Roman"><strong>OR REPLACE VIEW EXU9TNE</strong> <br /> (tsno, fileno, blockno, length) <br /> <strong>AS</strong> <br /> <strong>SELECT</strong> ts #,</font></font> segfile <font size="3"><font face="Times New Roman">#,</font></font> segblock <font size="3"><font face="Times New Roman">#, length <br /> <strong>FROM sys.</strong></font></font> Uet <font size="3"><font face="Times New Roman">$ <br /> <strong>WHERE</strong> ext # = 1 <br /> <font color="#ff0000">UNION ALL select &quot;TSNO&quot;, &quot;FILENO&quot;, &quot;BLOCKNO&quot;, &quot;LENGTH&quot; from</font></font></font> sys.exu9tneb <br /><br /> <font size="3">Is to increase attention to the above statement marked red</font> <br /><br /> <font size="3">And then try the next should be <font face="Times New Roman">OK.</font></font> <br /><br /> <font size="3" color="#ff0000">D: \ hanganbuild&gt; exp hangyun /</font> hangyun <font size="3" color="#ff0000">@</font> HANGAN100 <font size="3" color="#ff0000">file = c: \ 0425.dmp tables = sys_news</font> <br /><br /> <font size="3" color="#ff0000">Export: Release</font> 9.2.0.1.0 <font size="3" color="#ff0000">- Production on Wednesday, April 25 13:36:31 2007</font> <br /><br /> <font size="3" color="#ff0000">Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.</font> <br /><br /> <font size="3" color="#ff0000">Connect to: Oracle Database 10g Enterprise Edition Release</font> 10.2.0.1.0 <font size="3" color="#ff0000">- Production <br /> With the Partitioning, OLAP and Data Mining options <br /> ZHS16GBK have been derived AL16UTF16 NCHAR character set and character set</font> <br /><br /> <font size="3" color="#ff0000">About to export specified tables by conventional path ... <br /> .. Are derived table SYS_NEWS 4999 line was derived</font><br /> In the absence of warning, to terminate the export. <br /><br /> <font size="3">(Note: <font face="Times New Roman">Oracle&#39;s</font> system is better not to easily view changes to the Executive after the operation,</font> it <font size="3">is best to revert to the original view) <br /><br /></font>				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/oracle10g-full-version-centos5-installed-the-installation-has-passed/" title="ORACLE10G full version centos5 installed (the installation has passed)">ORACLE10G full version centos5 installed (the installation has passed)</a> 2009-03-31 09:49:10</li>
					<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>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-exp-00003-on-the-question-of-solution/</wfw:commentRss>
	</item>
		<item>
		<title>The use of EBS fnd_global.apps_initialize</title>
		<link>http://www.kods.netwww.kods.net/the-use-of-ebs-fnd-global-apps-initialize/</link>
		<comments>http://www.kods.netwww.kods.net/the-use-of-ebs-fnd-global-apps-initialize/#comments</comments>
		<pubDate>Fri, 22 May 2009 20:43:48+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[parameters]]></category>
<category><![CDATA[apps]]></category>
<category><![CDATA[application id]]></category>
<category><![CDATA[global variables]]></category>
<category><![CDATA[parameter c]]></category>
<category><![CDATA[application number]]></category>
<category><![CDATA[gl]]></category>
<category><![CDATA[prototype]]></category>
<category><![CDATA[assets]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/the-use-of-ebs-fnd-global-apps-initialize/</guid>
		<description><![CDATA[Prototype: fnd_global.apps_initialize (user_ID, Responsibility_id, Responsibility_application_id); Role: the conversation in the database set up global variables, and user-summary information. Paramet ...]]></description>
		<content:encoded><![CDATA[Prototype: fnd_global.apps_initialize (user_ID, Responsibility_id, <br /><br /> Responsibility_application_id); <br /><br /> Role: the conversation in the database set up global variables, and user-summary information. <br /><br /> Parameters was: <br /><br /> Parameters of a User ID <br /><br /> select user_id <br /><br /> from fnd_user <br /><br /> where user_name like &#39;% OPERATIONS%&#39;; - ID of OPERATIONS: 1318 <br /><br /> Parameter b, duties ID (responsibility id) <br /><br /> select RESPONSIBILITY_ID, APPLICATION_ID, RESPONSIBILITY_KEY <br /> from fnd_responsibility <br /> - where APPLICATION_ID = 140 <br /> where RESPONSIBILITY_KEY like &#39;% ASSETS_VISION_OPERATIONS%&#39;; <br /><br /> Parameter c, on behalf of the duties of their applications (application) number <br /><br /> SQL access to the above <br /><br /> Run: <br /> BEGIN <br /> fnd_global.APPS_INITIALIZE (youruesr_id, yourresp_id, yourresp_appl_id); <br /> END; <br /><br /> Test: <br /><br /> select fnd_profile.value ( &#39;GL_SET_OF_BKS_ID&#39;) FROM DUAL; <br /><br /> fnd_profile.value ( &#39;USER_ID&#39;) - corresponds to just user_id				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<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/database-tuning-problem-parameter-binding-histogram-analysis/" title="Database tuning problem (parameter binding, Histogram Analysis)">Database tuning problem (parameter binding, Histogram Analysis)</a> 2009-04-03 23:53:10</li>
					<li><a href="http://www.kods.netwww.kods.net/setting-to-discuss-filing-oracle10g/" title="setting to discuss filing oracle10g">setting to discuss filing oracle10g</a> 2009-04-02 05:19:08</li>
					<li><a href="http://www.kods.netwww.kods.net/listener-and-ezconnect/" title="LISTENER and EZCONNECT">LISTENER and EZCONNECT</a> 2009-04-01 21:42:20</li>
					<li><a href="http://www.kods.netwww.kods.net/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/the-use-of-ebs-fnd-global-apps-initialize/</wfw:commentRss>
	</item>
		<item>
		<title>oracle install faq</title>
		<link>http://www.kods.netwww.kods.net/oracle-install-faq/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-install-faq/#comments</comments>
		<pubDate>Fri, 22 May 2009 06:48:38+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle export]]></category>
<category><![CDATA[oracle user]]></category>
<category><![CDATA[us mnt]]></category>
<category><![CDATA[correct approach]]></category>
<category><![CDATA[cdrom]]></category>
<category><![CDATA[appendix]]></category>
<category><![CDATA[confusion]]></category>
<category><![CDATA[amp]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-install-faq/</guid>
		<description><![CDATA[6, Appendix ◎ installation procedures are shown in &quot;box □&quot; This is because the installation procedure for Oracle to support the poor Chinese, we use in English can be installed, before runni ...]]></description>
		<content:encoded><![CDATA[6, Appendix ◎ installation procedures are shown in &quot;box □&quot; <br /> This is because the installation procedure for Oracle to support the poor Chinese, we use in English can be installed, before running the installation <br /><br /> # su - oracle <br /> $ export LANGUAGE = en_US <br /> $ export LANG = en_US <br /><br /> ◎ oranavi in the use of tools if there are problems in the installation, the next on how to continue? <br /> Do not oranavi many tools to guide the use of Oracle&#39;s installation process, which will lead to the environment under the Oracle user configuration confusion, the correct approach is: <br /><br /> # su - oracle <br /> $ export LANGUAGE = en_US <br /> $ export LANG = en_US <br /> $ / mnt / cdrom / runInstall &amp;				<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-install-faq/</wfw:commentRss>
	</item>
		<item>
		<title>Oracle network configuration used in the sqlnet.ora, tnsnames.ora, listener.ora</title>
		<link>http://www.kods.netwww.kods.net/oracle-network-configuration-used-in-the-sqlnet-ora-tnsnames-ora-listener-ora/</link>
		<comments>http://www.kods.netwww.kods.net/oracle-network-configuration-used-in-the-sqlnet-ora-tnsnames-ora-listener-ora/#comments</comments>
		<pubDate>Wed, 20 May 2009 22:16:36+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle home]]></category>
<category><![CDATA[oracle product]]></category>
<category><![CDATA[relationship]]></category>
<category><![CDATA[server side]]></category>
<category><![CDATA[listener]]></category>
<category><![CDATA[configuration file]]></category>
<category><![CDATA[ezconnect]]></category>
<category><![CDATA[network admin]]></category>
<category><![CDATA[network configuration]]></category>
<category><![CDATA[adoption]]></category>
<category><![CDATA[authentication services]]></category>
<category><![CDATA[unix environment]]></category>
<category><![CDATA[connection string]]></category>
<category><![CDATA[content description]]></category>
<category><![CDATA[default domain]]></category>
<category><![CDATA[configuration tools]]></category>
<category><![CDATA[directory path]]></category>
<category><![CDATA[database server]]></category>
<category><![CDATA[netca]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/oracle-network-configuration-used-in-the-sqlnet-ora-tnsnames-ora-listener-ora/</guid>
		<description><![CDATA[Oracle network configuration used in the sqlnet.ora, tnsnames.ora, listener.ora file Note: The article and related content from the network from finishing the book, so only the sharing of knowledge, t ...]]></description>
		<content:encoded><![CDATA[Oracle network configuration used in the sqlnet.ora, tnsnames.ora, listener.ora file Note: The article and related content from the network from finishing the book, so only the sharing of knowledge, to help. <br /><br /> listener.ora, tnsnames.ora and sqlnet.ora This document is the relationship between three network configuration oracle of three key documents are on the $ ORACLE_HOME \ network \ admin directory. Listener.ora which is server-side and database-related, while the tnsnames.ora and sqlnet.ora files that not only two related to the server-side, the main thing is to work closely and client relations. <br /><br /> A client set up <br /><br /> 1.sqlnet.ora <br /><br /> The adoption of the document to determine how to find a connection in the connection string appears <br /><br /> Sample file: <br /> # Sqlnet.ora Network Configuration File: F: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ sqlnet.ora <br /> # Generated by Oracle configuration tools. <br /><br /> # This file is actually generated by netca. But if customers choose to <br /> # Install &quot;Software Only&quot;, this file wont exist and without the native <br /> # Authentication, they will not be able to connect to the database on NT. <br /><br /> SQLNET.AUTHENTICATION_SERVICES = (NTS) <br /><br /> NAMES.DIRECTORY_PATH = (TNSNAMES, HOSTNAME, ONAMES, EZCONNECT) <br /><br /> # NAMES.DEFAULT_DOMAIN = oracle.com <br /><br /> Content Description: <br /><br /> SQLNET.AUTHENTICATION_SERVICES = (NTS) - that the use of the OS authentication, the database server, you can use sqlplus / as sysdba. General this configuration is ok in the windows, and in the unix environment there may be some problems, and generally can be removed under unix this configuration. <br /><br /> NAMES.DIRECTORY_PATH = (TNSNAMES, HOSTNAME, ONAMES) - that will be the first to make use of analytical tnsnames; tnsnames analytic if not, will be used to resolve hostname; If the hostname can not resolve, will be used to resolve onames; the final analysis the use of EZCONNECT. For example, we enter the client: sqlplus zidi / zidi @ changbai, then the client will first look at the tnsnames.ora file orcl records. If there is no corresponding record is trying to bring as a host name orcl through network channels to resolve its IP address and then connect to this IP on global_name = changbai This example, of course, I am not a host name orcl. <br /><br /> Commented out the NAMES.DEFAULT_DOMAIN = changbai.com-- that the domain name using the default changbai.com, if tnsnames.ora configuration in the corresponding resolution, if the original database alias is oralocal (that is, the network service name), then When this parameter is enabled after tnsnames to change the configuration oralocal.changbai.com. When using tnsping or sqlplus login, simply write in front of the alias, the system will automatically add the back to resolve the domain name. <br /><br /> 2.tnsnames.ora <br /><br /> The document on the client machine, the client access the database record of the local configuration, in fact, the definition of network services, sqlnet.ora only when there is &quot;NAMES.DIRECTORY_PATH = (TNSNAMES)&quot; when such a word, that is, the client analysis connection string in the order of TNSNAMES when try to use the document. <br /><br /> Sample file: <br /> # Tnsnames.ora Network Configuration File: F: \ oracle \ product \ 10.2.0 \ db_1 \ NETWORK \ ADMIN \ tnsnames.ora <br /> # Generated by Oracle configuration tools. <br /><br /> HUINAMN = network service name <br /> (DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) (HOST = 108.108.108.108) (PORT = 1521)) using the agreement to access the database, the database host computer name or IP address, port number database <br /> ) <br /> (CONNECT_DATA = <br /> (SID = HN) database instance name, the premise is that the database is connected to Oracle8 or earlier <br /> ) <br /> ) <br /> CHANGBAI = <br /> (DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) (HOST = 208.208.208.208) (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVICE_NAME = CB) database services, or global database name <br /> ) <br /> ) <br /> ORCL = <br /> (DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SERVER = DEDICATED) using a dedicated server mode to connect, it needs to do the pattern matching server, if there is no server on the basis of the automatic adjustment mode <br /> (SERVICE_NAME = orcl) <br /> ) <br /> ) <br /><br /> Second, set up server-side <br /> listener.ora <br /><br /> It is the listener process listener configuration file. On the listener process is not to say, the acceptance of remote access to the database and transferred to the oracle application server process. So if not using a remote connection, listener process is not necessary to close the listener if the same process and will not affect the already existing database connection. <br /><br /> Sample file: <br /> # Listener.ora Network Configuration File: F: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin \ listener.ora <br /> # Generated by Oracle configuration tools. <br /><br /> SID_LIST_LISTENER = here LISTENER process definition example for the provision of services which <br /> (SID_LIST = <br /> (SID_DESC = <br /> (SID_NAME = PLSExtProc) <br /> (ORACLE_HOME = F: \ oracle \ product \ 10.2.0 \ db_1)<br /> (PROGRAM = extproc) <br /> ) <br /> ) <br /><br /> LISTENER = listener name, a database can have more than one listener <br /> (DESCRIPTION_LIST = <br /> (DESCRIPTION = <br /> (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1)) listener monitoring the agreement, IP, port, etc. <br /> (ADDRESS = (PROTOCOL = TCP) (HOST = dabeng) (PORT = 1521)) <br /> ) <br /> ) <br /><br /> The above example is one of the most simple example, but it is also the most common. The process of a listener for a database instance (SID) to provide services. <br /><br /> Third, sum up <br /><br /> The three documents mentioned above to pass through the graphical configuration tools to complete the configuration: Database Configuration Assistant, Net Configuration Assistant <br /><br /> The specific configuration will try my best, and then look at the configuration file, so there will be a general structure is that when you type sqlplus zidi / zidi @ changbai time <br /><br /> 1. Sqlnet.ora look at the name query to resolve the way, found TNSNAME <br /> 2. Tnsnames.ora file query, from the inside looking orcl records, and to find the host name, port and service_name <br /> 3. If the listener process, there is no problem, then the process of establishing a connection with the listener. <br /> 4. According to a different server models such as the dedicated server mode or shared server mode, listener action to take next. The default is dedicated server mode, there is no problem if the client is connected to the database on the server process. <br /> 5. At this time the network connection has been established, listener process is completed the mission. <br /><br /> Understanding from another angle: <br /> changbai is that we used to connect the remote database service name, but ultimately must be translated into host: port: service_name this connection string, and this transformation can be understood as the process of translation, and translation in order to succeed, you must choose a good translation method, it is our sqlnet.ora translation method used to select which NAMES.DIRECTORY_PATH = (TNSNAMES) is the name we have chosen analytical method; tnsnames.ora is a translation method - the local name resolution method configuration file, just like the method we have chosen the dictionary, the dictionary file is the same as our store with all the services which correspond to the connection string name; As listener.ora is responsible for accept our request for a responsible person - connecting address configuration document, which includes connecting the connection address of responsible person, but also can be placed through his connection to allow the database information. This constitutes a network architecture of Oracle.				<h5>Related Posts</h5>
		<div id="smilar">
		<ul>
					<li><a href="http://www.kods.netwww.kods.net/sga-extended-the-principle-of-32bit-oracle/" title="SGA extended the principle of 32bit oracle">SGA extended the principle of 32bit oracle</a> 2009-03-31 09:48:01</li>
					<li><a href="http://www.kods.netwww.kods.net/an-example-of-the-use-of-tkprof/" title="An example of the use of TKPROF">An example of the use of TKPROF</a> 2009-02-26 01:38:19</li>
					<li><a href="http://www.kods.netwww.kods.net/diagnosis-and-principles-of-order/" title="Diagnosis and principles of order">Diagnosis and principles of order</a> 2009-02-25 20:27:28</li>
					<li><a href="http://www.kods.netwww.kods.net/oracle-10g-dataguard-configuration-step-by-step/" title="ORACLE 10G dataguard configuration Step by Step">ORACLE 10G dataguard configuration Step by Step</a> 2009-02-16 01:13:55</li>
				</ul>
		</div>
		        ]]></content:encoded>
		<wfw:commentRss>http://www.kods.netwww.kods.net/oracle-network-configuration-used-in-the-sqlnet-ora-tnsnames-ora-listener-ora/</wfw:commentRss>
	</item>
		<item>
		<title>Dump Systemstat Error</title>
		<link>http://www.kods.netwww.kods.net/dump-systemstat-error/</link>
		<comments>http://www.kods.netwww.kods.net/dump-systemstat-error/#comments</comments>
		<pubDate>Wed, 20 May 2009 20:50:48+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle home]]></category>
<category><![CDATA[trc]]></category>
<category><![CDATA[oracle product]]></category>
<category><![CDATA[pga]]></category>
<category><![CDATA[production database]]></category>
<category><![CDATA[unlimit]]></category>
<category><![CDATA[doc id]]></category>
<category><![CDATA[prelim]]></category>
<category><![CDATA[access violation]]></category>
<category><![CDATA[patches]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/dump-systemstat-error/</guid>
		<description><![CDATA[The production database hang, try to get the systemstat ++++++++++++++++++ % oracle_home% \ bin \ sqlplus-prelim / as sysdba oradebug setmypid oradebug unlimit; oradebug dump systemstate 266 oradebug  ...]]></description>
		<content:encoded><![CDATA[The production database hang, try to get the systemstat <br /><br /> ++++++++++++++++++ <br /><br /> % oracle_home% \ bin \ sqlplus-prelim / as sysdba <br /><br /> oradebug setmypid <br /> oradebug unlimit; <br /> oradebug dump systemstate 266 <br /> oradebug dump systemstate 266 <br /> ++++++++++++++++++ <br /><br /> Then, it got a error in alert log <br /><br /> ++++++++++++++++++ <br /><br /> System State dumped to trace file <br /> Tue May 19 13:16:12 2009 <br /> Errors in file d: \ oracle \ product \ 10.2.0 \ admin \ fspdc \ udump \ fspdc_ora_12612.trc: <br /> ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [kgxAolDump +208] [PC: 0x50C15B6] [ADDR: 0x88] [UNABLE_TO_READ] [] <br /> ++++++++++++++++++ <br /><br /> It caused by a bug. <br /><br /> The solution from metalink <br /><br /><table cellspacing=6 cellpadding=0 width="80%" border=0><tbody><tr><td valign=top align=right><br /> <font color=#0000ff>Doc ID:</font> <br /><br /></td><td align=left><br /> <strong>417,879.1</strong> <br /><br /></td></tr></tbody></table><br /><br /><h2> Cause </h2> <font color=#444422><em><strong>Issue was filed as <font color=#0000ff>Bug 5892959</font> and was closed as a duplicate of unpublished bug 5730231. <br /><br /></strong></em></font> <h2> Solution </h2><br /> The issue is not resolved in any known patches. The below workaround was provided: <br /><br /> Workaround <br /> ~~~~~~~~~~~~ <br /> Connect / as sysdba (without-prelim) <br /><br /> -OR - <br /><br /> Force the variable PGA to be initialized <br /> eg: <br /> sqlplus-prelim &#39;/ as sysdba&#39; <br /> oradebug setmypid <br /> oradebug unlimit; <br /> oradebug call ksmcpg <br /> oradebug dump systemstate 10				<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/dump-systemstat-error/</wfw:commentRss>
	</item>
		<item>
		<title>RHEL AS 4 under manual in ORACLE 10g database on the bare equipment operation</title>
		<link>http://www.kods.netwww.kods.net/rhel-as-4-under-manual-in-oracle-10g-database-on-the-bare-equipment-operation/</link>
		<comments>http://www.kods.netwww.kods.net/rhel-as-4-under-manual-in-oracle-10g-database-on-the-bare-equipment-operation/#comments</comments>
		<pubDate>Wed, 20 May 2009 20:34:30+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[diagnosis]]></category>
<category><![CDATA[oracle]]></category>
<category><![CDATA[oracle home]]></category>
<category><![CDATA[oracle database]]></category>
<category><![CDATA[oracle product]]></category>
<category><![CDATA[assumption]]></category>
<category><![CDATA[oracle 10g database]]></category>
<category><![CDATA[software installation]]></category>
<category><![CDATA[oracle software]]></category>
<category><![CDATA[adump]]></category>
<category><![CDATA[linux operating system]]></category>
<category><![CDATA[storage directory]]></category>
<category><![CDATA[volume root]]></category>
<category><![CDATA[relevant directory]]></category>
<category><![CDATA[installation steps]]></category>
<category><![CDATA[rhel]]></category>
<category><![CDATA[file storage]]></category>
<category><![CDATA[mkdir]]></category>
<category><![CDATA[logical volume]]></category>
<category><![CDATA[database structure]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/rhel-as-4-under-manual-in-oracle-10g-database-on-the-bare-equipment-operation/</guid>
		<description><![CDATA[Have been used in the previous DBCA to create database using DBCA, however bare in the use of equipment always pass, so want to pass the database manually to the database of the way built on the bare  ...]]></description>
		<content:encoded><![CDATA[Have been used in the previous DBCA to create database using DBCA, however bare in the use of equipment always pass, so want to pass the database manually to the database of the way built on the bare device. Through the manual to understand database structure of ORACLE database . <br /> Assumption here has been able to install the linux operating system, ORACLE software, it is no longer detailed software installation steps. Can refer to: <br /> ORACLE 10G for RHEL AS 4 install (http://blog.chinaunix.net/u/28641/showart_1087570.html) <br /> In the cited article, the attention here to only install the software, not the establishment of databases. <br /><br /> After the completion of the installation of oracle software to start manually the database based on the bare device. <br /> Related to the environment: <br /> ORACLE_BASE: / opt / oracle <br /> ORACLE_HOME: / opt/oracle/product/10.2.0/ora10g <br /> ORACLE_SID: ora10g <br /><br /><h4> 1. The establishment of the relevant directory </h4> - Diagnosis of Contents <br /> [oracle @ rhel47 ~] $ mkdir-p $ ORACLE_BASE/admin/ora10g/adump <br /> [oracle @ rhel47 ~] $ mkdir-p $ ORACLE_BASE/admin/ora10g/bdump <br /> [oracle @ rhel47 ~] $ mkdir-p $ ORACLE_BASE/admin/ora10g/cdump <br /> [oracle @ rhel47 ~] $ mkdir-p $ ORACLE_BASE/admin/ora10g/udump <br /> [oracle @ rhel47 ~] $ mkdir-p $ ORACLE_BASE/admin/ora10g/pfile <br /><br /> - Data file storage directory <br /> [oracle @ rhel47 ~] $ mkdir-p $ ORACLE_BASE/oradata/ora10g <br /><br /><h4> 2. To create data files bare equipment </h4> - Create a logical volume. <br /> [root @ rhel47 ~] # lvcreate-L 608M-n lvsystem vg00 <br /> [root @ rhel47 ~] # lvcreate-L 408M-n lvsysaux vg00 <br /> [root @ rhel47 ~] # lvcreate-L 108M-n lvtemp vg00 <br /> [root @ rhel47 ~] # lvcreate-L 108M-n lvundotbs vg00 <br /> [root @ rhel47 ~] # lvcreate-L 60M-n lvredoa1 vg00 <br /> [root @ rhel47 ~] # lvcreate-L 60M-n lvredoa2 vg00 <br /> [root @ rhel47 ~] # lvcreate-L 60M-n lvredoa3 vg00 <br /><br /> - Bare of equipment, in order to reboot the system after the entry into force, the following command to be added to / etc / rc.local file. <br /> [root @ rhel47 vg00] # raw / dev/raw/raw1 / dev/mapper/vg00-lvsystem <br /> [root @ rhel47 vg00] # raw / dev/raw/raw2 / dev/mapper/vg00-lvsysaux <br /> [root @ rhel47 vg00] # raw / dev/raw/raw3 / dev/mapper/vg00-lvtemp <br /> [root @ rhel47 vg00] # raw / dev/raw/raw4 / dev/mapper/vg00-lvundotbs <br /> [root @ rhel47 vg00] # raw / dev/raw/raw5 / dev/mapper/vg00-lvredoa1 <br /> [root @ rhel47 vg00] # raw / dev/raw/raw6 / dev/mapper/vg00-lvredoa2 <br /> [root @ rhel47 vg00] # raw / dev/raw/raw7 / dev/mapper/vg00-lvredoa3 <br /><br /> - Change is the main bare equipment: a group, to take effect after the restart, the following command into / etc / rc.local file. <br /> [root @ rhel47 raw] # chown oracle: dba / dev / raw / raw * <br /><br /> - Data files in the directory link to the bare device. <br /> [oracle @ rhel47 ora10g] $ ln-s / dev/raw/raw1 rlvsystem <br /> [oracle @ rhel47 ora10g] $ ln-s / dev/raw/raw2 rlvsysaux <br /> [oracle @ rhel47 ora10g] $ ln-s / dev/raw/raw3 rlvtemp <br /> [oracle @ rhel47 ora10g] $ ln-s / dev/raw/raw4 rlvundotbs <br /> [oracle @ rhel47 ora10g] $ ln-s / dev/raw/raw5 rlvredoa1 <br /> [oracle @ rhel47 ora10g] $ ln-s / dev/raw/raw6 rlvredoa2 <br /> [oracle @ rhel47 ora10g] $ ln-s / dev/raw/raw7 rlvredoa3 <br /><br /><h4> 3. To create a document ORACLE parameters $ ORACLE_HOME/dbs/initora10g.ora </h4> Copy $ ORACLE_HOME / dbs / init.ora to $ ORACLE_HOME/dbs/initora10g.ora (that is, ora $ (ORACLE_SID). Ora). As a result of its own version of the init.ora low, it is recommended to use the init.ora with other documents, such as the establishment of a database using dbca generated init $ (ORACLE_SID). ora file as a template. <br /> Amended to read as follows parameters. <br /> db_name = ora10g <br /> shared_pool_size = 100000000 <br /> control_files = (/ opt/oracle/oradata/ora10g/control01.ctl, / opt/oracle/oradata/ora10g/control02.ctl, / opt/oracle/oradata/ora10g/control03.ctl) <br /> undo_management = AUTO <br /> undo_tablespace = UNDOTBS <br /><br /><h4> 4. Create a password file </h4> [oracle @ rhel47 ~] $ orapwd file = $ ORACLE_HOME/dbs/orapwora10g password = root123 entries = 5 force = y <br /><br /><h4> 5. Ora10g.sql script file to create database </h4> - Note the use of reuse parameters, shut down automatically extended. <br /> [oracle @ rhel47 ~] $ cat&gt;&gt; ora10g.sql &lt;&lt;EOF <br /> CREATE DATABASE ora10g <br /> LOGFILE <br /> GROUP 1 ( &#39;/ opt/oracle/oradata/ora10g/rlvredoa1&#39;) SIZE 50M, <br /> GROUP 2 ( &#39;/ opt/oracle/oradata/ora10g/rlvredoa2&#39;) SIZE 50M, <br /> GROUP 3 ( &#39;/ opt/oracle/oradata/ora10g/rlvredoa3&#39;) SIZE 50M REUSE <br /> MAXLOGFILES 5 <br /> MAXLOGMEMBERS 5 <br /> MAXLOGHISTORY 1 <br /> MAXDATAFILES 100 <br /> MAXINSTANCES 1 <br /> NOARCHIVELOG <br /> CHARACTER SET ZHS16GBK <br /> NATIONAL CHARACTER SET AL16UTF16 <br /> DATAFILE &#39;/ opt/oracle/oradata/ora10g/rlvsystem&#39; SIZE 600M REUSE AUTOEXTEND OFF <br /> EXTENT MANAGEMENT LOCAL <br /> SYSAUX DATAFILE &#39;/ opt/oracle/oradata/ora10g/rlvsysaux&#39; SIZE 400M REUSE AUTOEXTEND OFF <br /> DEFAULT TEMPORARY TABLESPACE temp <br /> TEMPFILE &#39;/ opt/oracle/oradata/ora10g/rlvtemp&#39; SIZE 100M REUSE AUTOEXTEND OFF <br /> UNDO TABLESPACE &quot;UNDOTBS&quot;<br /> DATAFILE &#39;/ opt/oracle/oradata/ora10g/rlvundotbs&#39; SIZE 100M REUSE AUTOEXTEND OFF; <br /><br /> EOF <br /><br /><h4> 6. The implementation of database </h4> oracle @ rhel47 ~] $ sqlplus / nolog <br /><br /> SQL * Plus: Release 10.2.0.1.0 - Production on Sat Feb 7 13:01:13 2009 <br /><br /> Copyright (c) 1982, 2005, Oracle. All rights reserved. <br /><br /> SQL&gt; connect sys/root123 as sysdba <br /> Connected to an idle instance. <br /> SQL&gt; startup nomount; <br /> ORACLE instance started. <br /><br /> Total System Global Area 134217728 bytes <br /> Fixed Size 1218100 bytes <br /> Variable Size 125831628 bytes <br /> Database Buffers 4194304 bytes <br /> Redo Buffers 2973696 bytes <br /> SQL&gt; start ora10g.sql <br /><br /> Database created. <br /><br /><h4> 7. To create data dictionary, PACKAGE package. </h4> - Are still under the SYS user, the two statements must spend a longer period of time, need to be patient ..................... <br /> SQL&gt; start / opt/oracle/product/10.2.0/ora10g/rdbms/admin/catalog.sql <br /><br /> SQL&gt; start / opt/oracle/product/10.2.0/ora10g/rdbms/admin/catproc.sql <br /><br /> Done here, to manually install on essentially completed. The following to manually configure and monitor DBCONSOLE <br /><br /><h4> 8. Configured to monitor </h4> Copy $ (ORACLE_HOME) / network / admin / samples / tnsname.ora to $ (ORACLE_HOME) / network / admin / increase / modify the relevant information. <br /> ORA10G = <br /> (DESCRIPTION = <br /> (ADDRESS_LIST = <br /> (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.80.47) (PORT = 1521)) <br /> ) <br /> (CONNECT_DATA = <br /> (SID = ora10g) <br /> (SERVER = DEDICATED) <br /> ) <br /> ) <br /><br /> Copy $ (ORACLE_HOME) / network / admin / samples / sqlnet.ora to $ (ORACLE_HOME) / network / admin / increase / modify the relevant information. <br /> SQLNET.AUTHENTICATION_SERVICES = (NTS) <br /> NAMES.DIRECTORY_PATH = (TNSNAMES) <br /><br /> Then, through the command to start listening. <br /> [oracle @ rhel47 ~] $ lsnrctl start <br /> Confirmed that the normal start. <br /><br /><h4> 9. DBCONSOLE configuration </h4> DBCONSOLE needed to configure this tool emca .. <br /> The establishment of the Treasury, the relevant information here, including the need for ORACLE_SID, listening port number, SYS and SYSMAN user password. <br /><font color="#000000"></font> [oracle @ rhel47 ~] $ emca-repos create <br /><br /> Configuration database, where the relevant information, including the need for ORACLE_SID, listening port number, SYS, DBSNMP and SYSMAN user password. <br /> [oracle @ rhel47 ~] $ emca-config dbcontrol db <br /><br /> Here .. take some time after the completion of, dbconsole automatically start .. using the following command to check. <br /> [oracle @ rhel47 ~] $ emctl status dbconsole <br /><br /> Http://rhel47:1158/em the way through (OEM) access control .. <br /><br /> (OVER)				<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/rhel-as-4-under-manual-in-oracle-10g-database-on-the-bare-equipment-operation/</wfw:commentRss>
	</item>
		<item>
		<title>"In-depth Analysis of Oracle" Book</title>
		<link>http://www.kods.netwww.kods.net/in-depth-analysis-of-oracle-book/</link>
		<comments>http://www.kods.netwww.kods.net/in-depth-analysis-of-oracle-book/#comments</comments>
		<pubDate>Wed, 20 May 2009 19:20:10+0000</pubDate>
		<dc:creator>kods.net</dc:creator>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[quot]]></category>
<category><![CDATA[oracle]]></category>
<category><![CDATA[point of view]]></category>
<category><![CDATA[oracle book]]></category>
<category><![CDATA[cognitive perspective]]></category>
		<guid isPermaLink="true">http://www.kods.netwww.kods.net/in-depth-analysis-of-oracle-book/</guid>
		<description><![CDATA[&quot;In-depth Analysis of Oracle&quot; Book The first time to buy books related DBA point of view! Reading down the breath, there are still many views. In general, the more successful this book. Part ...]]></description>
		<content:encoded><![CDATA[&quot;In-depth Analysis of Oracle&quot; Book <br /><br /> The first time to buy books related DBA point of view! <br /> Reading down the breath, there are still many views. In general, the more successful this book. Particularly in the author&#39;s actual experience. If some improvement, from the perspective of the book, as summed up the contents of the arrangement, the cognitive perspective to further extend the number of unique, <br /> Quality will have improved.				<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/in-depth-analysis-of-oracle-book/</wfw:commentRss>
	</item>
	</channel>
</rss>
