sp_iqaddlogin Procedure

Adds a new SAP Sybase IQ user account to the specified login policy.

Syntax1

call sp_iqaddlogin (‘username_in’, ‘pwd’, [ ’password_expiry_on_next_login ’] [ , ’policy_name ’] )

Syntax2

sp_iqaddloginusername_in’, ‘pwd’, [ ’password_expiry_on_next_login ’] [ , ’policy_name ’] 

Syntax3

sp_iqaddlogin username_in, pwd, [ password_expiry_on_next_login ] [ , policy_name ] 

Usage

Parameter

Description

username_in

The user’s login name. Login names must conform to the rules for identifiers

pwd

The user’s password. Passwords must conform to rules for passwords, that is, they must be valid identifiers.

password_expiry_on_next_login

(Optional) Specifies whether user’s password expires as soon as this user’s login is created. Default setting is OFF (password does not expire).

policy_name

(Optional) Creates the user under the named login policy. If unspecified, user is created under the root login policy.

A username_in/pwd created using sp_iqaddlogin and set to expire in one day is valid all day tomorrow and invalid on the following day. In other words, a login created today and set to expire in n days are not usable once the date changes to the (n+1)th day.

Privileges

Requires the MANAGE ANY USER system privilege.

Description

Adds a new SAP Sybase IQ user account, assigns a login policy to the user and adds the user to the ISYSUSER system table. If the user already has a user ID for the database but is not in ISYSUSER, (for example, if the user ID was added using the GRANT CONNECT statement or Sybase Control Center), sp_iqaddlogin adds the user to the table.

If you do not specify a login policy name when calling the procedure, SAP Sybase IQ assigns the user to the root login policy.

Note: If the maximum number of logins for a login policy is unlimited, then a user belonging to that login policy can have an unlimited number of connections.

The first user login forces a password change and assigns a login policy to the newly created user. Use CREATE USER to create new users, although, for backward compatibility, sp_iqaddlogin is still supported.

Examples

These calls add the user rose with a password irk324 under the login policy named expired_password. This example assumes the expired_password login policy already exists.

call sp_iqaddlogin('rose', 'irk324', 'ON', 'expired_password')
sp_iqaddlogin 'rose','irk324', 'ON', 'expired_password'