I've been trying to connect DB(sql server management studio) to rstudio.
This is what i have tried
# Importing and listing the drivers usiang the ODBC
library(odbc)
odbcListDrivers()
sort(unique(odbcListDrivers()[[1]]))
# Database connection using DBI
library(DBI)
con <- dbConnect( odbc(),
Driver = "SQL Server",
Server="localhost\\SQLEXPRESS",
Database="master",
Trusted_Connection="True"
)
The above code successfully connects to the db but i can see only the system databases under the connection tab. The non-system db the user defined ones are not show in the connection panel of the R studio. How to fix this.
Connections panel
Non-system dbs in the database
Related
I am building a shiny web app with r studio.
Now I want data from my companys oracle sql server on it.
On my computer, I can easily establish a connection via odbc, because I have the driver on my computer. With code like this:
con <- dbConnect(odbc::odbc(), "name", UID="uid", PWD= "pwd")
Now, is this connection possible when uploaded to shinyapps.io?
Also, with this code, I can only connect inside our companys vpn-network. How do I establish a connection from outside? I tried adding host and port, but that does not work.
Thanks a lot :)
I've been trying to set up a remote SQL Express database to test analysis work I've been doing (the full dataset is a full SQL Server build but for IG purposes I'm trying to do a minimal test setup in-house). I have a copy of the latest version of SQL Express set up on an old PC. My primary development environment is on the Mac, but I've got Bootcamp installed on it.
I installed the MS SQL ODBC driver for Mac from the Microsoft website, and have been trying to use the ODBC package following the instructions on https://db.rstudio.com.
After initial attempts failed, I tested the local setup of the SQL Server, following Microsoft's troubleshooting guide.
I then switched using Bootcamp to Windows, installed RStudio on there, and ran the same line of code (below) with the Windows version of the driver name, with success.
I've disabled the firewall to ensure that this wasn't interfering. I've pinged Test-PC and confirmed that the IP address works as expected. The error I get is as below.
Could anyone suggest where to go / look next?
library(odbc)
> odbc::odbcListDrivers()
name attribute value
1 ODBC Driver 13 for SQL Server Description Microsoft ODBC Driver 13 for SQL Server
2 ODBC Driver 13 for SQL Server Driver /usr/local/lib/libmsodbcsql.13.dylib
3 ODBC Driver 13 for SQL Server UsageCount
> con <- dbConnect(odbc::odbc(), Driver="ODBC Driver 13 for SQL Server", Server = "Test-PC/SQLEXPRESS", UID = "my_user", PWD = "my_password", Port = 1433)
Error: nanodbc/nanodbc.cpp:950: HYT00: [Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired
Can anyone help me with this?
I have to connect the oracle data source in MS access which has already connected with some HANA server. But now i want to connect it to oracle.
I have done the odbc connection in System DSN from Administrator tools. Connection successful. But, still i cannot see that DSN in System DSN.
Tried the following steps but still not working
1. Modified default value as "value not set" in regedit.
2. created System DSN through this "C:\windows\SysWOW64"
TIA
I can able to connect/fetch data from Tableau Desktop but in tableau server it is throwing below error with datasource, Datasource is build on BI ODBC driver. Access permission are assign granted to root folder Oracle_HOME.
Based on the error, it seems the the driver is not properly installed. Try downloading the Oracle driver from tableau drivers page. If its installed correctly please cross check on the configurations you have provided. If you are using the ODBC driver, have you created the DSN properly. The DSN needs to be configured properly with the server name and authorisations and once this is done you can use this DSN in tableau.
Once you have installed the driver properly
Click Connect to Data.
On the Connect page, click Other Databases (ODBC).
In the DSN drop-down list, select the name that you gave to your Oracle BI Server ODBC connection, and then click Connect.
Below is the link on how to connect with the BI Connector
How to Connect to Oracle BI Server with Tableau without the shortcomings of Oracle ODBC driver
By Default, tableau server pre-populates “Server Run As user” account to Network Service account (NT AUTHRITY\NetworkService). And this account does not have full permission.
I have a problem connecting to Oracle DB using ODBC library. ODBC drivers are installed and when I test connection through ODBC admin tool in windows it is ok. However, in R I'm running into the following problem:
con <- dbConnect(odbc::odbc(), "ORACLEDNS")
Error: nanodbc/nanodbc.cpp:950: 28000: [Oracle][ODBC][Ora]ORA-01005: null password given; logon denied
Adding PWD results in R session being unresponsive without providing any type of error.
con <- dbConnect(odbc::odbc(), "ORACLEDNS", PWD = "password")
How can I debug the issue, what might be the problem?
DB Version:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production