When you connect to the server, specify a single-byte hyphen (-) for both the authorization identifier and the password. This indicates that the facility for simple authentication of OS login users is to be used for authentications. This hyphen is referred to as the simple authentication keyword.
You can specify the simple authentication keyword with the following:
- PDUSER client environment definitions
You can specify the keyword for environment variable groups, user environment variables, and default settings (HiRDB.ini).
- Example:
- UNIX shell's PDUSER environment variable
export PDUSER='"-"/"-"'
- Command options provided by HiRDB
You can specify the keyword with operation commands and utilities.
- Arguments of server connection functions and properties provided by HiRDB
You can specify the keyword with an ODBC driver, a JDBC driver, a .NET data provider, and an OLE data provider.
- Example:
- Server connection function of an ODBC driver
SQLConnect(hdbc, "DSN", 3, "-", 1, "-", 1); // authorization-identifier "-", password "-"
- Arguments of SQL statements embedded in source files
You can specify the keyword in source files in which C/C++, COBOL, or SQLJ SQL statements are embedded.
- Example:
- Embedded C/C++ SQL statements
char xuserid[31] = "-"; // authorization-identifier "-"
char xpasswd[31] = "-"; // password "-"
EXEC SQL CONNECT USER :xuserid IDENTOFIED :xpasswd; // Connection established
- Note
- An attempt to establish a connection to the HiRDB server will fail in the following cases:
- The user name used to log in to the OS is longer than a user name permitted for simple authenticated users (the KFPA11564-E message is output).
- Acquisition of the user name used to log in to the OS failed (the KFPA11731-E message is output).
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.