Error while trying to retrieve text error CRA-12154 数据库连接错误
2017-03-16 15:57
1391 查看
Error while trying to retrieve text error CRA-12154
数据库连接错误
Pl/SQL
连接数据库 看ip地址
在PL/SQL中选择Help-->Support Info... ->查看DNS File C:\oracle\ora90\network\Admin\tnsnames.ora ->查看jdbcurl.java连接数据库IP-->查看数据库登录名和密码
#dev slisoper/slisoper
newdev2 = (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.8.200.105 )(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = lifedev)
)
)
根据jdbc连接数据库的ip地址
public JdbcUrl()
{
DBType = "ORACLE";
IP = "xx.x.xxx.xxx";
Port = "1521";
DBName = "lifedev";
UserName = "sss";
PassWord = "sss";
}
public String getJdbcUrl()
{
String sUrl = "";
if (DBType.trim().toUpperCase().equals("ORACLE"))
{
sUrl = "jdbc:oracle:thin:@" + IP + ":"
+ Port + ":"
+ DBName ;
}
if (DBType.trim().toUpperCase().equals("INFORMIX"))
{
sUrl = "jdbc:informix-sqli://" + IP + ":"
+ Port + "/"
+ DBName + ":"
+ "informixserver=" + ServerName + ";"
+ "user=" + UserName + ";"
+ "password=" + PassWord + ";";
}
if (DBType.trim().toUpperCase().equals("SQLSERVER"))
{
sUrl = "jdbc:microsoft:sqlserver://" + IP + ":"
+ Port +
";databaseName=" + DBName + ";selectMethod=cursor";
}
if (DBType.trim().toUpperCase().equals("WEBLOGICPOOL"))
{
sUrl = "jdbc:weblogic:pool:" + DBName ;
}
return sUrl;
}
数据库连接错误
Pl/SQL
连接数据库 看ip地址
在PL/SQL中选择Help-->Support Info... ->查看DNS File C:\oracle\ora90\network\Admin\tnsnames.ora ->查看jdbcurl.java连接数据库IP-->查看数据库登录名和密码
#dev slisoper/slisoper
newdev2 = (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.8.200.105 )(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = lifedev)
)
)
根据jdbc连接数据库的ip地址
public JdbcUrl()
{
DBType = "ORACLE";
IP = "xx.x.xxx.xxx";
Port = "1521";
DBName = "lifedev";
UserName = "sss";
PassWord = "sss";
}
public String getJdbcUrl()
{
String sUrl = "";
if (DBType.trim().toUpperCase().equals("ORACLE"))
{
sUrl = "jdbc:oracle:thin:@" + IP + ":"
+ Port + ":"
+ DBName ;
}
if (DBType.trim().toUpperCase().equals("INFORMIX"))
{
sUrl = "jdbc:informix-sqli://" + IP + ":"
+ Port + "/"
+ DBName + ":"
+ "informixserver=" + ServerName + ";"
+ "user=" + UserName + ";"
+ "password=" + PassWord + ";";
}
if (DBType.trim().toUpperCase().equals("SQLSERVER"))
{
sUrl = "jdbc:microsoft:sqlserver://" + IP + ":"
+ Port +
";databaseName=" + DBName + ";selectMethod=cursor";
}
if (DBType.trim().toUpperCase().equals("WEBLOGICPOOL"))
{
sUrl = "jdbc:weblogic:pool:" + DBName ;
}
return sUrl;
}
相关文章推荐
- plsql打开错误 error while trying to retrieve text for error ORA-12541
- [笔记]--解决 Error while trying to retrieve text for error ORA-12154 的问题
- Error while trying to retrieve text for error ORA-12154
- 工作总结26 Error while trying to retrieve text for error ORA-12154 解决方案
- Error while trying to retrieve text for error ORA-12154 解决方案
- 终于解决了Linux下运行OCCI程序一直报Error while trying to retrieve text for error ORA-01804错误
- ORA-12557: TNS:protocol adapter not loadable或error while trying to retrieve text for error ora-12557
- Oracle启动时报错 error while trying to retrieve text for error ORA-12543
- Error while trying to retrieve text for error ORA-12557问题
- Error while trying to retrieve text for error ORA-12705
- 终于解决了Linux下运行OCCI程序一直报Error while trying to retrieve text for error ORA-01804错误
- Error while trying to retrieve text for error ORA-03113 的一种解决方式
- kettle入门(二) 之 kettle连接oracle报的坑爹错误 Error occured while trying to connect to the database 的几种情况
- Error while trying to retrieve text for error ORA-01019 的解决办法
- 解决 ERROR OGG-00664 (status = 12162-Error while trying to retrieve text for error ORA-12162
- Error while trying to retrieve text for error ORA-12705
- kettle连接数据库报错:Error occured while trying to connect to the datab
- IntelliJ IDEA连接cvs超时Error refreshing view: Timeout while trying to connect to host
- kettle 通过JDBC 连接SQL Server(Error occurred while trying to connect to the database)
- kettle 通过JDBC 连接SQL Server(Error occurred while trying to connect to the database)