From 57a246986f480f1d92d332c0301cac9bd12691dc Mon Sep 17 00:00:00 2001 From: Benjamin De Boe Date: Thu, 2 Jan 2025 15:53:10 +0100 Subject: [PATCH] reran pkgdown reran pkgdown for Connecting.Rmd only and stuck with CSS / JS versions of other files for consistency, just to pick up fresht content. --- docs/articles/Connecting.html | 92 +++++++++++++++++++++++++++++------ 1 file changed, 77 insertions(+), 15 deletions(-) diff --git a/docs/articles/Connecting.html b/docs/articles/Connecting.html index e5169dfe..6093fee8 100644 --- a/docs/articles/Connecting.html +++ b/docs/articles/Connecting.html @@ -19,7 +19,7 @@ - +
@@ -45,7 +45,7 @@
- +
@@ -91,7 +91,7 @@

Connecting to a database

Martijn J. Schuemie

-

2023-12-11

+

2025-01-02

Source: vignettes/Connecting.Rmd @@ -120,6 +120,7 @@

Introduction @@ -176,10 +177,11 @@

-

Obtaining drivers for Netezza and Impala +

Obtaining drivers for Netezza, Impala and InterSystems IRIS

-

Because of licensing reasons the drivers for BigQuery, Netezza and -Impala are not included but must be obtained by the user. see these +

Because of licensing reasons the drivers for BigQuery, Netezza, +Impala and InterSystems IRIS are not included but must be obtained by +the user. see these instructions on how to download these drivers, which you can also see by typing ?jdbcDrivers.

@@ -267,13 +269,73 @@

Connecting to a SQLite databaseinsertTable(connection = conn, tableName = "cars", data = cars)

-
## Inserting data took 0.0271 secs
+
## Inserting data took 0.0247 secs
 querySql(conn, "SELECT COUNT(*) FROM main.cars;")
+
## Warning in fun(libname, pkgname): Java library version does not match R package version! Please try reinstalling the SqlRender package.
+##             Make sure to close all instances of R, and open only one instance before reinstalling. Also make sure your
+##             R workspace is not reloaded on startup. Delete your .Rdata file if necessary
##   COUNT(*)
 ## 1       50
-
+
 disconnect(conn)
+
+
+

Connecting with Windows authentication from a non-windows +machine +

+

Kerberos is used by Active Directory, you need to have the +appropriate packages installed on your client machine. For MacOS, the +Kerberos packages are usually already installed. On Linux, you’ll have +to install krb5-user. Most of this setup comes from this +site.

+
    +
  1. +

    On the non-windows client machine, create or update +/etc/krb5.conf so that it points to your AD server. Here’s +an example of krb5.conf:

    +
    [libdefaults]
    +default_realm = DOMAIN.COMPANY.COM
    +
    +[realms]
    +DOMAIN.COMPANY.COM = {
    +  kdc = dc-33.domain.company.com
    +}
    +
  2. +
  3. Run kinit <username>@DOMAIN.COMPANY.COM to get +a ticket granting ticket from the kerberos domain controller (KDC). +(NOTE: you want to make sure your KDC is accessible from your +machine)

  4. +
  5. Download the latest MSSql +JDBC driver.

  6. +
  7. +

    Try to connect to the database with the following code in +RStudio:

    +
    library(devtools)
    +library(DatabaseConnector)
    +connectionDetails <- createConnectionDetails(
    +  dbms="sql server", 
    +  ...
    +  extraSettings="authenticationScheme=JavaKerberos")
    +c <- connect(connectionDetails = connectionDetails)
    +

    In RStudio, you should see that the variable c has a value and the +new connection in the connections tab as well.

    +
  8. +
+

Note: If you are getting the below error on Mac:

+
+

Error in rJava::.jcall(jdbcDriver, “Ljava/sql/Connection;”, +“connect”, : com.microsoft.sqlserver.jdbc.SQLServerException: Kerberos +Login failed: Integrated authentication failed. +ClientConnectionId:13fb0d4e-4822-4de2-a125-8408334cb3ed due to +javax.security.auth.login.LoginException (Cannot get any of properties: +[user, USER] from con properties not available to garner authentication +information from the user)

+
+

Instead of kinit you can also try +/System/Library/CoreServices and find ‘Ticket Viewer’ Click +‘Add Identity’, then enter your user name. After you click ‘Continue’, a +Kerberos ticket should have been generated.

@@ -281,7 +343,7 @@

Connecting to a SQLite database

Contents

- + @@ -294,16 +356,16 @@

Connecting to a SQLite database

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + +