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

weblogicÏÂÔÚOracleÖд洢clobÀàÐÍÒ»Àý

String sql = "select t.FILE_INFO from T_FILE_DB_DETAIL t where t.id= "
      + fileDBUpDownDetail.getId() + " for update";
    rs = stmt.executeQuery(sql);
    if (rs.next()) {
     // ÔÚweblogicϲ¿Êðʱ£¬ÐèÒª¸ü¸ÄΪBea WebLogic BLOB¸ñʽ
//     weblogic.jdbc.vendor.oracle.OracleThinBlob blob = (weblogic.jdbc.vendor.oracle.OracleThinBlob) rs
//       .getBlob(1);
     BLOB blob = (BLOB) rs.getBlob(1);
     if (blob != null) {
      out = blob.getBinaryOutputStream();
      byte[] buf = new byte[8192];// 8K »º´æ
      int len;
      while ((len = fileInputStream.read(buf)) > 0) {
       if (out != null) {
        out.write(buf, 0, len);
        out.flush();
       }
      }
     }
    }


Ïà¹ØÎĵµ£º

Oracle±í¿Õ¼ä¹ÜÀí

extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î»      --segment    management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......

oracle sqlplus ³£ÓÃÃüÁî´óÈ«

showºÍsetÃüÁîÊÇÁ½ÌõÓÃÓÚά»¤SQL*Plusϵͳ±äÁ¿µÄÃüÁî
SQL> show all --²é¿´ËùÓÐ68¸öϵͳ±äÁ¿Öµ
SQL> show user --ÏÔʾµ±Ç°Á¬½ÓÓû§
SQL> show error¡¡¡¡ --ÏÔʾ´íÎó
SQL> set heading off --½ûÖ¹Êä³öÁбêÌ⣬ĬÈÏֵΪON
SQL> set feedback off --½ûÖ¹ÏÔʾ×îºóÒ»ÐеļÆÊý·´À¡ÐÅÏ¢£¬Ä¬ÈÏֵΪ"¶Ô6¸ö» ......

´´½¨oracleÊý¾Ý¿âÁ¬½Ó(database link)µÄÁ½ÖÖ·½·¨


oracle Êý¾Ý¿âÁ¬½Ó¾ÍÏñÄãÔÚ³ÌÐòÖн¨Á¢Ò»¸öµ½Êý¾Ý¿âµÄÁ¬½ÓÒ»Ñù¡£
Èç¹ûÊý¾Ý¿â²»ÔÚ±¾µØÖ÷»ú,±ØÐëÔÚ$ORACLE_HOME/network/admin/tnsnames.oraÖÐÅäÖÃÏàÓ¦µÄtns£¬È»ºó³ÌÐò²ÅÄÜͨ¹ýÅäÖúõÄtns·ÃÎÊÊý¾Ý¿â£¬µ«ÊÇjavaͨ¹ýthin·½Ê½·ÃÎÊoracleÀýÍ⣬¿ÉÒÔ²ÉÓÃÔÚ±¾µØÅäÖúõÄtns±ðÃû£¬Ò²¿ÉÒÔ²ÉÓÃtnsÈ«½âÎöÃû£¬²ÉÓñðÃûµÈºÅºóµÄÈ« ......

ORACLEÖÐÈÕÆÚ¼Ó¼õ


¼Ó·¨
select sysdate,add_months(sysdate,12) from dual;         --¼Ó1Äê
select sysdate,add_months(sysdate,1) from dual;         --¼Ó1ÔÂ
select sysdate,to_char(sysdate+7,'yyyy-mm-dd HH24:MI:SS') from dual;   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ