Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracleÊý¾Ý×ÖµäС½á


ÏÂÃæ°´Àà±ðÁгöһЩORACLEÓû§³£ÓÃÊý¾Ý×ÖµäµÄ²éѯʹÓ÷½·¨¡£
   
    Ò»¡¢Óû§
    ²é¿´µ±Ç°Óû§µÄȱʡ±í¿Õ¼ä
    SQL>select username,default_tablespace from user_users;
    ²é¿´µ±Ç°Óû§µÄ½ÇÉ«
    SQL>select * from user_role_privs;
 
    ²é¿´µ±Ç°Óû§µÄϵͳȨÏÞºÍ±í¼¶È¨ÏÞ
    SQL>select * from user_sys_privs;
    SQL>select * from user_tab_privs;
    ¶þ¡¢±í
     
    ²é¿´Óû§ÏÂËùÓеıí
    SQL>select * from user_tables;
         
    ²é¿´Ãû³Æ°üº¬log×Ö·ûµÄ±í
    SQL>select object_name,object_id from user_objects where instr(object_name,'LOG')>0;
     
    ²é¿´Ä³±íµÄ´´½¨Ê±¼ä 
    SQL>select object_name,created from user_objects where object_name=upper('&table_name');
     
    ²é¿´Ä³±íµÄ´óС
    SQL>select sum(bytes)/(1024*1024) as size(M) from user_segments where segment_name=upper('&table_name');
     
    ²é¿´·ÅÔÚORACLEµÄÄÚ´æÇøÀïµÄ±í  
    SQL>select table_name,cache from user_tables where instr(cache,'Y')>0;
   
    Èý¡¢Ë÷Òý
    
    ²é¿´Ë÷Òý¸öÊýºÍÀà±ð
    SQL>select index_name,index_type,table_name from user_indexes order by table_name;
 ²é¿´Ë÷Òý±»Ë÷ÒýµÄ×Ö¶Î
    SQL>select * from user_ind_columns where index_name=upper('&index_name');
     
    ²é¿´Ë÷ÒýµÄ´óС
    SQL>select sum(bytes)/(1024*1024) as size(M) from user_segments where segment_name=up


Ïà¹ØÎĵµ£º

ORACLE ORA 00132 ORA 00214

oracle¶ÏµçºóÖØÆô³öÏÖµÄÎÊÌâÒѾ­½â¾ö·½·¨
Ò»¡¢ORA-00132 
ÎÊÌâÃèÊö £ºsyntax error or unresolved network name ''
µÚ1²½£º¸´ÖÆÒ»·Ýpfile²ÎÊýÎļþ£¨×¢Ò⣺oracleÖеÄpfileÖ¸µÄ¾ÍÊÇinit<sid>.oraÎļþ£©
$sqlplus '/as sysdba';
SQL> create pfile from spfile='/u01/oracle/product/10.2.0/db_1/dbs/spf ......

ORACLEÎﻯÊÓͼ Query RewriteµÄÒ»°ãÀí½âÖ®¶þ


   ÔÚOracleµÄQuery RewriteÖÐÖ÷ÒªÓÐÈýµã, µÚÒ»ÊÇҪʹÓÃCBO; µÚ¶þÊÇÒªÉèÖÃquery rewrite enabled²ÎÊýΪTRUE; µÚÈýÊÇÒªÏÈÔñÉèÖÃquery rewrite integrity²ÎÊýµÄÖµ(stale_tolerated, trusted, enforced). ¶ÔÓÚµÚÒ»µã, ÎÒÃÇ×îºÃanalyzeÏà¹ØµÄ±í¼°Ë÷Òý¼°MV; ¶ÔÓÚµÚ¶þµã,Õâ¸ö²ÎÊýÖ»ÓÐÁ½¸öÖµ(true, false), ºÜ¼òµ ......

oracle ±¸·ÝÃüÁî

µ¼³ö EXP USER/PASSWORD@ODBC FILE=C£º\***.DMP ROWS=N //²»±£´æÊý¾Ý£»
µ¼³ö EXP USER/PASSWORD@ODBC FILE=C£º\***.DMP   //±£´æÊý¾Ý£»
µ¼³ö EXP USER/PASSWORD@ODBC FILE=C£º\***.DMP full=y //È«²¿µ¼³ö£»
µ¼Èë imp user/password@odbc file=c:\***.dmp full=y ignore=y;
OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏà ......

PL/SQLÁ¬½ÓOracle(Ãâ°²×°oracle¿Í»§¶Ë)

 
      ´ó¼Ò¶¼ÖªµÀ£¬ÓÃPL/SQLÁ¬½ÓOracle£¬ÊÇÐèÒª°²×°Oracle¿Í»§¶ËÈí¼þµÄ¡£ÓÐûҪÏë¹ý²»°²×°Oracle¿Í»§¶ËÖ±½ÓÁ¬½ÓOracleÄØ£¿
      ÆäʵÎÒÒ»Ö±ÏëÕâÑù×ö£¬ÒòΪÕâ¸ö¿Í»§¶ËʵÔÚÌ«ÈÃÈËÌÖÑáÁË£¡£¡£¡²»µ«»á°²×°Ò»¸öJDK£¬¶øÇÒ»¹»á°Ñ×Ô¼º·ÅÔÚ»·¾³±äÁ¿µÄ×îÇ°Ãæ£¬»áÔì³É²»Ð ......

Oracleά»¤³£ÓÃSQLÓï¾ä

1¡¢²é¿´±í¿Õ¼äµÄÃû³Æ¼°´óС
¡¡¡¡select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
¡¡¡¡from dba_tablespaces t, dba_data_files d
¡¡¡¡where t.tablespace_name = d.tablespace_name
¡¡¡¡group by t.tablespace_name;
¡¡¡¡
¡¡¡¡2¡¢²é¿´±í¿Õ¼äÎïÀíÎļþµÄÃû³Æ¼°´óС
¡¡¡¡select tablespace_ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ