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();
}
}
Ïà¹ØÎĵµ£º
ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name Type Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y &nb ......
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 AWR ½éÉÜ(AWR -- Automatic Workload Repository)
http://blog.csdn.net/tianlesoftware/archive/2009/10/17/4682300.aspx
Ò». ADDM¸ÅÊö
ADDM(Automatic Database Diagnostic Monitor) ÊÇÖ²ÈëOracleÊý¾Ý¿âµÄÒ»¸ö×ÔÕï¶ÏÒýÇæ.ADDM ͨ¹ý¼ì²éºÍ ......
Ò»£º»Ø¹ö¶Î¸ÅÊö
¡¡¡¡»Ø¹ö¶ÎÓÃÓÚ´æ·ÅÊý¾ÝÐÞ¸Ä֮ǰµÄÖµ£¨°üÀ¨Êý¾ÝÐÞ¸Ä֮ǰµÄλÖúÍÖµ£©¡£»Ø¹ö¶ÎµÄÍ·²¿°üº¬ÕýÔÚʹÓõĸûعö¶ÎÊÂÎñµÄÐÅÏ¢¡£Ò»¸öÊÂÎñÖ»ÄÜʹÓÃÒ»¸ö»Ø¹ö¶ÎÀ´´æ·ÅËüµÄ»Ø¹öÐÅÏ¢£¬¶øÒ»¸ö»Ø¹ö¶Î¿ÉÒÔ´æ·Å¶à¸öÊÂÎñµÄ»Ø¹öÐÅÏ¢¡£
»Ø¹ö¶ÎµÄ×÷ÓÃ
¡¡¡¡ÊÂÎñ»Ø¹ö£ºµ±ÊÂÎñÐ޸ıíÖÐÊý¾ÝµÄʱºò£¬¸ÃÊý¾ÝÐÞ¸ÄÇ°µÄÖµ£¨¼´Ç°Ó°Ïñ£ ......
[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 ......