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

JDBC ¼òµ¥µÄOracleÁ¬½Ó

/*Ö÷ÒªÊÇΪÁË¿´ÇåÁ¬½ÓÂß¼­£¬ËùÒÔ°ÑÒì³£Exception*/
import java.sql.*;
public class TestJDBC {
    public static void main(String[] args) throws Exception {
        ResultSet rs = null;
        Statement stmt = null;
        Connection conn = null;
       
            Class.forName("oracle.jdbc.driver.OracleDriver");//ÒªÒýÈëOracleµÄclass12.jar
            //new oracle.jdbc.driver.OracleDriver();
            conn = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.1:1521:demo", "scott", "tiger");
            stmt = conn.createStatement();
            rs = stmt.executeQuery("select * from dept");
            while(rs.next()) {
                System.out.println(rs.getString("deptno"));
                System.out.println(rs.getInt("deptno"));
            }
        rs.close();
        stmt.close();
        conn.close();
        }
}


Ïà¹ØÎĵµ£º

oracleÖÐsubstrºÍinstrµÄÓ÷¨

ÍøÉÏËѼ¯µÄ£¬ÕûÀíÏÂ
1¡¢substr(string string, int a, int b)
²ÎÊý1:string Òª´¦ÀíµÄ×Ö·û´®
²ÎÊý2£ºa ½ØÈ¡×Ö·û´®µÄ¿ªÊ¼Î»Öã¨ÆðʼλÖÃÊÇ0£©
²ÎÊý3£ºb ½ØÈ¡µÄ×Ö·û´®µÄ³¤¶È(¶ø²»ÊÇ×Ö·û´®µÄ½áÊøÎ»ÖÃ)
ÀýÈ磺
substr("ABCDEFG", 0); //·µ»Ø£ºABCDEFG£¬½ØÈ¡ËùÓÐ×Ö·û
substr("ABCDEFG", 2); //·µ»Ø£ºCDEFG£¬½ØÈ¡´ÓC¿ ......

oracle logical standby ÈÕ³£¹ÜÀí³£ÓõÄһЩÓï¾ä

// Ö´ÐÐÌø¹ý£¬Ìø¹ýµÄ½á¹ûÔÚ
execute dbms_logstdby.skip(stmt => 'DML',schema_name => '%', object_name => '%');
stmtµÄȡֵ¿ÉÒÔÊÇ£º
http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10802/d_lsbydb.htm#997290
// Ìø¹ýµÄÄÚÈݼÇÔØÔÚÏÂÃæ
select * from dba_logstdby_skip
......

Oracle log files

Oracle log files : An introduction
 
The Oracle server maintains the redo Oracle log files to minimize the loss of data in the Database in case of an uncontrolled shutdown.
Online redo Oracle log files are filled with redo records. A redo record, also called a redo entry, is made up of a gr ......

Oracle For Update ÐÐËø


ת£ºhttp://hi.baidu.com/mcj0127/blog/item/111a900777db06c87b89473c.html
SELECT FOR UPDATE Ïà¹ØµÄ֪ʶ
Ò»¸öÓʼþ·¢Ë͵ÄÓ¦Óûáÿ¹ýÒ»¶¨µÄʱ¼äƬȥÊý¾Ý¿âÖÐȡδ·¢µÄÓʼþÈ»ºó·¢ËÍÓʼþ£¬³É¹¦ºó½«Êý¾Ý¿âÖÐÓʼþ±êʶδ·¢¸ÄΪÒÑ·¢¡£
Õâ¸öÓ¦Óò¿ÊðÔÚwebsphereÉÏ£¬websphere²ÉÓÃÊÇ´¹Ö±¿Ë¡£¬ÓÐ4¸öserver,µ±4¸öserver¶¼¿ªÆôµÄ ......

oracleÖØ½¨ÃÜÂëÎļþ


[oracle@dba01 dbs]$ orapwd file=/oracle/app/oracle/product/10.2.0/db_1/dbs/orapworcl password=oracle entries=20 force=y
[oracle@dba01 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 29 13:07:10 2010
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Con ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ