Quantcast
Channel: Teradata Downloads
Viewing all articles
Browse latest Browse all 780

How to capture JDBC Connection parameter LOG=DEBUG messages with R

$
0
0

JDBC Connection parameter LOG=DEBUG prints error, timing, informational, and debug messages to Java System.out. The following shows how the messages can be captured with R.

R can be started with several executables: R, Rgui, Rscript, Rterm. Not all of them capture messages printed to Java System.out, e.g. Rgui on Windows. Rscript does not include the invoked R commands in its output, so the executables to use for capturing invoked R commands and messages printed to Java System.out are R or Rterm.

  1. Save the following in a file, e.g. Rtest.txt.
    library(RJDBC)
    library(teradataR)
    
    drv = JDBC("com.teradata.jdbc.TeraDriver","c:\\terajdbc\\terajdbc4.jar;c:\\terajdbc\\tdgssconfig.jar")
    con = dbConnect(drv,"jdbc:teradata://system/LOG=DEBUG","user","password")
    dbGetQuery(con,"select * from dbc.dbcinfo")
    dbDisconnect(con)
    
  2. Enter the following to execute Rterm and save the output in Result.log: Rterm --no-save < Rtest.txt > Result.log
Ignore ancestor settings: 
0
Apply supersede status to children: 
0

Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>