1 Version 4.0 -- 1/15/89 sp_depends
______________________________________________________________________
NAME: sp_depends
FUNCTION:
Displays information about database object dependencies-the
view(s), trigger(s), and procedure(s) that depend on the table or
view specified, and the table(s) and view(s) that are depended on
by the view, trigger, or procedure specified.
SYNTAX:
sp_depends objname
EXAMPLES:
sp_depends Version 4.0 -- 1/15/89 2
______________________________________________________________________
1) sp_depends sysobjects
Lists the database objects that depend on the table sysob-
jects.
2) sp_depends titleview
Things the object references in the current database.
object type updated selected
-------------------- ---------------- ------- --------
dbo.authors user table no no
dbo.titleauthor user table no no
dbo.titles user table no no
Things inside the current database that reference the object.
3 Version 4.0 -- 1/15/89 sp_depends
______________________________________________________________________
object type
--------------------- ---------------
dbo.tview2 view
PARAMETERS:
objname - is the name of the database object that you want to
examine for dependencies. It can be a table, view, stored
procedure, or trigger.
COMMENTS:
o Executing sp_depends lists all the objects, if any, that depend
on objname; and all the objects, if any, that objname depends
on. For example, views depend on one or more tables and can
have procedures or other views that depend on them.
o The sp_depends procedure determines the dependencies by looking
sp_depends Version 4.0 -- 1/15/89 4
______________________________________________________________________
at sysdepends.
o An object that references another object is considered depen-
dent on that object.
o The updated and selected columns in the report from sp_depends
are meaningful if the object being reported on is a stored pro-
cedure or trigger. The values in these columns indicate
whether the stored procedure or trigger updates or selects from
that object.
o References to objects outside the current database are not
reported.
MESSAGES:
The object name supplied for the objname parameter does not exist
in the current database.
These are the objects in the current database that objname
depends on.
5 Version 4.0 -- 1/15/89 sp_depends
______________________________________________________________________
These are the objects in the current database that reference
objname.
Nothing depends upon objname and objname doesn't reference any
objects.
You cannot reference an object that is not in your current data-
base.
PERMISSIONS:
Execute permission to public.
TABLES USED:
sysdepends, sysobjects, master.dbo.spt_values,
master.dbo.sysdatabases
SEE ALSO:
sp_help, CREATE PROCedure, CREATE TABLE, CREATE VIEW, EXECute,
Views