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

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 system/manager@TEST file=d:\daochu.dmp full=y
 2 ½«Êý¾Ý¿âÖÐsystemÓû§ÓësysÓû§µÄ±íµ¼³ö
  exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)
 3 ½«Êý¾Ý¿âÖеıíinner_notify¡¢notify_staff_relatµ¼³ö
  exp aichannel/aichannel@TESTDB2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat)
 4 ½«Êý¾Ý¿âÖеıítable1ÖеÄ×Ö¶Îfiled1ÒÔ"00"´òÍ·µÄÊý¾Ýµ¼³ö
  exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\" ÉÏÃæÊdz£Óõĵ¼³ö£¬¶ÔÓÚѹËõ£¬¼ÈÓÃwinzip°ÑdmpÎļþ¿ÉÒԺܺõÄѹËõ¡£
 Ò²¿ÉÒÔÔÚÉÏÃæÃüÁîºóÃæ ¼ÓÉÏ compress=y À´ÊµÏÖ¡£
Êý¾ÝµÄµ¼È룺
 1 ½«D:\daochu.dmp ÖеÄÊý¾Ýµ¼Èë TESTÊý¾Ý¿âÖС£
  imp system/manager@TEST  file=d:\daochu.dmp
  imp aichannel/aichannel@HUST full=y  file=file= d:\data\newsmgnt.dmp ignore=y
 ÉÏÃæ¿ÉÄÜÓеãÎÊÌ⣬ÒòΪÓеıíÒѾ­´æÔÚ£¬È»ºóËü¾Í±¨´í£¬¶Ô¸Ã±í¾Í²»½øÐе¼Èë¡£
 ÔÚºóÃæ¼ÓÉÏ ignore=y ¾Í¿ÉÒÔÁË¡£
 2 ½«d:\daochu.dmpÖеıítable1 µ¼Èë
  imp system/manager@TEST  file=d:\daochu.dmp  tables=(table1)
 »ù±¾ÉÏÉÏÃæµÄµ¼Èëµ¼³ö¹»ÓÃÁË¡£²»ÉÙÇé¿öÒªÏÈÊǽ«±í³¹µ×ɾ³ý£¬È»ºóµ¼Èë¡£ ×¢Ò⣺
 ²Ù×÷ÕßÒªÓÐ×ã¹»µÄȨÏÞ£¬È¨ÏÞ²»¹»Ëü»áÌáʾ¡£
 Êý¾Ý¿âʱ¿ÉÒÔÁ¬Éϵġ£¿ÉÒÔÓÃtnsping TEST À´»ñµÃÊý¾Ý¿âTESTÄÜ·ñÁ¬ÉÏ¡£


Ïà¹ØÎĵµ£º

Oracle´´½¨±í¿Õ¼ä¡¢´´½¨Óû§ÒÔ¼°ÊÚȨ¡¢²é¿´È¨ÏÞ

´´½¨ÁÙʱ±í¿Õ¼ä
CREATE   TEMPORARY  TABLESPACE test_temp
TEMPFILE  ' C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf '
SIZE 32M
AUTOEXTEND  ON
NEXT  32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
´´½¨Óû§±í¿Õ¼ä
CREATE  TABLESPACE test_data
LOGGING
DATAFI ......

oracleÈÕÆÚº¯Êý¼¯½õ

Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY') from ......

OracleÖжà±í²éѯÔÙ°´Ê±¼äµ¹Ðò

ÎÒÔÚ¹¤×÷ÖÐÔÚOracleÖжà±í²éѯÔÙ°´Ê±¼äµ¹Ðòʱ£¬ÓÃorder by ±íÃû.datatime desc ×ÜÊÇʵÏÖ²»ÁË¡£
²»¹ý×îºóÎÊÑî¾é×îºóºÍÎÒ˵¿ÉÒÔ°ÑÎÒÃDzéѯµÄ×ܸösqlÓï¾ä×öΪһ¸ö±íÀ´ÅÅÐò£º
select rownum,aa.* from (....  order by ±íÃû.datatime desc ) aa ......

Oracle²âÊÔ´æ´¢¹ý³ÌÁ½ÖÖ·½Ê½

ÔÚ³õѧOracleʱ£¬Ð´ÁËÒ»¸ö´æ´¢¹ý³Ì£¬Ãû³ÆÊÇ£ºPROC_GET_BILL£¬Èý¸ö²ÎÊý£¬µÚ1£¬3ÊÇin²ÎÊý£¬µÚ2ÊÇout²ÎÊý£¬Ð´ÍêÖ®ºó£¬Ïë²âһϣ¬½á¹û·¢ÏÖÍøÉÏÓжàÖÖ·½Ê½£¨ÆäÖØÒªÊÇÏÂÃæÕâÁ½ÖÖ£¬Ö»ÊÇд·¨²»Í¬¶øÒÑ£©£¬¸Õ¿ªÊ¼°ÑÁ½ÖÖ±äÁ¿¶¨Ò巽ʽ¸ã´íÁË£¬Ò»Ö±Ö´Ðв»¹ý£¬¾­ÂýÂý³¢ÊÔ£¬µÃµ½ÁËÏÂÃæÁ½ÖÖд·¨£¬Ï£ÍûÏñÎÒÕâÑù³õѧÕßÉÙ×ßÍä·£¬Ö±½Ó¸ãÇåÁ½ÖÖ· ......

¡¾×ª¡¿ Oracle group by¼°ÆäÈô¸ÉÏà¹Øº¯ÊýµÄһЩ˵Ã÷

Oracle group by¼°ÆäÈô¸ÉÏà¹Øº¯ÊýµÄһЩ˵Ã÷
http://blog.csdn.net/roland_wg/archive/2009/07/03/4319323.aspx
OracleµÄgroup by³ýÁË»ù±¾Ó÷¨ÒÔÍ⣬»¹ÓÐ3ÖÖÀ©Õ¹Ó÷¨£¬·Ö±ðÊÇrollup¡¢cube¡¢grouping sets¡£
¼ÙÉèÓÐÒ»¸ö±ítest£¬ÓÐA¡¢B¡¢C¡¢D¡¢E5ÁС£
1£© Èç¹ûʹÓÃgroup by rollup(A,B,C)£¬Ê×ÏÈ»á¶Ô(A¡¢B¡¢C)½øÐÐGROUP BY ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ