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

javaµ÷ÓÃoracle´æ´¢¹ý³Ì

//¿´¿´ÈçºÎ±àдһЩ¸´ÔӵĴ洢¹ý³Ì
Ò»£ºÎÞ·µ»ØÖµµÄ´æ´¢¹ý³Ì
ΪÁËÑéÖ¤£¬ÎÒÏÈ´´½¨Ò»ÕŲâÊÔ±í
create table mytest(myid varchar2(30),myname varchar2(50));
´æ´¢¹ý³ÌΪ£º
create or replace PROCEDURE mytest2(id in varchar2,name in varchar2)  as
begin
   insert into mytest (myid,myname) values(id, name);
end;
/
È»ºóÄØ£¬ÔÚjavaÀïµ÷ÓÃʱ¾ÍÓÃÏÂÃæµÄ´úÂ룺
package com.hyq.src;
import java.sql.*;
import java.sql.ResultSet;
public class TestProcedureOne {
  public TestProcedureOne() {
  }
  public static void main(String[] args ){
    String driver = "oracle.jdbc.driver.OracleDriver";
    String strUrl = "jdbc:oracle:thin:@127.0.0.1:1521:HUAYU";
    Statement stmt = null;
    ResultSet rs = null;
    Connection conn = null;
    //CallableStatement:ÓÃÓÚÈ¥µ÷Óô洢¹ý³Ì
    CallableStatement cstmt = null;
    try {
      Class.forName(driver);
      conn =  DriverManager.getConnection(strUrl, "scott", "tiger");
      CallableStatement proc = null;
      proc = conn.prepareCall("{ call mytest2(?,?)}");
 //¸ø?ºÅ¸³Öµ
      proc.setString(1, "100");
      proc.setString(2, "user1");
 //Ö´Ðд洢¹ý³Ì
      proc.execute();
    }
    catch (Exception ex2) {
 ex2.printStackTrace();    
    }
    finally{
      //¹Ø±Õ×ÊÔ´..
    }
  }
}
µ±È»ÁË£¬Õâ¾ÍÏÈÒªÇóÒª½¨ÕűíTESTTB,ÀïÃæÁ½¸ö×ֶΣ¨I_ID£¬I_NAME£©¡£
¶þ£ºÓзµ»ØÖµµÄ´æ´¢¹ý³Ì£¨·ÇÁÐ±í£©
´æ´¢¹ý³ÌΪ£º
CREATE OR REPLACE PROCEDURE mytest3(id in varchar2,name out varchar2)  as
BE


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

oracleµÄ9¸öname

OracleµÄ9¸ö_name
2008-07-17 23:47
1¡¢db_name Êý¾Ý¿âÃû
¡¡¡¡SQL> connect xys/manager as sysdba
¡¡¡¡ÒÑÁ¬½Ó¡£
¡¡¡¡SQL> show user
¡¡¡¡USER Ϊ "SYS"
¡¡¡¡SQL> show parameter db_name
¡¡¡¡NAME TYPE VALUE
¡¡¡¡---- -------- ------------
¡¡¡¡db_name string test1
¡¡¡¡db_nameÊÇÊý¾Ý¿âµÄÃû×Ö£¬or ......

oracle¸´Ï°£¨Ò»£© Ö®OracleÌåϵ½á¹¹

      ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬Ô­À´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·­Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
      µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......

ADO+ORACLE´óÏÀÇë½ø

ÎÒÏÖÔÚÏëʵÏÖÒ»¸öÅжÏORACLEÖÐÒ»¸öÊÓͼÊÇ·ñ´æÔÚ£¬Èç¹û´æÔÚ¾Íɾ³ý¡£
ÔÚ³ÌÐòÖÐÎÒÕâÑùдµÄ:
try
 {
 #pragma region [ɾµôÀϵÄÊÓͼ]
  csSqlText.Format("SELECT COUNT(*) AS ÊÓͼ¼ÆÊý from SYS.ALL_VIEWS WHERE VIEW_NAME='%s';",csViewName);
  if (!dbcontroler.Connect_to((_bstr_t)m ......

LinuxÏ°²×°Oracle 10gÖÐÎÄÂÒÂë

ÔÚCenotOS 5.3ÖÐÎÄ»·¾³Ï°²×°Oracle 10g R2ʱ£¬½øÈëͼÐλ¯½çÃæºó£¬·¢ÏÖÖÐÎÄÂÒÂë¡£
ÔÚÍøÉÏËÑË÷ºó£¬·¢ÏÖÊÇÓÉÓÚLinuxÉÏûÓа²×°Oracle°²×°Ê±Ê¹ÓõÄ×ÖÌå¿âÔì³ÉµÄ¡£
´ÓÒÔÏÂÍøÕ¾ÏÂÔØ×ÖÌå¿â
http://download.csdn.net/source/1073202
È»ºóÔÚLinuxÏÂÖ´ÐÐÒÔÏÂÃüÁ°Ñ×ÖÌå¿â°²×°µ½ÏàӦλÖü´¿É
mkdir -p /usr/share/fonts/zh_CN ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ