connections

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
connections [2016/01/22 15:24]
dmtolpeko [Connections - PL/HQL Reference]
connections [2016/04/20 07:24] (current)
dmtolpeko
Line 1: Line 1:
-====== Connections ​- HPL/SQL Reference ​======+====== Connections ======
  
 HPL/SQL allows you to [[multiple-databases|work with multiple databases]] in a single HPL/SQL script. ​ HPL/SQL allows you to [[multiple-databases|work with multiple databases]] in a single HPL/SQL script. ​
Line 5: Line 5:
 ===== Configuring Connections ===== ===== Configuring Connections =====
  
-Connection information is stored in [[configuration|plhql-site.xml]] configuration file. The default connection profile is defined by [[configuration#​plhqlconndefault|plhql.conn.default]] option:+Connection information is stored in [[configuration|hplsql-site.xml]] configuration file. The default connection profile is defined by [[configuration#​hplsqlconndefault|hplsql.conn.default]] option:
  
 <​HTML>​ <​HTML>​
 <​property>​ <​property>​
-  <​name>​plhql.conn.default</​name>​+  <​name>​hplsql.conn.default</​name>​
   <​value>​hiveconn</​value>​   <​value>​hiveconn</​value>​
 </​property>​ </​property>​
Line 17: Line 17:
 ===== Predefined Connections ===== ===== Predefined Connections =====
  
-[[configuration|plhql-site.xml]] contains predefined connections for some databases:+[[configuration|hplsql-site.xml]] contains predefined connections for some databases:
  
   * **hiveconn** - Embedded Hive JDBC Connection (not requiring a HiveServer)   * **hiveconn** - Embedded Hive JDBC Connection (not requiring a HiveServer)
Line 23: Line 23:
 <​HTML>​ <​HTML>​
 <​property>​ <​property>​
-  <​name>​plhql.conn.hiveconn</​name>​+  <​name>​hplsql.conn.hiveconn</​name>​
   <​value>​org.apache.hadoop.hive.jdbc.HiveDriver;​jdbc:​hive://</​value>​   <​value>​org.apache.hadoop.hive.jdbc.HiveDriver;​jdbc:​hive://</​value>​
 </​property> ​ </​property> ​
Line 32: Line 32:
 <​HTML>​ <​HTML>​
 <​property>​ <​property>​
-  <​name>​plhql.conn.hive2conn</​name>​+  <​name>​hplsql.conn.hive2conn</​name>​
   <​value>​org.apache.hive.jdbc.HiveDriver;​jdbc:​hive2://​localhost:​10000</​value>​   <​value>​org.apache.hive.jdbc.HiveDriver;​jdbc:​hive2://​localhost:​10000</​value>​
 </​property> ​ </​property> ​
Line 41: Line 41:
 <​HTML>​ <​HTML>​
 <​property>​ <​property>​
-  <​name>​plhql.conn.db2conn</​name>​+  <​name>​hplsql.conn.db2conn</​name>​
   <​value>​com.ibm.db2.jcc.DB2Driver;​jdbc:​db2://​localhost:​50001/​dbname;​user;​pwd</​value>​   <​value>​com.ibm.db2.jcc.DB2Driver;​jdbc:​db2://​localhost:​50001/​dbname;​user;​pwd</​value>​
   <​description>​IBM DB2 connection</​description>​   <​description>​IBM DB2 connection</​description>​
Line 53: Line 53:
 <​HTML>​ <​HTML>​
 <​property>​ <​property>​
- <​name>​plhql.conn.tdconn</​name>​+ <​name>​hplsql.conn.tdconn</​name>​
  <​value>​  <​value>​
  ​com.teradata.jdbc.TeraDriver;​jdbc:​teradata://​host/​database=name,​logmech=ldap;​usr;​pwd  ​com.teradata.jdbc.TeraDriver;​jdbc:​teradata://​host/​database=name,​logmech=ldap;​usr;​pwd
Line 60: Line 60:
 </​HTML>​ </​HTML>​
  
-When using Teradata JDBC driver make sure //​teradata-jdbc4-xx.xx.xx.jar//​and //​tdgssconfig.jar//​ (both .jars required) are specified in CLASSPATH.+When using Teradata JDBC driver make sure //​teradata-jdbc4-xx.xx.xx.jar//​and //​tdgssconfig.jar//​ (both .jars are required) are specified in CLASSPATH.
  
   * **mysqlconn** - MySQL JDBC Connection   * **mysqlconn** - MySQL JDBC Connection
Line 66: Line 66:
 <​HTML>​ <​HTML>​
 <​property>​ <​property>​
-  <​name>​plhql.conn.mysqlconn</​name>​+  <​name>​hplsql.conn.mysqlconn</​name>​
   <​value>​com.mysql.jdbc.Driver;​jdbc:​mysql://​localhost/​test;​user;​password</​value>​   <​value>​com.mysql.jdbc.Driver;​jdbc:​mysql://​localhost/​test;​user;​password</​value>​
 </​property>​ </​property>​
Line 73: Line 73:
 When using MySQL JDBC driver make sure //​mysql-connector-java-x.x.xx-bin.jar//​ is specified in CLASSPATH. When using MySQL JDBC driver make sure //​mysql-connector-java-x.x.xx-bin.jar//​ is specified in CLASSPATH.
  
-You can modify these connection profiles and specify appropriate connection details. Set the default connection profile using the [[configuration#​plhqlconndefault|plhql.conn.default]] option.+You can modify these connection profiles and specify appropriate connection details. Set the default connection profile using the [[configuration#​hplsqlconndefault|hplsql.conn.default]] option. 
 ===== Defining a New Connection ===== ===== Defining a New Connection =====
  
-PL/HQL allows you to define any connection profile. Just create a new parameter named //plhql.conn.<​your_connection_name>//​ and specify the connection details:+HPL/SQL allows you to define any connection profile. Just create a new parameter named //hplsql.conn.<​your_connection_name>//​ and specify the connection details:
  
 <​HTML>​ <​HTML>​
Line 82: Line 83:
 </​HTML> ​ </​HTML> ​
  
-For example, to create a new connection //sales// that points to the //​sales_db//​ database in MySQL add the following section to your [[configuration|plhql-site.xml]] file:+For example, to create a new connection //sales// that points to the //​sales_db//​ database in MySQL add the following section to your [[configuration|hplsql-site.xml]] file:
  
 <​HTML>​ <​HTML>​
 <​property>​ <​property>​
-  <​name>​plhql.conn.sales</​name>​+  <​name>​hplsql.conn.sales</​name>​
   <​value>​com.mysql.jdbc.Driver;​jdbc:​mysql://​localhost/​sales_db;​paul;​pwd</​value>​   <​value>​com.mysql.jdbc.Driver;​jdbc:​mysql://​localhost/​sales_db;​paul;​pwd</​value>​
 </​property>​ </​property>​
Line 93: Line 94:
 Read your JDBC driver documentation how to properly specify the connection string and available options. Read your JDBC driver documentation how to properly specify the connection string and available options.
  
-Once you configured the connections,​ read how to [[multiple-databases|use them in PL/HQL scripts]].+Once you configured the connections,​ read how to [[multiple-databases|use them in HPL/SQL scripts]].
  
 ~~NOTOC~~ ~~NOTOC~~