JDBCÁ¬½ÓOracleµÄ¼òµ¥Àý×Ó
1import java.sql.*;
2import java.util.logging.Level;
3import java.util.logging.Logger;
4
5/** *//**
6 * Title: JDBCÁ¬½ÓÊý¾Ý¿â
7 * Description: ±¾ÊµÀýÑÝʾÈçºÎʹÓÃJDBCÁ¬½ÓOracleÊý¾Ý¿â£¬²¢ÑÝʾÌí¼ÓÊý¾ÝºÍ²éѯÊý¾Ý.
8 */
9public class JDBCExample {
10
11 public static void main(String[] arg) {
12 try {
13 try {
14 //×¢²áJDBCÇý¶¯
15 Class.forName("oracle.jdbc.driver.OracleDriver");
16 } catch (ClassNotFoundException ex) {
17 Logger.getLogger(JDBCExample.class.getName()).log(Level.SEVERE, null, ex);
18 }
19 //´´½¨Êý¾Ý¿âÁ¬½Ó
20 String url = "jdbc:oracle:thin:@127.0.0.1:1521:NEW";
21 String username = "scott";
22 String password = "tiger";
23 Connection con = null;
24 try {
25 con = DriverManager.getConnection(url, username, password);
26 } catch (SQLException ex) {
27
Ïà¹ØÎĵµ£º
oracleº¯Êý´óÈ«-Êý×Ö´¦Àíº¯Êý
F.3 Êý×Öº¯Êý
º¯Êý½ÓÊÜNUMBERÀàÐ͵IJÎÊý²¢·µ»ØNUMBERÀàÐ͵ÄÊýÖµ.³¬Ô½º¯ÊýºÍÈý½Çº¯ÊýµÄ·µ»ØÖµ¾«È·µ½36λ.ACOS¡¢ASIN¡¢ATAN¡¢ATAN2µÄ½á¹û¾«È·µ½36λ.
l ABS
Óï·¨: ABS(x)
¹¦ÄÜ: µÃµ½xµÄ¾ø¶ÔÖ ......
²úÉú±í¿Õ¼äÒ»°ã¶¼ÊÇDBA»òÌØȨÓû§À´Íê³ÉµÄ£¬Èç¹ûÒªÒÔÆäËûµÄÉí·ÝÀ´²úÉú£¬Õâ¸öÓû§±ØÐëÓÉCreate tablespaceȨÏÞ²ÅÐС£²úÉúÒ»¸ö±í¿Õ¼äʱ£¬Ò»°ãÐèÒª²úÉúÒ»¸öÊý¾ÝÎļþ£¬²¢È·¶¨ÎļþµÄ´óСºÍ¶ÎµÄ´óС¡£
²úÉúÒ»¸ö±í¿Õ¼ä£¬È·¶¨Êý¾ÝÎļþ£¬Îļþ´óСºÍÇø´óС¡£
create tablespace date01 datafile d:\oracle\oradata\scut\date01.dbf ......
OracleÆô¶¯Ê±ÐèÒªµÄ·þÎñ£º
ÔÌûµØÖ·£ºhttp://www.blogjava.net/sidanzhou/archive/2008/03/03/183507.html
×¢£ºSID - Êý¾Ý¿â±êʶ
HOME_NAME - Oracle HomeÃû³Æ£¬ÈçOraHome92¡¢OraHome81
£¨1£©OracleServiceSID
Êý¾Ý¿â·þÎñ£¬Õâ¸ö·þÎñ»á×Ô¶¯µØÆô¶¯ºÍÍ£Ö¹Êý¾Ý¿â¡£Èç¹û°²×°ÁËÒ»¸öÊý¾Ý¿â£¬ËüµÄȱʡÆô¶¯ÀàÐÍΪ×Ô¶¯¡£·þÎñ½ø³ ......
Êý¾Ý¿âÖ®¼äµÄÁ´½Ó½¨Á¢ÔÚDATABASE LINKÉÏ¡£Òª´´½¨Ò»¸öDB LINK£¬±ØÐëÏÈÔÚÿ¸öÊý¾Ý¿â·þÎñÆ÷ÉÏÉèÖÃÁ´½Ó×Ö·û´®¡£
1¡¢ ÅäÖÃTNS £¬ $ORACLE_HOME/NETWORK/ADMIN/tnsname.ora
10gstandby =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = HFCC-KF-3068)(PORT = ......
insert into dts_auction_comments (id,auction_id,user_id,user_nick,comments,gmt_create,gmt_modified,status,comm_type)
values(409,127380, ......