GRANT LOGON does either of the following:
- Gives specific users permission to log on to the database from one or more specific client systems.
- Changes the current system logon defaults.
Required Privileges
You must have the EXECUTE privilege on the DBC.LogonRule macro to perform GRANT LOGON.
Syntax
GRANT LOGON ON { host_id [,...] | ALL } { AS DEFAULT | { TO | FROM } user_name [,...] } [ WITH NULL PASSWORD ] [;]
Syntax Elements
- host_id
- A mainframe connection or a workstation network connection that is currently defined to the system by the hardware configuration data. The interface need not be operational.
- ALL
- Any source through which a logon is attempted, including the system console.
- AS DEFAULT
- The current default for the specified host_id set is to be changed, without residual conditions, as defined in this GRANT LOGON statement. A statement with AS DEFAULT has no effect on the access granted to or revoked from particular user names.
- TO
- FROM
- The clause that specifies the recipient of the GRANT results.
- user_name
- One or more user names whose current system logon defaults are to be changed.
- You cannot specify the name DBC as a user name in a GRANT LOGON statement. A statement that includes this name returns an error message.
- The product of the number of host IDs times the number of user names cannot exceed 25.
- WITH NULL PASSWORD
- Permits a logon string that has no password to be accepted from the specified client system community.