javaÔõôÁ¬½ÓOracle£¬¼±°¡ - Java / JavaÏà¹Ø
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "sys";
try {
Class.forName("oracle.jdbc.driver.OracleDriver"); //OracleÇý¶¯³ÌÐò
con = DriverManager.getConnection(URL, USERNAME, PASSWORD);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
±¨µÄ´íÎóÊÇ:java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
sysÓû§±ØÐëʹÓÃsysdba»òÕßsysoperµÄÉí·Ý²ÅÄܵǽ¡£
Èç¹ûÄãʹÓÃDBA StudioµÇ½µÄ»°£¬ÄãÄÜ¿´µ½ÔÚÓû§Ãû£¬ÃÜÂëÏÂÃæÓÐÒ»¸öÑ¡Ôñ¿ò£¬Ä¬ÈÏÊÇNormal£»µ«¿ÉÒÔ´ÓÕâÀïÑ¡Ôñsysdba»òÕßsysoper¡£
JDBCÎÒ»¹²»ÖªµÀÔõô¸Ä±äµÇ½Éí·Ý¡£
Äã»»ÓñðµÄÓû§µÇ½ÊÔһϰɡ£
Ò»°ã³ÌÐòÖÐÓÃsystem/manager¾ÍÐÐÁË¡£
Â¥É϶þλÕý½â,ÎҾͲ»¶à˵ÁË
²»ÒªÓÃsysÁ¬½Óoralce£¬ÓÃsysн¨Ò»¸öÓû§²âÊÔ
ʹÓÃSCOTT/tigerµÇ½°É
sysÕ˺Ų»¶Ô
×Ô¼ºÔÚOracleн¨Ò»¸öDatabase user È»ºóÔÚ
private static final String URL = "jdbc:oracle:thin:@localhost:1521:user";
private static final String USERNAME = "user"; <
Ïà¹ØÎÊ´ð£º
import java.io.*;
class FileTest
{
public static void main(String [] args) throws Exception
{
File fDir=new File(File.separator);
String strFile="javaÔ´´úÂë²âÊÔ"+File.separato ......
ÎÊÌâÃèÊö£ºÐ´ÈÕÖ¾¹¦ÄÜ£¬Ð´ºÃµÄдÈÕÖ¾·þÎñ£¬ÆäËûÓû§Í¨¹ýhttpµ÷Ó÷þÎñ£¬´«Èë²ÎÊý£¬È»ºó¼Ç¼ÈÕÖ¾£¬
ÎҵķþÎñ¸ÃÔõôд£¬ ±ðÈËÔõôͨ¹ýhttpµ÷ÓÃÎҵķþÎñ£¬ÎÒÓÃwebserviceдºÃÁËÒ»¸ö£¬¿ÉÊDz¢·¢ÓÐÉÏÏߣ¬Ïë¸ÄÓ ......
ÎÒÏëÓÃJavaдһ¸ö³ÌÐò£¬¾ÍÊÇÎÒÏëÔÚÔËÐдúÂëºó£¬ÔÚÖ¸¶¨µÄʱ¼ä´ò¿ªÄ³³ÌÐò£¬ÀýÈçÎÒÔËÐдúÂëºó£¬½²ÔÚ12£º00´ò¿ª"D:\Program Files\Tencent\QQ2009\Bin\QQ.exe"Õâ¸ö³ÌÐò£¬Çó¸ßÈËÖ¸µã¡£»¹ÓпÉÄܵĻ°ÔÚÖ¸¶¨µÄʱ¼ä ......
ÇëÎÊÕâ¸ö»º³å³ØÊÇÔõô»ØÊ°¡£¿¿ÉÒÔÁ¬½Ó»º³å³ØÀûÓÃÆäÖеÄÊý¾Ý°É£¿ÔõôÓã¿
Õâ¸öÊÇoracle×Ô¶¯×öµÄ£¬Ò»°ãÓ¦ÓóÌÐòÊDzÙ×÷²»Á˵ġ£
²»ÄÜÖ±½ÓÁ¬½ÓÂð£¿
ÒýÓÃ
²»ÄÜÖ±½ÓÁ¬½ÓÂð£¿
²»ÄÜ
ÄÇ»º³å³ØÀïµÄÊý¾ÝÒ²²»Äܲéѯ ......