Table 7-75 describes the Adaptive Server Enterprise system procedures provided in Sybase IQ.
System procedure |
Description |
Permissions |
---|---|---|
sp_addgroup group-name |
Adds a group to a database |
Requires DBA or PERMS ADMIN to change an existing user to a group. Requires DBA or USER ADMIN and PERMS ADMIN to create a new user and change to a group. |
sp_addlogin userid, password[, defdb [, deflanguage [, fullname]]] |
Adds a new user account to a database |
Requires DBA or USER ADMIN authority. |
sp_addmessage message-num, message_text [, language] |
Adds user-defined messages to SYSUSERMESSAGES for use by stored procedure PRINT and RAISERROR calls |
Requires DBA or RESOURCE authority. |
sp_addtype typename, data-type, [, "identity" | nulltype] |
Creates a user-defined data type. Sybase IQ does not support IDENTITY columns. |
Requires DBA or RESOURCE authority. |
sp_adduser userid [, name_in_db [, grpname]] |
Adds a new user to a database |
Requires DBA or USER ADMIN authority to create a new user. Requires DBA or USER ADMIN and PERMS ADMIN authority to create a new user and add the user to the group specified. |
sp_changegroup new-group-name, userid |
Changes a user's group or adds a user to a group |
Requires DBA or PERMS ADMIN authority. |
sp_dboption [dbname, optname, {true | false}] |
Displays or changes database options |
None required. |
sp_dropgroup group-name |
Drops a group from a database |
Requires DBA or PERMS ADMIN authority. |
sp_droplogin userid |
Drops a user from a database |
Requires DBA or USER ADMIN authority. |
sp_dropmessage message-number [, language] |
Drops user-defined messages |
Requires DBA or RESOURCE authority. |
sp_droptype typename |
Drops a user-defined data type |
Requires DBA or RESOURCE authority. |
sp_dropuser userid |
Drops a user from a database |
Requires DBA or USER ADMIN authority. |
sp_getmessage message-num, @msg-var output [, language] |
Retrieves stored message strings from SYSUSERMESSAGES for PRINT and RAISERROR statements. |
None required. |
sp_helptext 'owner.object-name' |
Displays the text of a system procedure or view |
None required. |
sp_password caller_passwd, new_passwd [, userid] |
Adds or changes a password for a user ID |
Requires DBA authority or PERMS ADMIN authority for users without DBA authority to change the passwords of other users. You may change your own password without these authorities. |
Procedures like sp_dropuser provide
minimal compatibility with Adaptive Server Enterprise stored procedures.
If you are accustomed to Adaptive Server Enterprise (or Sybase IQ 11.x)
stored procedures, compare their text with Sybase IQ 12 procedures
before using the procedure in dbisql. To compare,
use the command:
sp_helptext 'owner.procedure_name'
For system stored procedures delivered by Sybase, the owner is always dbo. To see the text of a stored procedure of the same name owned by a different user, you must specify that user, for example:
sp_helptext 'myname.myprocedure'