ÔÚORACLEµÃµ½Ä³¸ö±íµÄÖ÷¼ü×Ö¶ÎÃû
select column_name from all_cons_columns cc
where owner='SSH' --SSHΪÓû§Ãû³Æ£¬Òª×¢Òâ´óСд
and table_name='SYS_DEPT' --SYS_DEPTΪ±íÃû£¬×¢Òâ´óСд
and exists (select 'x' from all_constraints c
where c.owner = cc.owner
and c.constraint_name = cc.constraint_name
and c.constraint_type ='P'
)
order by position
;
Ïà¹ØÎĵµ£º
ÈÕ³£¿ª·¢»î¶¯ÖУ¬ÓÐʱºòÐèÒª¶ÔoracleÖ´Ðмƻ®½øÐÐ¼à¿Ø£¬ÒÔ´ËÀ´µ÷ÓųÌÐòºÍÊý¾Ý¿â·½ÃæµÄÐÔÄÜ¡£
³£Ó÷½·¨ÓÐÒÔϼ¸ÖÖ£º
Ò»¡¢Í¨¹ýPL/SQL Dev¹¤¾ß
1¡¢Ö±½ÓFile->New->Explain Plan Window£¬ÔÚ´°¿ÚÖÐÖ´ÐÐsql¿ÉÒԲ鿴¼Æ»®½á¹û¡£ÆäÖУ¬Cost±íʾcpuµÄÏûºÄ£¬µ¥Î»Îªn%£¬Cardinality±íʾִÐеÄÐÐÊý£¬µÈ¼ÛRow ......
±í¡¡¡¡¡¡¡¡tree
¡¡¡¡×ֶΡ¡¡¡¡¡master
¡¡¡¡¡¡¡¡¡¡¡¡¡¡sub
¡¡¡¡¡¡¡¡¡¡¡¡¡¡sales
¡¡¡¡insert into tree values
¡¡¡¡('Ö÷1',¡¡¡¡ 'Ö÷2',¡¡ 15);¡¡
¡¡¡¡insert into tree values¡¡¡¡¡¡
¡¡¡¡('Ö÷1',¡¡¡¡ 'Ö÷3',¡¡ 20);¡¡¡¡¡¡¡¡¡¡
¡¡¡¡insert into tree values
¡¡¡¡('Ö÷2',¡¡¡¡ 'Ö÷4',¡¡¡¡5);¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡ ......
ASM:Automatic Storage Management, ÊÇOracle Ö÷ÍÆµÄÒ»ÖÖÃæÏòOracleµÄ´æ´¢½â¾ö·½°¸£¬ ASM ºÍ RDBMS ·Ç³£ÏàËÆ£¬ASM Ò²ÊÇÓÉʵÀýºÍÎļþ×é³É£¬ Ò²¿ÉÒÔͨ¹ýsqlplus ¹¤¾ßÀ´Î¬»¤¡£
1. ASM ʵÀýÓÉSGA ºÍºǫ́½ø³Ì×é³É¡£
1.1 SGA  ......
OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹ÔÓ뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°ÑdmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£
Ö´Ðл·¾³£º¿ÉÒÔÔÚSQLPLUS.EXE»òÕßDOS£¨ÃüÁîÐУ©ÖÐÖ´ÐУ¬ DOSÖпÉÒÔÖ´ÐÐʱÓÉÓÚ ÔÚoracle 8i ÖÐ °²×°Ä¿Â¼ora81BIN±»ÉèÖÃΪȫ¾Ö·¾¶£¬ ¸ÃÄ¿ ......
²ã´Î»¯²éѯ£º
select [level],colomn,...from table
[where where_clause]
[ [start with start_condition] [connect by prior prior_condition]&nbs ......