Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String IP = "Server99";
- String port = "1521";
- String DBNAME= "PGDB";
- String mcS_UserName="UserName";
- String mcS_Password="Password";
- String JDBC_DRIVER="oracle.jdbc.driver.OracleDriver";
- Connection conn;
- String DB_URL= "jdbc:oracle:thin:@"+IP+":"+port+":"+DBNAME;
- Class.forName(JDBC_DRIVER);
- conn = DriverManager.getConnection(DB_URL,mcS_UserName,mcS_Password);
- ]$ tnsping Server099
- TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 01-MAR-2016 14:02:54
- Copyright (c) 1997, 2009, Oracle. All rights reserved.
- Used parameter files:
- /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
- Used EZCONNECT adapter to resolve the alias
- Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS= (PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.99)(PORT=1521)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement