Creates a database connection profile, which includes the agent and the JDBC parameters.
create connection connection_name
set type [{to|=}] {ASE | ASE_CLUSTER | RSSD | ORACLE | IQ | HANADB}
and set agent [{to|=}]agent_name
and set host [{to|=}] host
and set port [{to|=}] port
and set database [{to|=}] database_name
and set user [{to|=}] user
[and set password [{to|=}] password]
[and set desc [{to|=}] description]
[with node set host [{to|=}] host and set port [{to|=}] port
[and node set host [{to|=}] host
and set port [{to|=}] port]…]
[with properties set property_name [{to|=}] property_value
[and set property_name [{to|=}] property_value ]…]
ASE – for an Adaptive Server database connection.
ASE_CLUSTER– for an Adaptiver Server Cluster database connection.
RSSD – for a Replication Server System Database (RSSD) connection.
IQ – for a Sybase IQ database connection.
ORACLE– for an Oracle database connection.
HANADB – for an SAP HANA database connection.
You cannot set the host name and port number for an ASE_CLUSTER connection; you must set these values inside a node definition. agent_name is invalid, if the connection type is Replication Server System Database (RSSD). An RSSD connection cannot define an agent.
See jConnect for JDBC 7.0 > jConnect for JDBC 7.0 Programmers Reference > Programming Information > Establishing a Connection > Connection Properties.
create connection MyConnPDB set type=ASE and set agent=pdbAgt and set database=mypdb and set host=myhost and set port=1111 and set user=myuser and set password=mypwd go
create connection MyRSSDConn set type=RSSD and set host=rshost and set database=RSSD_database_name and set port=2222 and set user=rsuser and set password=rspwd go
create connection MyConnPDB set type=ASE and set agent=pdbAgt and set database=mypdb and set host=myhost and set port=1111 and set user=myuser and set password=mypwd with properties set REQUEST_KERBEROS_SESSION=true and set SERVICE_PRINCIPAL_NAME=myserver go
create connection MyEncryptedPasswordConn set type=ASE and set agent=pdbAgt and set database=mypdb and set host=myhost and set port=4901 and set user=myuser and set password=mypwd with properties set ENCRYPT_PASSWORD=true go
See Connection Properties in the jConnect for JDBC 7.0 Programmers Reference.
create connection ora1 set type=oracle and set agent=localagent and set host=“10.0.14.129” and set port=1521 and set database=XE and set user=Aladdin and set password=Op3nSesame goThe Oracle database attribute must be set to the Oracle SERVICE_NAME value, which is stored in the tnsnames.ora file, in :%ORACLE%\product\10.2.0\server\NETWORK\ADMIN\. The exact path varies, based on the Oracle database version installed on your machine.
SERVICE_NAME = XE
create connection iq1 set type=IQ and set agent=myagent and set host= “10.0.14.119” and set port=2638 and set database=iqdemo and set user=Aladdin and set password = Op3nSesame go
create connection myHDBconn1 set type=HANADB and set agent=myagent and set host="10.0.14.119" and set port=30315 and set user=HAUSER and set password=Pa55word go