sp_depends

Adaptive Server 15.7 SP100 introduces a new option in the sp_depends system procedure to display information about precomputed result sets.

sp_depends

sp_depends displays information about precomputed result sets. The syntax is:
sp_depends precomputed_result_set_name[, column_name]
Where:
  • precomputed_result_set_name – is the name of the precomputed result set for which you are checking dependencies.
  • column_name – is the name of the column on which you are checking dependencies.
sp_depends displays information about:
  • Table and view dependencies in the database on which the specified precomputed result set depends
  • Views in the database that depend on the precomputed result set
  • Precomputed result set column dependencies and unique constraints defined in either the column specified, if you provide a column_name, or on all the columns in the precomputed result set, if you do not provide a column_name
The following examples assume that prs1 and view1 are created with the following dependency structure:
  • prs1 is defined on base table tab1 (with unique constraint on column c1) and view1 is defined on prs1
  • prs1 is configured for immediate refresh
This example displays the dependencies for table tab1, which includes a dependency on the prs1 precomputed result set:
sp_depends tab1

Things inside the current database that reference the object.

Object                        type
--------                      ---------------------- 
dbo.prs1                      precomputed result set 

The specified column (or all columns, if none was specified) in tab1 
has no dependencies on other objects, and no other object depends on 
any columns from it.
This example displays the precomputed result sets that include dependencies for column c1:
sp_depends prs1,c1
Things the object references in the current database.
object       type           updated    selected         
------------ -------------- ---------- --------- 
dbo.tab1     user table     no         no               

Things inside the current database that reference the object.
object             type     
------------------ -------- 
dbo.view1          view     

Dependent objects that reference column c1.
Columns referenced in stored procedures, views or triggers are not 
included in this report.
Type  Property   Object Names or Column Names Also see/Use command                   
----- ---------- ---------------------------- -------------------- 
index constraint prs1_10240036482 (c1)        sp_helpindex,
                                              drop index,
                                              sp_helpconstraint, 
                                              alter table drop
                                              constraint