Adds a new Sybase IQ user account to the specified login policy.
call sp_iqaddlogin (‘username_in’, ‘pwd’, [ ’password_expiry_on_next_login ’] [ , ’policy_name ’] )
sp_iqaddlogin ‘username_in’, ‘pwd’, [ ’password_expiry_on_next_login ’] [ , ’policy_name ’]
sp_iqaddlogin username_in, pwd, [ password_expiry_on_next_login ] [ , policy_name ]
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.
Requires DBA authority.
CREATE USER Statement in Chapter 1, “SQL Statements,” in Reference: Statements and Options.
Adds a new 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 Central), sp_iqaddlogin adds the user to the table.
If you do not specify a login policy name when calling the procedure, Sybase IQ assigns the user to the root login policy.
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. Sybase recommends that you use CREATE USER to create new users, although, for backward compatibility, sp_iqaddlogin is still supported.
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'