{"id":1453,"date":"2016-08-04T22:32:59","date_gmt":"2016-08-04T14:32:59","guid":{"rendered":"http:\/\/www.yallonking.com\/?p=1453"},"modified":"2016-08-04T22:33:55","modified_gmt":"2016-08-04T14:33:55","slug":"solaris%e4%b8%8boracle-9-2-0-4-rac%e5%8d%87%e7%ba%a7%e5%88%b011-2-0-4-rac%e7%9a%84%e6%93%8d%e4%bd%9c%e6%89%8b%e8%ae%b0","status":"publish","type":"post","link":"http:\/\/www.yallonking.com\/?p=1453","title":{"rendered":"solaris\u4e0boracle 9.2.0.4 rac\u5347\u7ea7\u523011.2.0.4 rac\u7684\u64cd\u4f5c\u624b\u8bb0"},"content":{"rendered":"<p>\u4ee5\u524d\u7684\u4e00\u4e2a\u6838\u5fc3\u6570\u636e\u5e93RAC\u8de8\u7248\u672c\u5347\u7ea7\u7684\u64cd\u4f5c\u6587\u6863\uff0c\u8fd9\u4efd\u6587\u6863\u6709\u7684\u5382\u5546\u62a5\u4ef7\u5230\u4e8610\u4e07+\uff0c\u4eca\u5929\u82b1\u65f6\u95f4\u6574\u7406\u51fa\u6765\u653e\u7ed9\u5927\u5bb6\uff0c\u4ee5\u98e8\u4f17\u4eba\uff0c\u7b97\u662f\u8fd1\u4e24\u5e74\u6765\u6ca1\u6709\u66f4\u65b0\u6280\u535a\u7684\u81ea\u6211\u68c0\u8ba8\u5427\uff01<\/p>\n<p><strong>\u8fc1\u79fb\u5347\u7ea7\u80cc\u666f\uff1a<\/strong><br \/>\n\u673a\u5668\u578b\u53f7\uff1av890 sparcx64 -> T5-2 sparcx64<br \/>\n\u96c6\u7fa4\u4ef6\uff1asun cluster -> oracle cluster<br \/>\n\u64cd\u4f5c\u7cfb\u7edf\uff1asolaris<br \/>\n\u6570\u636e\u5e93\uff1a9.2.0.4 \u53cc\u8282\u70b9 RAC -> 11.2.0.4 \u53cc\u8282\u70b9 RAC<\/p>\n<p><strong>\u8fc1\u79fb\u96be\u70b9\uff1a<\/strong><br \/>\n1\u3001\u96c6\u7fa4\u4ef6\u66f4\u6362<br \/>\n2\u3001\u6570\u636e\u5e93\u5938\u7248\u672c\u5347\u7ea7<br \/>\n3\u3001\u6570\u636e\u91cf\u8f83\u5927\uff0c\u505c\u673a\u65f6\u95f4\u77ed\uff08\u7ea6\u4e00\u4e2a\u591a\u5c0f\u65f6\uff09<\/p>\n<p><strong>\u5b98\u65b9\u652f\u6301\u7684\u5347\u7ea7\u8def\u52b2\u56fe<\/strong><br \/>\n<a href=\"http:\/\/www.yallonking.com\/wp-content\/uploads\/2016\/08\/upgradeto11gpath.png\" class=\"cboxElement\" rel=\"example_group\"1453><img loading=\"lazy\" src=\"http:\/\/www.yallonking.com\/wp-content\/uploads\/2016\/08\/upgradeto11gpath.png\" alt=\"upgradeto11gpath\" width=\"925\" height=\"588\" class=\"aligncenter size-full wp-image-1454\" srcset=\"http:\/\/www.yallonking.com\/wp-content\/uploads\/2016\/08\/upgradeto11gpath.png 925w, http:\/\/www.yallonking.com\/wp-content\/uploads\/2016\/08\/upgradeto11gpath-300x191.png 300w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/a><\/p>\n<p><strong>\u524d\u671f\u5de5\u4f5c<\/strong><br \/>\n1\u3001\u57282\u4e2a\u65b0\u673a\u5668\u5b89\u88c5\u597d11.2.0.4 crs,asm,db software<br \/>\n2\u3001\u5728\u65b0\u673a\u5668\u8282\u70b91\u5b89\u88c5\u597d10.2.0.5\u7684db software<br \/>\n3\u3001\u63d0\u524d\u51c6\u5907\u597d9.2.0.4\u539f\u59cb\u5e93\u7684\u5168\u91cf\u5907\u4efd\u6587\u4ef6<\/p>\n<p><strong>#######\u4ee5\u4e0b\u6240\u6709\u64cd\u4f5c\u5747\u5728\u65b0\u76842\u53f0\u6570\u636e\u5e93T5-2\u673a\u5668\u4e0a\u6267\u884c#######<\/strong><\/p>\n<p>*****************************************************************<br \/>\n\u7b2c\u4e00\u6b65\uff1a\u7528\u8282\u70b91\u768410.2.0.5\u7684db software \u6062\u590d\u6570\u636e\u523011.2.0.4 \u7684asm<br \/>\n*****************************************************************<br \/>\n\u8282\u70b91\u521b\u5efa\u76f8\u5173\u76ee\u5f55<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ id\r\nuid=100(grid) gid=100(oinstall)\r\nASMCMD&gt; pwd\r\n+data\/xxdb\r\nASMCMD&gt; mkdir datafile\r\nASMCMD&gt; mkdir archivelog\r\nASMCMD&gt; mkdir CONTROLFILE\r\nASMCMD&gt; mkdir ONLINELOG\r\nASMCMD&gt; mkdir PARAMETERFILE\r\nASMCMD&gt; mkdir TEMPFILE\r\nASMCMD&gt; pwd\r\n+fra\r\nASMCMD&gt; mkdir xxdb\r\nASMCMD&gt; cd xxdb\r\nASMCMD&gt; mkdir ONLINELOG\r\n<\/pre>\n<p>\u8282\u70b91\u4f7f\u7528\u5982\u4e0b\u53c2\u6570\u6587\u4ef6\u542f\u52a8\u6570\u636e\u5e93\u5b9e\u4f8b<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ cat pfile_10g \r\n*.__db_cache_size=1174405120\r\n*.__java_pool_size=16777216\r\n*.__large_pool_size=16777216\r\n*.__shared_pool_size=352321536\r\n*.__streams_pool_size=0\r\n*.audit_file_dest=&#039;\/u01\/app\/oracle\/admin\/xxdb\/adump&#039;\r\n*.cluster_database_instances=2\r\n*.cluster_database=false\r\n*.db_block_size=16384\r\n*.compatible=&#039;10.2.0.5.0&#039;\r\n*.control_files=&#039;+DATA\/xxdb\/controlfile\/control01.ctl&#039;,&#039;+DATA\/xxdb\/controlfile\/control02.ctl&#039;\r\n*.core_dump_dest=&#039;\/u01\/app\/oracle\/admin\/xxdb\/cdump&#039;\r\nxxdb1.instance_name=&#039;xxdb1&#039;\r\nxxdb2.instance_name=&#039;xxdb2&#039;\r\nxxdb2.instance_number=2\r\nxxdb1.instance_number=1\r\n*.log_archive_dest=&#039;+data\/xxdb\/archivelog&#039;\r\n*.db_domain=&#039;&#039;\r\n*.db_file_multiblock_read_count=16\r\n*.db_name=&#039;kingxxdb&#039;\r\n*.job_queue_processes=10\r\n*.log_archive_format=&#039;%t_%s_%r.dbf&#039;\r\n*.open_cursors=5000\r\n*.pga_aggregate_target=5368709120\r\n*.processes=1000\r\n*.remote_login_passwordfile=&#039;exclusive&#039;\r\n*.sessions=1335\r\n*.sga_target=10739500056\r\nxxdb1.thread=1\r\nxxdb2.thread=2\r\n*.undo_management=&#039;AUTO&#039;\r\n*.undo_retention=10800\r\nxxdb2.undo_tablespace=&#039;UNDOTBS2&#039;\r\nxxdb1.undo_tablespace=&#039;UNDOTBS1&#039;\r\n<\/pre>\n<p>\u8282\u70b91\u542f\u52a8\u6570\u636e\u5e93\u5b9e\u4f8b\u5230nomount<br \/>\n\u6062\u590d\u63a7\u5236\u6587\u4ef6<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ export ORACLE_HOME=\/u01\/app\/oracle\/product\/10.2.5\/db_1\r\nbash-3.2$ export LD_LIBRARY_PATH=$ORACLE_HOME\/lib:$LD_LIBRARY_PATH\r\nbash-3.2$ cd \/u01\/app\/oracle\/product\/10.2.5\/db_1\/bin\r\nbash-3.2$ .\/sqlplus &quot;\/as sysdba&quot;\r\n\r\nSQL*Plus: Release 10.2.0.5.0 - Production on \u661f\u671f\u56db 9\u6708 25 09:23:50 2014\r\n\r\nCopyright (c) 1982, 2010, Oracle.  All Rights Reserved.\r\n\r\n\u5df2\u8fde\u63a5\u5230\u7a7a\u95f2\u4f8b\u7a0b\u3002\r\n\r\nSQL&gt; startup nomount pfile=&#039;\/home\/oracle\/pfile_10g&#039;;\r\nORACLE \u4f8b\u7a0b\u5df2\u7ecf\u542f\u52a8\u3002\r\n\r\nTotal System Global Area 1.0754E+10 bytes\r\nFixed Size                  2069696 bytes\r\nVariable Size            1543506752 bytes\r\nDatabase Buffers         9059696640 bytes\r\nRedo Buffers              148922368 bytes\r\nSQL&gt; exit\r\n\u4ece Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production\r\nWith the Partitioning, OLAP, Data Mining and Real Application Testing options \u65ad\u5f00\r\nbash-3.2$ .\/rman target \/\r\n\r\n\u6062\u590d\u7ba1\u7406\u5668: Release 10.2.0.5.0 - Production on \u661f\u671f\u56db 9\u6708 25 09:24:26 2014\r\n\r\nCopyright (c) 1982, 2007, Oracle.  All rights reserved.\r\n\r\n\u8fde\u63a5\u5230\u76ee\u6807\u6570\u636e\u5e93: kingxxdb (\u672a\u88c5\u8f7d)\r\n\r\nRMAN&gt; restore controlfile from &#039;\/datamount\/app\/oracle\/rman\/20141011\/ctl_file_4mpkoguc_1_1_20141011&#039;;\r\n\r\n\u542f\u52a8 restore \u4e8e 25-9\u6708 -14\r\n\u4f7f\u7528\u76ee\u6807\u6570\u636e\u5e93\u63a7\u5236\u6587\u4ef6\u66ff\u4ee3\u6062\u590d\u76ee\u5f55\r\n\u5206\u914d\u7684\u901a\u9053: ORA_DISK_1\r\n\u901a\u9053 ORA_DISK_1: sid=1076 devtype=DISK\r\n\r\n\u901a\u9053 ORA_DISK_1: \u6b63\u5728\u8fd8\u539f\u63a7\u5236\u6587\u4ef6\r\n\u901a\u9053 ORA_DISK_1: \u8fd8\u539f\u5b8c\u6210, \u7528\u65f6: 00:00:07\r\n\u8f93\u51fa\u6587\u4ef6\u540d=+DATA\/xxdb\/controlfile\/control01.ctl\r\n\u8f93\u51fa\u6587\u4ef6\u540d=+FRA\/xxdb\/controlfile\/control02.ctl\r\n\u5b8c\u6210 restore \u4e8e 25-9\u6708 -14\r\n\r\n\r\n\u5728\u8282\u70b91\u5c06\u539f\u5e93\u7684\u5168\u91cf\u5907\u4efd\u6587\u4ef6\u6ce8\u518c\u5230\u63a7\u5236\u6587\u4ef6\u4e2d\r\nRMAN&gt; startup mount\r\n\r\n\u6570\u636e\u5e93\u5df2\u7ecf\u542f\u52a8\r\n\u6570\u636e\u5e93\u5df2\u88c5\u8f7d\r\n\u91ca\u653e\u7684\u901a\u9053: ORA_DISK_1\r\n\r\nRMAN&gt; catalog start with &#039;\/datamount\/app\/oracle\/rman&#039;;\r\n\r\n\r\n\u7ee7\u7eed\u6062\u590d\u6570\u636e\u6587\u4ef6\u5230asm\r\n\r\nrun{\r\nallocate channel c1 type disk;\r\nallocate channel c2 type disk;\r\nallocate channel c3 type disk;\r\nallocate channel c4 type disk;\r\nset newname for datafile 30 to &#039;+data\/xxdb\/datafile\/aaa15.dbf&#039;;\r\nset newname for datafile 19 to &#039;+data\/xxdb\/datafile\/aaa08.dbf&#039;;\r\nset newname for datafile 06 to &#039;+data\/xxdb\/datafile\/aaa01.dbf&#039;;\r\nset newname for datafile 02 to &#039;+data\/xxdb\/datafile\/system02.dbf&#039;;\r\nset newname for datafile 05 to &#039;+data\/xxdb\/datafile\/indx02.dbf&#039;;\r\nset newname for datafile 33 to &#039;+data\/xxdb\/datafile\/aaa17.dbf&#039;;\r\nset newname for datafile 14 to &#039;+data\/xxdb\/datafile\/aaa04.dbf&#039;;\r\nset newname for datafile 15 to &#039;+data\/xxdb\/datafile\/aaa05.dbf&#039;;\r\nset newname for datafile 03 to &#039;+data\/xxdb\/datafile\/undotbs01.dbf&#039;;\r\nset newname for datafile 09 to &#039;+data\/xxdb\/datafile\/tools01.dbf&#039;;\r\nset newname for datafile 28 to &#039;+data\/xxdb\/datafile\/aaa13.dbf&#039;;\r\nset newname for datafile 01 to &#039;+data\/xxdb\/datafile\/system01.dbf&#039;;\r\nset newname for datafile 04 to &#039;+data\/xxdb\/datafile\/indx01.dbf&#039;;\r\nset newname for datafile 10 to &#039;+data\/xxdb\/datafile\/tools02.dbf&#039;;\r\nset newname for datafile 18 to &#039;+data\/xxdb\/datafile\/perfstat.dbf&#039;;\r\nset newname for datafile 32 to &#039;+data\/xxdb\/datafile\/aaa16.dbf&#039;;\r\nset newname for datafile 31 to &#039;+data\/xxdb\/datafile\/indx04.dbf&#039;;\r\nset newname for datafile 07 to &#039;+data\/xxdb\/datafile\/aaa02.dbf&#039;;\r\nset newname for datafile 11 to &#039;+data\/xxdb\/datafile\/undotbs02.dbf&#039;;\r\nset newname for datafile 21 to &#039;+data\/xxdb\/datafile\/perfstat01.dbf&#039;;\r\nset newname for datafile 16 to &#039;+data\/xxdb\/datafile\/aaa06.dbf&#039;;\r\nset newname for datafile 17 to &#039;+data\/xxdb\/datafile\/aaa07.dbf&#039;;\r\nset newname for datafile 22 to &#039;+data\/xxdb\/datafile\/aaa10.dbf&#039;;\r\nset newname for datafile 08 to &#039;+data\/xxdb\/datafile\/aaa03.dbf&#039;;\r\nset newname for datafile 12 to &#039;+data\/xxdb\/datafile\/users01.dbf&#039;;\r\nset newname for datafile 29 to &#039;+data\/xxdb\/datafile\/aaa14.dbf&#039;;\r\nset newname for datafile 25 to &#039;+data\/xxdb\/datafile\/aaa11.dbf&#039;;\r\nset newname for datafile 26 to &#039;+data\/xxdb\/datafile\/perfstat03.dbf&#039;;\r\nset newname for datafile 24 to &#039;+data\/xxdb\/datafile\/perfstat02.dbf&#039;;\r\nset newname for datafile 27 to &#039;+data\/xxdb\/datafile\/aaa12.dbf&#039;;\r\nset newname for datafile 20 to &#039;+data\/xxdb\/datafile\/aaa09.dbf&#039;;\r\nset newname for datafile 23 to &#039;+data\/xxdb\/datafile\/indx03.dbf&#039;;\r\nset newname for datafile 13 to &#039;+data\/xxdb\/datafile\/users02.dbf&#039;;\r\nrestore database;\r\nrecover database;\r\nswitch datafile all;\r\nrelease channel c1;\r\nrelease channel c2;\t \r\nrelease channel c3;\r\nrelease channel c4;\t\t\r\n}\r\n\r\n<\/pre>\n<p>\u5728\u539f\u59cb\u5e93\u4e0a\u63d2\u5165\u6d4b\u8bd5\u6570\u636e<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; drop table test_20141017;\r\n\r\nTable dropped.\r\n\r\nSQL&gt; create table test_20141017 (id number,my_date date);\r\n\r\nTable created.\r\n\r\nSQL&gt; insert into test_20141017 values (1,sysdate);\r\n\r\n1 row created.\r\n\r\nSQL&gt; commit;\r\n\r\nCommit complete.\r\n\r\nSQL&gt; select id,to_char(my_date,&#039;yyyy\/mm\/dd hh24:mi:ss&#039;) from test_20141017;\r\n\r\n        ID TO_CHAR(MY_DATE,&#039;YY\r\n---------- -------------------\r\n         1 2014\/10\/18 00:27:28\r\n\r\n<\/pre>\n<p>\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u811a\u672c\u7edf\u8ba1\u6307\u5b9a\u7528\u6237\u4e0b\u6240\u6709\u8868\u7684\u6761\u76ee\u6570\u53ca\u603b\u6761\u76ee\u6570<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nset serverout on\r\ndeclare \r\nv_sum_num number :=0;\r\nv_num number :=0;\r\nv_table_name varchar2(100);\r\nstr_sql varchar2(500);\r\ncursor tab_name is select table_name from dba_tables where owner= upper(&#039;&amp;user_name&#039;) order by 1;\r\nbegin\r\n\tdbms_output.put_line(&#039;---------TABLE SUM------------&#039;);\r\n\tfor i in tab_name\r\n\t\tloop\r\n\t\t\tv_table_name:=i.table_name;\r\n\t\t\texecute immediate &#039;select count(*) from &#039; || v_table_name into v_num;\r\n\t\t\tdbms_output.put_line(v_table_name||&#039;:&#039;||chr(9)||v_num);\r\n\t\t\tv_sum_num:=v_num+v_sum_num;\r\n\t\tend loop;\r\n\tdbms_output.put_line(&#039;------------------------------&#039;);\r\n\tdbms_output.put_line(&#039;SUM_NUM&#039;||&#039;:&#039;||chr(9)||v_sum_num);\r\nend;\r\n\/\t\r\n\r\n<\/pre>\n<p>\u5f00\u59cb\u505c\u6b62\u4e1a\u52a1\u5e76\u62f7\u8d1d\u539f\u59cb\u6570\u636e\u5e93\u5f53\u5929\u6240\u6709\u8282\u70b9\u7684\u6240\u6709\u5f52\u6863\u5230\u65b0\u5e93\u5e76\u6ce8\u518c<br \/>\n\u5728\u539f\u59cb\u6570\u636e\u5e93\u5404\u8282\u70b9\u5207\u6362\u65e5\u5fd7<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nalter system checkpoint;\r\nalter system switch logfile;\r\nalter system archive log current;\r\n\r\nroot@xxdb1 # scp 10.2.2.23:\/oradata1\/rman\/arch1\/* \/oradata1\/rman\/arch1\/\r\nroot@xxdb1 # scp 10.2.2.26:\/oradata1\/rman\/arch2\/* \/oradata1\/rman\/arch1\/\r\nroot@xxdb1 # chown -R oracle:oinstall \/oradata1\/rman\/arch1\r\n<\/pre>\n<p>\u5728\u65b0\u7684\u8282\u70b91\u6ce8\u518c\u76f8\u5173\u5f52\u6863\u5e76\u6062\u590d<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ export ORACLE_HOME=\/u01\/app\/oracle\/product\/10.2.5\/db_1\r\nbash-3.2$ export LD_LIBRARY_PATH=$ORACLE_HOME\/lib:$LD_LIBRARY_PATH\r\nbash-3.2$ cd \/u01\/app\/oracle\/product\/10.2.5\/db_1\/bin\r\nbash-3.2$ .\/rman target \/\r\n\r\nRMAN&gt; catalog start with &#039;\/oradata1\/rman\/arch1&#039;;\r\n\r\nrun{\r\nallocate channel c1 type disk;\r\nallocate channel c2 type disk;\r\nallocate channel c3 type disk;\r\nallocate channel c4 type disk;\r\nrecover database;\r\nrelease channel c1;\r\nrelease channel c2;\t \r\nrelease channel c3;\r\nrelease channel c4;\t\t\r\n}\r\n<\/pre>\n<p>\u5728\u65b0\u8282\u70b91\u66f4\u6539redo\u8def\u5f84<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ export ORACLE_HOME=\/u01\/app\/oracle\/product\/10.2.5\/db_1\r\nbash-3.2$ export LD_LIBRARY_PATH=$ORACLE_HOME\/lib:$LD_LIBRARY_PATH\r\nbash-3.2$ cd \/u01\/app\/oracle\/product\/10.2.5\/db_1\/bin\/\r\nbash-3.2$ .\/sqlplus &quot;\/as sysdba&quot;\r\n\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo01.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo01.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo02.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo02.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo03.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo03.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo04.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo04.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo05.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo05.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo06.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo06.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo07.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo07.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo08.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo08.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo09.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo09.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo10.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo10.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo11.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo11.log&#039;;\r\nalter database rename file &#039;\/opt\/oracle\/oradata\/king\/redo12.log&#039; to &#039;+DATA\/xxdb\/ONLINELOG\/redo12.log&#039;;\r\n<\/pre>\n<p>\u65b0\u7684\u8282\u70b91\u7ee7\u7eed\u4fee\u6539\u76f8\u5173\u53c2\u6570<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; create spfile from pfile=&#039;\/home\/oracle\/pfile_10g&#039;;\r\n\r\n\u6587\u4ef6\u5df2\u521b\u5efa\u3002\r\n\r\nSQL&gt; shutdown immediate;\r\nORA-01109: \u6570\u636e\u5e93\u672a\u6253\u5f00\r\n\r\n\r\n\u5df2\u7ecf\u5378\u8f7d\u6570\u636e\u5e93\u3002\r\nORACLE \u4f8b\u7a0b\u5df2\u7ecf\u5173\u95ed\u3002\r\nSQL&gt; startup nomount; \r\nORACLE \u4f8b\u7a0b\u5df2\u7ecf\u542f\u52a8\u3002\r\n\r\nTotal System Global Area 1.0754E+10 bytes\r\nFixed Size                  2069696 bytes\r\nVariable Size            1543506752 bytes\r\nDatabase Buffers         9059696640 bytes\r\nRedo Buffers              148922368 bytes\r\nSQL&gt; ALTER SYSTEM SET SHARED_POOL_SIZE=&#039;800M&#039; SCOPE=spfile; \r\n\r\n\u7cfb\u7edf\u5df2\u66f4\u6539\u3002\r\n\r\nSQL&gt; ALTER SYSTEM SET JAVA_POOL_SIZE=&#039;512M&#039; SCOPE=spfile; \r\n\r\n\u7cfb\u7edf\u5df2\u66f4\u6539\u3002\r\n\r\nSQL&gt; shutdown immediate;\r\nORA-01507: database not mounted\r\n\r\nORACLE instance shut down.\r\n<\/pre>\n<p>*****************************************************************<br \/>\n\u7b2c\u4e8c\u6b65\uff1a\u7528\u8282\u70b91\u768410.2.0.5\u7684db software \u5347\u7ea7\u6570\u636e\u5b57\u5178\u523010.2.0.5<br \/>\n\u7531\u4e8e9i\u6240\u4f7f\u7528\u5230\u7684\u6570\u636e\u5e93\u7ec4\u4ef6\u8f83\u5c11\uff0c\u6545\u5347\u7ea7\u6570\u636e\u5b57\u5178\u4e5f\u5c31\u82b1\u4e86\u51e0\u5206\u949f\u800c\u5df2<br \/>\n*****************************************************************<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ export ORACLE_HOME=\/u01\/app\/oracle\/product\/10.2.5\/db_1\r\nbash-3.2$ export LD_LIBRARY_PATH=$ORACLE_HOME\/lib:$LD_LIBRARY_PATH\r\nbash-3.2$ pwd\r\n\/u01\/app\/oracle\/product\/10.2.0\/db_1\/bin\r\nbash-3.2$ .\/sqlplus &quot;\/as sysdba&quot;\r\n\r\nSQL*Plus: Release 10.2.0.5.0 - Production on Sun May 25 21:23:03 2014\r\n\r\nCopyright (c) 1982, 2010, Oracle.  All Rights Reserved.\r\n\r\nConnected to an idle instance.\r\n\r\nSQL&gt; STARTUP UPGRADE\r\nORACLE instance started.\r\n\r\nTotal System Global Area 1.0754E+10 bytes\r\nFixed Size                  2069888 bytes\r\nVariable Size             855640704 bytes\r\nDatabase Buffers         9848225792 bytes\r\nRedo Buffers               48259072 bytes\r\nDatabase mounted.\r\nORA-01589: must use RESETLOGS or NORESETLOGS option for database open\r\n\r\n\r\nSQL&gt; alter database open RESETLOGS;\r\nalter database open RESETLOGS\r\n*\r\nERROR at line 1:\r\nORA-01092: ORACLE instance terminated. Disconnection forced\r\n\r\n\r\nSQL&gt; exit\r\nDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production\r\nWith the Partitioning, Real Application Clusters, OLAP, Data Mining\r\nand Real Application Testing options\r\nbash-3.2$ .\/sqlplus &quot;\/as sysdba&quot;\r\n\r\nSQL*Plus: Release 10.2.0.5.0 - Production on Sun May 25 21:24:03 2014\r\n\r\nCopyright (c) 1982, 2010, Oracle.  All Rights Reserved.\r\n\r\nConnected to an idle instance.\r\n\r\nSQL&gt; startup UPGRADE\r\nORACLE instance started.\r\n\r\nTotal System Global Area 1.0754E+10 bytes\r\nFixed Size                  2069888 bytes\r\nVariable Size             889195136 bytes\r\nDatabase Buffers         9814671360 bytes\r\nRedo Buffers               48259072 bytes\r\nDatabase mounted.\r\nDatabase opened.\r\nSQL&gt; alter tablespace temp add tempfile &#039;+DATA\/xxdb\/TEMPFILE\/temp02.dbf&#039; size 10240M;\r\n\r\nTablespace altered.\r\n\r\nSQL&gt; create tablespace SYSAUX datafile &#039;+DATA\/xxdb\/datafile\/sysaux01.dbf&#039;\r\n  2       size 2048M reuse\r\n  3       extent management local\r\n  4       segment space management auto\r\n  5       online;\r\n\r\nTablespace created.\r\n\r\nSQL&gt; create pfile=&#039;\/home\/oracle\/pfile_10g_new&#039; from spfile;\r\n\r\nFile created.\r\n\r\nSQL&gt; shutdown immediate;\r\nDatabase closed.\r\nDatabase dismounted.\r\nORACLE instance shut down.\r\n\r\nSQL&gt; startup UPGRADE\r\nORACLE instance started.\r\n\r\nTotal System Global Area 1.0754E+10 bytes\r\nFixed Size                  2069888 bytes\r\nVariable Size             889195136 bytes\r\nDatabase Buffers         9814671360 bytes\r\nRedo Buffers               48259072 bytes\r\nDatabase mounted.\r\nDatabase opened.\r\n\r\n\r\nSQL&gt; SPOOL &#039;\/home\/oracle\/10g_patch.log&#039;\r\nSQL&gt; @\/u01\/app\/oracle\/product\/10.2.5\/db_1\/rdbms\/admin\/catupgrd.sql\r\n\r\nSPOOL OFF\r\n\r\nSQL&gt; set line 400\r\nSQL&gt; select comp_id,status,version from dba_registry order by 1;\r\n\r\nCOMP_ID                        STATUS                 VERSION\r\n------------------------------ ---------------------- ------------------------------\r\nCATALOG                        VALID                  10.2.0.5.0\r\nCATPROC                        VALID                  10.2.0.5.0\r\nOWM                            VALID                  10.2.0.5.0\r\nRAC                            INVALID                10.2.0.5.0\r\n\r\n\u5df2\u9009\u62e94\u884c\u3002\r\n\r\nSQL&gt; shutdown immediate;\r\nDatabase closed.\r\nDatabase dismounted.\r\nORACLE instance shut down.\r\nSQL&gt; startup\r\nORACLE instance started.\r\n\r\nTotal System Global Area 1.0754E+10 bytes\r\nFixed Size                  2069888 bytes\r\nVariable Size             889195136 bytes\r\nDatabase Buffers         9814671360 bytes\r\nRedo Buffers               48259072 bytes\r\nDatabase mounted.\r\nDatabase opened.\r\n<\/pre>\n<p>*****************************************************************<br \/>\n\u7b2c\u4e09\u6b65\uff1a\u7528\u8282\u70b91\u768411.2.0.4\u7684db software \u5347\u7ea7\u6570\u636e\u5b57\u5178\u523011.2.0.4<br \/>\n\u6b64\u5904\u5347\u7ea7\u6570\u636e\u5b57\u5178\u4f7f\u7528\u4e8640\u5206\u949f\u5de6\u53f3\uff0c\u7b97\u662f\u6b63\u5e38\u65f6\u957f<br \/>\n*****************************************************************<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ .\/sqlplus &quot;\/as sysdba&quot;\r\n\r\nSQL*Plus: Release 10.2.0.5.0 - Production on Mon May 26 07:32:59 2014\r\n\r\nCopyright (c) 1982, 2010, Oracle.  All Rights Reserved.\r\n\r\n\r\nConnected to:\r\nOracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production\r\nWith the Partitioning, Real Application Clusters, OLAP, Data Mining\r\nand Real Application Testing options\r\n\r\nSQL&gt; @\/u01\/app\/oracle\/product\/11.2.0\/db_1\/rdbms\/admin\/utlu112i.sql\r\nOracle Database 11.2 Pre-Upgrade Information Tool 05-26-2014 07:33:26\r\nScript Version: 11.2.0.4.0 Build: 001\r\n.\r\n**********************************************************************\r\nDatabase:\r\n**********************************************************************\r\n--&gt; name:          kingxxdb\r\n--&gt; version:       10.2.0.5.0\r\n--&gt; compatible:    10.2.0.5.0\r\n--&gt; blocksize:     16384\r\n--&gt; platform:      Solaris[tm] OE (64-bit)\r\n--&gt; timezone file: V4\r\n.\r\n**********************************************************************\r\nTablespaces: [make adjustments in the current environment]\r\n**********************************************************************\r\n--&gt; SYSTEM tablespace is adequate for the upgrade.\r\n.... minimum required size: 534 MB\r\n--&gt; UNDOTBS1 tablespace is adequate for the upgrade.\r\n.... minimum required size: 400 MB\r\n--&gt; TEMP tablespace is adequate for the upgrade.\r\n.... minimum required size: 60 MB\r\n--&gt; SYSAUX tablespace is adequate for the upgrade.\r\n.... minimum required size: 282 MB\r\n.\r\n**********************************************************************\r\nFlashback: OFF\r\n**********************************************************************\r\n**********************************************************************\r\nUpdate Parameters: [Update Oracle Database 11.2 init.ora or spfile]\r\nNote: Pre-upgrade tool was run on a lower version 64-bit database.\r\n**********************************************************************\r\n--&gt; If Target Oracle is 32-Bit, refer here for Update Parameters:\r\n-- No update parameter changes are required.\r\n.\r\n\r\n--&gt; If Target Oracle is 64-Bit, refer here for Update Parameters:\r\n-- No update parameter changes are required.\r\n.\r\n**********************************************************************\r\nRenamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]\r\n**********************************************************************\r\n-- No renamed parameters found. No changes are required.\r\n.\r\n**********************************************************************\r\nObsolete\/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]\r\n**********************************************************************\r\n-- No obsolete parameters found. No changes are required\r\n.\r\n\r\n**********************************************************************\r\nComponents: [The following database components will be upgraded or installed]\r\n**********************************************************************\r\n--&gt; Oracle Catalog Views         [upgrade]  VALID\r\n--&gt; Oracle Packages and Types    [upgrade]  VALID\r\n--&gt; Real Application Clusters    [upgrade]  VALID\r\n--&gt; Oracle Workspace Manager     [upgrade]  VALID\r\n.\r\n**********************************************************************\r\nMiscellaneous Warnings\r\n**********************************************************************\r\nWARNING: --&gt; Database is using a timezone file older than version 14.\r\n.... After the release migration, it is recommended that DBMS_DST package\r\n.... be used to upgrade the 10.2.0.5.0 database timezone version\r\n.... to the latest version which comes with the new release.\r\nWARNING: --&gt; Database contains INVALID objects prior to upgrade.\r\n.... The list of invalid SYS\/SYSTEM objects was written to\r\n.... registry$sys_inv_objs.\r\n.... The list of non-SYS\/SYSTEM objects was written to\r\n.... registry$nonsys_inv_objs.\r\n.... Use utluiobj.sql after the upgrade to identify any new invalid\r\n.... objects due to the upgrade.\r\n.... USER PUBLIC has 40 INVALID objects.\r\n.... USER SYSTEM has 5 INVALID objects.\r\n.... USER SYS has 179 INVALID objects.\r\n.... USER CAUSER has 3 INVALID objects.\r\n.... USER WMSYS has 1 INVALID objects.\r\n.... USER PERFSTAT has 2 INVALID objects.\r\n.... USER OCSPUSER has 2 INVALID objects.\r\nWARNING: --&gt; Your recycle bin is turned on and currently contains no objects.\r\n.... Because it is REQUIRED that the recycle bin be empty prior to upgrading\r\n.... and your recycle bin is turned on, you may need to execute the command:\r\n        PURGE DBA_RECYCLEBIN\r\n.... prior to executing your upgrade to confirm the recycle bin is empty.\r\nWARNING: --&gt; JOB_QUEUE_PROCESS value must be updated\r\n.... Your current setting of &quot;10&quot; is too low.\r\n\r\n.... Starting with Oracle Database 11g Release 2 (11.2), setting\r\n.... JOB_QUEUE_PROCESSES to 0 causes both DBMS_SCHEDULER and\r\n.... DBMS_JOB jobs to not run. Previously, setting JOB_QUEUE_PROCESSES\r\n.... to 0 caused DBMS_JOB jobs to not run, but DBMS_SCHEDULER jobs were\r\n.... unaffected and would still run. This parameter must be updated to\r\n.... a value greater than 128  (default value is 1000) prior to upgrade.\r\n.... Not doing so will affect the running of utlrp.sql after the upgrade\r\n.\r\n**********************************************************************\r\nRecommendations\r\n**********************************************************************\r\nOracle recommends gathering dictionary statistics prior to\r\nupgrading the database.\r\nTo gather dictionary statistics execute the following command\r\nwhile connected as SYSDBA:\r\n\r\n    EXECUTE dbms_stats.gather_dictionary_stats;\r\n\r\n**********************************************************************\r\nOracle recommends reviewing any defined events prior to upgrading.\r\n\r\nTo view existing non-default events execute the following commands\r\nwhile connected AS SYSDBA:\r\n  Events:\r\n    SELECT (translate(value,chr(13)||chr(10),&#039; &#039;)) FROM sys.v$parameter2\r\n      WHERE  UPPER(name) =&#039;EVENT&#039; AND  isdefault=&#039;FALSE&#039;\r\n\r\n  Trace Events:\r\n    SELECT (translate(value,chr(13)||chr(10),&#039; &#039;)) from sys.v$parameter2\r\n      WHERE UPPER(name) = &#039;_TRACE_EVENTS&#039; AND isdefault=&#039;FALSE&#039;\r\n\r\nChanges will need to be made in the init.ora or spfile.\r\n\r\n**********************************************************************\r\nSQL&gt; shutdown immediate;\r\nDatabase closed.\r\nDatabase dismounted.\r\nORACLE instance shut down.\r\n\r\nbash-3.2$ cat \/home\/oracle\/pfile_11g \r\n*.__db_cache_size=1174405120\r\n*.__java_pool_size=16777216\r\n*.__large_pool_size=16777216\r\n*.__shared_pool_size=352321536\r\n*.__streams_pool_size=0\r\n*.audit_file_dest=&#039;\/u01\/app\/oracle\/admin\/xxdb\/adump&#039;\r\n*.cluster_database_instances=2\r\n*.cluster_database=false\r\n*.compatible=&#039;10.2.0.5.0&#039;\r\n*.control_files=&#039;+DATA\/xxdb\/controlfile\/control01.ctl&#039;,&#039;+DATA\/xxdb\/controlfile\/control02.ctl&#039;\r\n*.core_dump_dest=&#039;\/u01\/app\/oracle\/admin\/xxdb\/cdump&#039;\r\n*.db_block_size=16384\r\n*.db_domain=&#039;&#039;\r\n*.db_file_multiblock_read_count=16\r\n*.db_name=&#039;kingxxdb&#039;\r\nxxdb1.instance_name=&#039;xxdb1&#039;\r\nxxdb2.instance_name=&#039;xxdb2&#039;\r\nxxdb2.instance_number=2\r\nxxdb1.instance_number=1\r\n*.java_pool_size=536870912\r\n*.job_queue_processes=10\r\n*.log_archive_dest=&#039;+data\/xxdb\/archivelog&#039;\r\n*.log_archive_format=&#039;%t_%s_%r.dbf&#039;\r\n*.open_cursors=5000\r\n*.pga_aggregate_target=5368709120\r\n*.processes=1000\r\n*.remote_login_passwordfile=&#039;exclusive&#039;\r\n*.sessions=335\r\n*.sga_target=10739500056\r\n*.shared_pool_size=838860800\r\nxxdb1.thread=1\r\nxxdb2.thread=2\r\n*.undo_management=&#039;AUTO&#039;\r\n*.undo_retention=10800\r\nxxdb2.undo_tablespace=&#039;UNDOTBS2&#039;\r\nxxdb1.undo_tablespace=&#039;UNDOTBS1&#039;\r\n\r\n\r\nbash-3.2$ env|grep ORACLE\r\nORACLE_SID=xxdb1\r\nORACLE_BASE=\/u01\/app\/oracle\r\nORACLE_HOME=\/u01\/app\/oracle\/product\/11.2.0\/db_1\r\nbash-3.2$ sqlplus &quot;\/as sysdba&quot;\r\n\r\nSQL*Plus: Release 11.2.0.4.0 Production on Mon May 26 07:57:08 2014\r\n\r\nCopyright (c) 1982, 2013, Oracle.  All rights reserved.\r\n\r\nConnected to an idle instance.\r\n\r\nSQL&gt; startup nomount pfile=&#039;\/home\/oracle\/pfile_11g&#039;;\r\nORACLE instance started.\r\n\r\nTotal System Global Area 1.0726E+10 bytes\r\nFixed Size                  2191016 bytes\r\nVariable Size            2046824792 bytes\r\nDatabase Buffers         8657043456 bytes\r\nRedo Buffers               20021248 bytes\r\nSQL&gt; create spfile from pfile=&#039;\/home\/oracle\/pfile_11g&#039;;\r\n\r\nFile created.\r\n\r\nSQL&gt; shutdown immediate;\r\nORA-01507: database not mounted\r\n\r\n\r\nORACLE instance shut down.\r\n\r\nSQL&gt; startup upgrade\r\nORACLE instance started.\r\nTotal System Global Area 1.0726E+10 bytes\r\nFixed Size                  2191016 bytes\r\nVariable Size            1845498200 bytes\r\nDatabase Buffers         8858370048 bytes\r\nRedo Buffers               20021248 bytes\r\nDatabase mounted.\r\nDatabase opened.\r\n\r\n\r\nSQL&gt; spool &#039;\/home\/oracle\/11g_update.log&#039;;\r\nSQL&gt; @?\/rdbms\/admin\/catupgrd.sql\r\n\r\n\r\n\r\nbash-3.2$ sqlplus &quot;\/as sysdba&quot;\r\n\r\nSQL*Plus: Release 11.2.0.4.0 Production on Mon May 26 08:59:45 2014\r\n\r\nCopyright (c) 1982, 2013, Oracle.  All rights reserved.\r\n\r\nConnected to an idle instance.\r\n\r\nSQL&gt; startup\r\nORACLE instance started.\r\n\r\nTotal System Global Area 1.0726E+10 bytes\r\nFixed Size                  2191016 bytes\r\nVariable Size            1845498200 bytes\r\nDatabase Buffers         8858370048 bytes\r\nRedo Buffers               20021248 bytes\r\nDatabase mounted.\r\nDatabase opened.\r\nSQL&gt; @?\/rdbms\/admin\/utlu112s.sql\r\n.\r\nOracle Database 11.2 Post-Upgrade Status Tool           05-26-2014 09:03:37\r\n.\r\nComponent                               Current      Version     Elapsed Time\r\nName                                    Status       Number      HH:MM:SS\r\n.\r\nOracle Server\r\n.                                         VALID      11.2.0.4.0  00:14:21\r\nOracle Real Application Clusters\r\n.                                         VALID      11.2.0.4.0  00:00:00\r\nOracle Workspace Manager\r\n.                                         VALID      11.2.0.4.0  00:00:36\r\nFinal Actions\r\n.                                                                00:00:32\r\nTotal Upgrade Time: 00:15:31\r\n\r\nPL\/SQL procedure successfully completed.\r\n<\/pre>\n<p>\u6570\u636e\u5b57\u5178\u5347\u7ea7\u523011.2.0.4\u540e\u7684\u65e0\u6548\u5bf9\u8c61\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; select count(*) FROM dba_invalid_objects;\r\n\r\n  COUNT(*)\r\n----------\r\n       717\r\n\r\nSQL&gt; select OWNER,count(*) FROM dba_invalid_objects group by OWNER;\r\n\r\nOWNER                            COUNT(*)\r\n------------------------------ ----------\r\nPUBLIC                                267\r\nSYSTEM                                 10\r\nSYS                                   405\r\nCAUSER                                  3\r\nWMSYS                                  28\r\nPERFSTAT                                2\r\nOCSPUSER                                2\r\n\r\n7 rows selected.\r\n<\/pre>\n<p>\u539f\u5e939i\u7684\u65e0\u6548\u5bf9\u8c61\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; select owner,count(*) from dba_objects where status=&#039;INVALID&#039; group by owner;\r\n\r\nOWNER                            COUNT(*)\r\n------------------------------ ----------\r\nSYS                                     7\r\n\r\nSQL&gt; select OWNER,OBJECT_NAME,OBJECT_TYPE from dba_objects where status=&#039;INVALID&#039;;\r\n\r\nOWNER                          OBJECT_NAME                              OBJECT_TYPE\r\n------------------------------ ---------------------------------------- ------------------\r\nSYS                            DBMS_AQADM_SYS                           PACKAGE BODY\r\nSYS                            DBMS_IREFRESH                            PACKAGE BODY\r\nSYS                            DBMS_PCLXUTIL                            PACKAGE BODY\r\nSYS                            DBMS_PRVTAQIP                            PACKAGE BODY\r\nSYS                            DBMS_SNAPSHOT                            PACKAGE BODY\r\nSYS                            DBMS_STATS                               PACKAGE BODY\r\nSYS                            UTL_RECOMP                               PACKAGE BODY\r\n\r\n7 rows selected.\r\n<\/pre>\n<p>\u7ee7\u7eed\u7f16\u8bd1\u65e0\u6548\u5bf9\u8c61<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; spool &#039;\/home\/oracle\/utlrp.log&#039;;\r\nSQL&gt; @?\/rdbms\/admin\/utlrp.sql\r\nSQL&gt; select count(*) FROM dba_invalid_objects;\r\n\r\n  COUNT(*)\r\n----------\r\n         0\r\n\r\nSQL&gt; spool off\r\nSQL&gt; shutdown immediate;\r\nDatabase closed.\r\nDatabase dismounted.\r\nORACLE instance shut down.\r\nSQL&gt; exit\r\nDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production\r\nWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,\r\nData Mining and Real Application Testing options\r\n\r\n<\/pre>\n<p>\u4fee\u6539\u76f8\u5173\u914d\u7f6e\u6587\u4ef6<br \/>\n\u8282\u70b91\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ env|grep ORACLE\r\nORACLE_SID=xxdb1\r\nORACLE_BASE=\/u01\/app\/oracle\r\nORACLE_HOME=\/u01\/app\/oracle\/product\/11.2.0\/db_1\r\nbash-3.2$ tail -5 \/var\/opt\/oracle\/oratab \r\n# Multiple entries with the same $ORACLE_SID are not allowed.\r\n#\r\n#\r\n+ASM1:\/u01\/crs\/oracle\/product\/11.2.0\/crs_1:N            # line added by Agent\r\nxxdb1:\/u01\/app\/oracle\/product\/11.2.0\/db_1:N\r\n\r\n<\/pre>\n<p>\u8282\u70b92\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ env|grep ORACLE\r\nORACLE_SID=xxdb2\r\nORACLE_BASE=\/u01\/app\/oracle\r\nORACLE_HOME=\/u01\/app\/oracle\/product\/11.2.0\/db_1\r\nbash-3.2$ tail -5 \/var\/opt\/oracle\/oratab\r\n# Multiple entries with the same $ORACLE_SID are not allowed.\r\n#\r\n#\r\n+ASM2:\/u01\/crs\/oracle\/product\/11.2.0\/crs_1:N            # line added by Agent\r\nxxdb2:\/u01\/app\/oracle\/product\/11.2.0\/db_1:N\r\n<\/pre>\n<p>*****************************************************************<br \/>\n\u7b2c\u56db\u6b65\uff1a\u6ce8\u518c\u76f8\u5173\u8d44\u6e90\u523011.2.0.4\u7684CRS<br \/>\n*****************************************************************<br \/>\n\u521b\u5efaspfile\u5230asm<br \/>\n\u4fee\u6539\u540e\u53c2\u6570\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ cat \/home\/oracle\/pfile_new.txt \r\n*.memory_max_target=51539607552\t#48GB\r\n*.memory_target=51539607552\t#48GB\r\n*.audit_file_dest=&#039;\/u01\/app\/oracle\/admin\/xxdb\/adump&#039;\r\n*.cluster_database_instances=2\r\n*.cluster_database=true\r\n*.compatible=&#039;11.2.0.4.0&#039;\r\n*.control_files=&#039;+DATA\/xxdb\/controlfile\/control01.ctl&#039;,&#039;+DATA\/xxdb\/controlfile\/control02.ctl&#039;\r\n*.core_dump_dest=&#039;\/u01\/app\/oracle\/admin\/xxdb\/cdump&#039;\r\n*.db_block_size=16384\r\n*.db_domain=&#039;&#039;\r\n*.db_file_multiblock_read_count=16\r\n*.db_name=&#039;kingxxdb&#039;\r\nxxdb1.instance_name=&#039;xxdb1&#039;\r\nxxdb2.instance_name=&#039;xxdb2&#039;\r\nxxdb2.instance_number=2\r\nxxdb1.instance_number=1\r\n*.job_queue_processes=10\r\n*.log_archive_dest=&#039;+data\/xxdb\/archivelog&#039;\r\n*.log_archive_format=&#039;%t_%s_%r.dbf&#039;\r\n*.open_cursors=5000\r\n*.processes=1000\r\n*.remote_login_passwordfile=&#039;exclusive&#039;\r\n*.sessions=1335\r\nxxdb1.thread=1\r\nxxdb2.thread=2\r\n*.undo_management=&#039;AUTO&#039;\r\n*.undo_retention=10800\r\nxxdb2.undo_tablespace=&#039;UNDOTBS2&#039;\r\nxxdb1.undo_tablespace=&#039;UNDOTBS1&#039;\r\n*.SESSION_CACHED_CURSORS=300\r\nxxdb1.cluster_interconnects=&#039;162.34.30.35&#039;\r\nxxdb2.cluster_interconnects=&#039;162.34.30.36&#039;\r\n\r\n\r\nbash-3.2$ sqlplus &quot;\/as sysdba&quot;\r\n\r\nSQL*Plus: Release 11.2.0.4.0 Production on Mon May 26 09:46:55 2014\r\n\r\nCopyright (c) 1982, 2013, Oracle.  All rights reserved.\r\n\r\nConnected to an idle instance.\r\n\r\nSQL&gt; startup nomount pfile=&#039;\/home\/oracle\/pfile_new.txt&#039;\r\nORACLE instance started.\r\n\r\nTotal System Global Area 1.0726E+10 bytes\r\nFixed Size                  2191016 bytes\r\nVariable Size            2113933656 bytes\r\nDatabase Buffers         8589934592 bytes\r\nRedo Buffers               20021248 bytes\r\nSQL&gt; create spfile=&#039;+DATA\/xxdb\/datafile\/spfilekingxxdb.ora&#039; from pfile=&#039;\/home\/oracle\/pfile_new.txt&#039;;\r\n\r\nFile created.\r\n\r\nSQL&gt; shutdown immediate;\r\nORA-01507: database not mounted\r\n\r\n\r\nORACLE instance shut down.\r\n\r\nbash-3.2$ pwd\r\n\/u01\/app\/oracle\/product\/11.2.0\/db_1\/dbs\r\nbash-3.2$ cat initxxdb1.ora\r\nSPFILE=&#039;+DATA\/xxdb\/datafile\/spfilekingxxdb.ora&#039;\r\nbash-3.2$ scp initxxdb1.ora xxdb2:\/u01\/app\/oracle\/product\/11.2.0\/db_1\/dbs\/initxxdb2.ora\r\ninitxxdb1.ora        100% |*********************************************************************************|    48       00:00    \r\nbash-3.2$ \r\n<\/pre>\n<p>\u521b\u5efa\u5bc6\u7801\u6587\u4ef6<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ id\r\nuid=101(oracle) gid=100(oinstall)\r\n\u8282\u70b91\uff1a\r\nbash-3.2$ orapwd file=\/u01\/app\/oracle\/product\/11.2.0\/db_1\/dbs\/orapwxxdb1 entries=10 password=oracle force=y\r\n\r\n\u8282\u70b92\uff1a\r\nbash-3.2$ orapwd file=\/u01\/app\/oracle\/product\/11.2.0\/db_1\/dbs\/orapwxxdb2 entries=10 password=oracle force=y\r\n<\/pre>\n<p>\u6e05\u7406\u5176\u4ed6\u65e0\u7528\u53c2\u6570\u6587\u4ef6<br \/>\n\u8282\u70b91\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ pwd\r\n\/u01\/app\/oracle\/product\/11.2.0\/db_1\/dbs\r\nbash-3.2$ ls -ltr\r\n\u603b\u6570 12\r\n-rw-r--r--   1 oracle   oinstall      48  9\u6708 24\u65e5 11:52 initxxdb1.ora\r\n-rw-r-----   1 oracle   oinstall    2560  9\u6708 25\u65e5 12:32 orapwxxdb1\r\n-rw-rw----   1 oracle   oinstall    1544  9\u6708 25\u65e5 12:39 hc_xxdb1.dat\r\n\r\nbash-3.2$ pwd\r\n\/u01\/app\/oracle\/product\/10.2.5\/db_1\/dbs\r\nbash-3.2$ rm -rf *\r\n<\/pre>\n<p>\u8282\u70b92\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ pwd\r\n\/u01\/app\/oracle\/product\/11.2.0\/db_1\/dbs\r\nbash-3.2$ ls -ltr\r\n\u603b\u6570 12\r\n-rw-r--r--   1 oracle   oinstall      48  9\u6708 24\u65e5 11:53 initxxdb2.ora\r\n-rw-r-----   1 oracle   oinstall    2560  9\u6708 25\u65e5 12:33 orapwxxdb2\r\n-rw-rw----   1 oracle   oinstall    1544  9\u6708 25\u65e5 12:45 hc_xxdb2.dat\r\n<\/pre>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ id\r\nuid=101(grid) gid=100(oinstall)\r\nbash-3.2$ crs_stat -t\r\n\u540d\u79f0           \u7c7b\u578b           \u76ee\u6807      \u72b6\u6001      \u4e3b\u673a        \r\n------------------------------------------------------------\r\nora.DATA.dg    ora....up.type ONLINE    ONLINE    xxdb1       \r\nora.FRA.dg     ora....up.type ONLINE    ONLINE    xxdb1       \r\nora....ER.lsnr ora....er.type ONLINE    ONLINE    xxdb1       \r\nora....N1.lsnr ora....er.type ONLINE    ONLINE    xxdb1       \r\nora.OCRVOTE.dg ora....up.type ONLINE    ONLINE    xxdb1       \r\nora.asm        ora.asm.type   ONLINE    ONLINE    xxdb1       \r\nora....SM1.asm application    ONLINE    ONLINE    xxdb1       \r\nora....B1.lsnr application    ONLINE    ONLINE    xxdb1       \r\nora.xxdb1.gsd  application    OFFLINE   OFFLINE               \r\nora.xxdb1.ons  application    ONLINE    ONLINE    xxdb1       \r\nora.xxdb1.vip  ora....t1.type ONLINE    ONLINE    xxdb1       \r\nora....SM2.asm application    ONLINE    ONLINE    xxdb2       \r\nora....B2.lsnr application    ONLINE    ONLINE    xxdb2       \r\nora.xxdb2.gsd  application    OFFLINE   OFFLINE               \r\nora.xxdb2.ons  application    ONLINE    ONLINE    xxdb2       \r\nora.xxdb2.vip  ora....t1.type ONLINE    ONLINE    xxdb2       \r\nora.cvu        ora.cvu.type   ONLINE    ONLINE    xxdb1       \r\nora.gsd        ora.gsd.type   OFFLINE   OFFLINE               \r\nora....network ora....rk.type ONLINE    ONLINE    xxdb1       \r\nora.oc4j       ora.oc4j.type  ONLINE    ONLINE    xxdb1       \r\nora.ons        ora.ons.type   ONLINE    ONLINE    xxdb1       \r\nora....ry.acfs ora....fs.type ONLINE    ONLINE    xxdb1       \r\nora.scan1.vip  ora....ip.type ONLINE    ONLINE    xxdb1 \r\n\r\n\r\n<\/pre>\n<p>\u6ce8\u518c\u76f8\u5173\u8d44\u6e90<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ id\r\nuid=101(oracle) gid=100(oinstall)\r\nbash-3.2$ env|grep ORACLE\r\nORACLE_SID=xxdb1\r\nORACLE_BASE=\/u01\/app\/oracle\r\nORACLE_HOME=\/u01\/app\/oracle\/product\/11.2.0\/db_1\r\nbash-3.2$ srvctl add database -d kingxxdb -o \/u01\/app\/oracle\/product\/11.2.0\/db_1 -p +DATA\/xxdb\/datafile\/spfilekingxxdb.ora\r\nbash-3.2$ srvctl add instance -d kingxxdb -n xxdb1 -i xxdb1\r\nbash-3.2$ srvctl add instance -d kingxxdb -n xxdb2 -i xxdb2\r\nbash-3.2$ srvctl start database -d kingxxdb\r\nbash-3.2$ srvctl status asm\r\nASM \u6b63\u5728 xxdb1,xxdb2 \u4e0a\u8fd0\u884c\r\nbash-3.2$ srvctl status database -d kingxxdb\r\n\u5b9e\u4f8b xxdb1 \u6b63\u5728\u8282\u70b9 xxdb1 \u4e0a\u8fd0\u884c\r\n\u5b9e\u4f8b xxdb2 \u6b63\u5728\u8282\u70b9 xxdb2 \u4e0a\u8fd0\u884c\r\nbash-3.2$ srvctl status listener \r\n\u76d1\u542c\u7a0b\u5e8f LISTENER \u5df2\u542f\u7528\r\n\u76d1\u542c\u7a0b\u5e8f LISTENER \u6b63\u5728\u8282\u70b9\u4e0a\u8fd0\u884c: xxdb1,xxdb2\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\nbash-3.2$ id\r\nuid=101(grid) gid=100(oinstall)\r\nbash-3.2$ crs_stat -t\r\n\u540d\u79f0           \u7c7b\u578b           \u76ee\u6807      \u72b6\u6001      \u4e3b\u673a        \r\n------------------------------------------------------------\r\nora.DATA.dg    ora....up.type ONLINE    ONLINE    xxdb1       \r\nora.FRA.dg     ora....up.type ONLINE    ONLINE    xxdb1       \r\nora....ER.lsnr ora....er.type ONLINE    ONLINE    xxdb1       \r\nora....N1.lsnr ora....er.type ONLINE    ONLINE    xxdb1       \r\nora.OCRVOTE.dg ora....up.type ONLINE    ONLINE    xxdb1       \r\nora.asm        ora.asm.type   ONLINE    ONLINE    xxdb1       \r\nora....SM1.asm application    ONLINE    ONLINE    xxdb1       \r\nora....B1.lsnr application    ONLINE    ONLINE    xxdb1       \r\nora.xxdb1.gsd  application    OFFLINE   OFFLINE               \r\nora.xxdb1.ons  application    ONLINE    ONLINE    xxdb1       \r\nora.xxdb1.vip  ora....t1.type ONLINE    ONLINE    xxdb1       \r\nora....SM2.asm application    ONLINE    ONLINE    xxdb2       \r\nora....B2.lsnr application    ONLINE    ONLINE    xxdb2       \r\nora.xxdb2.gsd  application    OFFLINE   OFFLINE               \r\nora.xxdb2.ons  application    ONLINE    ONLINE    xxdb2       \r\nora.xxdb2.vip  ora....t1.type ONLINE    ONLINE    xxdb2       \r\nora....xxdb.db ora....se.type ONLINE    ONLINE    xxdb1       \r\nora.cvu        ora.cvu.type   ONLINE    ONLINE    xxdb1       \r\nora.gsd        ora.gsd.type   OFFLINE   OFFLINE               \r\nora....network ora....rk.type ONLINE    ONLINE    xxdb1       \r\nora.oc4j       ora.oc4j.type  ONLINE    ONLINE    xxdb1       \r\nora.ons        ora.ons.type   ONLINE    ONLINE    xxdb1       \r\nora....ry.acfs ora....fs.type ONLINE    ONLINE    xxdb1       \r\nora.scan1.vip  ora....ip.type ONLINE    ONLINE    xxdb1    \t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\r\n<\/pre>\n<p>\u4fee\u6539redo<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nalter system checkpoint;\r\nalter system switch logfile;\r\nalter system archive log current;\r\n\r\nset line 400\r\ncol MEMBER for a60\r\nset pagesize 30\r\nselect l.thread#,l.group#,l.bytes\/1024\/1024 mb,l.status,lf.member \r\nfrom v$log l,v$logfile lf \r\nwhere l.group#=lf.group#\r\norder by 1,2,lf.member    \r\n\/\r\n\r\nALTER DATABASE DROP LOGFILE GROUP 1;\r\nALTER DATABASE DROP LOGFILE GROUP 2;\r\nALTER DATABASE DROP LOGFILE GROUP 3;\r\nALTER DATABASE DROP LOGFILE GROUP 4;\r\nALTER DATABASE DROP LOGFILE GROUP 5;\r\nALTER DATABASE DROP LOGFILE GROUP 6;\r\nALTER DATABASE DROP LOGFILE GROUP 7;\r\nALTER DATABASE DROP LOGFILE GROUP 8;\r\nALTER DATABASE DROP LOGFILE GROUP 9;\r\nALTER DATABASE DROP LOGFILE GROUP 10;\r\nALTER DATABASE DROP LOGFILE GROUP 11;\r\nALTER DATABASE DROP LOGFILE GROUP 12;\r\n\r\n\r\nALTER DATABASE ADD LOGFILE THREAD 1 GROUP 1 (&#039;+DATA\/xxdb\/onlinelog\/redo01a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo01b.log&#039;) size 512m reuse;\r\nALTER DATABASE ADD LOGFILE THREAD 1 GROUP 2 (&#039;+DATA\/xxdb\/onlinelog\/redo02a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo02b.log&#039;) size 512m reuse;  \r\nALTER DATABASE ADD LOGFILE THREAD 1 GROUP 3 (&#039;+DATA\/xxdb\/onlinelog\/redo03a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo03b.log&#039;) size 512m reuse; \r\nALTER DATABASE ADD LOGFILE THREAD 1 GROUP 4 (&#039;+DATA\/xxdb\/onlinelog\/redo04a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo04b.log&#039;) size 512m reuse; \r\nALTER DATABASE ADD LOGFILE THREAD 1 GROUP 5 (&#039;+DATA\/xxdb\/onlinelog\/redo05a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo05b.log&#039;) size 512m reuse; \r\nALTER DATABASE ADD LOGFILE THREAD 1 GROUP 6 (&#039;+DATA\/xxdb\/onlinelog\/redo06a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo06b.log&#039;) size 512m reuse; \r\nALTER DATABASE ADD LOGFILE THREAD 2 GROUP 7 (&#039;+DATA\/xxdb\/onlinelog\/redo07a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo07b.log&#039;) size 512m reuse; \r\nALTER DATABASE ADD LOGFILE THREAD 2 GROUP 8 (&#039;+DATA\/xxdb\/onlinelog\/redo08a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo08b.log&#039;) size 512m reuse;\r\nALTER DATABASE ADD LOGFILE THREAD 2 GROUP 9 (&#039;+DATA\/xxdb\/onlinelog\/redo09a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo09b.log&#039;) size 512m reuse;  \r\nALTER DATABASE ADD LOGFILE THREAD 2 GROUP 10 (&#039;+DATA\/xxdb\/onlinelog\/redo10a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo10b.log&#039;) size 512m reuse; \r\nALTER DATABASE ADD LOGFILE THREAD 2 GROUP 11 (&#039;+DATA\/xxdb\/onlinelog\/redo11a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo11b.log&#039;) size 512m reuse; \r\nALTER DATABASE ADD LOGFILE THREAD 2 GROUP 12 (&#039;+DATA\/xxdb\/onlinelog\/redo12a.log&#039;,&#039;+FRA\/xxdb\/onlinelog\/redo12b.log&#039;) size 512m reuse; \r\n\r\nalter system checkpoint;\r\nalter system switch logfile;\r\nalter system archive log current;\r\n\r\n\r\nALTER DATABASE DROP LOGFILE GROUP 2;\r\nALTER DATABASE DROP LOGFILE GROUP 9;\r\nALTER DATABASE DROP LOGFILE GROUP 11;\r\nALTER DATABASE DROP LOGFILE GROUP 12;\r\n<\/pre>\n<p>\u67e5\u770b\u65b0\u6570\u636e\u5e93\u7684\u7248\u672c\u4fe1\u606f\u673a\u76f8\u5173\u7ec4\u4ef6\u4fe1\u606f<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nbash-3.2$ sqlplus &quot;\/as sysdba&quot;\r\n\r\nSQL*Plus: Release 11.2.0.4.0 Production on Mon May 26 10:39:21 2014\r\n\r\nCopyright (c) 1982, 2013, Oracle.  All rights reserved.\r\n\r\n\r\nConnected to:\r\nOracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production\r\nWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,\r\nData Mining and Real Application Testing options\r\n\r\nSQL&gt; set line 400\r\nSQL&gt; select * from gv$version;\r\n\r\n   INST_ID BANNER\r\n---------- --------------------------------------------------------------------------------\r\n         1 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production\r\n         1 PL\/SQL Release 11.2.0.4.0 - Production\r\n         1 CORE 11.2.0.4.0      Production\r\n         1 TNS for Solaris: Version 11.2.0.4.0 - Production\r\n         1 NLSRTL Version 11.2.0.4.0 - Production\r\n         2 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production\r\n         2 PL\/SQL Release 11.2.0.4.0 - Production\r\n         2 CORE 11.2.0.4.0      Production\r\n         2 TNS for Solaris: Version 11.2.0.4.0 - Production\r\n         2 NLSRTL Version 11.2.0.4.0 - Production\r\n\r\n10 rows selected.\r\n\r\nSQL&gt; show parameter compatible\r\n\r\nNAME                                 TYPE        VALUE\r\n------------------------------------ ----------- ------------------------------\r\ncompatible                           string      11.2.0.4.0\r\n\r\n\r\nSQL&gt; select * from gv$option order by 1;\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         1 Partitioning                                                     TRUE\r\n         1 Objects                                                          TRUE\r\n         1 Real Application Clusters                                        TRUE\r\n         1 Advanced replication                                             TRUE\r\n         1 Bit-mapped indexes                                               TRUE\r\n         1 Connection multiplexing                                          TRUE\r\n         1 Connection pooling                                               TRUE\r\n         1 Database queuing                                                 TRUE\r\n         1 Incremental backup and recovery                                  TRUE\r\n         1 Instead-of triggers                                              TRUE\r\n         1 Parallel backup and recovery                                     TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         1 Parallel execution                                               TRUE\r\n         1 Parallel load                                                    TRUE\r\n         1 Point-in-time tablespace recovery                                TRUE\r\n         1 Fine-grained access control                                      TRUE\r\n         1 Proxy authentication\/authorization                               TRUE\r\n         1 Change Data Capture                                              TRUE\r\n         1 Plan Stability                                                   TRUE\r\n         1 Online Index Build                                               TRUE\r\n         1 Coalesce Index                                                   TRUE\r\n         1 Managed Standby                                                  TRUE\r\n         1 Materialized view rewrite                                        TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         1 Database resource manager                                        TRUE\r\n         1 Spatial                                                          TRUE\r\n         1 Automatic Storage Management                                     TRUE\r\n         1 Export transportable tablespaces                                 TRUE\r\n         1 Transparent Application Failover                                 TRUE\r\n         1 Fast-Start Fault Recovery                                        TRUE\r\n         1 Sample Scan                                                      TRUE\r\n         1 Duplexed backups                                                 TRUE\r\n         1 Java                                                             TRUE\r\n         1 OLAP Window Functions                                            TRUE\r\n         1 Block Media Recovery                                             TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         1 Fine-grained Auditing                                            TRUE\r\n         1 Application Role                                                 TRUE\r\n         1 Enterprise User Security                                         TRUE\r\n         1 Oracle Data Guard                                                TRUE\r\n         1 Oracle Label Security                                            FALSE\r\n         1 OLAP                                                             TRUE\r\n         1 Basic Compression                                                TRUE\r\n         1 Join index                                                       TRUE\r\n         1 Trial Recovery                                                   TRUE\r\n         1 Data Mining                                                      TRUE\r\n         1 Online Redefinition                                              TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         1 Streams Capture                                                  TRUE\r\n         1 File Mapping                                                     TRUE\r\n         1 Block Change Tracking                                            TRUE\r\n         1 Flashback Table                                                  TRUE\r\n         1 Flashback Database                                               TRUE\r\n         1 Transparent Data Encryption                                      TRUE\r\n         1 Backup Encryption                                                TRUE\r\n         1 Unused Block Compression                                         TRUE\r\n         1 Oracle Database Vault                                            FALSE\r\n         1 Result Cache                                                     TRUE\r\n         1 SQL Plan Management                                              TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         1 SecureFiles Encryption                                           TRUE\r\n         1 Real Application Testing                                         TRUE\r\n         1 Flashback Data Archive                                           TRUE\r\n         1 DICOM                                                            TRUE\r\n         1 Active Data Guard                                                TRUE\r\n         1 Server Flash Cache                                               TRUE\r\n         1 Advanced Compression                                             TRUE\r\n         1 XStream                                                          TRUE\r\n         1 Deferred Segment Creation                                        TRUE\r\n         1 Data Redaction                                                   TRUE\r\n         2 Data Redaction                                                   TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         2 Partitioning                                                     TRUE\r\n         2 Objects                                                          TRUE\r\n         2 Real Application Clusters                                        TRUE\r\n         2 Advanced replication                                             TRUE\r\n         2 Bit-mapped indexes                                               TRUE\r\n         2 Connection multiplexing                                          TRUE\r\n         2 Connection pooling                                               TRUE\r\n         2 Database queuing                                                 TRUE\r\n         2 Incremental backup and recovery                                  TRUE\r\n         2 Instead-of triggers                                              TRUE\r\n         2 Parallel backup and recovery                                     TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         2 Parallel execution                                               TRUE\r\n         2 Parallel load                                                    TRUE\r\n         2 Point-in-time tablespace recovery                                TRUE\r\n         2 Fine-grained access control                                      TRUE\r\n         2 Proxy authentication\/authorization                               TRUE\r\n         2 Change Data Capture                                              TRUE\r\n         2 Plan Stability                                                   TRUE\r\n         2 Online Index Build                                               TRUE\r\n         2 Coalesce Index                                                   TRUE\r\n         2 Managed Standby                                                  TRUE\r\n         2 Materialized view rewrite                                        TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         2 Database resource manager                                        TRUE\r\n         2 Spatial                                                          TRUE\r\n         2 Automatic Storage Management                                     TRUE\r\n         2 Export transportable tablespaces                                 TRUE\r\n         2 Transparent Application Failover                                 TRUE\r\n         2 Fast-Start Fault Recovery                                        TRUE\r\n         2 Sample Scan                                                      TRUE\r\n         2 Duplexed backups                                                 TRUE\r\n         2 Java                                                             TRUE\r\n         2 OLAP Window Functions                                            TRUE\r\n         2 Block Media Recovery                                             TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         2 Fine-grained Auditing                                            TRUE\r\n         2 Application Role                                                 TRUE\r\n         2 Enterprise User Security                                         TRUE\r\n         2 Oracle Data Guard                                                TRUE\r\n         2 Oracle Label Security                                            FALSE\r\n         2 OLAP                                                             TRUE\r\n         2 Basic Compression                                                TRUE\r\n         2 Join index                                                       TRUE\r\n         2 Trial Recovery                                                   TRUE\r\n         2 Data Mining                                                      TRUE\r\n         2 Online Redefinition                                              TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         2 Streams Capture                                                  TRUE\r\n         2 File Mapping                                                     TRUE\r\n         2 Block Change Tracking                                            TRUE\r\n         2 Flashback Table                                                  TRUE\r\n         2 Flashback Database                                               TRUE\r\n         2 Transparent Data Encryption                                      TRUE\r\n         2 Backup Encryption                                                TRUE\r\n         2 Unused Block Compression                                         TRUE\r\n         2 Oracle Database Vault                                            FALSE\r\n         2 Result Cache                                                     TRUE\r\n         2 SQL Plan Management                                              TRUE\r\n\r\n   INST_ID PARAMETER                                                        VALUE\r\n---------- ---------------------------------------------------------------- ----------------------------------------------------------------\r\n         2 SecureFiles Encryption                                           TRUE\r\n         2 Real Application Testing                                         TRUE\r\n         2 Flashback Data Archive                                           TRUE\r\n         2 DICOM                                                            TRUE\r\n         2 Active Data Guard                                                TRUE\r\n         2 Server Flash Cache                                               TRUE\r\n         2 Advanced Compression                                             TRUE\r\n         2 XStream                                                          TRUE\r\n         2 Deferred Segment Creation                                        TRUE\r\n\r\n\u5df2\u9009\u62e9130\u884c\u3002\r\n<\/pre>\n<p>\u8bbe\u7f6e\u589e\u91cf\u5907\u4efdtrace<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE &#039;+FRA\/xxdb\/tracking.trc&#039; REUSE;\r\n<\/pre>\n<p>\u4fee\u6539rman\u914d\u7f6e\u4fe1\u606f<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nrman target \/\r\nshow all;\r\nCONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO &#039;\/oradata1\/rman\/controlbak\/ca_controlfile_%F&#039;;\r\nCONFIGURE SNAPSHOT CONTROLFILE NAME TO &#039;+FRA\/xxdb\/snapcf_xxdb1.f&#039;;\r\n<\/pre>\n<p>\u5f00\u59cb\u6d4b\u8bd5\u6570\u636e\u5b8c\u6574\u6027\u3002<\/p>\n<p>\u5728\u64cd\u4f5c\u673a\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4<br \/>\n\u67e5\u770b\u5347\u7ea7\u4e4b\u524d\u65b0\u5efa\u7684\u6d4b\u8bd5\u6570\u636e\u662f\u5426\u5b58\u5728<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nselect id,to_char(my_date,&#039;yyyy\/mm\/dd hh24:mi:ss&#039;) from test_20141017;\r\n<\/pre>\n<p>\u67e5\u770b\u5347\u7ea7\u4e4b\u540e\u5e94\u7528\u7528\u6237\u8868\u7684\u6761\u76ee\u6570\u662f\u5426\u4e00\u81f4<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nset serverout on\r\ndeclare \r\nv_sum_num number :=0;\r\nv_num number :=0;\r\nv_table_name varchar2(100);\r\nstr_sql varchar2(500);\r\ncursor tab_name is select table_name from dba_tables where owner= upper(&#039;&amp;user_name&#039;) order by 1;\r\nbegin\r\n\tdbms_output.put_line(&#039;---------TABLE SUM------------&#039;);\r\n\tfor i in tab_name\r\n\t\tloop\r\n\t\t\tv_table_name:=i.table_name;\r\n\t\t\texecute immediate &#039;select count(*) from &#039; || v_table_name into v_num;\r\n\t\t\tdbms_output.put_line(v_table_name||&#039;:&#039;||chr(9)||v_num);\r\n\t\t\tv_sum_num:=v_num+v_sum_num;\r\n\t\tend loop;\r\n\tdbms_output.put_line(&#039;------------------------------&#039;);\r\n\tdbms_output.put_line(&#039;SUM_NUM&#039;||&#039;:&#039;||chr(9)||v_sum_num);\r\nend;\r\n\/\t\r\n\r\n\r\n---------TABLE SUM------------\r\nABCDEFGP:        5\r\nABCDEFGR:        386\r\nABCDEFGTBLCERT:  56453925\r\nABCDEFGTBLREVOKE:        9489064\r\nABCDEFGABLE:     4\r\nABCDEFGTBLCERT:  0\r\nABCDEFGTBLREVOKE:        0\r\nABCDEFGHCERT:    0\r\nABCDEFGHCERTEX:  0\r\nABCDEFGEYCERT:   1\r\nABCDEFGT:        52578693\r\nABCDEFGTACTIVATE:        740\r\nABCDEFGTCOUNTER: 22\r\nABCDEFGTREQ:     73777925\r\nABCDEFGL:        24\r\nABCDEFGAYKEYINFO:        1\r\nABCDEFGBLECERT:  112983\r\nABCDEFGINFO:     16213\r\nABCDEFGOKE:      14770154\r\nABCDEFGNFO:      151\r\nABCDEFGSER:      196\r\nABCDEFGFDEFINFO: 2\r\nABCDEFGTISTIC:   150889524\r\nABCDEFGCONST:    6\r\nABCDEFGVAR:      30\r\nABCDEFGG:        154543835\r\nABCDEFGK_SYN:    1\r\nABCDEFGP_REVOKE: 7479553\r\n------------------------------\r\nSUM_NUM:        520113438\r\n\r\nPL\/SQL procedure successfully completed.\r\n\r\nElapsed: 00:07:10.45\r\n<\/pre>\n<p>\u81f3\u6b64\uff0c\u5347\u7ea7\u5168\u90e8\u7ed3\u675f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u524d\u7684\u4e00\u4e2a\u6838\u5fc3\u6570\u636e\u5e93RAC\u8de8\u7248\u672c\u5347\u7ea7\u7684\u64cd\u4f5c\u6587\u6863\uff0c\u8fd9\u4efd\u6587\u6863\u6709\u7684\u5382\u5546\u62a5\u4ef7\u5230\u4e8610\u4e07+\uff0c\u4eca\u5929\u82b1\u65f6\u95f4\u6574\u7406\u51fa\u6765\u653e\u7ed9\u5927\u5bb6\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[35],"tags":[],"_links":{"self":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1453"}],"collection":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1453"}],"version-history":[{"count":6,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1453\/revisions"}],"predecessor-version":[{"id":1460,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1453\/revisions\/1460"}],"wp:attachment":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1453"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}