![]() | ![]() |
Home |
|
|
Reference Manual All Volumes (Online Only) |
|
| Chapter 3: System Procedures |
This chapter describes the system procedures, which are Sybase-supplied stored procedures used for updating and getting reports from system tables. Table 3-1 lists the system procedures discussed in this chapter.
Procedure | Description |
|---|---|
Displays all active roles granted to a user's login. | |
Allows an Adaptive Server user to be known in a database as another user. | |
Allows users to enter user-defined audit records (comments) into the audit trail. | |
Adds another system audit table after auditing is installed. | |
Adds an engine to an existing engine group or, if the group does not exist, creates an engine group and adds the engine. | |
Creates or updates a user-defined execution class that you can bind to client applications, logins, and stored procedures. | |
Creates an extended stored procedure (ESP) in the master database. | |
(Component Integration Services only) Assigns an alternate login name and password to be used when communicating with a remote server. | |
Adds a group to a database. Groups are used as collective names in granting and revoking privileges. | |
Defines the names of the months and days, and the date format, for an alternate language. | |
Adds a new user account to Adaptive Server. | |
Adds user-defined messages to sysusermessages for use by stored procedure print and raiserror calls and by sp_bindmsg. | |
(Component Integration Services only) Specifies the mapping between a local table and an external storage location. | |
Authorizes a new remote server user by adding an entry to master.dbo.sysremotelogins. | |
Creates a limit on the amount of server resources that a login or application can use to execute a query, query batch, or transaction. | |
Defines a segment on a database device in the current database. | |
Defines a remote server or defines the name of the local server. | |
Creates a threshold to monitor space on a database segment. When free space on the segment falls below the specified level, Adaptive Server executes the associated stored procedure. | |
Adds a named time range to Adaptive Server. | |
Creates a user-defined datatype. | |
Adds a dump device to Adaptive Server. | |
Adds a new user to the current database. | |
Enables and disables the logging of a specific system-defined or user-defined message in the Adaptive Server error log. | |
Allows a System Security Officer to configure auditing options. | |
(Component Integration Services only) Defines a passthrough connection to a remote server for a specific user, which allows the named user to enter passthrough mode automatically at login. | |
Binds a database, table, index, text object, or image object to a data cache. | |
Binds a user-defined default to a column or user-defined datatype. | |
Associates an execution class with a client application, login, or stored procedure. | |
Binds a user message to a referential integrity constraint or check constraint. | |
Binds a rule to a column or user-defined datatype. | |
Creates, configures, reconfigures, drops, and provides information about data caches. | |
Enables or disables prefetching (large I/O) and MRU cache replacement strategy for a table, index, text object, or image object. | |
Changes the owner of a database. | |
Changes a user's group. | |
Checks the current database for names that contain characters not in the 7-bit ASCII set. | |
Detects and displays identifiers that are Transact-SQL reserved words. Checks server names, device names, database names, segment names, user-defined datatypes, object names, column names, user names, login names, and remote login names. | |
Changes the max_rows_per_page value for future space allocations of a table or index. | |
Clears the execution attributes of the client application, login, or stored procedure that was set by sp_setpsexe. | |
Initiates a new accounting period for all server users or for a specified user. Prints statistics for the previous period by executing sp_reportstats. | |
Defines a common key¾columns that are frequently joined¾between two tables or views. | |
Displays or changes configuration parameters. | |
Displays the number of user indexes, objects, or databases in a server. | |
Reports information about a specific cursor or all cursors that are active for your session. | |
Displays or changes database options. | |
Forces Adaptive Server to recognize changes made by alter database. Run this procedure only when instructed to do so by an Adaptive Server message. | |
(Component Integration Services only) Defines a default storage location for objects in a local database. | |
Displays information about database object dependencies¾the view(s), trigger(s), and procedure(s) that depend on a specified table or view, and the table(s) and view(s) that the specified view, trigger, or procedure depends on. | |
Specifies whether or not a database device can be used for database storage if the user does not specify a database device or specifies default with the create database or alter database commands. | |
Sets or shows which Adaptive Server configuration parameters appear in sp_configure output. | |
Displays information about a login account. | |
Displays all roles granted to another role, or displays the entire hierarchy tree of roles in table format. | |
Removes the alias user name identity established with sp_addalias. | |
Drops an Adaptive Server database device or dump device. | |
Drops an engine from a specified engine group or, if the engine is the last one in the group, drops the engine group. | |
Drops a user-defined execution class. | |
Removes an ESP from the master database. | |
(Component Integration Services only) Drops the definition of a remote login previously defined to the local server by sp_addexternlogin. | |
Removes lock promotion values from a table or database. | |
Drops a group from a database. | |
Removes a key defined with sp_primarykey, sp_foreignkey, or sp_commonkey from the syskeys table. | |
Drops an alternate language from the server and removes its row from master.dbo.syslanguages. | |
Drops an Adaptive Server user login by deleting the user's entry in master.dbo.syslogins. | |
Drops user-defined messages from sysusermessages. | |
(Component Integration Services only) Deletes the external storage mapping provided for a local object. | |
Drops a remote user login. | |
Removes one or more resource limits from Adaptive Server. | |
Drops a segment from a database or unmaps a segment from a particular database device. | |
Drops a server from the list of known servers. | |
Removes a free-space threshold from a segment. | |
Removes a user-defined time range from Adaptive Server. | |
Drops a user-defined datatype. | |
Drops a user from the current database. | |
Estimates the amount of space required for a table and its indexes, and the time needed to create the index. | |
Extends the range of a segment to another database device. | |
Reports information about all the locks held by a family (coordinating process and its worker processes) executing a statement in parallel. | |
Provides access to all the pages in a database that were previously taken offline by recovery. | |
Provides access to pages previously taken offline by recovery. | |
Defines a foreign key on a table or view in the current database. | |
Unloads a dynamic link library (DLL) that was previously loaded into XP Server memory to support the execution of an ESP. | |
Retrieves stored message strings from sysmessages and sysusermessages for print and raiserror statements. | |
(Windows NT only) When Integrated Security mode or Mixed mode (with Named Pipes) is active, assigns Adaptive Server roles or default permissions to Windows NT users and groups. | |
Reports information about a database object (any object listed in sysobjects) and about Adaptive Server-supplied or user-defined datatypes. | |
Lists the first page and the control page for each partition in a partitioned table. | |
Displays information about the objects that are bound to a data cache or the amount of overhead required for a specified cache size. | |
Reports help information about configuration parameters, such as how much memory is needed if the parameter is set to a certain value. sp_helpconfig displays the current setting, the amount of memory used for that setting, the default value, and the minimum and maximum settings. | |
Reports information about any integrity constraints specified for a table. This information includes the constraint name and the definition of the bound default, unique or primary key constraint, referential constraint, or check constraint. sp_helpconfig also displays the number of references used by the specified tables. | |
Reports information about a particular database or about all databases. | |
Reports information about a particular device or about all Adaptive Server database devices and dump devices. | |
Displays ESPs registered in the current database, along with their associated DLL files. | |
(Component Integration Services only) Reports information about external login names. | |
Reports information about a particular group or about all groups in the current database. | |
Reports information about the indexes created on a table. | |
Lists the columns in two tables or views that are likely join candidates. | |
Reports information about a primary, foreign, or common key of a particular table or view, or about all keys in the current database. | |
Reports information about a particular alternate language or about all languages. | |
Reports the name of the device that contains the first page of the transaction log. | |
(Component Integration Services only) Reports information about remote object definitions. Shows owners, objects, type, and definition. | |
Reports information about a particular remote server's logins or about all remote servers' logins. | |
Reports information about all resource limits, limits for a given login or application, limits in effect at a given time or day of the week, or limits with a given scope or action. | |
Reports information about permissions for database objects, users, groups, or roles. | |
Reports information about a particular segment or about all segments in the current database. | |
Reports information about a particular remote server or about all remote servers. | |
Displays Adaptive Server's default sort order and character set. | |
Prints the text of a system procedure, trigger, view, default, rule, or integrity check constraint. | |
Reports the segment, free-space value, status, and stored procedure associated with all thresholds in the current database or all thresholds for a particular segment. | |
Reports information about a particular user or about all users in the current database. | |
Checks user tables for indexes marked as suspect during recovery following a sort order change. | |
Lists all databases that have offline pages because of corruption detected on recovery. | |
Lists all pages that are currently offline because of corruption detected on recovery. | |
Reports information about processes that currently hold locks. | |
Locks an Adaptive Server account so that the user cannot log in, or displays a list of all locked accounts. | |
Moves the transaction log of a database with log and data on the same device to a separate database device. | |
(Windows NT only) Displays the value of one or all integrated security parameters. | |
(Windows NT only) Displays all roles granted to Windows NT users and groups with sp_grantlogin. | |
Changes the log I/O size used by Adaptive Server to a different memory pool when it is doing I/O for the transaction log of the current database. | |
Modifies the default database, default language, default role activation, or full name for an Adaptive Server login account. | |
Changes a resource limit by specifying a new limit value or the action to take when the limit is exceeded, or both. | |
Modifies a threshold by associating it with a different threshold procedure, free-space level, or segment name. You cannot use sp_modifythreshold to change the amount of free space or the segment name for the last-chance threshold. | |
Changes the start day, start time, end day, and/or end time associated with a named time range. | |
Displays statistics about Adaptive Server. | |
Displays cache usage statistics regarding metadata descriptors for indexes, objects, and databases, such as the number of metadata descriptors currently in use by Adaptive Server. Also reports the number of auxiliary scan descriptors in use. | |
(Component Integration Services only) Allows the user to pass a SQL command buffer to a remote server. | |
Adds or changes a password for an Adaptive Server login account. | |
Puts future space allocations for a table or an index on a particular segment. | |
Creates, drops, resizes, and provides information about memory pools within data caches. | |
Defines a primary key on a table or view. | |
(Windows NT only) Reads, processes, sends, and deletes messages in the Adaptive Server message inbox. | |
Displays the query processing mode of a stored procedure, view, or trigger. | |
Displays or changes the transaction modes associated with stored procedures. | |
Causes each stored procedure and trigger that uses the named table to be recompiled the next time it runs. | |
Remaps a stored procedure, trigger, rule, default, or view from releases later than 4.8 and earlier than 10.0 to be compatible with releases 10.0 and later. Use sp_remap on pre-release 11.0 objects that the release 11.0 upgrade procedure failed to remap. | |
Displays or changes remote login options. | |
(Component Integration Services only) Establishes a connection to a remote server, passes a query buffer to the remote server from the client, and relays the results back to the client. | |
Changes the name of a user-created object or user-defined datatype in the current database. | |
Changes the name of a database. You cannot rename system databases or databases with external referential integrity constraints. | |
Reports statistics on system usage. | |
(Windows NT only) When Integrated Security mode or Mixed mode (with Named Pipes) is active, revokes Adaptive Server roles and default permissions from Windows NT users and groups. | |
Grants or revokes system roles to an Adaptive Server login account. | |
Displays or changes remote server options. | |
Assigns or changes the alias for an alternate language. | |
Sets or changes the lock promotion thresholds for a database, for a table, or for Adaptive Server. | |
Sets custom execution attributes "on the fly" for an active client application, login, or stored procedure. | |
Displays and sets the recovery fault isolation mode. | |
On recovery, sets the maximum number of suspect pages that Adaptive Server will allow in the specified database before taking the entire database offline. | |
Displays information about engine group assignments, bound client applications, logins, and stored procedures. | |
Displays the execution class attributes and the engines in any engine group associated with the specified execution class. | |
Displays the query plan for any user connection for the current SQL statement (or a previous statement in the same batch). The query plan is displayed in showplan format. | |
Displays execution class, current priority, and affinity for all processes running on Adaptive Server. | |
Displays estimates of the number of rows, the number of data pages, and the space used by one table or by all tables in the current database. | |
Displays the syntax of Transact-SQL statements, system procedures, utilities, and other routines, depending on which products and corresponding sp_syntax scripts exist on Adaptive Server. | |
Displays performance information. | |
Executes automatically when the number of free pages on the log segment falls below the last-chance threshold, unless the threshold is associated with a different procedure. Sybase does not provide this procedure. | |
Unbinds a database, table, index, text object, or image object from a data cache. | |
Unbinds all objects that are bound to a cache. | |
Unbinds a created default value from a column or from a user-defined datatype. | |
Unbinds a database, table, index, text object, or image object from a data cache. | |
Unbinds a user-defined message from a constraint. | |
Unbinds a rule from a column or from a user-defined datatype. | |
Notifies the Backup Server(TM) that the operator performed the requested volume handling during a dump or load. | |
Reports information about all current Adaptive Server users and processes or about a particular user or process. |
|
| Introduction to System Procedures |
|
| Manual Pages for System Procedures |
|
|