Adds a new Sybase IQ user account.
call sp_iqaddlogin (‘userid’, ‘password’, [ number_of_connections ] [ , password_expiration ] )
sp_iqaddlogin ‘userid’, ‘password’, [ number_of_connections ] [ , password_expiration ]
sp_iqaddlogin userid, password, [ number_of_connections ] [ , password_expiration ]
DBA authority required.
userid The user’s login name. Login names must conform to the rules for identifiers.
password The user’s password. Passwords must conform to Adaptive Server Anywhere rules for passwords, that is, they must be valid identifiers.
number_of_connections Maximum number of concurrent database connections for the user. Default is 0: Sybase IQ does not enforce a maximum number of connections.
password_expiration Password expiration interval, in days. Must be a value from 0 through 32767. Default is 0: the password does not expire. You cannot set a password expiration for the user DBA.
A userid/password 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.
Chapter 12, “Managing User IDs and Permissions,” in Sybase IQ System Administration Guide
Adds a new Sybase IQ user account, specifies the number of concurrent logins the user might have and the password expiration interval, and adds the user to the IQ_USER_LOGIN_INFO_TABLE system table. If the user already has a user ID for the database but is not in IQ_USER_LOGIN_INFO_TABLE (for example, if the user ID was added using the GRANT CONNECT statement or Sybase Central), sp_iqaddlogin adds the user to the table.
By default, you can add users with sp_iqaddlogin only on a multiplex write server. To enable sp_iqaddlogin on query servers, you must set the database option MPX_LOCAL_SPEC_PRIV to change the default. For details, see “MPX_LOCAL_SPEC_PRIV option”.
You must add users with sp_iqaddlogin to manage them with the Sybase IQ Login Management facility.
The following errors might occur. Causes are listed after each error.
Permission denied: you do not have permission to execute the procedure sp_iqaddlogin.
Cause: A user without DBA role tried to execute sp_iqaddlogin.
RAISERROR executed: User <loginname> already exists.
Cause: The message appears if a user being created already exists for the database.
RAISERROR executed: "NUMBER_OF_CONNECTIONS must be greater than or equal to zero and less than of equal to 32767."
Cause: Number of connections value was something other than 0 through 32767.
RAISERROR executed: "PASSWORD_EXPIRATION must be greater than or equal to zero and less than or equal to 32767."
Cause: Number of days for password expiration was something other than 0 through 32767.
The following stored procedure calls add the user rose and allow that user 5 concurrent connections with a password irk324 that expires in 180 days.
call sp_iqaddlogin ('rose','irk324',5,180)
sp_iqaddlogin 'rose','irk324',5,180