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

¡¾×ª¡¿Oracleϵͳ±í²éѯ

Êý¾Ý×Öµädict×ÜÊÇÊôÓÚOracleÓû§sysµÄ¡£
1¡¢Óû§£º
¡¡select username from dba_users;
¸Ä¿ÚÁî
¡¡alter user spgroup identified by spgtest;
2¡¢±í¿Õ¼ä£º
¡¡select * from dba_data_files;
¡¡select * from dba_tablespaces;//±í¿Õ¼ä
¡¡select tablespace_name,sum(bytes), sum(blocks)
from dba_free_space group by tablespace_name;//¿ÕÏбí¿Õ¼ä
¡¡select * from dba_data_files
where tablespace_name='RBS';//±í¿Õ¼ä¶ÔÓ¦µÄÊý¾ÝÎļþ
¡¡select * from dba_segments
where tablespace_name='INDEXS';
3¡¢Êý¾Ý¿â¶ÔÏó£º
¡¡select * from dba_objects;
¡¡CLUSTER¡¢DATABASE LINK¡¢FUNCTION¡¢INDEX¡¢LIBRARY¡¢PACKAGE¡¢PACKAGE BODY¡¢
¡¡PROCEDURE¡¢SEQUENCE¡¢SYNONYM¡¢TABLE¡¢TRIGGER¡¢TYPE¡¢UNDEFINED¡¢VIEW¡£
4¡¢±í£º
¡¡select * from dba_tables;
¡¡analyze my_table compute statistics;->dba_tablesºó6ÁÐ
¡¡select extent_id,bytes from dba_extents
¡¡where segment_name='CUSTOMERS' and segment_type='TABLE'
¡¡order by extent_id;//±íʹÓõÄextentµÄÐÅÏ¢¡£segment_type='ROLLBACK'²é¿´»Ø¹ö¶ÎµÄ¿Õ¼ä·ÖÅäÐÅÏ¢
¡¡ÁÐÐÅÏ¢£º
select distinct table_name
from user_tab_columns
where column_name='SO_TYPE_ID';
5¡¢Ë÷Òý£º¡¡
¡¡select * from dba_indexes;//Ë÷Òý£¬°üÀ¨Ö÷¼üË÷Òý
¡¡select * from dba_ind_columns;//Ë÷ÒýÁÐ
¡¡select i.index_name,i.uniqueness,c.column_name
from user_indexes i,user_ind_columns c
¡¡where i.index_name=c.index_name
¡¡and i.table_name ='ACC_NBR';//Áª½ÓʹÓÃ
6¡¢ÐòÁУº
¡¡select * from dba_sequences;
7¡¢ÊÓͼ£º
¡¡select * from dba_views;
¡¡select * from all_views;
text ¿ÉÓÃÓÚ²éѯÊÓͼÉú³ÉµÄ½Å±¾
8¡¢¾Û´Ø£º
¡¡select * from dba_clusters;
9¡¢¿ìÕÕ£º
¡¡select * from dba_snapshots;
¿ìÕÕ¡¢·ÖÇøÓ¦´æÔÚÏàÓ¦µÄ±í¿Õ¼ä¡£
10¡¢Í¬Òå´Ê£º
¡¡select * from dba_synonyms
where table_owner='SPGROUP';
//if owner is PUBLIC,then the synonyms is a public synonym.
¡¡if owner is one of users,then the synonyms is a private synonym.
11¡¢Êý¾Ý¿âÁ´£º
¡¡select * from dba_db_links;
ÔÚspbaseϽ¨Êý¾Ý¿âÁ´
¡¡create database link dbl_spnew
¡¡connect to spnew identified by spnew u


Ïà¹ØÎĵµ£º

oracle¸´Ï°£¨Ò»£© Ö®OracleÌåϵ½á¹¹

      ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬Ô­À´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·­Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
      µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......

²»ÊÇORACLEµÄÎÊÌâ

                                          ²»ÊÇORACLEµÄÎÊÌâ
2009-12-30 15:00
    ......

½âËø±í(oracle)

µ±Ê¹ÓÃ'for update' Ôì³É±íËø×¡ÁË.¿ÉÒÔÓÃDBAµÇ½°´ÕÕÏÂÃæ²½Öè:
1.²é¿´Äĸö±í±»Ëø:
select b.owner,b.object_name,l.session_id,l.locked_mode
from v$locked_object l, dba_objects b
where b.object_id=l.object_id;
2.²é¿´±»Ëø±íµÄsid ºÍserial# :
select t2.username,t2.sid,t2.serial#,t2.logon_time
from v$lo ......

oracleµÄdecode

DECODEº¯ÊýµÄ×÷ÓãºËü¿ÉÒÔ½«ÊäÈëÊýÖµÓ뺯ÊýÖеIJÎÊýÁбíÏà±È½Ï£¬¸ù¾ÝÊäÈëÖµ·µ»ØÒ»¸ö¶ÔÓ¦Öµ¡£º¯ÊýµÄ²ÎÊýÁбíÊÇÓÉÈô¸ÉÊýÖµ¼°Æä¶ÔÓ¦½á¹ûÖµ×é³ÉµÄÈô¸ÉÐòżÐÎʽ¡£µ±È»£¬Èç¹ûδÄÜÓëÈκÎÒ»¸öʵ²ÎÐòżƥÅä³É¹¦£¬Ôòº¯ÊýÒ²ÓÐĬÈϵķµ»ØÖµ¡£
¡¡¡¡Çø±ðÓÚSQLµÄÆäËüº¯Êý£¬DECODEº¯Êý»¹ÄÜʶ±ðºÍ²Ù×÷¿ÕÖµ¡£
¡¡¡¡Óï·¨ÈçÏ£º
¡¡¡¡DECODE ......

oracle ´¥·¢Æ÷¿ª·¢

 ´¥·¢Æ÷¿ª·¢µÄÄ¿µÄ£ºÈ·±£Êý¾Ý¿âÂú×ãÌØ¶¨µÄÉÌÒµ¹æÔòºÍÆóÒµÂß¼­£¬¿ÉÒÔʹÓô¥·¢Æ÷£¬Ô¼Êø£¬×Ó³ÌÐò¡£ÒòΪ
   Ô¼Êø×î¼òµ¥ÇÒÐÔÄܺã¬ËùÑ¡Ô¼Êø£¬Èç¹ûÔ¼Êø²»ÄÜÂú×㣬¾ÍÓô¥·¢Æ÷£¬Èô´¥·¢Æ÷¶¼²»ÄÜÂú×ãÑ¡Ôñ×Ó³ÌÐò¡£
  
   Ò»¡¢´¥·¢Æ÷¹¦ÄÜ£º
   1£¬¿ØÖÆÊý¾Ý°²È«,ÔÚ·þÎñÆ÷¼¶±ð¿ØÖÆÊý¾Ý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ