Home > database >  Dblink connection, PLSQL can connect!
Dblink connection, PLSQL can connect!

Time:10-02

When making dblink connection,
 using '(the DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(TCP) PROTOCOL=(HOST=11.39.22.66) (9900) PORT=)) (CONNECT_DATA=(SERVICE_NAME=former) https://bbs.csdn.net/topics/)' 

Using the connection string, is a direct copy tnsnames. Ora, PLSQL can access to, but dblink show "TNS connection timeout"

CodePudding user response:

Dblink depends on the server, not the machine

CodePudding user response:

Using the back can also use the service name

CodePudding user response:

Using the direct write '11.39.22.66 @ wouldn' try

CodePudding user response:

Use DB_LINK first ping again Telnet server if no problem, then look at servername, it is single or cluster,

CodePudding user response:

1, conn user/[email protected]:9900/former look to whether can connect
2, make sure there is no firewall between two servers on the network, such as limit

CodePudding user response:

Private static final String DRIVER="... The oracle JDBC DRIVER OracleDriver ";
Private static final String URL="JDBC: oracle: thin: @ localhost: 1521: xe";
Private static final String USERNAME="system";
Private static final String PASSWORD="sun";

Public static Connection getConnection () {
The Connection conn=null;
Try {
Class.forname (DRIVER);
Conn=DriverManager. GetConnection (URL, USERNAME, PASSWORD);
} the catch (a ClassNotFoundException e) {
//TODO Auto - generated the catch block,
e.printStackTrace();
} the catch (SQLException e) {
//TODO Auto - generated the catch block,
e.printStackTrace();
}
Return the conn.
}
  • Related