Differences

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

Link to this comparison view

dev:connections:home [2011/01/20 18:57]
els
dev:connections:home [2016/06/28 22:38]
Line 1: Line 1:
-{{page>:​top_add&​nofooter&​noeditbtn}} 
  
- 
-====== Development:​ SQL ====== 
- 
-===== Connection Strings ===== 
- 
-Omnidex uses connection strings to connect to Omnidex Environment Files. ​ A connection string is a universal syntax that describes the location, network information and options for connecting to the environment file.  Connection strings are used throughout the Omnidex product, including ODBC, JDBC, Omnidex Grids, and the Omnidex SQL Engine. 
- 
- 
-==== Syntax ==== 
- 
-The full syntax of the Omnidex connection string is shown below. ​ It is rare that all portions are needed, though. Any portion of the connection string are optional and can be omitted and replaced with the default settings as long as enough information remains to support the connection.  ​ 
- 
-  [ host : port : pool ] filename [ node ] &​options 
- 
- 
-==== Discussion ==== 
- 
- 
-== host == 
- 
-The name of the host where the Omnidex Environment File is located. ​ If omitted, //host// defaults to "​localhost"​. Note that Omnidex Network Services must be running on that host to receive the connection. 
- 
-== port == 
- 
-The port number used to connect to //​host//​. ​ If omitted, //port// defaults to 7555.  Note that Omnidex Network Services must be running on that host to receive the connection. 
- 
-== pool == 
- 
-The name of an Omnidex Connection Pool to be used when connecting to this environment. If omitted, then this will not be a pooled connection. ​ Note that Omnidex Network Services must be running on that host to receive the connection. 
- 
-== filename == 
- 
-The filename for the Omnidex Environment File.  This filename can be fully qualified; otherwise, it is treated as a relative filename, relative to the current working directory of where Omnidex Network Services was launched. ​ //​Filename//​ can only be omitted if Omnidex Connection Pools are used, in which case the filename is registered as part of configuring the connection pool.  ​ 
- 
-== node == 
- 
-The Grid Node within an Omnidex Grid to connect to.  Normally, connections to the Environment File for an Omnidex Grid provide access to the entire grid.  Specifying the //node// allows a connection directly to a Grid Node.  If omitted, then the connection is to the entire Omnidex Grid. 
- 
-== options == 
- 
-The options to be used when connecting to the Omnidex Environment File.  The allowed options are documented as part of the SQL [[dev:​sql:​statements:​connect:​home|CONNECT]] statement. 
- 
-== Using Environment Variables == 
- 
-Omnidex allows environment variables to replace any or all of the components of a connection string. ​ The syntax for referencing an environment variable on the remote host is {$VARIABLE},​ where VARIABLE is the name of the environment variable. ​ The syntax for referencing an environment variable on the local host is {$$VARIABLE}. ​ The entire connection string could be replaced with environment variables using the following syntax. ​ Note that any variable name can be used. 
- 
-Environment variables on the remote host.  Note that that host, port and pool can only reference variables on the local host since that is required for communicating with the remote host: 
- 
-  [ {$$HOST} : {$$PORT} : {$$POOL} ] {$FILENAME} [ {$NODE} ] &​{$OPTIONS} 
- 
-Environment variables on the local host: 
- 
-  [ {$$HOST} : {$$PORT} : {$$POOL} ] {$$FILENAME} [ {$$NODE} ] &​{$$OPTIONS} 
- 
-Omnidex also allows shell commands to be used in place of environment variables. ​ Shell commands can be used to allow an external process to produce the value, rather than relying on an environment variable. ​ The syntax for referencing a shell command on the remote server is {$(command)},​ where command is the shell command. ​ The syntax for referencing a shell command on the local server is {$$(command)}. 
- 
-Shell commands on the remote UNIX host from a local Windows client. ​ Note that that host, port and pool can only reference shell commands on the local host since that is required for communicating with the remote host: 
- 
-  [ {$$(type host.txt)} : {$$(type host.txt)} : {$$(type pool.txt)} ] {$(cat filename.txt)} [ {$(cat node.txt)} ] &{$(cat options.txt)} 
- 
-Shell commands on the remote host: 
- 
-  [ {$$(cat host.txt)} : {$$(cat host.txt)} : {$$(cat pool.txt)} ] {$(cat filename.txt)} [ {$(cat node.txt)} ] &{$(cat options.txt)} 
- 
- 
- 
-==== Examples ==== 
- 
-== Connection to local environment file == 
- 
-This connection string connects to a environment file on the local machine. ​ Because of the absence of bracketed network information,​ this connection will not require Omnidex Network Services.  ​ 
- 
-  c:​\class\simple.xml 
- 
-This same environment file could be accessed with a relative filename as long as the process'​ current working directory was c:\class: 
- 
-  simple.xml 
- 
- 
-== Connection to a remote environment file == 
- 
-This connection string connects to an environment file on a remote machine name '​server1':​ 
- 
-  [server1:​7555]c:​\class\simple.xml 
- 
-== Connection to a remote Omnidex Connection Pool == 
- 
-This connection string connects to a remote Omnidex Connection Pool named '​simple'​ on a remote machine named '​server1'​. ​ Note that the filename is omitted since it is contained in the definition of the Omnidex Connection Pool. 
- 
-  [server1:​7555:​simple] 
- 
-== Connection to a remote environment with options == 
- 
-This connection string connects to an environment file on a remote machine named '​server1'​ using read-only options. 
- 
-  [server1:​7555]c:​\class\simple.xml&​read 
- 
- 
-====== Additional Resources ====== 
- 
-See also:  
- 
-{{page>:​dev:​see_also&​nofooter&​noeditbtn}} 
- 
-{{page>:​bottom_add&​nofooter&​noeditbtn}} 
 
Back to top
dev/connections/home.txt ยท Last modified: 2016/06/28 22:38 (external edit)