T-SQL: sp_MSdependencies Flags parameter
Asked Answered
D

1

5

can anybody tell me what are valid values for the flags parameter of the

sp_MSdependencies stored procedure

and especially what do they mean.

Dratted answered 5/1, 2011 at 16:37 Comment(0)
O
8

Running this will enumerate the options for you.

exec sp_MSdependencies '?'

Returns:

sp_MSobject_dependencies name = NULL, type = NULL, flags = 0x01fd
  name:  name or null (all objects of type)
  type:  type number (see below) or null
      if both null, get all objects in database
  flags is a bitmask of the following values:
      0x10000  = return multiple parent/child rows per object
      0x20000  = descending return order
      0x40000  = return children instead of parents
      0x80000  = Include input object in output result set
      0x100000 = return only firstlevel (immediate) parents/children
      0x200000 = return only DRI dependencies
      power(2, object type number(s))  to return in results set:
          0 (1      - 0x0001)    - UDF
          1 (2      - 0x0002)    - system tables or MS-internal objects
          2 (4      - 0x0004)    - view
          3 (8      - 0x0008)    - user table
          4 (16     - 0x0010)    - procedure
          5 (32     - 0x0020)    - log
          6 (64     - 0x0040)    - default
          7 (128    - 0x0080)    - rule
          8 (256    - 0x0100)    - trigger
          12 (1024  - 0x0400) - uddt
      shortcuts:
          29     (0x011c) - trig, view, user table, procedure
          448   (0x00c1) - rule, default, datatype
          4606 (0x11fd) - all but systables/objects
          4607 (0x11ff) - all
Onepiece answered 5/1, 2011 at 17:23 Comment(1)
That's amazing, didn't know about '?' parameter. For a moment I thought that it could be used everywhere, but it seems that its just an exception. I am using 1315327 flag (0x1411FF). I randomly tried others 0x415FF and I don't know how they are added, it doesn't make much sense to me and it looks like its deprecated and there is no documentation.Cleanshaven

© 2022 - 2024 — McMap. All rights reserved.