sp_iqmodifyadmin procedure

Function

Enables Sybase IQ Login Management for servers and modifies Sybase IQ user account information in the IQ_SYSTEM_LOGIN_INFO_TABLE system table.

Syntax1

call sp_iqmodifyadmin (‘{enable | disable}’, )

Syntax2

call sp_iqmodifyadmin ('option ', value  [, 'server-name'])

Syntax3

sp_iqmodifyadmin ‘{enable | disable}'

Syntax4

sp_iqmodifyadminoption ' , [value] [, 'server-name' ]

Permissions

DBA authority required.

Usage

enable | disable Enables or disables Sybase IQ Login Management. Cannot be specified with the server-name argument.

option Name of the option to change:

value Value to which the named option is set. Values can be integers from 0 through 32767.

server-name Optional parameter allowed only when specifying db_connections. Values are the server name or all servers keyword. The latter removes server level settings and specifies the global default setting.

See also

“sp_iqaddlogin procedure”

“sp_iqmodifylogin procedure”

“LOGIN_PROCEDURE option”

Description

NoteEnabling login management through sp_iqmodifylogin automatically adds existing users to the Sybase IQ Login Management tables. New users added with the GRANT CONNECT command after a database upgrade are not automatically added to the Sybase IQ Login Management tables.

Users added to the database with GRANT CONNECT after IQ Login Management has been enabled or a database upgrade has been done will not be managed by IQ Login Management until IQ Login Management is enabled again.

To identify such users, compare the output of SELECT * FROM SYSUSERPERM and sp_iqlistpasswordexpirations. Users who appear in the SYSUSERPERM table but not in the output of sp_iqlistpasswordexpirations are not managed by IQ Login Management. To manage these users with IQ Login Management, simply enable IQ Login Management again, as follows:

call sp_iqmodifyadmin('enable');

Errors

The following errors may occur. Causes are listed after each error.

Permission denied: You do not have permission to execute the procedure sp_iqmodifyadmin.

Cause: A user without DBA role tried to execute sp_iqmodifyadmin.

RAISERROR executed: "The number of connections allowed must specified and be greater than or equal to zero and less than or equal to 32767."

Cause: A value other than 0 through 32767 was entered for user_connections.

RAISERROR executed: "The number of connections allowed must specified and be greater than or equal to zero and less than or equal to 32767."

Cause: A value other than 0 through 32767 was entered for db_connections.

RAISERROR executed: "The number of days the password is valid must specified and be greater than or equal to zero and less than or equal to 32767."

Cause: A value other than 0 through 32767 was entered for password_expiration.

RAISERROR executed: "The number of days to warn before a password expires must specified and be greater than or equal to zero and less than or equal to 32767."

Cause: A value other than 0 through 32767 was entered for password_warning.

RAISERROR executed: "Invalid input was supplied to sp_iqmodifyadmin. Valid options are: enable, disable, user_connections, db_connections, password_warning, password_expiration."

Cause: Invalid data was entered somewhere in the command.

RAISERROR executed: "Server name <server name> not found."

Cause: server name value specified did not match a valid server name in IQ_MPX_INFO.

RAISERROR executed: "Server name parameter not allowed with this option."

Cause: server name value was specified for an option other than 'db_connections'

RAISERROR executed: "Server name parameter not allowed with this option in non-multiplex mode."

Cause: procedure was called with server name argument in a nonmultiplex environment

Examples

The following procedure calls set the maximum number of connections to the database at 200. They do not enable or disable Sybase IQ Login Management.

call sp_iqmodifyadmin ('db_connections', 200)
sp_iqmodifyadmin 'db_connections', 200

If Sybase IQ Login Management is not enabled, this change is not enforced.

The following statement changes the per-server connection limit to 20 on server master:

sp_iqmodifyadmin('user_connections', 20, 'master'