DB2ºÍORACLEµÄÓ¡Ïó±È½Ï
Ò»¸öÏîÄ¿ÐèÒªDB2£¬ÒÔǰûÓùý£¬ÓÃÁËWINDOWS 2008ϵÄDB29.7 ºÃ¼¸ÖÜ£¬ËãÈëÃÅÁË°É£¬ÏÂÃæÕâÎÄÕ¾͵±Ò»¸öORACLEʹÓÃÕßÑÛÀïµÄDB2µÄÓ¡Ïó°É£¬Ò²ÐíÓÐЩ¶«Î÷¿ÉÄÜÓÐÆ«²î£¬µ«ÊǾÍÊÇÎÒ×Ô¼ºµÄÓ¡Ïó£º
1¡¢Ìåϵ½á¹¹£¬DB2µÄʵÀýºÍÊý¾Ý¿â·Ö¿ªµÄ×ö·¨£¬ÎÒ¸öÈË»¹ÊDZȽÏϲ»¶µÄ£¬ÒòΪʵÀý¿ÉÒÔ´´½¨¶à¸ö£¬Êý¾Ý¿âµÄ»Ö¸´Ö±½Ó»Ö¸´µ½ÊµÀýϾͿÉÒÔÁË£¬Ïà¶ÔORACLE¼òµ¥¶àÁË¡£
2¡¢¹ÜÀí¹¤¾ß£¬DB2µÄ¹ÜÀí¹¤¾ß×öµÃÌ«¼òªÁË£¬¿ØÖÆÖÐÐÄÖ»ÄÜ˵ÄÜÓöøÒÑ£¬¶øÇÒ»¹ÓкöàBUG,²»ÈçORACLEµÄÆóÒµ¹ÜÀíÆ÷×öµÃºÃ£¬Á¬WEB°æ¶¼Ã»ÓС£
3¡¢±¸·Ý¹ÜÀí£¬DB2µÄ±¸·ÝÖ»ÄÜ˵ÊǼòªÁË£¬Ã»Óб¸·Ý¼¯µÄ¹ÜÀí¹¦ÄÜ£¬Ã»Óлָ´Ô¤ÀÀºÍУÑ鹦ÄÜ£¬²»ÄÜдµ½ÍøÂçÇý¶¯Æ÷ÉÏ£¬°¦Ì«¶àµÄûÓÐÁË£¬ORACLEµÄRMANȷʵǿ´ó£»
4¡¢DB2µÄÃüÁîÖ´Ðз½Ê½£¬ÎÒºÜϲ»¶£¬¿ÉÒÔÔÚÃüÁîÐÐÉÏÖ´ÐÐSQL£¬Ò²¿ÉÒÔÔÚÃüÁî´°¿ÚÉÏÖ´ÐÐSQL£¬Ïà¶ÔSQLPLUSÁé»î¶àÁË£»
5¡¢DB2µÄ×Ô¶¯Î¬»¤¹¦ÄÜ×öµÄºÜºÃ£¬¿ÉÒÔÅäÖóÉΪÔÚij¸öʱ¼ä´°¿Ú¶¨ÆÚ×Ô¶¯ÕûÀíÊý¾Ý¿âËéƬºÍÖؽ¨Ë÷ÒýµÈ¹¤×÷£¬Î¨Ò»²»´óÀíÏëµÄÊÇ×Ô¶¯Î¬»¤µÄ±¸·Ý¹¦Äܲ»ÄÜÖ¸¶¨Ñ¹Ëõ±¸·Ý£¬Ïà¶Ô¶øÑÔORACLEµÄ×Ô¶¯Î¬»¤¹¦ÄܾͺÜÒ»°ãÁË£»
6¡¢DB2µÄÔËÐÐ×´¿öµÄ¹¦ÄÜÎÒÒ²ºÜϲ»¶£¬ORACLEÒ²ÓÐÀàËƵÄAHM£¬µ«ÊÇDB2µÄÔËÐÐ×´¿ö¸üΪֱ½Ó£¬¿ÉÒÔһϾͿ´³öÊý¾Ý¿âÄ¿Ç°ÓÐɶÎÊÌ⣬DB2»¹¸ø³öÁËÈçºÎ´¦ÀíµÄ½¨Òé¹ËÎʳÌÐò£»
7¡¢DB2µÄÄÚ´æ×´¿ö¼à¿Ø¹¦Äܱ¾À´ÎÒÒ²ºÜϲ»¶£¬¿ÉÒÔÖ±½ÓÔÚÄÚ´æ×´¿ö¼à¿ØÉÏÖ±½Ó¸ÄÏàÓ¦µÄ²ÎÊý£¬µ«ÊÇ·¢ÏÖÒ»¸ö¾Þ´óBUGºó£¬ÎҾͺܲ»Ï²»¶ÁË£¬Èç¹ûÄãÒ»Ö±µãˢУ¬·¢ÏÖÄÚ´æÕ¼ÓÃÁ¿»á²»¶ÏÉÏÉý£¬ÎÒÓдÎΪÁ˼à¿ØÒ»¸öÄÚ´æ²ÎÊý£¬ÈÃÕâ¸ö¹¤¾ßÔËÐÐÁËÒ»ÌìÒ»Ò¹£¬½á¹û»ØÀ´Ò»¿´£¬Ôε¹£¬ËùÓеÄÄÚ´æ²ÎÊýÔö³¤µ½Êý°ÙG,ÎÒÏë¿´µÄÀúÊ·±ä»¯Çé¿ö¾ÓȻûÓС£
8¡¢DB2µÄÔ¶³ÌÍøÂçÁ¬½Ó²ÉÓõıàÄ¿·½Ê½ÃèÊöÁ¬½Ó´®µÄ·½Ê½ÎҸоõºÜ²»Ë¬£¬ÎªÁ˸ĸö¿Í»§¶ËµÄÁ¬½Ó·þÎñÆ÷µÄIPµØÖ·£¬ËùÓеĿͻ§¶Ë¶¼ÐèÒª½«±àĿɾ³ý£¬È»ºóÖØбàÄ¿Á¬½ÓµØÖ·£¬Ôε¹100¶ą̀PC»ú¸ãÏÂÀ´£¬¾¡¹Ü¿ÉÒÔʹÓýű¾£¬µ«ÊÇ»¹ÊÇ°ÑÈ˶¼¿ì¸ã·èÁË¡£ORACLE²ÉÓõÄÓÃÎļþÀ´ÅäÖÃÔ¶³Ì·þÎñÆ÷µÄ·½Ê½£¬ËùÓеÄPC»ú¶¼Í¨¹ý¸üзþÎñÆ÷Ö±½Ó¸üб¾»úµÄTNSNAME£¬1·ÖÖӸ㶨¡£
9¡¢DB2µÄÊý¾Ý¿â´´½¨Èç¹ûÒªÊÖ¹¤¹ÜÀíÈÝÆ÷£¬¾ÓȻûÓÐÖ¸¶¨È±Ê¡µÄϵͳ±í¿Õ¼äÊý¾ÝÎļþÃû£¬ÄãÒª´´½¨Ò»¶ÑÏàÓ¦µÄÎļþÃû£¬Ã»°ì·¨£¬Ö»ºÃÕÕ³oracleµÄOFAÌåϵ½á¹¹µÄÎļþÃû¡£
10¡¢DB2µÄÁ¬½ÓÅäÖÃͼÐι¤¾ßʵÔÚÊDzîÁË£¬ÔÚÉÏÃæÅäÖÃÒ»²½²½Åä³öµÄÁ¬½Ó¾ÓÈ»²»ÄÜÓã¡Ö»ºÃʹÓýű¾,ÕâµãORACLE±ÈDB2Ç¿¶àÁË¡£
11¡¢DB2ÔÚWINDOWS ƽ̨µÄ¿É¿¿ÐÔ²»ÔõôÑù£¬3¸ö¶àÐÇÆÚÎÞÔµÎÞ¹ÊDOWNÁË4´Î»ú£¬ORACLEÅäº
Ïà¹ØÎĵµ£º
create or replace procedure getok
as
cursor mycur is select ids,name from aaa where name not in (select names from ok);
vempno aaa.ids%type;
vename aaa.name%type;
begin
open mycur;
loop
fetch mycur into vempno,vename;
exit when mycur%notfound;
if mycur%found then
insert ......
Á½¸ö×Ó²éѯ½øÐм¯ºÏÔËÐУ¬ Ìõ¼þ¾ÍÊÇÁ½¸ö²éѯµÄ×ֶθöÊýÒ»Ö£¬ÀàÐÍÒ»Ö£¬×Ö¶ÎÃû¿ÉÒÔ²»Í¬¡£
SQL> select * from ta;
ID NAME
---------- --------------------
1 gorey
&nb ......
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
month spelled out march
Year:
yy two digits 98  ......
1¡¢²é¿´Êý¾Ý¿â×Ö·û¼¯
Êý¾Ý¿â·þÎñÆ÷×Ö·û¼¯select * from nls_database_parameters£¬ÆäÀ´Ô´ÓÚprops$£¬ÊDZíʾÊý¾Ý¿âµÄ×Ö·û¼¯¡£
¡¡¡¡
¡¡¡¡¿Í»§¶Ë×Ö·û¼¯»·¾³select * from nls_instance_parameters,ÆäÀ´Ô´ÓÚv$parameter£¬
¡¡¡¡
¡¡¡¡±íʾ¿Í»§¶ËµÄ×Ö·û¼¯µÄÉèÖ㬿ÉÄÜÊDzÎÊýÎļþ£¬»·¾³±äÁ¿»òÕßÊÇ×¢²á±í
¡¡¡¡
¡¡¡¡»á»°×Ö·û¼¯» ......
Ò»¡¢ÉèÖóõʼ»¯²ÎÊý job_queue_processes
sql> alter system set job_queue_processes=n;£¨n>0£©
job_queue_processes×î´óֵΪ1000
²é¿´¸ÃÖµ show parameter processes
²é¿´job queue ºǫ́½ø³Ì
sql>select name,description from v$bgprocess;
¶þ£¬dbms_job package Ó÷¨½é ......