|
Sybernet / Supplied Procedures Reference
Release 3.00 Dec 18, 2005 |
|
This procedure is used by Sybernet and Sybercron to determine the attributes of an object, such as whether or not the object exists. In addition to all of the columns from sysobjects, this procedure also returns db_id, db_name, and owner as output parameters.
procedure sp_sysobjects
(
@procname varchar(92)
, @name varchar(30) = null output
, @id int = null output
, @uid int = null output
, @type char(2) = null output
, @userstat smallint = null output
, @sysstat smallint = null output
, @indexdel smallint = null output
, @schemacnt smallint = null output
, @sysstat2 int = null output
, @crdate datetime = null output
, @expdate datetime = null output
, @deltrig int = null output
, @instrig int = null output
, @updtrig int = null output
, @seltrig int = null output
, @ckfirst int = null output
, @cache smallint = null output
, @audflags int = null output
, @objspare int = null output
, @versionts binary(12) = null output
, @loginame varchar(30) = null output
, @db_id int = null output
, @db_name varchar(30) = null output
, @owner varchar(30) = null output
)
| Parameter | Description |
|---|---|
procname |
Object to be examined. This name should be fully qualified if this object resides in another database. |
The following example illustrates how to call SP_SYSOBJECTS:
declare
@id int
, @crdate datetime
begin
exec sp_sysobjects
@procname = 'http.dbo.sp_html_who'
, @id = @id output
, @crdate = @crdate output
if (@id is null)
select 'This object does not exist.'
else
select 'This object (' || convert(varchar,@id) || ') was created on ' || convert(varchar,@crdate) || '.'
end