Èý²½½ÌÄãÕÆÎÕOracleÍⲿ±í
Íâ±í(external table)¾ÍÏñÆÕͨµÄ±í¶ÔÏñÒ»Ñù£¬¿ÉÒÔselectµÈ£¬Ö»ÊÇËüÊÇÖ»¶ÁµÄ£¬Êý¾Ý¿âÖÐÖ»±£´æÁ˱í½á¹¹µÄÃèÊö£¬±íÊý¾ÝȴûÓдæ·ÅÔÚÊý¾Ý¿âÄÚ£¬¶øÊÇ´æ·ÅÔÚÁËÎļþϵͳÉÏ¡£µ±Óû§Ï뿶ûʹÓÃÊý¾Ý¿âÍâµÄ½á¹¹»¯Êý¾Ýʱ£¬ÓÃÆðÍâ±íÀ´¾Í·Ç³£·½±ã£¬ÉõÖÁ±Èsqlldr¶¼Òª·½±ãµÄ¶à¡£ÔÚÕâƪÎÄÕÂÀÎÒÃÇΪ´ó¼ÒÑÝʾÁË
¡¡¡¡Èý²½¾ÍÕÆÎÕoracleÍâ±í¹ý³Ì¡£Í¨¹ýÕâ´Îѧϰ£¬Ò²Ðí´ó¼Ò¾Í»á·¢Õ¹ÔÀ´Ñ§Ï°oracleÒ²ÊǺÃÈÝÒ×Ŷ¡£
¡¡¡¡µÚÒ»²½£º´´½¨Ä¿Â¼²¢ÊÚȨ
¡¡¡¡Ä¿Â¼ÊÇÊý¾ÝÎļþµÄ´æ·ÅÄ¿±ê£¬Êý¾ÝÎļþͨ³£ÒªÇóÊÇÎı¾Îļþ¡£Õâ¸ö¹ý³ÌÔÚ9iÒÔÇ°ÊÇÐèÒªÅäÖÃutl_file_dir²ÎÊýµÄ¡£ ¸´ÖÆÄÚÈݵ½¼ôÌù°å
¡¡¡¡´úÂë:¡¡
sys@TEST>!ls /home/oracle/temp
¡¡¡¡user.ctl userlist.txt user.log
¡¡¡¡rudolf@TEST>
¡¡¡¡sys@TEST>conn system/alibaba
¡¡¡¡Connected.
¡¡¡¡sys@TEST>
¡¡¡¡sys@TEST>CREATE DIRECTORY TEMP AS '/home/oracle/temp/';
¡¡¡¡Directory created.
¡¡¡¡sys@TEST>grant read,write on directory TEMP to rudolf;
¡¡¡¡Grant succeeded.
µÚ¶þ²½£º´´½¨Íâ±íÓë²âÊÔ ¸´ÖÆÄÚÈݵ½¼ôÌù°å
¡¡¡¡´úÂë:¡¡¡¡
rudolf@TEST>CREATE TABLE "USERLIST"
¡¡¡¡2 (
¡¡¡¡3 ID NUMBER,
¡¡¡¡4 USERNAME VARCHAR2(30),
¡¡¡¡5 EMAIL VARCHAR2(128)
¡¡¡¡6 )
¡¡¡¡7 ORGANIZATION external
¡¡¡¡8 (
¡¡¡¡9 TYPE oracle_loader
¡¡¡¡10 DEFAULT DIRECTORY TEMP
¡¡¡¡11 ACCESS PARAMETERS
¡¡¡¡12 (
¡¡¡¡13 RECORDS DELIMITED BY NEWLINE CHARACTERSET US7ASCII
¡¡¡¡14 BADFILE 'TEMP':'userlist.bad'
¡¡¡¡15 DISCARDFILE 'TEMP':'userlist.dis'
¡¡¡¡16 LOGFILE 'TEMP':'user.log'
¡¡¡¡17 READSIZE 1048576
¡¡¡¡18 FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
¡¡¡¡19 MISSING FIELD VALUES ARE NULL
¡¡¡¡20 REJECT ROWS WITH ALL NULL FIELDS
¡¡¡¡21 (
¡¡¡¡22 ID CHAR(30)
¡¡¡¡23 TERMINATED BY "," OPTIONALLY ENCLOSED BY '"',
¡¡¡¡24 USERNAME CHAR(30)
¡¡¡¡25 TERMINATED BY "," OPTIONALLY ENCLOSED BY '"',
¡¡¡¡26 EMAIL CHAR(128)
¡¡¡¡27 TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
¡¡¡¡28 )
¡¡¡¡29 )
¡¡¡¡30 location
¡¡¡¡31 (
¡¡¡¡32 'userlist.txt'
Ïà¹ØÎĵµ£º
³£Óõļ¸¸öÊý¾Ý×ֵ䣺
user_objects : ¼Ç¼ÁËÓû§µÄËùÓжÔÏ󣬰üº¬±í¡¢Ë÷Òý¡¢¹ý³Ì¡¢ÊÓͼµÈÐÅÏ¢£¬ÒÔ¼°´´½¨Ê±¼ä£¬×´Ì¬ÊÇ·ñÓÐЧµÈÐÅÏ¢£¬ÊÇ·ÇDBAÓû§µÄ´ó±¾Óª¡£ÏëÖªµÀ×Ô¼ºÓÐÄÄЩ¶ÔÏó£¬ÍùÕâÀï²é¡£
user_source :°üº¬ÁËϵͳÖжÔÏóµÄÔÂ룬Èç´æ´¢¹ý³Ì£¬FUNCTION¡¢PROCEDURE¡¢PACKAGEµÈÐÅÏ¢
cat»òTab £º°üº¬µ±Ç°Óû§ËùÓеÄÓû§ºÍ ......
OracleÖеÄSQLÔÚÖ´ÐÐ֮ǰ½øÐнâÎö£¬Ò»¸öÓ²½âÎö°üÀ¨ÏÂÃæµÄ²½Ö裺
¼ÓÔص½¹²Ïí³ØÖÐ - SQLÔ´´úÂë±»¼ÓÔص½ÄÚ´æÖС£
Óï·¨½âÎö - Oracle¼ì²éÓ﷨ƴд´íÎó¡£
ÓïÒå½âÎö - OracleÑéÖ¤À´×ÔÊý¾Ý×ÖµäµÄËùÓбíÃûºÍÁÐÃû²¢ÇÒÑéÖ¤ÄãÊÇ·ñÓÐȨ·ÃÎÊÕâЩÊý¾Ý¡£
²éѯת»» - Èç¹ûÔÊÐí(query_rewrite=true)£¬oracle½«°Ñ¸´ÔÓµÄSQLת»»ÎªµÈ¼ÛµÄ¼òµ ......
ÔÚOracleÖн¨¿â£¬Í¨³£ÓÐÁ½ÖÖ·½·¨¡£Ò»ÊÇʹÓÃOracleµÄ½¨¿â¹¤ÇÒDBCA£¬ÕâÊÇÒ»¸öͼÐνçÃ湤ÇÒ£¬Ê¹ÓÃÆðÀ´·½±ãÇÒºÜÈÝÒ×Àí½â£¬ÒòΪËüµÄ½çÃæÓѺá¢ÃÀ¹Û£¬¶øÇÒÌáʾҲ±È½ÏÆëÈ«¡£ÔÚ£×indowsϵͳÖУ¬Õâ¸ö¹¤¾ß¿ÉÒÔÔÚOracle³ÌÐò×éÖдò¿ª£¨”¿ªÊ¼”—“³ÌÐò”—“ Oracle - OraDb10g_home1”&mdash ......
ORACLE EXP/IMP ²ÎÊýÏê½â
2008-01-09 18:16
ORACLE EXP/IMP ²ÎÊýÏê½â
===========================================================
×÷Õß: magic21(http://magic21.itpub.net)
·¢±íÓÚ: 2007.09.27 10:46
·ÖÀà: ÈÕ»ýÔÂÀÛ
³ö´¦: http://magic21.itpub.net/post/5324/400048
-------------------------------------- ......
ÔÚORACLE 10gµÇ½´´½¨ÐÂÓû§£º
ÔÚORACLE 10gµÇ½´´½¨ÐÂÓû§£º
1¡¢ÓÃsys Óû§µÇ¼
2¡¢create user test1 identified by test123;
3¡¢grant connect,resource to test1;
ÓÃtest1µÇ½£º sqlplus test1/test123
°²×°ÍêÁËOracleÊý¾Ý¿â£¬ÍüÁËÔÚ¿ÚÁî¹ÜÀíÖиøSCOTT½âËøÔõô°ì
ÎÊÌâ²¹³ä ......