{"id":700,"date":"2008-09-08T18:34:51","date_gmt":"2008-09-08T10:34:51","guid":{"rendered":"http:\/\/jason695.why3s.tw\/wordpress\/?p=700"},"modified":"2008-09-08T18:57:32","modified_gmt":"2008-09-08T10:57:32","slug":"oracle%e5%b8%b8%e8%a6%8b%e5%95%8f%e9%a1%8c%e9%9b%86%e4%b8%80","status":"publish","type":"post","link":"https:\/\/jason695.why3s.tw\/wordpress\/2008\/09\/08\/oracle%e5%b8%b8%e8%a6%8b%e5%95%8f%e9%a1%8c%e9%9b%86%e4%b8%80\/","title":{"rendered":"Oracle\u5e38\u898b\u554f\u984c\u96c6(\u4e00)"},"content":{"rendered":"<p><!--more--><br \/>\n<strong>1. Oracle\u5b89\u88dd\u5b8c\u6210\u5f8c\u7684\u521d\u59cb\u53e3\u4ee4<\/strong><\/p>\n<p>internal\/oracle<\/p>\n<p>sys\/change_on_install<\/p>\n<p>system\/manager<\/p>\n<p>scott\/tiger<\/p>\n<p>sysman\/oem_temp<\/p>\n<p><strong>2. ORACLE9IAS WEB CACHE\u7684\u521d\u59cb\u9ed8\u8a8d\u7528\u6236\u548c\u5bc6\u78bc\uff1f<\/strong><\/p>\n<p>administrator\/administrator<\/p>\n<p><strong>3. oracle 8.0.5\u600e\u9ebd\u5275\u5efa\u8cc7\u6599\u5eab<\/strong><\/p>\n<p>\u7528orainst\u3002\u5982\u679c\u6709motif\u4ecb\u9762\uff0c\u53ef\u4ee5\u7528orainst \/m<\/p>\n<p><strong>4. oracle 8.1.7\u600e\u9ebd\u5275\u5efa\u8cc7\u6599\u5eab<\/strong><\/p>\n<p>dbassist<\/p>\n<p><strong>5. oracle 9i \u600e\u9ebd\u5275\u5efa\u8cc7\u6599\u5eab<\/strong><\/p>\n<p>dbca<\/p>\n<p><strong>6. oracle\u4e2d\u7684\u88f8\u8a2d\u5099\u6307\u7684\u662f\u4ec0\u9ebd<\/strong><\/p>\n<p>\u88f8\u8a2d\u5099\u5c31\u662f\u7e5e\u904e\u6587\u4ef6\u7cfb\u7d71\u76f4\u63a5\u8a2a\u554f\u7684\u5132\u5b58\u7a7a\u9593<\/p>\n<p><strong>7. oracle\u5982\u4f55\u5340\u5206 64-bit\/32bit \u7248\u672c\uff1f\uff1f\uff1f<\/strong><\/p>\n<p>$ sqlplus &#8216;\/ AS SYSDBA&#8217;<\/p>\n<p>SQL*Plus: Release 9.0.1.0.0 &#8211; Production on Mon Jul 14 17:01:09<\/p>\n<p>2003<\/p>\n<p>(c) Copyright 2001 Oracle Corporation. All rights reserved.<\/p>\n<p>Connected to:<\/p>\n<p>Oracle9i Enterprise Edition Release 9.0.1.0.0 &#8211; Production<\/p>\n<p>With the Partitioning option<\/p>\n<p>JServer Release 9.0.1.0.0 &#8211; Production<\/p>\n<p>SQL&gt; select * from v$version;<\/p>\n<p>BANNER<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Oracle9i Enterprise Edition Release 9.0.1.0.0 &#8211; Production<\/p>\n<p>PL\/SQL Release 9.0.1.0.0 &#8211; Production<\/p>\n<p>CORE 9.0.1.0.0 Production<\/p>\n<p>TNS for Solaris: Version 9.0.1.0.0 &#8211; Production<\/p>\n<p>NLSRTL Version 9.0.1.0.0 &#8211; Production<\/p>\n<p>SQL&gt;<\/p>\n<p><strong>8. SVRMGR\u4ec0\u9ebd\u610f\u601d\uff1f<\/strong><\/p>\n<p>svrmgrl\uff0cServer Manager.<\/p>\n<p>9i\u4e0b\u6c92\u6709\uff0c\u5df2\u7d93\u6539\u7232\u7528SQLPLUS\u4e86<\/p>\n<p>sqlplus \/nolog<\/p>\n<p>\u8b8a\u7232\u6b78\u6a94\u65e5\u8a8c\u578b\u7684<\/p>\n<p><strong>9. \u8acb\u554f\u5982\u4f55\u5206\u8fa8\u67d0\u500b\u7528\u6236\u662f\u5f9e\u54ea\u53f0\u6a5f\u5668\u767b\u9678ORACLE\u7684<\/strong><\/p>\n<p>SELECT machine , terminal FROM V$SESSION;<\/p>\n<p><strong>10. \u7528\u4ec0\u9ebd\u8a9e\u53e5\u67e5\u8a62\u6b04\u4f4d\u5462\uff1f<\/strong><\/p>\n<p>desc table_name \u53ef\u4ee5\u67e5\u8a62\u8868\u7684\u7d50\u69cb<\/p>\n<p>select field_name,&#8230; from &#8230; \u53ef\u4ee5\u67e5\u8a62\u6b04\u4f4d\u7684\u503c<\/p>\n<p>select * from all_tables where table_name like &#8216;%&#8217;<\/p>\n<p>select * from all_tab_columns where table_name=&#8217;  &#8216;<\/p>\n<p><strong>11. \u600e\u6a23\u5f97\u5230\u89f8\u767c\u5668\u3001\u904e\u7a0b\u3001\u51fd\u6578\u7684\u5275\u5efa\u8173\u672c\uff1f<\/strong><\/p>\n<p>desc user_source<\/p>\n<p>user_triggers<\/p>\n<p><strong>12. \u600e\u6a23\u8a08\u7b97\u4e00\u500b\u8868\u4f54\u7528\u7684\u7a7a\u9593\u7684\u5927\u5c0f\uff1f<\/strong><\/p>\n<p>select owner,table_name,<\/p>\n<p>NUM_ROWS,<\/p>\n<p>BLOCKS*AAA\/1024\/1024 &#8220;Size M&#8221;,<\/p>\n<p>EMPTY_BLOCKS,<\/p>\n<p>LAST_ANALYZED<\/p>\n<p>from dba_tables<\/p>\n<p>where table_name=&#8217;XXX&#8217;;<\/p>\n<p>Here: AAA is the value of db_block_size ;<\/p>\n<p>XXX is the table name you want to check<\/p>\n<p><strong>13. \u5982\u4f55\u67e5\u770b\u6700\u5927\u6703\u8a71\u6578\uff1f<\/strong><\/p>\n<p>SELECT * FROM V$PARAMETER WHERE NAME LIKE &#8216;proc%&#8217;;<\/p>\n<p>SQL&gt;<\/p>\n<p>SQL&gt; show parameter processes<\/p>\n<p>NAME TYPE VALUE<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;-<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>aq_tm_processes integer 1<\/p>\n<p>db_writer_processes integer 1<\/p>\n<p>job_queue_processes integer 4<\/p>\n<p>log_archive_max_processes integer 1<\/p>\n<p>processes integer 200<\/p>\n<p>\u9019\u88cf\u7232200\u500b\u7528\u6236\u3002<\/p>\n<p>select * from v$license;<\/p>\n<p>\u5176\u4e2dsessions_highwater\u7d00\u9304\u66fe\u7d93\u5230\u9054\u7684\u6700\u5927\u6703\u8a71\u6578<\/p>\n<p><strong>14. \u5982\u4f55\u67e5\u770b\u7cfb\u7d71\u88ab\u9396\u7684\u4e8b\u52d9\u6642\u9593\uff1f<\/strong><\/p>\n<p>select * from v$locked_object ;<\/p>\n<p><strong>15. \u5982\u4f55\u4ee5archivelog\u7684\u65b9\u5f0f\u904b\u884coracle\u3002<\/strong><\/p>\n<p>init.ora<\/p>\n<p>log_archive_start = true<\/p>\n<p>RESTART DATABASE<\/p>\n<p><strong>16. \u600e\u9ebd\u7372\u53d6\u6709\u54ea\u4e9b\u7528\u6236\u5728\u4f7f\u7528\u8cc7\u6599\u5eab<\/strong><\/p>\n<p>select username from v$session;<\/p>\n<p><strong>17. \u8cc7\u6599\u8868\u4e2d\u7684\u6b04\u4f4d\u6700\u5927\u6578\u662f\u591a\u5c11<\/strong><\/p>\n<p>\u8868\u6216\u8996\u5716\u4e2d\u7684\u6700\u5927\u5217\u6578\u7232 1000<\/p>\n<p><strong>18. \u600e\u6a23\u67e5\u5f97\u8cc7\u6599\u5eab\u7684SID<\/strong><\/p>\n<p>select name from v$database;<\/p>\n<p>\u4e5f\u53ef\u4ee5\u76f4\u63a5\u67e5\u770b init.ora\u6587\u4ef6<\/p>\n<p><strong>19. \u5982\u4f55\u5728Oracle\u4f3a\u670d\u5668\u4e0a\u901a\u904eSQLPLUS\u67e5\u770b\u672c\u6a5fIP\u4f4d\u5740<\/strong><\/p>\n<p>select sys_context(&#8216;userenv&#8217;,&#8217;ip_address&#8217;) from dual;<\/p>\n<p>\u5982\u679c\u662f\u767b\u9678\u672c\u6a5f\u8cc7\u6599\u5eab\uff0c\u53ea\u80fd\u8fd4\u56de127.0.0.1\uff0c\u5475\u5475<\/p>\n<p><strong>20. unix \u4e0b\u600e\u9ebd\u8abf\u6574\u8cc7\u6599\u5eab\u7684\u6642\u9593\uff1f<\/strong><\/p>\n<p>su -root<\/p>\n<p>date -u 08010000<\/p>\n<p><strong>21. \u5728ORACLE TABLE\u4e2d\u5982\u4f55\u6293\u53d6MEMO\u985e\u578b\u6b04\u4f4d\u70ba\u7a7a\u7684\u8cc7\u6599\u8a18\u9304<\/strong><\/p>\n<p>select remark from oms_flowrec where trim(&#8216; &#8216; from remark) is not<\/p>\n<p>null ;<\/p>\n<p><strong>22. \u5982\u4f55\u7528BBB\u8868\u7684\u8cc7\u6599\u53bb\u66f4\u65b0AAA\u8868\u7684\u8cc7\u6599(\u6709\u95dc\u806f\u7684\u6b04\u4f4d)<\/strong><\/p>\n<p>UPDATE AAA SET BNS_SNM=(SELECT BNS_SNM FROM BBB WHERE<\/p>\n<p>AAA.DPT_NO=BBB.DPT_NO) WHERE BBB.DPT_NO IS NOT NULL;<\/p>\n<p><strong>23. P4\u96fb\u8166\u5b89\u88dd\u65b9\u6cd5<\/strong><\/p>\n<p>\u5c07SYMCJIT.DLL\u6539\u70baSYSMCJIT.OLD<\/p>\n<p><strong>24. \u4f55\u67e5\u8a62SERVER\u662f\u4e0d\u662fOPS<\/strong><\/p>\n<p>SELECT * FROM V$OPTION;<\/p>\n<p>\u5982\u679cPARALLEL SERVER=TRUE\u5247\u6709OPS\u80fd<\/p>\n<p><strong>25. \u4f55\u67e5\u8a62\u6bcf\u500b\u7528\u6236\u7684\u6b0a\u9650<\/strong><\/p>\n<p>SELECT * FROM DBA_SYS_PRIVS;<\/p>\n<p><strong>26. \u5982\u4f55\u5c07\u8868\u79fb\u52d5\u8868\u7a7a\u9593<\/strong><\/p>\n<p>ALTER TABLE TABLE_NAME MOVE TABLESPACE_NAME;<\/p>\n<p><strong>27. \u5982\u4f55\u5c07\u7d22\u5f15\u79fb\u52d5\u8868\u7a7a\u9593<\/strong><\/p>\n<p>ALTER INDEX INDEX_NAME REBUILD TABLESPACE TABLESPACE_NAME;<\/p>\n<p><strong>28. \u5728LINUX,UNIX\u4e0b\u5982\u4f55\u555f\u52d5DBA STUDIO<\/strong><\/p>\n<p>OEMAPP DBASTUDIO<\/p>\n<p><strong>29. \u67e5\u8a62\u9396\u7684\u72c0\u6cc1\u7684\u5c0d\u8c61\u6709<\/strong><\/p>\n<p>V$LOCK, V$LOCKED_OBJECT, V$SESSION, V$SQLAREA, V$PROCESS ;<\/p>\n<p>\u67e5\u8a62\u9396\u7684\u8868\u7684\u65b9\u6cd5:<\/p>\n<p>SELECT S.SID SESSION_ID, S.USERNAME, DECODE(LMODE, 0, &#8216;None&#8217;, 1,<\/p>\n<p>&#8216;Null&#8217;, 2, &#8216;Row-S (SS)&#8217;, 3, &#8216;Row-X (SX)&#8217;, 4, &#8216;Share&#8217;, 5, &#8216;S\/Row-X<\/p>\n<p>(SSX)&#8217;, 6, &#8216;Exclusive&#8217;, TO_CHAR(LMODE)) MODE_HELD, DECODE(REQUEST,<\/p>\n<p>0, &#8216;None&#8217;, 1, &#8216;Null&#8217;, 2, &#8216;Row-S (SS)&#8217;, 3, &#8216;Row-X (SX)&#8217;, 4,<\/p>\n<p>&#8216;Share&#8217;, 5, &#8216;S\/Row-X (SSX)&#8217;, 6, &#8216;Exclusive&#8217;, TO_CHAR(REQUEST))<\/p>\n<p>MODE_REQUESTED, O.OWNER||&#8217;.&#8217;||O.OBJECT_NAME||&#8217;<\/p>\n<p>(&#8216;||O.OBJECT_TYPE||&#8217;)&#8217;, S.TYPE LOCK_TYPE, L.ID1 LOCK_ID1, L.ID2<\/p>\n<p>LOCK_ID2 FROM V$LOCK L, SYS.DBA_OBJECTS O, V$SESSION S WHERE L.SID<\/p>\n<p>= S.SID AND L.ID1 = O.OBJECT_ID ;<\/p>\n<p><strong>30. \u5982\u4f55\u89e3\u9396<\/strong><\/p>\n<p>ALTER SYSTEM KILL SESSION \u2018SID,SERIR#\u2019;<\/p>\n<p><strong>31. SQLPLUS\u4e0b\u5982\u4f55\u4fee\u6539\u7de8\u8f2f\u5668<\/strong><\/p>\n<p>DEFINE _EDITOR=&#8221;&lt;\u7de8\u8f2f\u5668\u7684\u5b8c\u6574\u8def\u7d93&gt;&#8221; &#8212; \u5fc5\u9808\u52a0\u4e0a\u96d9\u5f15\u865f<\/p>\n<p>\u4f86\u5b9a\u7fa9\u65b0\u7684\u7de8\u8f2f\u5668\uff0c\u4e5f\u53ef\u4ee5\u628a\u9019\u500b\u5beb\u5728$ORACLE_HOME\/sqlplus\/admin\/glogin.sql\u88cf\u9762\u4f7f\u5b83\u6c38\u4e45\u6709\u6548\u3002<\/p>\n<p><strong>32. ORACLE\u7522\u751f\u96a8\u6a5f\u51fd\u6578\u662f<\/strong><\/p>\n<p>DBMS_RANDOM.RANDOM<\/p>\n<p><strong>33. LINUX\u4e0b\u67e5\u8a62\u78c1\u76e4\u7af6\u722d\u72c0\u6cc1\u547d\u4ee4<\/strong><\/p>\n<p>Sar -d<\/p>\n<p><strong>33. LINUX\u4e0b\u67e5\u8a62CPU\u7af6\u722d\u72c0\u6cc1\u547d\u4ee4<\/strong><\/p>\n<p>sar -r<\/p>\n<p><strong>34. \u67e5\u8a62\u7576\u524d\u7528\u6236\u5c0d\u8c61<\/strong><\/p>\n<p>SELECT * FROM USER_OBJECTS;<\/p>\n<p>SELECT * FROM DBA_SEGMENTS;<\/p>\n<p><strong>35. \u5982\u4f55\u7372\u53d6\u932f\u8aa4\u8cc7\u8a0a<\/strong><\/p>\n<p>SELECT * FROM USER_ERRORS;<\/p>\n<p><strong>36. \u5982\u4f55\u7372\u53d6\u93c8\u63a5\u72c0\u6cc1<\/strong><\/p>\n<p>SELECT * FROM DBA_DB_LINKS;<\/p>\n<p><strong>37. \u67e5\u770b\u6578\u64da\u5eab\u5b57\u5143\u72c0\u6cc1<\/strong><\/p>\n<p>SELECT * FROM NLS_DATABASE_PARAMETERS;<\/p>\n<p>SELECT * FROM V$NLS_PARAMETERS;<\/p>\n<p><strong>38. \u67e5\u8a62\u8868\u7a7a\u9593\u8cc7\u8a0a<\/strong><\/p>\n<p>SELECT * FROM DBA_DATA_FILES;<\/p>\n<p><strong>39. ORACLE\u7684INTERAL\u7528\u6236\u8981\u53e3\u4ee4<\/strong><\/p>\n<p>\u4fee\u6539 SQLNET.ORA<\/p>\n<p>SQLNET.AUTHENTICATION_SERVICES=(NTS)<\/p>\n<p><strong>40. \u51fa\u73feJAVA.EXE\u7684\u89e3\u6c7a\u8fa6\u6cd5<\/strong><\/p>\n<p>\u4e00\u822c\u662f\u5c07ORACLEORAHOMEXIHTTPSERVER\u6539\u6210\u624b\u5de5\u555f\u52d5\u53ef\u4ee5\u7684<\/p>\n<p>X\u662f8\u62169<\/p>\n<p><strong>41. \u5982\u4f55\u7d66\u8868\u3001\u5217\u52a0\u6ce8\u91cb\uff1f<\/strong><\/p>\n<p>SQL&gt;comment on table \u8868 is &#8216;\u8868\u6ce8\u91cb&#8217;;<\/p>\n<p>\u6ce8\u91cb\u5df2\u5275\u5efa\u3002<\/p>\n<p>SQL&gt;comment on column \u8868.\u5217 is &#8216;\u5217\u6ce8\u91cb&#8217;;<\/p>\n<p>\u6ce8\u91cb\u5df2\u5275\u5efa\u3002<\/p>\n<p>SQL&gt; select * from user_tab_comments where comments is not null;<\/p>\n<p><strong>42. \u5982\u4f55\u67e5\u770b\u5404\u500b\u8868\u7a7a\u9593\u4f54\u7528\u78c1\u7247\u60c5\u6cc1\uff1f<\/strong><\/p>\n<p>SQL&gt; col tablespace format a20<\/p>\n<p>SQL&gt; select<\/p>\n<p>b.file_id \u6587\u4ef6ID\u865f,<\/p>\n<p>b.tablespace_name \u8868\u7a7a\u9593\u540d,<\/p>\n<p>b.bytes \u4f4d\u5143\u7d44\u6578,<\/p>\n<p>(b.bytes-sum(nvl(a.bytes,0))) \u5df2\u4f7f\u7528,<\/p>\n<p>sum(nvl(a.bytes,0)) \u5269\u9918\u7a7a\u9593,<\/p>\n<p>sum(nvl(a.bytes,0))\/(b.bytes)*100 \u5269\u9918\u767e\u5206\u6bd4<\/p>\n<p>from dba_free_space a,dba_data_files b<\/p>\n<p>where a.file_id=b.file_id<\/p>\n<p>group by b.tablespace_name,b.file_id,b.bytes<\/p>\n<p>order by b.file_id<\/p>\n<p><strong>43. \u5982\u628aORACLE\u8a2d\u7f6e\u7232MTS\u6216\u5c08\u7528\u6a21\u5f0f\uff1f<\/strong><\/p>\n<p>#dispatchers=&#8221;(PROTOCOL=TCP) (SERVICE=SIDXDB)&#8221;<\/p>\n<p>\u52a0\u4e0a\u5c31\u662fMTS\uff0c\u6ce8\u91cb\u5c31\u662f\u5c08\u7528\u6a21\u5f0f\uff0cSID\u662f\u6307\u4f60\u7684\u5be6\u4f8b\u540d\u3002<\/p>\n<p><strong>44. \u5982\u4f55\u624d\u80fd\u5f97\u77e5\u7cfb\u7d71\u7576\u524d\u7684SCN\u865f<\/strong><\/p>\n<p>select max(ktuxescnw * power(2, 32) + ktuxescnb) from x$ktuxe;<\/p>\n<p><strong>45. \u8acb\u554f\u5982\u4f55\u5728ORACLE\u4e2d\u53d6\u6beb\u79d2<\/strong><\/p>\n<p>9i\u4e4b\u524d\u4e0d\u652f\u63f4,9i\u958b\u59cb\u6709timestamp.<\/p>\n<p>9i\u53ef\u4ee5\u7528select systimestamp from dual;<\/p>\n<p>\u5927\u5bb6\u5728\u61c9\u7528ORACLE\u7684\u6642\u5019\u53ef\u80fd\u6703\u9047\u5230\u5f88\u591a\u770b\u8d77\u4f86\u4e0d\u96e3\u7684\u554f\u984c, \u7279\u5225\u5c0d\u65b0\u624b\u4f86\u8aaa, \u4eca\u5929\u6211\u7c21\u55ae\u628a\u5b83\u7e3d\u7d50\u4e00\u4e0b, \u767c\u5e03\u7d66\u5927\u5bb6,<\/p>\n<p>\u5e0c\u671b\u5c0d\u5927\u5bb6\u6709\u5e6b\u52a9! \u548c\u5927\u5bb6\u4e00\u8d77\u63a2\u8a0e, \u5171\u540c\u9032\u6b65!<\/p>\n<p>\u5c0dORACLE\u9ad8\u624b\u4f86\u8aaa\u662f\u4e0d\u7528\u770b\u7684.<\/p>\n<p><strong>46. \u5982\u4f55\u5728\u5b57\u4e32\u91cc\u52a0\u56de\u8eca\uff1f<\/strong><\/p>\n<p>select &#8216;Welcome to visit&#8217;||chr(10)||&#8217;www.CSDN.NET&#8217; from dual ;<\/p>\n<p><strong>47. \u4e2d\u6587\u662f\u5982\u4f55\u6392\u5e8f\u7684\uff1f<\/strong><\/p>\n<p>Oracle9i\u4e4b\u524d\uff0c\u4e2d\u6587\u662f\u6309\u7167\u4e8c\u9032\u4f4d\u7de8\u78bc\u9032\u884c\u6392\u5e8f\u7684\u3002<\/p>\n<p>\u5728oracle9i\u4e2d\u65b0\u589e\u4e86\u6309\u7167\u62fc\u97f3\u3001\u90e8\u9996\u3001\u7b46\u756b\u6392\u5e8f\u529f\u80fd\u3002\u8a2d\u7f6eNLS_SORT\u503c<\/p>\n<p>SCHINESE_RADICAL_M \u6309\u7167\u90e8\u9996\uff08\u7b2c\u4e00\u9806\u5e8f\uff09\u3001\u7b46\u5283\uff08\u7b2c\u4e8c\u9806\u5e8f\uff09\u6392\u5e8f<\/p>\n<p>SCHINESE_STROKE_M \u6309\u7167\u7b46\u5283\uff08\u7b2c\u4e00\u9806\u5e8f\uff09\u3001\u90e8\u9996\uff08\u7b2c\u4e8c\u9806\u5e8f\uff09\u6392\u5e8f<\/p>\n<p>SCHINESE_PINYIN_M \u6309\u7167\u62fc\u97f3\u6392\u5e8f<\/p>\n<p><strong>48. Oracle8i\u4e2d\u7269\u4ef6\u540d\u53ef\u4ee5\u7528\u4e2d\u6587\u55ce\uff1f<\/strong><\/p>\n<p>\u53ef\u4ee5<\/p>\n<p><strong>49. \u5982\u4f55\u6539\u8b8aWIN\u4e2dSQL*Plus\u5553\u52d5\u9078\u9805\uff1f<\/strong><\/p>\n<p>SQL*PLUS\u81ea\u8eab\u7684\u9078\u9805\u8a2d\u7f6e\u6211\u5011\u53ef\u4ee5\u5728$ORACLE_HOME\/sqlplus\/admin\/glogin.sql\u4e2d\u8a2d\u7f6e\u3002<\/p>\n<p><strong>50. \u600e\u6a23\u4fee\u6539oracel\u8cc7\u6599\u5eab\u7684\u9ed8\u8a8d\u65e5\u671f<\/strong><\/p>\n<p>alter session set nls_date_format=&#8217;yyyymmddhh24miss&#8217;;<\/p>\n<p>OR<\/p>\n<p>\u53ef\u4ee5\u5728init.ora\u4e2d\u52a0\u4e0a\u4e00\u884c<\/p>\n<p>nls_date_format=&#8217;yyyymmddhh24miss&#8217;<\/p>\n<p><strong>51. \u5982\u4f55\u5c07\u5c0f\u8868\u653e\u5165keep\u6c60\u4e2d<\/strong><\/p>\n<p>alter table xxx storage(buffer_pool keep);<\/p>\n<p><strong>52. \u5982\u4f55\u6aa2\u67e5\u662f\u5426\u5b89\u88dd\u4e86\u67d0\u500bpatch<\/strong><\/p>\n<p>check that oraInventory<\/p>\n<p><strong>53. \u5982\u4f55\u4f7fselect\u8a9e\u53e5\u4f7f\u67e5\u8a62\u7d50\u679c\u81ea\u52d5\u751f\u6210\u5e8f\u865f<\/strong><\/p>\n<p>select rownum,COL from table;<\/p>\n<p><strong>54. \u5982\u4f55\u77e5\u9053\u8cc7\u6599\u8932\u4e2d\u67d0\u500b\u8868\u6240\u5728\u7684tablespace<\/strong><\/p>\n<p>select tablespace_name from user_tables where table_name=&#8217;TEST&#8217;;<\/p>\n<p>select * from user_tables\u4e2d\u6709\u500b\u6b04\u4f4dTABLESPACE_NAME\uff0c\uff08oracle\uff09;<\/p>\n<p>select * from dba_segments where \u2026;<\/p>\n<p><strong>55. \u600e\u9ebd\u53ef\u4ee5\u5feb\u901f\u505a\u4e00\u500b\u548c\u539f\u8868\u4e00\u6a23\u7684\u5099\u4efd\u8868<\/strong><\/p>\n<p>create table new_table as (select * from old_table);<\/p>\n<p><strong>55. \u600e\u9ebd\u5728sqlplus\u4e0b\u4fee\u6539procedure<\/strong><\/p>\n<p>select line,trim(text) t from user_source where name =\u2019A\u2019 order by<\/p>\n<p>line;<\/p>\n<p><strong>56. \u600e\u6a23\u89e3\u9664PROCEDURE\u88ab\u610f\u5916\u9396\u5b9a<\/strong><\/p>\n<p>alter system kill session ,\u628a\u90a3\u500bsession\u7d66\u6bba\u6389\uff0c\u4e0d\u904e\u4f60\u8981\u5148\u67e5\u51fa\u5979\u7684session id<\/p>\n<p>or<\/p>\n<p>\u628a\u8a72\u904e\u7a0b\u91cd\u65b0\u6539\u500b\u540d\u5b57\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p><strong>57. SQL Reference\u662f\u500b\u4ec0\u9ebd\u6771\u897f\uff1f<\/strong><\/p>\n<p>\u662f\u4e00\u672csql\u7684\u4f7f\u7528\u624b\u518a\uff0c\u5305\u62ec\u8a9e\u6cd5\u3001\u51fd\u6578\u7b49\u7b49\uff0coracle\u5b98\u65b9\u7db2\u7ad9\u7684\u6587\u6a94\u4e2d\u5fc3\u6709\u4e0b\u8f09.<\/p>\n<p><strong>58. \u5982\u4f55\u67e5\u770b\u8cc7\u6599\u5eab\u7684\u72c0\u614b<\/strong><\/p>\n<p>unix\u4e0b<\/p>\n<p>ps -ef | grep ora<\/p>\n<p>windows\u4e0b<\/p>\n<p>\u770b\u670d\u52d9\u662f\u5426\u8d77\u4f86<\/p>\n<p>\u662f\u5426\u53ef\u4ee5\u9023\u4e0a\u8cc7\u6599\u5eab<\/p>\n<p><strong>59. \u8acb\u554f\u5982\u4f55\u4fee\u6539\u4e00\u5f35\u8868\u7684\u4e3b\u9375<\/strong><\/p>\n<p>alter table aaa<\/p>\n<p>drop constraint aaa_key ;<\/p>\n<p>alter table aaa<\/p>\n<p>add constraint aaa_key primary key(a1,b1) ;<\/p>\n<p><strong>60. \u6539\u8b8a\u8cc7\u6599\u6a94\u6848\u7684\u5927\u5c0f<\/strong><\/p>\n<p>\u7528 ALTER DATABASE &#8230;. DATAFILE &#8230;. ;<\/p>\n<p>\u624b\u5de5\u6539\u8b8a\u8cc7\u6599\u6a94\u6848\u7684\u5927\u5c0f\uff0c\u5c0d\u65bc\u539f\u4f86\u7684 \u8cc7\u6599\u6a94\u6848\u6709\u6c92\u6709\u640d\u5bb3\u3002<\/p>\n<p><strong>61. \u600e\u6a23\u67e5\u770bORACLE\u4e2d\u6709\u54ea\u4e9b\u7a0b\u5f0f\u5728\u904b\u884c\u4e4b\u4e2d\uff1f<\/strong><\/p>\n<p>\u67e5\u770bv$sessions\u8868<\/p>\n<p><strong>62. \u600e\u9ebd\u53ef\u4ee5\u770b\u5230\u8cc7\u6599\u5eab\u6709\u591a\u5c11\u500btablespace<\/strong><\/p>\n<p>select * from dba_tablespaces;<\/p>\n<p><strong>63. \u5982\u4f55\u4fee\u6539oracle\u8cc7\u6599\u5eab\u7684\u7528\u6236\u9023\u63a5\u6578\uff1f<\/strong><\/p>\n<p>\u4fee\u6539initSID.ora\uff0c\u5c07process\u52a0\u5927\uff0c\u91cd\u5553\u8cc7\u6599\u5eab.<\/p>\n<p><strong>64. \u5982\u4f55\u67e5\u51fa\u4e00\u689d\u8a18\u9304\u7684\u6700\u5f8c\u66f4\u65b0\u6642\u9593<\/strong><\/p>\n<p>\u53ef\u4ee5\u7528logminer \u5bdf\u770b<\/p>\n<p><strong>65. \u5982\u4f55\u5728PL\/SQL\u4e2d\u8b80\u5beb\u6587\u4ef6\uff1f<\/strong><\/p>\n<p>UTL_FILE\u5305\u5141\u8a31\u7528\u6236\u901a\u904ePL\/SQL\u8b80\u5beb\u4f5c\u696d\u7cfb\u7d71\u6587\u4ef6\u3002<\/p>\n<p><strong>66. \u600e\u6a23\u628a\u201c&amp;\u201d\u653e\u5165\u4e00\u689d\u8a18\u9304\u4e2d\uff1f<\/strong><\/p>\n<p>insert into a values (translate (&#8216;at{&amp;}t&#8217;,&#8217;at{}&#8217;,&#8217;at&#8217;));<\/p>\n<p><strong>67. EXP\u3000\u5982\u4f55\u52a0\uff31\uff35\uff25\uff32\uff39\u53c3\u6578\uff1f<\/strong><\/p>\n<p>EXP USER\/PASS FILE=A.DMP TABLES(BSEMPMS)<\/p>\n<p>QUERY='&#8221;WHERE EMP_NO=\\&#8217;S09394\\&#8217;\\&#8221; \ufe54<\/p>\n<p><strong>68. \u95dc\u65bcoracle8i\u652f\u63f4\u7c21\u9ad4\u548c\u7e41\u9ad4\u7684\u5b57\u5143\u96c6\u554f\u984c\uff1f<\/strong><\/p>\n<p>ZHS16GBK\u53ef\u4ee5\u652f<\/p>\n<p><strong>69. Data Guard\u662f\u4ec0\u9ebd\u8edf\u9ad4\uff1f<\/strong><\/p>\n<p>\u5c31\u662fStandby\u7684\u63db\u4ee3\u7523\u54c1<\/p>\n<p><strong>70. \u5982\u4f55\u5275\u5efaSPFILE<\/strong><\/p>\n<p>SQL&gt; connect \/ as sysdba<\/p>\n<p>SQL&gt; select * from v$version;<\/p>\n<p>SQL&gt; create pfile from spfile;<\/p>\n<p>SQL&gt; CREATE SPFILE FROM<\/p>\n<p>PFILE=&#8217;E:\\ora9i\\admin\\eygle\\pfile\\init.ora&#8217;;<\/p>\n<p>\u6587\u4ef6\u5df2\u5275\u5efa\u3002<\/p>\n<p>SQL&gt; CREATE SPFILE=&#8217;E:\\ora9i\\database PFILEEYGLE.ORA&#8217; FROM<\/p>\n<p>PFILE=&#8217;E:\\ora9i\\admin\\eygle\\pfile\\init.ora&#8217;;<\/p>\n<p>\u6587\u4ef6\u5df2\u5275\u5efa\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[41],"tags":[],"class_list":["post-700","post","type-post","status-publish","format-standard","hentry","category-oracle","no-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/comments?post=700"}],"version-history":[{"count":0,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/700\/revisions"}],"wp:attachment":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}