Please enable JavaScript to view this site.

ESL Documentation

Direct Command

Log the user into a SQL Server or Datasource.

login SERVER_NAME [HOST_NAME USER_NAME [PASSWORD [ENCRYPTION]]]

SERVER_NAME 

A string value representing the name of the server or datasource to which you wish to connect.

(SQL Server only.) To use a NULL server name, use a pair of double quotes ("") in place of SERVER_NAME. This is required when using ESL SQL Executable Support commands on a standalone machine (where one machine is both the client and the server).

(ORACLE only.) If you use LOCAL for SERVER_NAME, you are logged into the local default database. If SERVER_NAME is not LOCAL, the USER_ NAME and SERVER_NAME are combined into an SQL*Net string.

 

HOST_NAME

A string value representing the name of the host. This name will appear in the Sysprocesses table in the master database, and identifies the machine that is logged onto the server. You may use any name.

 

(ORACLE and ODBC.) HOST_NAME is not used; however, if the credentials are required, then include at least one non-whitespace character as a placeholder.

We recommend using " ".

 

USER_NAME 

A string value representing the name of the user. Make sure that the named user has the required privileges for the database. With ODBC, Windows Authentication can be used by not including the USER_NAME and PASSWORD parameters.

 

PASSWORD

A string value representing the user's password. If the USER_NAME has an associated password, you must include it with the command. If no password is associated with the USER_NAME, you do not need to specify anything here. The PASSWORD must not be included if Windows Authentication is being used.

 

ENCRYPTION

(SYBASE only.)

Any non-blank character that must be separated by a minimum of a white-space from the PASSWORD string.  This flag is only valid for the Sybase executable and indicates that the password must be encrypted before being passed across the network to Host database server. The encryption technique is negotiated between the Database on the Host server and the Client PC.

Description

Note: Not applicable to DB/2, as it provides its own login facility through StartDB command.

This command logs the user into a SQL Server. The user must be logged onto a server before any SQL requests can be processed.

If the SQL Server connection is not available, this command times out after 60 seconds.

Example

response to start 

start local SQL "eslsqlms" 

 send "login " ServerName " " HostName " " UserName " " PassWord "\n" to SQL

  # This example uses a null SERVER_NAME

  send "login \"\" " HostName " " UserName " " PassWord "\n" to SQL