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

Oracle×Ö·û´®´¦Àíº¯Êý


Oracle×Ö·û´®´¦Àíº¯Êý
2008Äê10ÔÂ18ÈÕ ÐÇÆÚÁù 23:45
ÏîÄ¿ÖÐÓÐÉæ¼°´æ´¢¹ý³Ì¶Ô×Ö·û´®µÄ´¦Àí£¬ËùÒԾͽ«ÔÚÍøÉϲéÕÒµ½µÄ×ÊÁÏ»ã×Ü£¬×öÒ»¸öÐÅϢƴ½ÓʽµÄ×ܽᡣ
ÒÔÏÂÐÅÏ¢¾ùÀ´×Ô»¥ÁªÍø£¬Ìù³öÀ´Ò»Ôò×Ô¼º±£´æÒÔ´ýÒÔºóʹÓã¬Ò»Ôò¹©´ó¼Ò·ÖÏí¡£
×Ö·ûº¯Êý——·µ»Ø×Ö·ûÖµ
ÕâЩº¯ÊýÈ«¶¼½ÓÊÕµÄÊÇ×Ö·û×åÀàÐ͵IJÎÊý(CHR³ýÍâ)²¢ÇÒ·µ»Ø×Ö·ûÖµ.
³ýÁËÌرð˵Ã÷µÄÖ®Íâ,ÕâЩº¯Êý´ó²¿·Ö·µ»ØVARCHAR2ÀàÐ͵ÄÊýÖµ.
×Ö·ûº¯ÊýµÄ·µ»ØÀàÐÍËùÊܵÄÏÞÖƺͻù±¾Êý¾Ý¿âÀàÐÍËùÊܵÄÏÞÖÆÊÇÏàͬµÄ¡£
×Ö·ûÐͱäÁ¿´æ´¢µÄ×î´óÖµ£º
VARCHAR2ÊýÖµ±»ÏÞÖÆΪ2000×Ö·û(ORACLE 8ÖÐΪ4000×Ö·û)
CHARÊýÖµ±»ÏÞÖÆΪ255×Ö·û(ÔÚORACLE8ÖÐÊÇ2000)
longÀàÐÍΪ2GB
ClobÀàÐÍΪ4GB
1¡¢CHR
Óï·¨: chr(x)
¹¦ÄÜ£º·µ»ØÔÚÊý¾Ý¿â×Ö·û¼¯ÖÐÓëXÓµÓеȼÛÊýÖµµÄ×Ö·û¡£CHRºÍASCIIÊÇÒ»¶Ô·´º¯Êý¡£¾­¹ýCHRת»»ºóµÄ×Ö·ûÔÙ¾­¹ýASCIIת»»Óֵõ½ÁËÔ­À´µÄ×Ö
·û¡£
ʹÓÃλÖ㺹ý³ÌÐÔÓï¾äºÍSQLÓï¾ä¡£
2¡¢CONCAT
Óï·¨£º CONCAT£¨string1,string2£©
¹¦ÄÜ£º·µ»Østring1£¬²¢ÇÒÔÚºóÃæÁ¬½Óstring2¡£
ʹÓÃλÖ㺹ý³ÌÐÔÓï¾äºÍSQLÓï¾ä¡£
3¡¢INITCAP
Óï·¨£ºINITCAP£¨string£©
¹¦ÄÜ£º·µ»Ø×Ö·û´®µÄÿ¸öµ¥´ÊµÄµÚÒ»¸ö×Öĸ´óд¶øµ¥´ÊÖеÄÆäËû×ÖĸСдµÄstring¡£µ¥´ÊÊÇÓÃ.¿Õ¸ñ»ò¸ø×ÖĸÊý×Ö×Ö·û½øÐзָô¡£²»ÊÇ×ÖĸµÄ
×Ö·û²»±ä¶¯¡£
ʹÓÃλÖ㺹ý³ÌÐÔÓï¾äºÍSQLÓï¾ä¡£
4¡¢LTRIM
Óï·¨£ºLTRIM£¨string1,string2£©
¹¦ÄÜ£º·µ»Øɾ³ý´Ó×ó±ßËãÆð³öÏÖÔÚstring2ÖеÄ×Ö·ûµÄstring1¡£String2±»È±Ê¡ÉèÖÃΪµ¥¸öµÄ¿Õ¸ñ¡£Êý¾Ý¿â½«É¨Ãèstring1£¬´Ó×î×ó±ß¿ªÊ¼¡£µ±
Óöµ½²»ÔÚstring2ÖеĵÚÒ»¸ö×Ö·û£¬½á¹û¾Í±»·µ»ØÁË¡£LTRIMµÄÐÐΪ·½Ê½ÓëRTRIMºÜÏàËÆ¡£
ʹÓÃλÖ㺹ý³ÌÐÔÓï¾äºÍSQLÓï¾ä¡£
5¡¢NLS_INITCAP
Óï·¨£ºNLS_INITCAP£¨string[,nlsparams]£©
¹¦ÄÜ£º·µ»Ø×Ö·û´®Ã¿¸öµ¥´ÊµÚÒ»¸ö×Öĸ´óд¶øµ¥´ÊÖеÄÆäËû×ÖĸСдµÄstring£¬nlsparams
Ö¸¶¨Á˲»Í¬ÓڸûỰȱʡֵµÄ²»Í¬ÅÅÐòÐòÁС£Èç¹û²»Ö¸¶¨²ÎÊý£¬Ôò¹¦ÄܺÍINITCAPÏàͬ¡£Nlsparams¿ÉÒÔʹÓõÄÐÎʽÊÇ£º
‘NLS_SORT=sort’
ÕâÀïsortÖƶ©ÁËÒ»¸öÓïÑÔÅÅÐòÐòÁС£
ʹÓÃλÖ㺹ý³ÌÐÔÓï¾äºÍSQLÓï¾ä¡£
6¡¢NLS_LOWER
Óï·¨£ºNLS_LOWER£¨string[,nlsparams]£©
¹¦ÄÜ£º·µ»Ø×Ö·û´®ÖеÄËùÓÐ×Öĸ¶¼ÊÇСдÐÎʽµÄstring¡£²»ÊÇ×ÖĸµÄ×Ö·û²»±ä¡£
      Nlsparams²ÎÊýµÄÐÎʽÓëÓÃ;ºÍNLS_INITCAPÖеÄnlsparams²ÎÊýÊÇÏàͬµÄ¡£Èç¹ûnlsparamsûÓб»°üº¬£¬ÄÇôNLS_LOWERËù×÷µÄ´¦ÀíºÍ


Ïà¹ØÎĵµ£º

oracle ֮ϵͳ±í µãµÎ »ýÀÛ

²é¿´ÕýÔÚÖ´ÐеÄsqlÓï¾ä
SELECT osuser, username, sql_text from v$session a, v$sqltext b where a.sql_address =b.address order by address, piece;
²¶×½ÔËÐкܾõÄSQL
 select username,sid,opname, round(sofar*100 / totalwork,0) || '%' as progress, time_remaining,sql_text from v$session_longops , v$ ......

C#ÖвÙ×÷OracleʱµÄSQLÓï¾ä²ÎÊýµÄÓ÷¨

C#ÖвÙ×÷OracleʱµÄSQLÓï¾ä²ÎÊýµÄÓ÷¨
OracleTransaction myTrans ;
            conn.Open();
            myTrans =conn.BeginTransaction(IsolationLevel.ReadCommitted) ......

Oracle£º1 not in (null)¼ìË÷²»³ö½á¹û

in/not   inÔÚÅжÏNULLʱÓõÄÓë=/<>Ò»ÑùµÄ·½Ê½£¬¼´±ØÐëÓÃis   nullÀ´Åжϣ¬·ñÔòʼÖÕΪʧ°Ü¡£  
  Óï¾ä  
  select   'true'   from   dual   where   (1,2)   not   in   ((2,3),(2,null));  
  ³É¹¦µÄÔ­ÒòÔÚÓÚÅж϶þÔªÖµÊ±Ê ......

ORACLE ALERT

Oracle EBS AlertÔÚOracle EBSÖÐÓ¦Ó÷dz£¹ã·º,Ö÷Òª¼¯ÖÐÔÚ¶¨ÆÚ֪ͨºÍÌáÐÑ,ʼþÀàµÄ֪ͨºÍÌáÐÑ,ÀýÈç:
1)ij¸öÖ°Ô±¹ýÉúÈÕ,µ«ÊÇÈËÁ¦×ÊÔ´²¿ÃÅÏ£Íû·¢¸ö×£ºØµÄÓʼþ,¾Í¿ÉÒÔͨ¹ýAlert½øÐÐ֪ͨףºØ;
2)ÔÚDBA¼ì²âϵͳÊÇ·ñÕý³£ÔËתµÄ¹ý³ÌÖÐ,Èç¹ûij¸ö±í¿Õ¼ä¿ìÂúÁË,¿ÉÒÔ½¨Á¢Alert½øÐÐ֪ͨ¹ÜÀíÔ±;
3)¿ÉÒÔ½øÐÐÌáÐÑEBSÖеÄËùÓÐÈËÔ±,µ±È»Ò²¿ ......

oracleÐÞ¸ÄÓû§Ãû

 --sqlplus
sqlplus;
sys /password as sysdba;
--²éÕÒÓû§ID£¨user#£©,Êý¾Ý¿âÀïÃæ´æ·ÅµÄÓû§¶¼ÊÇ´óд!
select user#,name,password from user$ where name ='FACT';
USER# NAME                      ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ