Createlocalconnection: Save a JDBC Connection

Creates a JDBC connection and stores it locally.

Description

You must use this command to create and save the local connection before you can use the CLI dataload or dimbuild commands with the streaming option. You must also set an environment variable EXTERNAL_CLASSPATH to point to the .jar file for your database driver. For examples of setting this variable, see Build Dimensions and Load Data by Streaming from a Remote Database.

Syntax

createLocalConnection [-verbose] -name streamConnection -connectionstring  connectionString -user userName [-driver jdbcDriver]
Option Abbreviation Description
-verbose -v Show extended descriptions
-name -N Connection name
-connectionstring -cs JDBC connection string. Format can be with SID, as follows:
jdbc:oracle:thin:@host:port:SID

or with service name, as follows

jdbc:oracle:thin:@host:port/service_name

See Examples.

-user -u User name
-driver -D JDBC driver. If not provided, Oracle Database is considered the default, as oracle.jdbc.driver.OracleDriver

Examples

The following examples reflect various data sources.

If the -driver option and jdbcDriver parameter are not provided, Oracle database is the assumed database by default.

Oracle DB – Example with SID (Service ID)

esscs createLocalConnection -N OracleDBConnection1 -cs jdbc:oracle:thin:@myhostname01:1521:ORCL -u OracleUser -D oracle.jdbc.driver.OracleDriver

Oracle DB – Example with Service Name

esscs createLocalConnection -N OracleDBConnection2 -cs jdbc:oracle:thin:@host1.domain.com:1521/ORCL.esscs.host1.oraclecloud.com -u OracleUser

DB2

esscs createLocalConnection -N DB2conn -cs jdbc:db2://myhostname02.domain.com:50000/TBC -u myDB2User -D com.ibm.db2.jcc.DB2Driver

MySQL

esscs createLocalConnection -N MySQLconn -cs jdbc:mysql://myhostname03.domain.com:3306/tbc -u MySQLUsr -D com.mysql.jdbc.Driver

Microsoft SQL Server

esscs createLocalConnection -N MSSQLConn -cs jdbc:sqlserver://myhostname04.domain.com:1433 -u MSSQLUsr -D com.microsoft.sqlserver.jdbc.SQLServerDriver

Teradata

esscs createLocalConnection -N TeraDconn -cs jdbc:teradata://myhostname05.domain.com/DBS_PORT=1025 -u MSSQLUsr -D com.teradata.jdbc.TeraDriver