1. ServiceName方式:
jdbc:oracle:thin:@//<host>:<port>/ServiceName
2. SID方式:
jdbc:oracle:thin:@<host>:<port>:<SID>
3.RAC方式(老的写法,现在一般用ServiceName方式)
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.2)(PORT=1521)))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxrac)))
- 浏览: 147910 次
最新评论
-
zhou9629:
spring redis 整合 -
see_you_again:
回复一楼:我也只是初学
spark使用logback+slf4j 替换log4j+slf4j -
wu_shao_jie:
嗨,我在用spark-submit命令提交作业的时候,应用程序 ...
spark使用logback+slf4j 替换log4j+slf4j -
zhangfc682:
引用
Eclipse代码模板
相关推荐
jdbc-oracle-thinjdbc-oracle-thin
private static String url="jdbc:oracle:thin:@127.0.0.1:1521:databasename"; private static String uname="username"; private static String passwd="password"; static{ try { Class.forName("oracle...
使用jdbc连接oracle时url有三种格式 格式一: Oracle JDBC Thin using an SID: jdbc:oracle:thin:@host:port:SID Example: jdbc:oracle:thin:@localhost:1521:orcl 这种格式是最简单也是用得最多的 你的oracle的...
private static String url="jdbc:oracle:thin:@192.168.5.221:1521:width"; private static String uname="dzzm"; private static String passwd="dzzm"; static{ try { Class.forName("oracle.jdbc....
url = "jdbc:oracle:thin:@localhost:1521:orcl"; user = "scott"; password = "tiger"; //第一步,加载驱动程序 Class.forName("oracle.jdbc.driver.OracleDriver"); //第二步,获得数据库连接...
jdbc:oracle:thin:@hostname:1521:<SID> Postgresql org.postgresql.Driver jdbc:postgresql://localhost/soft Apache Derby/Java DB org.apache.derby.jdbc.ClientDriver jdbc:derby://localhost:1527/database...
如Oracle12c 使用jdbc:oracle:thin:@localhost:1521/pdborcl Oracle10/11/g 使用jdbc:oracle:thin:@localhost:1521:orcl MySQL使用jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8 其他...
在连接数据库的url地址有点不一样 代码如下:jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=IP1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=IP2)(PORT=1521)))...
比如oracle的url就变成了jdbc:log4jdbc:oracle:thin:@x.x.x.x:1521:dbname; 2、在日志系统中设置jdbc.sqlonly、jdbc.sqltiming等日志级别,可直接将log4jdbc doc中的日志内容copy过去; 3、运行系统测试,到对应...
JDBC URL:jdbc:oracle:thin:@dbip:port:databasename 说明:驱动程序包名有可能会变 JDBC URL中各个部分含义如下: dbip –为数据库服务器的IP地址,如果是本地可写:localhost或127.0.0.1。 port –为数据库的监听...
"jdbc:oracle:thin:@localhost:1521:orcl" * 2. Access url示例: "jdbc:odbc:Access" * 3. SQLServer url示例: "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs" * 4. DB2 url示例: "jdbc:db2://...
Oracle url示例:"jdbc:oracle:thin:@localhost:1521:orcl" * 2. Access url示例:"jdbc:odbc:HANFENG" * 3. SQL Server ur示例:"jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs","sa","" * 4. DB2 ...
--url>jdbc:log4jdbc:oracle:thin:@10.15.0.138:1521:orcl; <!--url>jdbc:log4jdbc:oracle:thin:@192.168.10.11:1521:orcl; <url>jdbc:log4jdbc:oracle:thin:@192.168.10.78:1526:yyorcl</url> ...
jdbc:oracle:thin:@<host>:<port1521>:<全局数据库名> 或 java:oracle:oci@<本地服务名> oracle的oci和thin连接的区别 1)从使用上来说,oci必须在客户机上安装oracle客户端或才能连接,而thin就不需要,因此从使用...
# Another example of the URL would be jdbc:oracle:thin:@//ip:port/database. For more information, please go to the JDBC driver docs connection-url=jdbc:oracle:thin://ip:port/database connection-user=...
String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orcl为数据库的SID String user="test"; String password="test"; Connection conn= DriverManager.getConnection(url,user,password); 1、SQL Server...
String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orcl为数据库的SID String user="test"; String password="test"; Connection conn= DriverManager.getConnection(url,user,password); 2、DB2数据库 ...
用例: driver = "oracle.jdbc.driver.OracleDriver"; url = "jdbc\:oracle\:thin\:@192.168.1.202\:1521\:cxhis";
jdbc驱动包 JDBC Name: Connector/J Home Page: ... Connection con = DriverManager.getConnection("jdbc:oracle:thin:@host:port:databse","user","password");