Adds a new IQ user account.
call sp_iqaddlogin (‘loginname’, ‘password’, [ number_of_connections ] [ , password_expiration ] )
sp_iqaddlogin ‘loginname’, ‘password’, [ number_of_connections ] [ , password_expiration ]
sp_iqaddlogin loginname, password, [ number_of_connections ] [ , password_expiration ]
DBA authority required.
loginname 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: 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.
Chapter 12, “Managing User IDs and Permissions” in Sybase IQ System Administration Guide
Adds a new IQ user account, specifies the number of concurrent logins the user may 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.
You must add users with sp_iqaddlogin in order to manage them with the Sybase IQ User Administration facility.
The following errors may 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 will appear 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