File: _sap-hana.Rmd

package info (click to toggle)
r-cran-dbplyr 2.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,376 kB
  • sloc: sh: 13; makefile: 2
file content (48 lines) | stat: -rw-r--r-- 1,218 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# SAP HANA

## Sign up for free cloud trial

* <https://saphanajourney.com/hana-cloud/plans/>
* Go to <https://account.hanatrial.ondemand.com/cockpit>
* Click trial, then "dev" space.
* Then follow <https://saphanajourney.com/hana-cloud/learning-article/how-to-create-your-trial-sap-hana-cloud-instance/>
* Allow access from all IP addresses.
* Need to restart service every day; it's automatically stopped each night.
* Need to create `test` database using database explorer

## Install drivers

* Download SAP HANA installer from <https://www.sap.com/cmp/td/sap-hana-express-edition.html>
* Uncheck virtual machine; check "clients (mac)"
* Untar download
* Untar `hdb_client_mac.tgz`
* `./hdb_inst`

Configure odbc.init: `edit_file("/usr/local/etc/odbcinst.ini")`

```
[SAP HANA]
Description=SAP HANA
Driver=/Applications/sap/hdbclient/libodbcHDB.dylib
```

Check:

```{r}
odbc::odbcListDrivers()
```

## Connect

```{r, eval = FALSE}
con <- DBI::dbConnect(odbc::odbc(),
  driver = "SAP HANA",
  uid = "DBADMIN",
  pwd = "Password12",
  servernode = "a9441502-7166-4a5a-b5d8-23abe3b5009c.hana.trial-us10.hanacloud.ondemand.com:443",
  encrypt="true",
  sslValidateCertificate = "false"
)
class(con)
#> [1] "HDB"
```