User IDs and database authorization
The CONNECT statement specifies a user ID and password to be used for checking the permissions for any dynamic SQL statements that are used in the program (defined in Dynamic SQL statements
). It is also used for authorization of any static statements that are contained in modules preprocessed without the SQL preprocessor -l option. The -l option provides user identification.
Static SQL statements in modules that are preprocessed with the -l option will have the authorization checked at execution time using the user ID and password specified with the -l option. This is how privileged commands can be executed by non-privileged users under C program control.