DB2 Version 10.1 for Linux, UNIX, and Windows

CONNECT statement syntax enhancements

You can specify additional CONNECT statement syntax, when you set the precompiler option COMPATIBILITY_MODE to ORA.

In your C and C++ embedded SQL applications, a database connection can be established with one of the following CONNECT statements:
When you set the precompiler option COMPATIBILITY_MODE to ORA, you can also specify the following CONNECT statement syntax:
EXEC SQL CONNECT [ username IDENTIFIED BY password ][ USING  dbname ] ;
The parameters are described in the following table:
Parameter Description
username Either a host variable or a string that specifies the database user name
password Either a host variable or a string that specifies the password
dbname Either a host variable or a string that specifies the database name