锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区三区视频在线观看,欧美激情亚洲另类,欧美日韩国产ahttp://www.shnenglu.com/colys/category/4141.htmlLIFE AS CODEzh-cnTue, 20 May 2008 19:44:58 GMTTue, 20 May 2008 19:44:58 GMT60鍒嗘暎鏁版嵁搴撳帇鍔?鍒嗚〃澶勭悊璁捐鎬濇兂鍜屽疄鐜?/title><link>http://www.shnenglu.com/colys/articles/32397.html</link><dc:creator>colys</dc:creator><author>colys</author><pubDate>Tue, 18 Sep 2007 01:51:00 GMT</pubDate><guid>http://www.shnenglu.com/colys/articles/32397.html</guid><wfw:comment>http://www.shnenglu.com/colys/comments/32397.html</wfw:comment><comments>http://www.shnenglu.com/colys/articles/32397.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/colys/comments/commentRss/32397.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/colys/services/trackbacks/32397.html</trackback:ping><description><![CDATA[<div><strong> 涓銆佹榪?/strong> </div> <div> </div> <div>鍒嗚〃鏄釜鐩墠綆楁槸姣旇緝鐐掔殑姣旇緝嫻佽鐨勬蹇碉紝鐗瑰埆鏄湪澶ц礋杞界殑鎯呭喌涓嬶紝鍒嗚〃鏄竴涓壇濂藉垎鏁f暟鎹簱鍘嬪姏鐨勫ソ鏂規硶銆?/div> <div> </div> <div>棣栧厛瑕佷簡瑙d負浠涔堣鍒嗚〃錛屽垎琛ㄧ殑濂藉鏄粈涔堛傛垜浠厛鏉ュぇ姒備簡瑙d互涓嬩竴涓暟鎹簱鎵цSQL鐨勮繃紼嬶細</div> <div>鎺ユ敹鍒癝QL --> 鏀懼叆SQL鎵ц闃熷垪 --> 浣跨敤鍒嗘瀽鍣ㄥ垎瑙QL --> 鎸夌収鍒嗘瀽緇撴灉榪涜鏁版嵁鐨勬彁鍙栨垨鑰呬慨鏀?--> 榪斿洖澶勭悊緇撴灉</div> <div> </div> <div>褰撶劧錛岃繖涓祦紼嬪浘涓嶄竴瀹氭紜紝榪欏彧鏄垜鑷繁涓昏鎰忚瘑涓婅繖涔堟垜璁や負銆傞偅涔堣繖涓鐞嗚繃紼嬪綋涓紝鏈瀹規槗鍑虹幇闂鐨勬槸浠涔堬紵灝辨槸璇達紝濡傛灉鍓嶄竴涓猄QL娌? 鏈夋墽琛屽畬姣曠殑璇濓紝鍚庨潰鐨凷QL鏄笉浼氭墽琛岀殑錛屽洜涓轟負浜嗕繚璇佹暟鎹殑瀹屾暣鎬э紝蹇呴』瀵規暟鎹〃鏂囦歡榪涜閿佸畾錛屽寘鎷叡浜攣鍜岀嫭浜攣涓ょ閿佸畾銆傚叡浜攣鏄湪閿佸畾鐨勬湡闂達紝 鍏跺畠綰跨▼涔熷彲浠ヨ闂繖涓暟鎹枃浠訛紝浣嗘槸涓嶅厑璁鎬慨鏀規搷浣滐紝鐩稿簲鐨勶紝鐙韓閿佸氨鏄暣涓枃浠跺氨鏄綊涓涓嚎紼嬫墍鏈夛紝鍏跺畠綰跨▼鏃犳硶璁塊棶榪欎釜鏁版嵁鏂囦歡銆備竴鑸琈ySQL涓? 鏈蹇殑瀛樺偍寮曟搸MyISAM錛屽畠鏄熀浜庤〃閿佸畾鐨勶紝灝辨槸璇村鏋滀竴閿佸畾鐨勮瘽錛岄偅涔堟暣涓暟鎹枃浠跺閮ㄩ兘鏃犳硶璁塊棶錛屽繀欏葷瓑鍓嶄竴涓搷浣滃畬鎴愬悗錛屾墠鑳芥帴鏀朵笅涓涓搷浣滐紝 閭d箞鍦ㄨ繖涓墠涓涓搷浣滄病鏈夋墽琛屽畬鎴愶紝鍚庝竴涓搷浣滅瓑寰呭湪闃熷垪閲屾棤娉曟墽琛岀殑鎯呭喌鍙仛闃誨錛屼竴鑸垜浠氫織鎰忎箟涓婂彨鍋?#8220;閿佽〃”銆?/div> <div> </div> <div>閿佽〃鐩存帴瀵艱嚧鐨勫悗鏋滄槸浠涔堬紵灝辨槸澶ч噺鐨凷QL鏃犳硶绔嬪嵆鎵ц錛屽繀欏葷瓑闃熷垪鍓嶉潰鐨凷QL鍏ㄩ儴鎵ц瀹屾瘯鎵嶈兘緇х畫鎵ц銆傝繖涓棤娉曟墽琛岀殑SQL灝變細瀵艱嚧娌℃湁緇撴灉錛屾垨鑰呭歡榪熶弗閲嶏紝褰卞搷鐢ㄦ埛浣撻獙銆?/div> <div> </div> <div>鐗瑰埆鏄浜庝竴浜涗嬌鐢ㄦ瘮杈冮綣佺殑琛紝姣斿SNS緋葷粺涓殑鐢ㄦ埛淇℃伅琛ㄣ佽鍧涚郴緇熶腑鐨勫笘瀛愯〃絳夌瓑錛岄兘鏄闂噺澶у緢澶х殑琛紝涓轟簡淇濊瘉鏁版嵁鐨勫揩閫熸彁鍙栬繑鍥炵粰鐢ㄦ埛錛屽繀欏諱嬌鐢ㄤ竴浜涘鐞嗘柟寮忔潵瑙e喅榪欎釜闂錛岃繖涓氨鏄垜浠婂ぉ瑕佽亰鍒扮殑鍒嗚〃鎶鏈?/div> <div> </div> <div> </div> <div>鍒嗚〃鎶鏈【鍚嶆濅箟錛屽氨鏄妸鑻ュ共涓瓨鍌ㄧ浉鍚岀被鍨嬫暟鎹殑琛ㄥ垎鎴愬嚑涓〃鍒嗚〃瀛樺偍錛屽湪鎻愬彇鏁版嵁鐨勬椂鍊欙紝涓嶅悓鐨勭敤鎴瘋闂笉鍚岀殑琛紝浜掍笉鍐茬獊錛屽噺灝戦攣琛ㄧ殑鍑? 鐜囥傛瘮濡傦紝鐩墠淇濆瓨鐢ㄦ埛鍒嗚〃鏈変袱涓〃錛屼竴涓槸user_1琛紝榪樻湁涓涓槸 user_2 琛紝涓や釜琛ㄤ繚瀛樹簡涓嶅悓鐨勭敤鎴蜂俊鎭紝user_1 淇濆瓨浜嗗墠10涓囩殑鐢ㄦ埛淇℃伅錛寀ser_2淇濆瓨浜嗗悗10涓囧悕鐢ㄦ埛鐨勪俊鎭紝鐜板湪濡傛灉鍚屾椂鏌ヨ鐢ㄦ埛 heiyeluren1 鍜?heiyeluren2 榪欎釜涓や釜鐢ㄦ埛錛岄偅涔堝氨鏄垎琛ㄤ粠涓嶅悓鐨勮〃鎻愬彇鍑烘潵錛屽噺灝戦攣琛ㄧ殑鍙兘銆?/div> <div> </div> <div> </div> <div>鎴戜笅闈㈣璁茶堪鐨勪袱縐嶅垎琛ㄦ柟娉曟垜鑷繁閮芥病鏈夊疄楠岃繃錛屼笉淇濊瘉鍑嗙‘鑳界敤錛屽彧鏄彁渚涗竴涓璁℃濊礬銆備笅闈㈠叧浜庡垎琛ㄧ殑渚嬪瓙鎴戝亣璁炬槸鍦ㄤ竴涓創鍚х郴緇熺殑鍩虹涓婃潵榪涜澶勭悊鍜屾瀯寤虹殑銆傦紙濡傛灉娌℃湁鐢ㄨ繃璐村惂鐨勭敤鎴瘋刀绱oogle涓涓嬶級</div> <div> </div> <div> </div> <div> </div> <div><strong> 浜屻佸熀浜庡熀紜琛ㄧ殑鍒嗚〃澶勭悊</strong> </div> <div> </div> <div>榪欎釜鍩轟簬鍩虹琛ㄧ殑鍒嗚〃澶勭悊鏂瑰紡澶ц嚧鐨勬濇兂灝辨槸錛氫竴涓富瑕佽〃錛屼繚瀛樹簡鎵鏈夌殑鍩烘湰淇℃伅錛屽鏋滄煇涓」鐩渶瑕佹壘鍒板畠鎵瀛樺偍鐨勮〃錛岄偅涔堝繀欏諱粠榪欎釜鍩虹琛ㄤ腑 鏌ユ壘鍑哄搴旂殑琛ㄥ悕絳夐」鐩紝濂界洿鎺ヨ闂繖涓〃銆傚鏋滆寰楄繖涓熀紜琛ㄩ熷害涓嶅蹇紝鍙互瀹屽叏鎶婃暣涓熀紜琛ㄤ繚瀛樺湪緙撳瓨鎴栬呭唴瀛樹腑錛屾柟渚挎湁鏁堢殑鏌ヨ銆?/div> <div> </div> <div>鎴戜滑鍩轟簬璐村惂鐨勬儏鍐碉紝鏋勫緩鍋囪濡備笅鐨?寮犺〃錛?/div> <div> </div> <div>1. 璐村惂鐗堝潡琛? 淇濆瓨璐村惂涓増鍧楃殑淇℃伅</div> <div>2. 璐村惂涓婚琛細淇濆瓨璐村惂涓増鍧椾腑鐨勪富棰樹俊鎭紝鐢ㄤ簬嫻忚</div> <div>3. 璐村惂鍥炲琛細淇濆瓨涓婚鐨勫師濮嬪唴瀹瑰拰鍥炲鍐呭</div> <div> </div> <div> </div> <div>“璐村惂鐗堝潡琛?#8221;鍖呭惈濡備笅瀛楁錛?/div> <div>鐗堝潡ID       board_id          int(10)</div> <div>鐗堝潡鍚嶇О    board_name      char(50)</div> <div>瀛愯〃ID       table_id            smallint(5)</div> <div>浜х敓鏃墮棿    created             datetime</div> <div> </div> <div>“璐村惂涓婚琛?#8221;鍖呭惈濡備笅瀛楁錛?/div> <div>涓婚ID          topic_id        int(10)</div> <div>涓婚鍚嶇О        topic_name     char(255)</div> <div>鐗堝潡ID          board_id          int(10)</div> <div>鍒涘緩鏃墮棿       created           datetime</div> <div> </div> <div>“璐村惂鍥炲琛?#8221;鐨勫瓧孌靛涓嬶細</div> <div>鍥炲ID        reply_id           int(10)</div> <div>鍥炲鍐呭      reply_text        text</div> <div>涓婚ID        topic_id           int(10)</div> <div>鐗堝潡ID        board_id         int(10)</div> <div>鍒涘緩鏃墮棿      created            datetime</div> <div> </div> <div>閭d箞涓婇潰淇濆瓨浜嗘垜浠暣涓創鍚т腑鐨勮〃緇撴瀯淇℃伅錛屼笁涓〃瀵瑰簲鐨勫叧緋繪槸錛?/div> <div> </div> <div>鐗堝潡 --> 澶氫釜涓婚</div> <div>涓婚 --> 澶氫釜鍥炲</div> <div> </div> <div>閭d箞灝辨槸璇達紝琛ㄦ枃浠跺ぇ灝忕殑鍏崇郴鏄細</div> <div>鐗堝潡琛ㄦ枃浠?< 涓婚琛ㄦ枃浠?< 鍥炲琛ㄦ枃浠?/div> <div> </div> <div>鎵浠ュ熀鏈彲浠ョ‘瀹氶渶瑕佸涓婚琛ㄥ拰鍥炲琛ㄨ繘琛屽垎琛紝宸插鍔犳垜浠暟鎹绱㈡煡璇㈡洿鏀規椂鍊欑殑閫熷害鍜屾ц兘銆?/div> <div> </div> <div>鐪嬩簡涓婇潰鐨勮〃緇撴瀯錛屼細鏄庢樉鍙戠幇錛屽湪“鐗堝潡琛?#8221;涓繚瀛樹簡涓涓?table_id"瀛楁錛岃繖涓瓧孌靛氨鏄敤浜庝繚瀛樹竴涓増鍧楀搴旂殑涓婚鍜屽洖澶嶉兘鏄垎琛ㄤ繚瀛樺湪浠涔堣〃閲岀殑銆?/div> <div> </div> <div>姣斿鎴戜滑鏈変竴涓彨鍋?#8220;PHP”鐨勮創鍚э紝board_id鏄?錛屽瓙琛↖D涔熸槸1錛岄偅涔堣繖鏉¤褰曞氨鏄細</div> <div> </div> <div>board_id | board_name | table_id | created</div> <div>1 | PHP | 1 | 2007-01-19 00:30:12</div> <div> </div> <div>鐩稿簲鐨勶紝濡傛灉鎴戦渶瑕佹彁鍙?#8220;PHP”鍚ч噷鐨勬墍鏈変富棰橈紝閭d箞灝卞繀欏繪寜鐓ц〃閲屼繚瀛樼殑table_id鏉ョ粍鍚堜竴涓瓨鍌ㄤ簡涓婚鐨勮〃鍚嶇О錛屾瘮濡傛垜浠富棰樿〃鐨勫墠緙鏄?#8220;topic_”錛岄偅涔堢粍鍚堝嚭鏉?#8220;PHP”鍚у搴旂殑涓婚琛ㄥ簲璇ユ槸錛?#8220;topic_1”錛岄偅涔堟垜浠墽琛岋細</div> <div> </div> <div>Select * FROM topic_1 Where board_id = 1 orDER BY topic_id DESC LIMIT 10</div> <div> </div> <div>榪欐牱灝辮兘澶熻幏鍙栬繖涓富棰樹笅闈㈠洖澶嶅垪琛紝鏂逛究鎴戜滑榪涜鏌ョ湅錛屽鏋滈渶瑕佹煡鐪嬫煇涓富棰樹笅闈㈢殑鍥炲錛屾垜浠彲浠ョ戶緇嬌鐢ㄧ増鍧楄〃涓繚瀛樼殑“table_id”鏉ヨ繘琛屾煡璇€傛瘮濡傛垜浠洖澶嶈〃鐨勫墠緙鏄?#8220;reply_”錛岄偅涔堝氨鍙互緇勫悎鍑?#8220;PHP”鍚х殑ID涓?鐨勪富棰樼殑鍥炲錛?/div> <div> </div> <div>Select * FROM reply_1 Where topic_id = 1 orDER BY reply_id DESC LIMIT 10</div> <div> </div> <div>榪欓噷錛屾垜浠兘澶熸竻鏅扮殑鐪嬪埌錛屽叾瀹炴垜浠繖閲屼嬌鐢ㄤ簡鍩虹琛紝鍩虹琛ㄥ氨鏄垜浠殑鐗堝潡琛ㄣ傞偅涔堢浉搴旂殑錛岃偗瀹氫細璇達細鍩虹琛ㄧ殑鏁版嵁閲忓ぇ浜嗕互鍚庡浣曚繚璇佸畠鐨勯熷害鍜屾晥鐜囷紵</div> <div> </div> <div>褰撶劧錛屾垜浠氨蹇呴』浣垮緱榪欎釜鍩虹琛ㄤ繚鎸佹渶濂界殑閫熷害鍜屾ц兘錛屾瘮濡傦紝鍙互閲囩敤MySQL鐨勫唴瀛樿〃鏉ュ瓨鍌紝鎴栬呬繚瀛樺湪鍐呭瓨褰撲腑錛屾瘮濡侻emcache涔嬬被鐨勫唴瀛樼紦瀛樼瓑絳夛紝鍙互鎸夌収瀹為檯鎯呭喌鏉ヨ繘琛岃皟鏁淬?/div> <div> </div> <div>涓鑸熀浜庡熀紜琛ㄧ殑鍒嗚〃鏈哄埗鍦⊿NS銆佷氦鍙嬨佽鍧涚瓑Web2.0緗戠珯涓槸涓瘮杈冧笉閿欑殑瑙e喅鏂規錛屽湪榪欎簺緗戠珯涓紝瀹屽叏鍙互鍗曠嫭浣跨敤涓涓〃鏉ユ潵淇濆瓨鍩烘湰鏍囪瘑鍜岀洰鏍囪〃涔嬮棿鐨勫叧緋匯備嬌鐢ㄨ〃淇濆瓨瀵瑰簲鍏崇郴鐨勫ソ澶勬槸浠ュ悗鎵╁睍闈炲父鏂逛究錛屽彧闇瑕佸鍔犱竴涓〃璁板綍銆?/div> <div> </div> <div> </div> <div>銆?strong> 浼樺娍</strong> 銆戝鍔犲垹闄よ妭鐐歸潪甯告柟渚匡紝涓哄悗鏈熷崌綰х淮鎶ゅ甫鏉ュ緢澶т究鍒?/div> <div>銆?strong> 鍔e娍</strong> 銆戦渶瑕佸鍔犺〃鎴栬呭鏌愪竴涓〃榪涜鎿嶄綔錛岃繕鏄棤娉曠寮鏁版嵁搴擄紝浼氫駭鐢熺摱棰?/div> <div> </div> <div> </div> <div> </div> <div><strong> 涓夈佸熀浜?/strong> <strong> Hash</strong> <strong> 綆楁硶鐨勫垎琛ㄥ鐞?/strong> </div> <div> </div> <div>鎴戜滑鐭ラ亾Hash琛ㄥ氨鏄氳繃鏌愪釜鐗規畩鐨凥ash綆楁硶璁$畻鍑虹殑涓涓鹼紝榪欎釜鍊煎繀欏繪槸鎯熶竴鐨勶紝騫朵笖鑳藉浣跨敤榪欎釜璁$畻鍑烘潵鐨勫兼煡鎵懼埌闇瑕佺殑鍊鹼紝榪欎釜鍙仛鍝堝笇琛ㄣ?/div> <div> </div> <div>鎴戜滑鍦ㄥ垎琛ㄩ噷鐨刪ash綆楁硶璺熻繖涓濇兂綾諱技錛氶氳繃涓涓師濮嬬洰鏍囩殑ID鎴栬呭悕縐伴氳繃涓瀹氱殑hash綆楁硶璁$畻鍑烘暟鎹瓨鍌ㄨ〃鐨勮〃鍚嶏紝鐒跺悗璁塊棶鐩稿簲鐨勮〃銆?/div> <div> </div> <div>緇х畫鎷夸笂闈㈢殑璐村惂鏉ヨ錛屾瘡涓創鍚ф湁鐗堝潡鍚嶇О鍜岀増鍧桰D錛岄偅涔堣繖涓ら」鍊兼槸鍥哄畾鐨勶紝騫朵笖鏄儫涓鐨勶紝閭d箞鎴戜滑灝卞彲浠ヨ冭檻閫氳繃瀵硅繖涓ら」鍊間腑鐨勪竴欏硅繘琛屼竴浜涜繍綆楀緱鍑轟竴涓洰鏍囪〃鐨勫悕縐般?/div> <div> </div> <div>鐜板湪鍋囧鎴戜滑閽堝鎴戜滑榪欎釜璐村惂緋葷粺錛屽亣璁劇郴緇熸渶澶у厑璁?浜挎潯鏁版嵁錛岃冭檻姣忎釜琛ㄤ繚瀛?00涓囨潯璁板綍錛岄偅涔堟暣涓郴緇熷氨涓嶈秴榪?00涓〃灝辮兘澶熷綰熾傛寜鐓ц繖涓爣鍑嗭紝鎴戜滑鍋囪鍦ㄨ創鍚х殑鐗堝潡ID涓婅繘琛宧ash錛岃幏寰椾竴涓猭ey鍊鹼紝榪欎釜鍊煎氨鏄垜浠殑琛ㄥ悕錛岀劧鍚庤闂浉搴旂殑琛ㄣ?/div> <div> </div> <div>鎴戜滑鏋勯犱竴涓畝鍗曠殑hash綆楁硶錛?/div> <div> </div> <div>function get_hash($id){</div> <div>     $str = bin2hex($id);</div> <div>     $hash = substr($str, 0, 4);</div> <div>     if (strlen($hash)<4){</div> <div>         $hash = str_pad($hash, 4, "0");</div> <div>     }</div> <div>     return $hash;</div> <div>}</div> <div> </div> <div>綆楁硶澶ц嚧灝辨槸浼犲叆涓涓増鍧桰D鍊鹼紝鐒跺悗鍑芥暟榪斿洖涓涓?浣嶇殑瀛楃涓詫紝濡傛灉瀛楃涓查暱搴︿笉澶燂紝浣跨敤0榪涜琛ュ叏銆?/div> <div> </div> <div>姣斿錛歡et_hash(1)錛岃緭鍑虹殑緇撴灉鏄?#8220;3100”錛岃緭鍏ワ細get_hash(23819)錛屽緱鍒扮殑緇撴灉鏄細3233錛岄偅涔堟垜浠粡榪囩畝鍗曠殑璺熻〃鍓嶇紑緇勫悎錛屽氨鑳藉璁塊棶榪欎釜琛ㄤ簡銆傞偅涔堟垜浠渶瑕佽闂甀D涓?鐨勫唴瀹規椂鍊欏摝錛岀粍鍚堢殑琛ㄥ皢鏄細topic_3100銆乺eply_3100錛岄偅涔堝氨鍙互鐩存帴瀵圭洰鏍囪〃榪涜璁塊棶浜嗐?/div> <div> </div> <div>褰撶劧錛屼嬌鐢╤ash綆楁硶鍚庯紝鏈夐儴鍒嗘暟鎹槸鍙兘鍦ㄥ悓涓涓〃鐨勶紝榪欎竴鐐硅窡hash琛ㄤ笉鍚岋紝hash琛ㄦ槸灝介噺瑙e喅鍐茬獊錛屾垜浠繖閲屼笉闇瑕侊紝褰撶劧鍚屾牱闇瑕侀嫻嬪拰鍒嗘瀽琛ㄦ暟鎹彲鑳戒繚瀛樼殑琛ㄥ悕銆?/div> <div> </div> <div> </div> <div>濡傛灉闇瑕佸瓨鍌ㄧ殑鏁版嵁鏇村錛屽悓鏍風殑錛屽彲浠ュ鐗堝潡鐨勫悕瀛楄繘琛宧ash鎿嶄綔錛屾瘮濡備篃鏄笂闈㈢殑浜岃繘鍒惰漿鎹㈡垚鍗佸叚榪涘埗錛屽洜涓烘眽瀛楁瘮鏁板瓧鍜屽瓧姣嶈澶氬緢澶氾紝閭d箞閲嶅鍑犵巼鏇村皬錛屼絾鏄彲鑳界粍鍚堟垚鐨勮〃灝辨洿澶氫簡錛岀浉搴斿氨蹇呴』鑰冭檻涓浜涘叾瀹冪殑闂銆?/div> <div> </div> <div>褰掓牴緇撳簳錛屼嬌鐢╤ash鏂瑰紡鐨勮瘽蹇呴』閫夋嫨涓涓ソ鐨刪ash綆楁硶錛屾墠鑳界敓鎴愭洿澶氱殑琛紝鐒舵暟鎹煡璇㈢殑鏇磋繀閫熴?/div> <div> </div> <div> </div> <div>銆?strong> 浼樼偣hash綆楁硶鐩存帴寰楀嚭鐩爣琛ㄥ悕縐幫紝鏁堢巼寰堥珮</strong> 銆戦氳繃</div> <div>銆?strong> 鍔e娍</strong> 銆戞墿灞曟ф瘮杈冨樊錛岄夋嫨浜嗕竴涓猦ash綆楁硶錛屽畾涔変簡澶氬皯鏁版嵁閲忥紝浠ュ悗鍙兘鍦ㄨ繖涓暟鎹噺涓婅窇錛屼笉鑳借秴榪囪繃榪欎釜鏁版嵁閲忥紝鍙墿灞曟х◢宸?/div> <div> </div> <div> </div> <div> </div> <div><strong> 鍥涖佸叾瀹冮棶棰?/strong> </div> <div> </div> <div><strong> 1. </strong> <strong> 鎼滅儲闂</strong> </div> <div>鐜板湪鎴戜滑宸茬粡榪涜鍒嗚〃浜嗭紝閭d箞灝辨棤娉曠洿鎺ュ琛ㄨ繘琛屾悳绱紝鍥犱負浣犳棤娉曞鍙兘緋葷粺涓凡緇忓瓨鍦ㄧ殑鍑犲崄鎴栬呭嚑鐧句釜琛ㄨ繘琛屾绱紝鎵浠ユ悳绱㈠繀欏誨熷姪絎笁鏂圭殑緇勪歡鏉ヨ繘琛岋紝姣斿Lucene浣滀負绔欏唴鎼滅儲寮曟搸鏄釜涓嶉敊鐨勯夋嫨銆?/div> <div> </div> <div><strong> 2. </strong> <strong> 琛ㄦ枃浠墮棶棰?/strong> </div> <div>鎴戜滑鐭ラ亾MySQL鐨凪yISAM寮曟搸姣忎釜琛ㄩ兘浼氱敓鎴愪笁涓枃浠訛紝*.frm銆?.MYD銆?.MYI 涓変釜鏂囦歡錛屽垎琛ㄧ敤鏉ヤ繚瀛樿〃緇撴瀯銆佽〃鏁版嵁鍜岃〃绱㈠紩銆侺inux涓嬮潰姣忎釜鐩綍涓嬬殑鏂囦歡鏁伴噺鏈濂戒笉瑕佽秴榪?000涓紝涓嶇劧媯绱㈡暟鎹皢鏇存參錛岄偅涔堟瘡涓〃閮戒細鐢熸垚涓? 涓枃浠訛紝鐩稿簲鐨勫鏋滃垎琛ㄨ秴榪?00涓〃錛岄偅涔堝皢媯绱㈤潪甯告參錛屾墍浠ヨ繖鏃跺欏氨蹇呴』鍐嶈繘琛屽垎錛屾瘮濡傚湪榪涜鏁版嵁搴撶殑鍒嗙銆?/div> <div> </div> <div>浣跨敤鍩虹琛紝鎴戜滑鍙互鏂板鍔犱竴涓瓧孌碉紝鐢ㄦ潵淇濆瓨榪欎釜琛ㄤ繚瀛樺湪浠涔堟暟鎹備嬌鐢℉ash鐨勬柟寮忥紝鎴戜滑蹇呴』鎴彇hash鍊間腑絎嚑浣嶆潵浣滀負鏁版嵁搴撶殑鍚嶅瓧銆傝繖鏍鳳紝瀹屽ソ鐨勮В鍐寵繖涓棶棰樸?/div> <div> </div> <div> </div> <div><strong> 浜斻佹葷粨</strong> </div> <div> </div> <div>鍦ㄥぇ璐熻澆搴旂敤褰撲腑錛屾暟鎹簱涓鐩存槸涓緢閲嶈鐨勭摱棰堬紝蹇呴』瑕佺獊鐮達紝鏈枃璁茶В浜嗕袱縐嶅垎琛ㄧ殑鏂瑰紡錛屽笇鏈涘寰堝浜鴻兘澶熸湁鍚彂鐨勪綔鐢ㄣ傚綋鐒訛紝鏈枃浠g爜鍜岃鎯蟲病鏈夌粡榪囦換浣曚唬鐮佹祴璇曪紝鎵浠ユ棤娉曚繚璇佽璁$殑瀹屽叏鍑嗙‘瀹炵敤錛屽叿浣撹繕鏄渶瑕佽鑰呭湪浣跨敤榪囩▼褰撲腑璁ょ湡鍒嗘瀽瀹炴柦銆?/div> <div> </div> <br><img src ="http://www.shnenglu.com/colys/aggbug/32397.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/colys/" target="_blank">colys</a> 2007-09-18 09:51 <a href="http://www.shnenglu.com/colys/articles/32397.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>SQL璇彞瀵煎叆瀵煎嚭澶у叏[鏀墮泦] http://www.shnenglu.com/colys/articles/22813.htmlcolyscolysWed, 25 Apr 2007 10:07:00 GMThttp://www.shnenglu.com/colys/articles/22813.htmlhttp://www.shnenglu.com/colys/comments/22813.htmlhttp://www.shnenglu.com/colys/articles/22813.html#Feedback0http://www.shnenglu.com/colys/comments/commentRss/22813.htmlhttp://www.shnenglu.com/colys/services/trackbacks/22813.htmlEXEC master..xp_cmdshell 'bcp SettleDB.dbo.shanghu out c:\temp1.xls -c -q -S"GNETDATA/GNETDATA" -U"sa" -P""'

/*********** 瀵煎叆Excel
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\test.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions

/*鍔ㄦ佹枃浠跺悕
declare @fn varchar(20),@s varchar(1000)
set @fn = 'c:\test.xls'
set @s ='''Microsoft.Jet.OLEDB.4.0'',
''Data Source="'+@fn+'";User ID=Admin;Password=;Extended properties=Excel 5.0'''
set @s = 'SELECT * FROM OpenDataSource ('+@s+')...sheet1$'
exec(@s)
*/

SELECT cast(cast(縐戠洰緙栧彿 as numeric(10,2)) as nvarchar(255))+'銆' 杞崲鍚庣殑鍒悕
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\test.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions

/********************** EXCEL瀵煎埌榪滅▼SQL
insert OPENDATASOURCE(
'SQLOLEDB',
'Data Source=榪滅▼ip;User ID=sa;Password=瀵嗙爜'
).搴撳悕.dbo.琛ㄥ悕 (鍒楀悕1,鍒楀悕2)
SELECT 鍒楀悕1,鍒楀悕2
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\test.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions


/** 瀵煎叆鏂囨湰鏂囦歡
EXEC master..xp_cmdshell 'bcp dbname..tablename in c:\DT.txt -c -Sservername -Usa -Ppassword'

/** 瀵煎嚭鏂囨湰鏂囦歡
EXEC master..xp_cmdshell 'bcp dbname..tablename out c:\DT.txt -c -Sservername -Usa -Ppassword'
鎴?br>EXEC master..xp_cmdshell 'bcp "Select * from dbname..tablename" queryout c:\DT.txt -c -Sservername -Usa -Ppassword'

瀵煎嚭鍒癟XT鏂囨湰錛岀敤閫楀彿鍒嗗紑
exec master..xp_cmdshell 'bcp "搴撳悕..琛ㄥ悕" out "d:\tt.txt" -c -t ,-U sa -P password'


BULK INSERT 搴撳悕..琛ㄥ悕
FROM 'c:\test.txt'
WITH (
FIELDTERMINATOR = ';',
ROWTERMINATOR = '\n'
)


--/* dBase IV鏂囦歡
select * from
OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'dBase IV;HDR=NO;IMEX=2;DATABASE=C:\','select * from [瀹㈡埛璧勬枡4.dbf]')
--*/

--/* dBase III鏂囦歡
select * from
OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'dBase III;HDR=NO;IMEX=2;DATABASE=C:\','select * from [瀹㈡埛璧勬枡3.dbf]')
--*/

--/* FoxPro 鏁版嵁搴?br>select * from openrowset('MSDASQL',
'Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB=c:\',
'select * from [aa.DBF]')
--*/

/**************瀵煎叆DBF鏂囦歡****************/
select * from openrowset('MSDASQL',
'Driver=Microsoft Visual FoxPro Driver;
SourceDB=e:\VFP98\data;
SourceType=DBF',
'select * from customer where country != "USA" order by country')
go
/***************** 瀵煎嚭鍒癉BF ***************/
濡傛灉瑕佸鍑烘暟鎹埌宸茬粡鐢熸垚緇撴瀯(鍗崇幇瀛樼殑)FOXPRO琛ㄤ腑,鍙互鐩存帴鐢ㄤ笅闈㈢殑SQL璇彞

insert into openrowset('MSDASQL',
'Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB=c:\',
'select * from [aa.DBF]')
select * from 琛?br>
璇存槑:
SourceDB=c:\ 鎸囧畾foxpro琛ㄦ墍鍦ㄧ殑鏂囦歡澶?br>aa.DBF 鎸囧畾foxpro琛ㄧ殑鏂囦歡鍚?




/*************瀵煎嚭鍒癆ccess********************/
insert into openrowset('Microsoft.Jet.OLEDB.4.0',
'x:\A.mdb';'admin';'',A琛? select * from 鏁版嵁搴撳悕..B琛?br>
/*************瀵煎叆Access********************/
insert into B琛?selet * from openrowset('Microsoft.Jet.OLEDB.4.0',
'x:\A.mdb';'admin';'',A琛?

鏂囦歡鍚嶄負鍙傛暟
declare @fname varchar(20)
set @fname = 'd:\test.mdb'
exec('SELECT a.* FROM opendatasource(''Microsoft.Jet.OLEDB.4.0'',
'''+@fname+''';''admin'';'''', topics) as a ')

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="f:\northwind.mdb";Jet OLEDB:Database Password=123;User ID=Admin;Password=;')...浜у搧

********************* 瀵煎叆 xml銆鏂囦歡

DECLARE @idoc int
DECLARE @doc varchar(1000)
--sample XML document
SET @doc ='



Customer was very satisfied




Important
Happy Customer.




'
-- Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @idoc OUTPUT, @doc

-- Execute a SELECT statement using OPENXML rowset provider.
SELECT *
FROM OPENXML (@idoc, '/root/Customer/Order', 1)
WITH (oid char(5),
amount float,
comment ntext 'text()')
EXEC sp_xml_removedocument @idoc



???????

/**********************Excel瀵煎埌Txt****************************************/
鎯崇敤
select * into opendatasource(...) from opendatasource(...)
瀹炵幇灝嗕竴涓狤xcel鏂囦歡鍐呭瀵煎叆鍒頒竴涓枃鏈枃浠?br>
鍋囪Excel涓湁涓ゅ垪錛岀涓鍒椾負濮撳悕錛岀浜屽垪涓哄緢琛屽笎鍙?16浣?
涓旈摱琛屽笎鍙峰鍑哄埌鏂囨湰鏂囦歡鍚庡垎涓ら儴鍒嗭紝鍓?浣嶅拰鍚?浣嶅垎寮銆?br>

閭瑰仴錛?br>濡傛灉瑕佺敤浣犱笂闈㈢殑璇彞鎻掑叆鐨勮瘽,鏂囨湰鏂囦歡蹇呴』瀛樺湪,鑰屼笖鏈変竴琛?濮撳悕,閾惰璐﹀彿1,閾惰璐﹀彿2
鐒跺悗灝卞彲浠ョ敤涓嬮潰鐨勮鍙ヨ繘琛屾彃鍏?br>娉ㄦ剰鏂囦歡鍚嶅拰鐩綍鏍規嵁浣犵殑瀹為檯鎯呭喌榪涜淇敼.

insert into
opendatasource('MICROSOFT.JET.OLEDB.4.0'
,'Text;HDR=Yes;DATABASE=C:\'
)...[aa#txt]
--,aa#txt)
--*/
select 濮撳悕,閾惰璐﹀彿1=left(閾惰璐﹀彿,8),閾惰璐﹀彿2=right(閾惰璐﹀彿,8)
from
opendatasource('MICROSOFT.JET.OLEDB.4.0'
,'Excel 5.0;HDR=YES;IMEX=2;DATABASE=c:\a.xls'
--,Sheet1$)
)...[Sheet1$]



濡傛灉浣犳兂鐩存帴鎻掑叆騫剁敓鎴愭枃鏈枃浠?灝辮鐢╞cp

declare @sql varchar(8000),@tbname varchar(50)

--棣栧厛灝唀xcel琛ㄥ唴瀹瑰鍏ュ埌涓涓叏灞涓存椂琛?br>select @tbname='[##temp'+cast(newid() as varchar(40))+']'
,@sql='select 濮撳悕,閾惰璐﹀彿1=left(閾惰璐﹀彿,8),閾惰璐﹀彿2=right(閾惰璐﹀彿,8)
into '+@tbname+' from
opendatasource(''MICROSOFT.JET.OLEDB.4.0''
,''Excel 5.0;HDR=YES;IMEX=2;DATABASE=c:\a.xls''
)...[Sheet1$]'
exec(@sql)

--鐒跺悗鐢╞cp浠庡叏灞涓存椂琛ㄥ鍑哄埌鏂囨湰鏂囦歡
set @sql='bcp "'+@tbname+'" out "c:\aa.txt" /S"(local)" /P"" /c'
exec master..xp_cmdshell @sql

--鍒犻櫎涓存椂琛?br>exec('drop table '+@tbname)


/********************瀵兼暣涓暟鎹簱*********************************************/

鐢╞cp瀹炵幇鐨勫瓨鍌ㄨ繃紼?br>

/*
瀹炵幇鏁版嵁瀵煎叆/瀵煎嚭鐨勫瓨鍌ㄨ繃紼?br>鏍規嵁涓嶅悓鐨勫弬鏁?鍙互瀹炵幇瀵煎叆/瀵煎嚭鏁翠釜鏁版嵁搴?鍗曚釜琛?br>璋冪敤紺轟緥:
--瀵煎嚭璋冪敤紺轟緥
----瀵煎嚭鍗曚釜琛?br>exec file2table 'zj','','','xzkh_sa..鍦板尯璧勬枡','c:\zj.txt',1
----瀵煎嚭鏁翠釜鏁版嵁搴?br>exec file2table 'zj','','','xzkh_sa','C:\docman',1

--瀵煎叆璋冪敤紺轟緥
----瀵煎叆鍗曚釜琛?br>exec file2table 'zj','','','xzkh_sa..鍦板尯璧勬枡','c:\zj.txt',0
----瀵煎叆鏁翠釜鏁版嵁搴?br>exec file2table 'zj','','','xzkh_sa','C:\docman',0

*/
if exists(select 1 from sysobjects where name='File2Table' and objectproperty(id,'IsProcedure')=1)
drop procedure File2Table
go
create procedure File2Table
@servername varchar(200) --鏈嶅姟鍣ㄥ悕
,@username varchar(200) --鐢ㄦ埛鍚?濡傛灉鐢∟T楠岃瘉鏂瑰紡,鍒欎負絀?'
,@password varchar(200) --瀵嗙爜
,@tbname varchar(500) --鏁版嵁搴?dbo.琛ㄥ悕,濡傛灉涓嶆寚瀹?.dbo.琛ㄥ悕,鍒欏鍑烘暟鎹簱鐨勬墍鏈夌敤鎴瘋〃
,@filename varchar(1000) --瀵煎叆/瀵煎嚭璺緞/鏂囦歡鍚?濡傛灉@tbname鍙傛暟鎸囨槑鏄鍑烘暣涓暟鎹簱,鍒欒繖涓弬鏁版槸鏂囦歡瀛樻斁璺緞,鏂囦歡鍚嶈嚜鍔ㄧ敤琛ㄥ悕.txt
,@isout bit --1涓哄鍑?0涓哄鍏?br>as
declare @sql varchar(8000)

if @tbname like '%.%.%' --濡傛灉鎸囧畾浜嗚〃鍚?鍒欑洿鎺ュ鍑哄崟涓〃
begin
set @sql='bcp '+@tbname
+case when @isout=1 then ' out ' else ' in ' end
+' "'+@filename+'" /w'
+' /S '+@servername
+case when isnull(@username,'')='' then '' else ' /U '+@username end
+' /P '+isnull(@password,'')
exec master..xp_cmdshell @sql
end
else
begin --瀵煎嚭鏁翠釜鏁版嵁搴?瀹氫箟娓告爣,鍙栧嚭鎵鏈夌殑鐢ㄦ埛琛?br>declare @m_tbname varchar(250)
if right(@filename,1)<>'\' set @filename=@filename+'\'

set @m_tbname='declare #tb cursor for select name from '+@tbname+'..sysobjects where xtype=''U'''
exec(@m_tbname)
open #tb
fetch next from #tb into @m_tbname
while @@fetch_status=0
begin
set @sql='bcp '+@tbname+'..'+@m_tbname
+case when @isout=1 then ' out ' else ' in ' end
+' "'+@filename+@m_tbname+'.txt " /w'
+' /S '+@servername
+case when isnull(@username,'')='' then '' else ' /U '+@username end
+' /P '+isnull(@password,'')
exec master..xp_cmdshell @sql
fetch next from #tb into @m_tbname
end
close #tb
deallocate #tb
end
go


/************* Oracle **************/
EXEC sp_addlinkedserver 'OracleSvr',
'Oracle 7.3',
'MSDAORA',
'ORCLDB'
GO

delete from openquery(mailser,'select * from yulin')

select * from openquery(mailser,'select * from yulin')

update openquery(mailser,'select * from yulin where id=15')set disorder=555,catago=888

insert into openquery(mailser,'select disorder,catago from yulin')values(333,777)

colys 2007-04-25 18:07 鍙戣〃璇勮
]]>
Oracle job 綆$悊 http://www.shnenglu.com/colys/articles/job.htmlcolyscolysWed, 25 Apr 2007 05:00:00 GMThttp://www.shnenglu.com/colys/articles/job.htmlhttp://www.shnenglu.com/colys/comments/22794.htmlhttp://www.shnenglu.com/colys/articles/job.html#Feedback0http://www.shnenglu.com/colys/comments/commentRss/22794.htmlhttp://www.shnenglu.com/colys/services/trackbacks/22794.htmlSVRMGR> select * from dba_jobs;

鍒濆鍖栫浉鍏沖弬鏁癹ob_queue_processes
alter system set job_queue_processes=39 scope=spfile;//鏈澶у間笉鑳借秴榪?000  ;job_queue_interval = 10  //璋冨害浣滀笟鍒鋒柊棰戠巼縐掍負鍗曚綅
DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the current user

1  select job,what,to_char(last_date,'yyyy-mm-dd HH24:mi:ss'),to_char(next_date,'yyyy-mm-dd HH24:m),interval from dba_jobs where job in (325,295)
2 select job,what,last_date,next_date,interval from  dba_jobs where job in (1,3);


鏌ヨjob鐨勬儏鍐點?br>show paramter background_dump_dest.
鐪媋lter.log 鍜宼race

SVRMGR> select * from dba_jobs;

鍒濆鍖栫浉鍏沖弬鏁癹ob_queue_processes
alter system set job_queue_processes=39 scope=spfile;//鏈澶у間笉鑳借秴榪?000

job_queue_interval = 10  //璋冨害浣滀笟鍒鋒柊棰戠巼縐掍負鍗曚綅


DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the current user

1  select job,what,to_char(last_date,'yyyy-mm-dd HH24:mi:ss'),to_char(next_date,'yyyy-mm-dd HH24:m),interval from dba_jobs where job in (325,295)
2 select job,what,last_date,next_date,interval from  dba_jobs where job in (1,3);


鏌ヨjob鐨勬儏鍐點?br>show paramter background_dump_dest.
鐪媋lter.log 鍜宼race

璇烽棶鎴戝浣曞仠姝竴涓狫OB
SQL> exec dbms_job.broken(1,true)

PL/SQL 榪囩▼宸叉垚鍔熷畬鎴愩?br>SQL>commit  //蹇呴』鎻愪氦鍚﹀垯鏃犳晥

鍚姩浣滀笟
SQL> exec dbms_job.broken(1,false)

PL/SQL 榪囩▼宸叉垚鍔熷畬鎴愩?/p>

鍋滃叾浠栫敤鎴風殑job
SQL>exec sys.dbms_ijob.broken(98,true);
SQL>commit;


============================

exec dbms_job.broken(:job) 鍋滄
exec dbms_job.broken(186,true) //鏍囪浣峛roken
exec dbms_job.broken(186,false)//鏍囪涓洪潪broken
exec dbms_job.broken(186,false,next_day(sysdate,'monday')) //鏍囪涓洪潪broken,鎸囧畾鎵ц鏃墮棿
exec dbms_job.remove(:job)錛涘垹闄?br>exec dbms_job.remove(186);
commit錛?/p>

鎶婁竴涓猙roken job閲嶆柊榪愯


涓夈佹煡鐪嬬浉鍏砵ob淇℃伅
1銆佺浉鍏寵鍥?br>dba_jobs
all_jobs
user_jobs
dba_jobs_running 鍖呭惈姝e湪榪愯job鐩稿叧淇℃伅


鍒涘緩JOB
variable jobno number;
begin
  dbms_job.submit(:jobno, 'statspack.snap;', trunc(sysdate+1/24,'HH'), 'trunc(SYSDATE+1/24,''HH'')', TRUE, :instno);
  commit;
end;
print jobno

渚嬪錛屾垜浠凡緇忓緩绔嬩簡涓涓瓨鍌ㄨ繃紼嬶紝鍏跺悕縐頒負my_job錛屽湪sql/plus涓互scott鐢ㄦ埛韜喚鐧誨綍錛屾墽琛屽涓嬪懡浠わ細
sql> variable n number;
sql> begin
dbms_job.submit(:n‘my_job;’,sysdate,
‘sysdate錛?/360’);
commit;
end;
Sql> print :n;

緋葷粺鎻愮ず鎵ц鎴愬姛銆?
Sql> print :n;
緋葷粺鎵撳嵃姝や換鍔$殑緙栧彿錛屼緥濡傜粨鏋滀負300銆?

綆鍗曚緥瀛?br>涓涓畝鍗曚緥瀛愶細

鍒涘緩嫻嬭瘯琛?br>SQL> create table TEST(a date);

琛ㄥ凡鍒涘緩銆?/p>

鍒涘緩涓涓嚜瀹氫箟榪囩▼
SQL> create or replace procedure MYPROC as
  2  begin
  3  insert into TEST values(sysdate);
  4  end;
  5  /

榪囩▼宸插垱寤恒?/p>

鍒涘緩JOB
SQL> variable job1 number;
SQL>
SQL> begin
  2  dbms_job.submit(:job1,'MYPROC;',sysdate,'sysdate+1/1440');銆銆--姣忓ぉ1440鍒嗛挓錛屽嵆涓鍒嗛挓榪愯test榪囩▼涓嬈?br>  3  end;
  4  /

PL/SQL 榪囩▼宸叉垚鍔熷畬鎴愩?/p>

榪愯JOB
SQL> begin
  2  dbms_job.run(:job1);
  3  end;
  4  /

PL/SQL 榪囩▼宸叉垚鍔熷畬鎴愩?/p>

SQL> select to_char(a,'yyyy/mm/dd hh24:mi:ss') 鏃墮棿 from TEST;

鏃墮棿
-------------------
2001/01/07 23:51:21
2001/01/07 23:52:22
2001/01/07 23:53:24

鍒犻櫎JOB
SQL> begin
  2  dbms_job.remove(:job1);
  3  end;
  4  /

PL/SQL 榪囩▼宸叉垚鍔熷畬鎴愩?/p>

錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛?/p>


a銆佸埄鐢╠bms_job.run()绔嬪嵆鎵ц璇ob
   sql>begin
   sql>dbms_job.run(:jobno) 璇obno涓簊ubmit榪囩▼鎻愪氦鏃惰繑鍥炵殑job number
   sql>end;
   sql>/
b銆佸埄鐢╠bms_job.broken()閲嶆柊灝哹roken鏍囪涓篺alse
   sql>begin
   sql>dbms_job.broken (:job,false,next_date)
   sql>end;
   sql>/

錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳
SQL> create table a(a date);
Table created

鍒涘緩涓涓繃紼?br>SQL> create or replace procedure test as
  2  begin
  3  insert into a values(sysdate);
  4  end;
  5  /
Procedure created

鎻愪氦浣滀笟
SQL> declare
  2  job1 number;   //瀹氫箟涓涓暟瀛楀瀷鍙橀噺
  3  begin
  4  dbms_job.submit(:job1,'test;',sysdate,'sysdate+1/1440');  //鎸夊垎閽熺畻涓澶?440鍒嗛挓
  5  end;
  6  /
PL/SQL procedure successfully completed
job1
---------
4
SQL> commit;
Commit complete

榪愯浣滀笟
SQL> begin
  2  dbms_job.run(4);
  3  end;
  4  /
PL/SQL procedure successfully completed

鍒犻櫎浣滀笟
SQL> begin
  2  dbms_job.remove(4);
  3  end;
  4  /
PL/SQL procedure successfully completed
SQL> commit;
Commit complete


job change//淇敼浣滀笟
execute dbms_job.change(186,null,null,'sysdate+3');
execute dbms_job.change(186,'scott.test(update)');

DBA_JOBS
錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛?br>瀛楁錛堝垪錛?nbsp;         綾誨瀷                 鎻忚堪
JOB                NUMBER          浠誨姟鐨勫敮涓鏍囩ず鍙?
LOG_USER           VARCHAR2(30)    鎻愪氦浠誨姟鐨勭敤鎴?
PRIV_USER          VARCHAR2(30)    璧嬩簣浠誨姟鏉冮檺鐨勭敤鎴?
SCHEMA_USER        VARCHAR2(30)    瀵逛換鍔′綔璇硶鍒嗘瀽鐨勭敤鎴鋒ā寮?
LAST_DATE          DATE            鏈鍚庝竴嬈℃垚鍔熻繍琛屼換鍔$殑鏃墮棿
LAST_SEC           VARCHAR2(8)     濡侶H24:MM:SS鏍煎紡鐨刲ast_date鏃ユ湡鐨勫皬鏃訛紝鍒嗛挓鍜岀
THIS_DATE     DATE            姝e湪榪愯浠誨姟鐨勫紑濮嬫椂闂達紝濡傛灉娌℃湁榪愯浠誨姟鍒欎負null
THIS_SEC     VARCHAR2(8)     濡侶H24:MM:SS鏍煎紡鐨則his_date鏃ユ湡鐨勫皬鏃訛紝鍒嗛挓鍜岀
NEXT_DATE          DATE            涓嬩竴嬈″畾鏃惰繍琛屼換鍔$殑鏃墮棿
NEXT_SEC           VARCHAR2(8)     濡侶H24:MM:SS鏍煎紡鐨刵ext_date鏃ユ湡鐨勫皬鏃訛紝鍒嗛挓鍜岀
TOTAL_TIME         NUMBER          璇ヤ換鍔¤繍琛屾墍闇瑕佺殑鎬繪椂闂達紝鍗曚綅涓虹
BROKEN             VARCHAR2(1)     鏍囧織鍙傛暟錛孻鏍囩ず浠誨姟涓柇錛屼互鍚庝笉浼氳繍琛?
INTERVAL           VARCHAR2(200)   鐢ㄤ簬璁$畻涓嬩竴榪愯鏃墮棿鐨勮〃杈懼紡
FAILURES    NUMBER     浠誨姟榪愯榪炵畫娌℃湁鎴愬姛鐨勬鏁?
WHAT               VARCHAR2(2000)  鎵ц浠誨姟鐨凱L/SQL鍧?
CURRENT_SESSION_LABEL RAW          MLSLABEL 璇ヤ換鍔$殑淇′換Oracle浼氳瘽絎?
CLEARANCE_HI      RAW MLSLABEL     璇ヤ換鍔″彲淇′換鐨凮racle鏈澶ч棿闅?
CLEARANCE_LO      RAW              MLSLABEL 璇ヤ換鍔″彲淇′換鐨凮racle鏈灝忛棿闅?
NLS_ENV           VARCHAR2(2000)   浠誨姟榪愯鐨凬LS浼氳瘽璁劇疆
MISC_ENV          RAW(32)          浠誨姟榪愯鐨勫叾浠栦竴浜涗細璇濆弬鏁?


鎻忚堪                    INTERVAL鍙傛暟鍊?
姣忓ぉ鍗堝12鐐?nbsp;           'TRUNC(SYSDATE + 1)'
姣忓ぉ鏃╀笂8鐐?0鍒?nbsp;        'TRUNC(SYSDATE + 1) + 錛?*60+30錛?(24*60)'
姣忔槦鏈熶簩涓崍12鐐?nbsp;        'NEXT_DAY(TRUNC(SYSDATE ), ''TUESDAY'' ) + 12/24'
姣忎釜鏈堢涓澶╃殑鍗堝12鐐?nbsp;   'TRUNC(LAST_DAY(SYSDATE ) + 1)'
姣忎釜瀛e害鏈鍚庝竴澶╃殑鏅氫笂11鐐?'TRUNC(ADD_MONTHS(SYSDATE + 2/24, 3 ), 'Q' ) -1/24'
姣忔槦鏈熷叚鍜屾棩鏃╀笂6鐐?0鍒?nbsp;   'TRUNC(LEAST(NEXT_DAY(SYSDATE, ''SATURDAY"), NEXT_DAY(SYSDATE, "SUNDAY"))) + 錛?×60+10錛?錛?4×60錛?



colys 2007-04-25 13:00 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久综合狠狠综合久久激情| 欧美jizz19性欧美| 一区二区日韩精品| 欧美日韩三级电影在线| 一区二区三区 在线观看视| 一区二区日韩精品| 国产精品久久久对白| 西瓜成人精品人成网站| 香蕉乱码成人久久天堂爱免费| 国产伪娘ts一区| 欧美成人免费在线视频| 欧美极品aⅴ影院| 亚洲欧美在线免费观看| 欧美一区午夜视频在线观看| 亚洲电影免费观看高清完整版| 免费成人网www| 欧美日韩精品是欧美日韩精品| 欧美一区二区私人影院日本| 久久精品一区二区三区四区| 亚洲精选一区二区| 亚洲综合色激情五月| 在线精品视频一区二区三四| 亚洲精品小视频| 国产午夜久久| 亚洲国产精品va在看黑人| 欧美日韩一区二区三区四区五区| 久久成人免费| 欧美日韩不卡合集视频| 久久久亚洲成人| 欧美三级资源在线| 欧美chengren| 国产日韩亚洲欧美综合| 亚洲韩国日本中文字幕| 国产一二精品视频| 亚洲最黄网站| 亚洲精品乱码| 欧美在线免费观看亚洲| 亚洲视频国产视频| 欧美69wwwcom| 美国三级日本三级久久99| 欧美日韩一区自拍| 欧美韩日亚洲| 黄色在线一区| 香蕉乱码成人久久天堂爱免费 | 久久在线免费观看| 性感少妇一区| 欧美三区在线观看| 亚洲日本在线视频观看| 黄色国产精品| 小处雏高清一区二区三区| 亚洲天堂av综合网| 欧美电影电视剧在线观看| 乱码第一页成人| 国产一区二区三区av电影| 亚洲午夜成aⅴ人片| 亚洲视频观看| 欧美日韩国产免费观看| 欧美超级免费视 在线| 韩国一区二区三区在线观看 | 欧美成人伊人久久综合网| 国产欧美精品日韩精品| 亚洲网站在线| 亚洲一区免费观看| 欧美午夜免费影院| 亚洲手机成人高清视频| 亚洲在线中文字幕| 国产精品久久久久久亚洲调教| 亚洲精品在线视频观看| 99视频一区| 国产精品国产三级国产专区53 | 亚洲视频在线观看视频| 午夜国产精品视频| 国产欧美日韩一区二区三区在线 | 久久偷看各类wc女厕嘘嘘偷窃| 国产精品一区二区三区四区| 亚洲免费在线视频| 久久久www成人免费精品| 国产亚洲一区在线| 久久夜色精品国产| 亚洲日本激情| 亚洲欧美一级二级三级| 国产视频欧美| 久久一区中文字幕| 亚洲精品视频免费| 欧美一区二区网站| 亚洲成色777777女色窝| 欧美xxx在线观看| 一本色道久久综合亚洲精品不| 亚洲欧美日本日韩| 激情五月***国产精品| 欧美国产第一页| 亚洲午夜激情网站| 欧美18av| 欧美亚洲一区| 亚洲国产精品久久久久久女王 | 亚洲综合色在线| 美女视频黄免费的久久| 99在线精品视频在线观看| 国产精品入口尤物| 麻豆久久精品| 亚洲综合色噜噜狠狠| 欧美韩国日本一区| 午夜国产一区| 亚洲精品欧美日韩| 国产亚洲成av人在线观看导航| 久久先锋资源| 亚洲一区在线视频| 亚洲经典视频在线观看| 久久高清国产| 一本大道久久a久久精二百| 国产日韩免费| 欧美系列亚洲系列| 欧美1区3d| 久久国产精彩视频| 亚洲特黄一级片| 欧美国产精品v| 久久久亚洲国产美女国产盗摄| 一区二区三区四区五区视频 | 在线观看中文字幕亚洲| 国产精品你懂的在线| 欧美精品首页| 久久资源av| 久久精品国产69国产精品亚洲| 日韩一级视频免费观看在线| 欧美成人午夜影院| 久久久久**毛片大全| 香蕉尹人综合在线观看| 亚洲午夜精品久久久久久浪潮| 亚洲国产精品传媒在线观看| 国产亚洲精品久| 国产欧美一区二区在线观看| 欧美视频在线一区二区三区| 欧美经典一区二区| 欧美福利电影在线观看| 巨胸喷奶水www久久久免费动漫| 久久成人精品电影| 欧美伊人久久久久久午夜久久久久| 一区二区三区日韩| 一二三区精品| 99伊人成综合| 亚洲一区日韩在线| 亚洲欧美日韩综合aⅴ视频| 亚洲免费观看视频| 一本色道久久88亚洲综合88| 亚洲精品一二| 亚洲视频精选在线| 亚洲综合另类| 久久岛国电影| 久久综合中文字幕| 欧美成人一区二区三区在线观看| 免费国产自线拍一欧美视频| 美女精品在线| 欧美精品午夜视频| 国产精品国产三级国产普通话蜜臀| 欧美日韩中字| 国产欧美精品日韩精品| 国产在线播精品第三| 精品91在线| 日韩视频在线一区二区| 亚洲手机成人高清视频| 午夜欧美精品| 乱人伦精品视频在线观看| 亚洲高清视频一区| 一区二区三区精品| 欧美一区二区三区四区视频| 久久久亚洲高清| 欧美精品一区二区三区久久久竹菊 | 欧美日韩午夜激情| 国产精品美女久久久久久久| 国产乱肥老妇国产一区二| 国产午夜精品视频| 亚洲国产婷婷香蕉久久久久久99| 亚洲欧洲精品一区二区三区| 亚洲乱码一区二区| 欧美一区三区三区高中清蜜桃| 久久精品国产综合精品| 欧美激情一区三区| 中文欧美在线视频| 久久综合一区二区三区| 国产精品国产a级| 伊人久久大香线蕉综合热线 | 国产精品美女久久久免费 | 欧美精品在线一区二区| 国产精品视频第一区| 亚洲精品久久久久久久久久久久 | 美女亚洲精品| 亚洲天堂成人在线视频| 快射av在线播放一区| 国产精品久久一级| 亚洲精品在线视频观看| 久久久久久久97| 一本色道婷婷久久欧美| 久久综合久久综合久久| 国产精品综合视频| 一区二区欧美激情| 欧美国产日韩a欧美在线观看| 亚洲最新视频在线| 欧美激情一区二区| 在线视频国产日韩| 久久精品国产亚洲精品|