Oracle³£ÓòÙ×÷ÃüÁî
OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹ÔÓ뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°ÑdmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£ ÀûÓÃÕâ¸ö¹¦ÄÜ¿ÉÒÔ¹¹½¨Á½¸öÏàͬµÄÊý¾Ý¿â£¬Ò»¸öÓÃÀ´²âÊÔ£¬Ò»¸öÓÃÀ´ÕýʽʹÓá£
Ö´Ðл·¾³£º¿ÉÒÔÔÚSQLPLUS.EXE»òÕßDOS£¨ÃüÁîÐУ©ÖÐÖ´ÐУ¬
DOSÖпÉÒÔÖ´ÐÐʱÓÉÓÚ ÔÚoracle 8i ÖÐ °²×°Ä¿Â¼\ora81\BIN±»ÉèÖÃΪȫ¾Ö·¾¶£¬
¸ÃĿ¼ÏÂÓÐEXP.EXEÓëIMP.EXEÎļþ±»ÓÃÀ´Ö´Ðе¼Èëµ¼³ö¡£
oracleÓÃjava±àд£¬SQLPLUS.EXE¡¢EXP.EXE¡¢IMP.EXEÕâÁ½¸öÎļþÓпÉÄÜÊDZ»°ü×°ºóµÄÀàÎļþ¡£
SQLPLUS.EXEµ÷ÓÃEXP.EXE¡¢IMP.EXEËù°ü¹üµÄÀ࣬Íê³Éµ¼Èëµ¼³ö¹¦ÄÜ¡£
ÏÂÃæ½éÉܵÄÊǵ¼Èëµ¼³öµÄʵÀý¡£
Êý¾Ýµ¼³ö£º
1 ½«Êý¾Ý¿âTESTÍêÈ«µ¼³ö,Óû§Ãûsystem ÃÜÂëmanager µ¼³öµ½D:\daochu.dmpÖÐ
exp [email=system/manager@TEST]system/manager@TEST[/email] file=d:\daochu.dmp full=y
2 ½«Êý¾Ý¿âÖÐsystemÓû§ÓësysÓû§µÄ±íµ¼³ö
exp [email=system/manager@TEST]system/manager@TEST[/email] file=d:\daochu.dmp owner=(system,sys)
3 ½«Êý¾Ý¿âÖеıíinner_notify¡¢notify_staff_relatµ¼³ö
exp [email=aichannel/aichannel@TESTDB2]aichannel/aichannel@TESTDB2[/email] file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat)
4 ½«Êý¾Ý¿âÖеıítable1ÖеÄ×Ö¶Îfiled1ÒÔ"00"´òÍ·µÄÊý¾Ýµ¼³ö
exp [email=system/manager@TEST]system/manager@TEST[/email] file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"
ÉÏÃæÊdz£Óõĵ¼³ö£¬¶ÔÓÚѹËõ£¬¼ÈÓÃwinzip°ÑdmpÎļþ¿ÉÒԺܺõÄѹËõ¡£
Ò²¿ÉÒÔÔÚÉÏÃæÃüÁîºóÃæ ¼ÓÉÏ compress=y À´ÊµÏÖ¡£
Êý¾ÝµÄµ¼Èë
1 ½«D:\daochu.dmp ÖеÄÊý¾Ýµ¼Èë TESTÊý¾Ý¿âÖС£
imp [email=system/manager@TEST]system/manager@TEST[/email] file=d:\daochu.dmp
imp [email=aichannel/aichannel@HUST]aichannel/aichannel@HUST[/email] full=y file= d:\data\newsmgnt.dmp ignore=y
ÉÏÃæ¿ÉÄÜÓеãÎÊÌ⣬ÒòΪÓеıíÒѾ´æÔÚ£¬È»ºóËü¾Í±¨´í£¬¶Ô¸Ã±í¾Í²»½øÐе¼Èë¡£
ÔÚºóÃæ¼ÓÉÏ ignore=y ¾Í¿ÉÒÔÁË¡£
2 ½«d:\daochu.dmpÖеıítable1 µ¼Èë
imp [email=system
Ïà¹ØÎĵµ£º
1. ²é¿´Oracle´´½¨¹ýÄÄЩÓû§
>select username from all_users;
2. ²é¿´Oracle´´½¨¹ýÄÄЩ±í¿Õ¼ä£¬±í¿Õ¼äµÄÃû×ֺʹóС
>select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
from dba_tablespaces t, dba_data_files d
wher ......
oracleÖÐʹÓÃon delete cascadeºÍon delete set nullÀ´½¨Á¢Íâ¼ü
ÆäÃæÎÒÃǽéÉÜÁË´´½¨Íâ¼üÔ¼ÊøʱÈç¹ûʹÓÃoracleĬÈϵĴ´½¨·½Ê½£¬ÔÚɾ³ý±»²ÎÕÕµÄÊý¾Ýʱ£¬½«ÎÞ·¨±»É¾³ý£¬ÕâÒ»µãÔÚoracle9iÖиøÁËÎÒÃǸü¶àÁé»îµÄÑ¡Ôñ£¬ÎÒÃÇ¿ÉÊÇʹÓÃon delete cascadeºÍ on delete set null¹Ø¼ü×ÖÀ´¾ö¶¨É¾³ý±»²ÎÕÕÊý¾ÝʱÊÇ·ñÒª½«²ÎÕÕÕâ¸öÊý¾ÝµÄÄÇÐ ......
×î½ü£¬ORACLEϵͳ»ù±¾µ÷ÊÔͨ¹ý£¬ÊÇʱºòÉèÖÃORACLEËæRHEL×Ô¶¯Æô¶¯Óë¹Ø±Õ·þÎñµÄʱºòÁË£¬Ö®ËùÒÔ°ÑÕâ¸öÈÎÎñ·ÅÔÚ×îºóÀ´×ö£¬ÊÇÒòΪÎÒ¾õµÃÕâ¸öÓ¦¸Ã²»»áºÜÄÑ£¬µ«ÕæÕýʵʩÆðÀ´£¬»¹ÊÇÓöµ½Á˸ö²»Ð¡µÄÕÏ°
дºÃ½Å±¾£¬×¢²áºÃ·þÎñÖ®ºó£¬¾²âÊÔ£¬ORACLE¿ÉÒÔËæRHELÆô¶¯¶øÆô¶¯£¬µ«²»ÄÜËæϵͳ¹Ø±Õ¶ø¹Ø±Õ¡£ÔÚÍøÉÏÕҴ𰸣¬·¢ÏÖ¼¸ºõËùÓеÄÉèÖùý ......
ÔÚoracleÖд¦ÀíÈÕÆÚ´óÈ«
TO_DATE¸ñʽ
Day:
dd number 12
dy abbreviated fri
day spelled out friday
ddspth spelled out, ordinal twelfth
Month:
mm number 03
mon abbreviated mar ......
²éÕÒÊý¾Ý¿âÖÐËùÓÐ×ֶΠÒÔ¶ÔÓ¦µÄ±í
select C.column_name,C.TABLE_NAME from dba_tab_columns C where owner=''
²éÿ¸ö¿ÆÄ¿class ·ÖÊýscroÇ°ÈýÃû
select id, name, class, scro
from (select row_number() over(partition by class order by scro desc) cnt,
&n ......