[英]Error in .jcall(drv@jdrv, "Ljava/sql/Connection, Cannot connect to database using R
我正在尝试使用来自 RStudio 的 RJDBC 访问数据库,但出现以下错误。
我无法理解我的错误。 如果有人帮助我,我将不胜感激。
代码:
install.packages("RJDBC")
library(RJDBC)
drv <- JDBC("com.microsoft.sqlserver.jdbc.SQLServerDriver","c://sqljdbc42.jar")
conn <- dbConnect(drv, "jdbc:sqlserver://191.169.120.213:1433", "username", "password")
输出:
Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], :
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 192.168.120.213, port 1433 has failed. Error: "Connection timed out: no further information. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
注意:我没有任何与防火墙相关的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.