--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/7f54933b-fefc-4ef7-9ddb-31a364f48fd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[RODBC] ERROR: state 08001, code 0, message [unixODBC][FreeTDS][SQL Server]Unable to connect to data source
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/8d942ca4-b073-42d3-a454-15c1ebc3b3c9%40googlegroups.com.
[RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified
s_driver.name <- "FreeTDS"
s_server.name <- "xxxxxxx.database.windows.net,1433"
s_db.name <- "xxxxxxx"
s_user.name <-"xxxxxxx"
s_pwd <- "xxxxxxx"
s_con.text <- paste("DRIVER=",s_driver.name,
";Server=",s_server.name,
";Database=",s_db.name,
";UID=", s_user.name,
";PWD=",s_pwd,
";Encrypt=yes;",
"Connection Timeout = 30;",
sep="")
rodbc_connection <- odbcDriverConnect(s_con.text, case="nochange")
s_query <- 'select distinct x from y order by z desc'
v_output <- sqlQuery(rodbc_connection , s_query)
odbcCloseAll()
2016-05-04T15:41:15.461535+00:00 shinyapps[99921]: [RODBC] ERROR: state 08001, code 0, message [unixODBC][FreeTDS][SQL Server]Unable to connect to data source
2016-05-04T15:41:15.461683+00:00 shinyapps[99921]: [RODBC] ERROR: state 01000, code 20002, message [unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
2016-05-04T15:41:15.461822+00:00 shinyapps[99921]: Warning in odbcDriverConnect(s_con.text, case = "nochange") :
2016-05-04T15:41:15.461824+00:00 shinyapps[99921]: [RODBC] ERROR: state 01000, code 20017, message [unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
2016-05-04T15:41:15.462233+00:00 shinyapps[99921]: Warning in odbcDriverConnect(s_con.text, case = "nochange") :
2016-05-04T15:41:15.462246+00:00 shinyapps[99921]: ODBC connection failed
2016-05-04T15:41:15.463368+00:00 shinyapps[99921]: Warning: Error in sqlQuery: first argument is not an open RODBC channel
2016-05-04T15:41:15.469177+00:00 shinyapps[99921]: Stack trace (innermost first):
2016-05-04T15:41:15.232456+00:00 shinyapps[99921]: as.Date, as.Date.numeric
2016-05-04T15:41:15.461532+00:00 shinyapps[99921]: Warning in odbcDriverConnect(s_con.text, case = "nochange") :
2016-05-04T15:41:15.461681+00:00 shinyapps[99921]: Warning in odbcDriverConnect(s_con.text, case = "nochange") :
2016-05-04T15:41:15.469187+00:00 shinyapps[99921]: 9: tryCatchList
2016-05-04T15:41:15.469188+00:00 shinyapps[99921]: 8: tryCatch
2016-05-04T15:41:15.469189+00:00 shinyapps[99921]: 7: connect$retry
2016-05-04T15:41:15.469190+00:00 shinyapps[99921]: 6: eval
2016-05-04T15:41:15.469183+00:00 shinyapps[99921]: 11: doTryCatch
2016-05-04T15:41:15.469193+00:00 shinyapps[99921]: 4: eval
2016-05-04T15:41:15.469185+00:00 shinyapps[99921]: 10: tryCatchOne
2016-05-04T15:41:15.469182+00:00 shinyapps[99921]: 12: fn
2016-05-04T15:41:15.469179+00:00 shinyapps[99921]: 50: sqlQuery
2016-05-04T15:41:15.469181+00:00 shinyapps[99921]: 13: runApp
2016-05-04T15:41:15.469394+00:00 shinyapps[99921]: Error in sqlQuery(rodbc_connection, s_query) :
Hi Joshua,
Actually my requirement is I need to develop the web application/report then I need to host it on shinyapps.io ,so for that I have developed a report and deployed into shinyapps.io,after deployed into that whenever I ever I click on URL I got a error message like “first argument is not an open RODBC channel” based on this error message did searched in a google and found that we need to use freeTDS driver instead of RODBC,so I was trying to connect the freeTDS but no luck ,can you please help me how to install and how to configure freeTDS on windows 8.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/24b439e5-5e4c-40cd-adfa-8adf124e77fe%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "shinyapps.io Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-users+unsubscribe@googlegroups.com.
To post to this group, send email to shinyapps-users@googlegroups.com.
I am not 100% sure, but Josh's note seems to indicate that it is freeTDS and not FreeTDS. could you try the former and see if it solves the problem?
2017-07-07T22:55:52.371239+00:00 shinyapps[194788]: 2017-07-07T22:55:52.371240+00:00 shinyapps[194788]: Listening on http://127.0.0.1:44457 2017-07-07T22:56:00.999573+00:00 shinyapps[194788]: Warning in odbcDriverConnect(connection_string) : 2017-07-07T22:56:00.999689+00:00 shinyapps[194788]: [RODBC] ERROR: state 01000, code 20013, message [unixODBC][FreeTDS][SQL Server]Unknown host machine name. 2017-07-07T22:56:00.833648+00:00 shinyapps[194788]: Guessing layer_points() 2017-07-07T22:56:00.999687+00:00 shinyapps[194788]: Warning in odbcDriverConnect(connection_string) : 2017-07-07T22:56:00.999576+00:00 shinyapps[194788]: [RODBC] ERROR: state 08001, code 0, message [unixODBC][FreeTDS][SQL Server]Unable to connect to data source 2017-07-07T22:56:00.999943+00:00 shinyapps[194788]: Warning in odbcDriverConnect(connection_string) : 2017-07-07T22:56:01.024894+00:00 shinyapps[194788]: Warning in odbcDriverConnect(connection_string) : 2017-07-07T22:56:01.004891+00:00 shinyapps[194788]: 78: getData 2017-07-07T22:56:01.004894+00:00 shinyapps[194788]: 8: tryCatch 2017-07-07T22:56:01.025146+00:00 shinyapps[194788]: ODBC connection failed 2017-07-07T22:56:01.004889+00:00 shinyapps[194788]: Stack trace (innermost first): 2017-07-07T22:56:01.004892+00:00 shinyapps[194788]: 11: doTryCatch 2017-07-07T22:56:01.024798+00:00 shinyapps[194788]: Warning in odbcDriverConnect(connection_string) : 2017-07-07T22:56:01.004890+00:00 shinyapps[194788]: 79: sqlQuery 2017-07-07T22:56:01.004895+00:00 shinyapps[194788]: 5: eval 2017-07-07T22:56:01.004896+00:00 shinyapps[194788]: 3: eval 2017-07-07T22:56:01.004896+00:00 shinyapps[194788]: 2: eval.parent 2017-07-07T22:56:01.004892+00:00 shinyapps[194788]: 12: fn 2017-07-07T22:56:01.004897+00:00 shinyapps[194788]: 1: local 2017-07-07T22:56:01.050250+00:00 shinyapps[194788]: Stack trace (innermost first): 2017-07-07T22:56:00.999945+00:00 shinyapps[194788]: ODBC connection failed 2017-07-07T22:56:01.004895+00:00 shinyapps[194788]: 6: eval 2017-07-07T22:56:01.025798+00:00 shinyapps[194788]: Warning: Error in sqlQuery: first argument is not an open RODBC channel 2017-07-07T22:56:01.004892+00:00 shinyapps[194788]: 13: runApp 2017-07-07T22:56:01.004895+00:00 shinyapps[194788]: 4: eval 2017-07-07T22:56:01.025145+00:00 shinyapps[194788]: Warning in odbcDriverConnect(connection_string) : 2017-07-07T22:56:01.004893+00:00 shinyapps[194788]: 9: tryCatchList 2017-07-07T22:56:01.024895+00:00 shinyapps[194788]: [RODBC] ERROR: state 01000, code 20013, message [unixODBC][FreeTDS][SQL Server]Unknown host machine name. 2017-07-07T22:56:01.000777+00:00 shinyapps[194788]: Warning: Error in sqlQuery: first argument is not an open RODBC channel 2017-07-07T22:56:01.004891+00:00 shinyapps[194788]: 77: observeEventHandler [/srv/connect/apps/PerformanceShiny/server.R#42] 2017-07-07T22:56:01.004894+00:00 shinyapps[194788]: 7: connect$retry 2017-07-07T22:56:01.004893+00:00 shinyapps[194788]: 10: tryCatchOne 2017-07-07T22:56:01.024799+00:00 shinyapps[194788]: [RODBC] ERROR: state 08001, code 0, message [unixODBC][FreeTDS][SQL Server]Unable to connect to data source 2017-07-07T22:56:01.050253+00:00 shinyapps[194788]: 77: observeEventHandler [/srv/connect/apps/PerformanceShiny/server.R#70] 2017-07-07T22:56:01.050256+00:00 shinyapps[194788]: 8: tryCatch 2017-07-07T22:56:01.050254+00:00 shinyapps[194788]: 13: runApp 2017-07-07T22:56:01.050256+00:00 shinyapps[194788]: 7: connect$retry 2017-07-07T22:56:01.050257+00:00 shinyapps[194788]: 6: eval 2017-07-07T22:56:01.050257+00:00 shinyapps[194788]: 5: eval 2017-07-07T22:56:01.050254+00:00 shinyapps[194788]: 11: doTryCatch 2017-07-07T22:56:01.050258+00:00 shinyapps[194788]: 4: eval 2017-07-07T22:56:01.050255+00:00 shinyapps[194788]: 9: tryCatchList 2017-07-07T22:56:01.050255+00:00 shinyapps[194788]: 10: tryCatchOne 2017-07-07T22:56:01.050258+00:00 shinyapps[194788]: 3: eval 2017-07-07T22:56:01.050252+00:00 shinyapps[194788]: 79: sqlQuery 2017-07-07T22:56:01.050254+00:00 shinyapps[194788]: 12: fn 2017-07-07T22:56:01.050253+00:00 shinyapps[194788]: 78: getData 2017-07-07T22:56:01.050258+00:00 shinyapps[194788]: 2: eval.parent 2017-07-07T22:56:01.050259+00:00 shinyapps[194788]: 1: local
In SQL Studio I queried the version of Server that I am running and it returned "Microsoft SQL Azure (RMT) - 12.0.2000.8 June 11 2017 11:55:10"
I wasnt sure if that had effect on the TDS setting. I have entered all the advised Firewall settings into Azure Portal associated with the SQL Server.
For the TDS setting I have tried version 7.0, 7.1, 7.4 and 8.0
The code I am using to switch between a local instance and a shinyapp instance is:
if (Sys.getenv('SHINY_PORT') == "") {
SQL_Server_connection_string <- 'Driver={ODBC Driver 13 for SQL Server}; Server=tcp:xxxxxxx.database.windows.net,1433;Database=xxxxxxx;Uid=xxxxxx;Pwd=xxxxxx;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;'
} else {
SQL_Server_connection_string <- 'Driver=FreeTDS;TDS_Version=7.0; Server=tcp:xxxxxxx.database.windows.net,1433;Database=xxxxxxx;Uid=xxxxxx;Pwd=xxxxxx;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;'
}
Any idea what is going wrong?
--
You received this message because you are subscribed to the Google Groups "shinyapps.io Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-users+unsubscribe@googlegroups.com.
To post to this group, send email to shinyapps-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/b75e000a-baa6-4105-8efe-7cd5bd16856f%40googlegroups.com.