DatabaseProcApplicationCreatedLinks
sybsystemprocssp_oledb_gettableprivileges  14 déc. 14Defects Propagation Dependencies

1     
2     /* TABLE_PRIVILEGES Rowset
3     ** http://msdn.microsoft.com/en-us/library/ms725428(v=vs.85)
4     */
5     
6     /* Sccsid = "%Z% generic/sproc/src/%M% %I% %G%" */
7     
8     CREATE OR REPLACE PROCEDURE sp_oledb_gettableprivileges(@table_name VARCHAR(255) = NULL,
9         @table_schema VARCHAR(32) = NULL,
10        @table_catalog VARCHAR(32) = NULL,
11        @grantor VARCHAR(32) = NULL,
12        @grantee VARCHAR(32) = NULL)
13    AS
14        /*Check if the table is a temporary table and we are in the temp db*/
15        IF (@table_name LIKE "#%" AND DB_NAME() != db_name(tempdb_id()))
16        BEGIN
17            /*17676, "This may be a temporary object. Please execute procedure from your temporary database."*/
18            RAISERROR 17676
19            RETURN (1)
20        END
21    
22    
23        /*Check that the database of the table is the current database*/
24        IF (@table_catalog IS NULL) OR (@table_catalog = '')
25            SELECT @table_catalog = DB_NAME()
26    
27        IF (@table_name IS NULL) OR (@table_name = '')
28            SELECT @table_name = '%'
29    
30        IF (@table_schema IS NULL) OR (@table_schema = '')
31            SELECT @table_schema = '%'
32    
33        IF (@grantor IS NULL) OR (@grantor = '')
34            SELECT @grantor = '%'
35    
36        IF (@grantee IS NULL) OR (@grantee = '')
37            SELECT @grantee = '%'
38    
39        /* Adaptive Server has expanded all '*' elements in the following statement */ SELECT DISTINCT
40            GRANTOR,
41            GRANTEE,
42            TABLE_CATALOG,
43            TABLE_SCHEMA,
44            TABLE_NAME,
45            PRIVILEGE_TYPE,
46            IS_GRANTABLE
47            , PREDICATE
48        FROM
49            --explicit grants/revokes
50            (SELECT
51                EXPLICITGRANTS.TABLE_CATALOG, EXPLICITGRANTS.TABLE_SCHEMA, EXPLICITGRANTS.TABLE_NAME, EXPLICITGRANTS.GRANTOR, EXPLICITGRANTS.GRANTEE, EXPLICITGRANTS.PRIVILEGE_TYPE, EXPLICITGRANTS.IS_GRANTABLE, EXPLICITGRANTS.PREDICATE
52            FROM
53                (SELECT
54                    DB_NAME() AS TABLE_CATALOG,
55                    matchinggrantrecords.table_owner AS TABLE_SCHEMA,
56                    matchinggrantrecords.table_name AS TABLE_NAME,
57                    matchinggrantrecords.grantor AS GRANTOR,
58                    posiblegrants.grantee AS GRANTEE,
59                    PRIVILEGE_TYPE =
60                    CASE
61                        WHEN posiblegrants.action = 83 THEN "IDENTITY INSERT"
62                        WHEN posiblegrants.action = 84 THEN "IDENTITY UPDATE"
63                        WHEN posiblegrants.action = 151 THEN "REFERENCES"
64                        WHEN posiblegrants.action = 193 THEN "SELECT"
65                        WHEN posiblegrants.action = 195 THEN "INSERT"
66                        WHEN posiblegrants.action = 196 THEN "DELETE"
67                        WHEN posiblegrants.action = 197 THEN "UPDATE"
68                        WHEN posiblegrants.action = 282 THEN "DELETE STATISTICS"
69                        WHEN posiblegrants.action = 320 THEN "TRUNCATE TABLE"
70                        WHEN posiblegrants.action = 326 THEN "UPDATE STATISTICS"
71                        WHEN posiblegrants.action = 353 THEN "DECRYPT"
72                        WHEN posiblegrants.action = 368 THEN "TRANSFER TABLE"
73                        ELSE "UNKNOWN"
74                    END,
75                    IS_GRANTABLE =
76                    CASE
77                        WHEN matchinggrantrecords.protecttype = 0 AND
78                            (matchinggrantrecords.columns IS NULL OR
79                                matchinggrantrecords.columns = 0x01) THEN CONVERT(BIT, 1)
80                        ELSE CONVERT(BIT, 0)
81                    END
82                    , dbo.sp_drv_getcomment(matchinggrantrecords.predid) AS PREDICATE
83                FROM
84                    (SELECT
85                        actions.action,
86                        dbo.sp_drv_anyprivilege(actions.action) AS any_action,
87                        userrecord.name AS grantee,
88                        userrecord.suid,
89                        userrecord.uid,
90                        userrecord.gid
91                    FROM
92                        (SELECT 151 AS action
93                        UNION
94                        SELECT 193 AS action
95                        UNION
96                        SELECT 195 AS action
97                        UNION
98                        SELECT 197 AS action
99                        UNION
100                       SELECT 196 AS action) AS actions,
101                       (SELECT
102                           name,
103                           suid,
104                           uid,
105                           gid
106                       FROM
107                           sysusers
108                       WHERE
109                           suid > - 2
110                       UNION
111                       SELECT "PUBLIC", 0, 0, 0) AS userrecord) AS posiblegrants
112                   INNER JOIN
113                       (SELECT
114                           tablets.table_id,
115                           USER_NAME(subprotects.grantorid) AS grantor,
116                           subprotects.granteeid,
117                           subprotects.protecttype,
118                           subprotects.action,
119                           subprotects.columns,
120                           subprotects.predid,
121                           tablets.table_owner,
122                           tablets.table_name
123                       FROM
124                           (SELECT
125                               protects.id AS table_id,
126                               protects.grantor AS grantorid,
127                               protects.uid AS granteeid,
128                               protects.protecttype,
129                               protects.action,
130                               protects.predid,
131                               protects.columns
132                           FROM
133                               sysprotects AS protects
134                           WHERE
135                               protects.protecttype < 2) AS subprotects
136                           INNER JOIN
137                               (SELECT
138                                   objects.id AS table_id,
139                                   USER_NAME(objects.uid) AS table_owner,
140                                   objects.name AS table_name
141                               FROM
142                                   sysobjects AS objects
143                               WHERE
144                                   objects.name LIKE @table_name ESCAPE '\' AND
145                                   USER_NAME(objects.uid) LIKE @table_schema ESCAPE '\' AND
146                                   objects.type IN ('S', 'U', 'V')) AS tablets
147                               ON
148                               subprotects.table_id IN (tablets.table_id, 0)) AS matchinggrantrecords
149                       ON
150                       matchinggrantrecords.action IN (posiblegrants.action, posiblegrants.any_action) AND
151                       (posiblegrants.uid = matchinggrantrecords.granteeid OR
152                           --uid NOT IN matching used records AND
153                           (NOT EXISTS (SELECT sysprotects.uid FROM sysprotects WHERE sysprotects.uid = posiblegrants.uid AND sysprotects.action IN (posiblegrants.action, posiblegrants.any_action) AND sysprotects.id IN (matchinggrantrecords.table_id, 0)) AND
154                               --roleid IN matchinggrantrecords OR
155                               (EXISTS (SELECT sysusers.uid FROM (SELECT srid, suid FROM master.dbo.sysloginroles) AS sysloginroles LEFT JOIN (SELECT srid, name FROM master.dbo.syssrvroles) AS syssrvroles ON sysloginroles.srid = syssrvroles.srid LEFT JOIN sysusers ON syssrvroles.name = sysusers.name WHERE sysusers.uid = matchinggrantrecords.granteeid AND sysloginroles.suid = posiblegrants.suid) OR
156                                   --roleid NOT IN matching used records AND
157                                   (NOT EXISTS (SELECT rolelist.suid FROM (SELECT sysprotects.uid, sysprotects.action, sysprotects.id FROM sysprotects) AS usedlist INNER JOIN (SELECT sysusers.uid, sysloginroles.suid FROM master.dbo.sysloginroles AS sysloginroles LEFT JOIN master.dbo.syssrvroles AS syssrvroles ON sysloginroles.srid = syssrvroles.srid LEFT JOIN sysusers ON syssrvroles.name = sysusers.name) AS rolelist ON usedlist.uid = rolelist.uid WHERE usedlist.action IN (posiblegrants.action, posiblegrants.any_action) AND usedlist.id IN (matchinggrantrecords.table_id, 0) AND rolelist.suid = posiblegrants.suid) AND
158                                       --gid IN matchinggrantrecords
159                                       ((posiblegrants.gid != 0) AND (posiblegrants.gid = matchinggrantrecords.granteeid))))))) AS EXPLICITGRANTS
160           UNION
161           --implicit grants
162           SELECT
163               IMPLICITGRANTS.TABLE_CATALOG, IMPLICITGRANTS.TABLE_SCHEMA, IMPLICITGRANTS.TABLE_NAME, IMPLICITGRANTS.GRANTOR, IMPLICITGRANTS.GRANTEE, IMPLICITGRANTS.PRIVILEGE_TYPE, IMPLICITGRANTS.IS_GRANTABLE, IMPLICITGRANTS.PREDICATE
164           FROM
165               (SELECT
166                   DB_NAME() AS TABLE_CATALOG,
167                   tablets.table_owner AS TABLE_SCHEMA,
168                   tablets.table_name AS TABLE_NAME,
169                   "_SYSTEM" AS GRANTOR,
170                   posiblegrants.grantee AS GRANTEE,
171                   PRIVILEGE_TYPE =
172                   CASE
173                       WHEN posiblegrants.action = 83 THEN "IDENTITY INSERT"
174                       WHEN posiblegrants.action = 84 THEN "IDENTITY UPDATE"
175                       WHEN posiblegrants.action = 151 THEN "REFERENCES"
176                       WHEN posiblegrants.action = 193 THEN "SELECT"
177                       WHEN posiblegrants.action = 195 THEN "INSERT"
178                       WHEN posiblegrants.action = 196 THEN "DELETE"
179                       WHEN posiblegrants.action = 197 THEN "UPDATE"
180                       WHEN posiblegrants.action = 282 THEN "DELETE STATISTICS"
181                       WHEN posiblegrants.action = 320 THEN "TRUNCATE TABLE"
182                       WHEN posiblegrants.action = 326 THEN "UPDATE STATISTICS"
183                       WHEN posiblegrants.action = 353 THEN "DECRYPT"
184                       WHEN posiblegrants.action = 368 THEN "TRANSFER TABLE"
185                       ELSE "UNKNOWN"
186                   END,
187                   CONVERT(BIT, 1) AS IS_GRANTABLE
188                   , CONVERT(VARCHAR(255), NULL) AS PREDICATE
189               FROM
190                   (SELECT
191                       actions.action,
192                       dbo.sp_drv_anyprivilege(actions.action) AS any_action,
193                       userrecord.name AS grantee,
194                       userrecord.suid,
195                       userrecord.uid,
196                       userrecord.gid
197                   FROM
198                       (SELECT 151 AS action
199                       UNION
200                       SELECT 193 AS action
201                       UNION
202                       SELECT 195 AS action
203                       UNION
204                       SELECT 197 AS action
205                       UNION
206                       SELECT 196 AS action) AS actions,
207                       (SELECT
208                           name,
209                           suid,
210                           uid,
211                           gid
212                       FROM
213                           sysusers
214                       WHERE
215                           suid > - 2) AS userrecord) AS posiblegrants
216                   INNER JOIN
217                       (SELECT
218                           objects.id AS table_id,
219                           objects.uid AS table_ownerid,
220                           USER_NAME(objects.uid) AS table_owner,
221                           objects.name AS table_name
222                       FROM
223                           sysobjects AS objects
224                       WHERE
225                           objects.name LIKE @table_name ESCAPE '\' AND
226                           USER_NAME(objects.uid) LIKE @table_schema ESCAPE '\' AND
227                           objects.type IN ('S', 'U', 'V')) AS tablets
228                       ON
229                       posiblegrants.uid = tablets.table_ownerid AND
230                       --(the action is not decrypt OR implicit decrypt is enabled) AND
231                       (posiblegrants.action != 353 OR (SELECT value FROM master.dbo.sysconfigures WHERE config = 480) = 0) AND
232                       --uid NOT IN matching used records AND
233                       NOT EXISTS (SELECT sysprotects.uid FROM sysprotects WHERE sysprotects.uid = posiblegrants.uid AND sysprotects.action IN (posiblegrants.action, posiblegrants.any_action) AND sysprotects.id IN (tablets.table_id, 0)) AND
234                       --roleid NOT IN matching used records AND
235                       NOT EXISTS (SELECT rolelist.suid FROM (SELECT sysprotects.uid, sysprotects.action, sysprotects.id FROM sysprotects) AS usedlist INNER JOIN (SELECT sysusers.uid, sysloginroles.suid FROM master.dbo.sysloginroles AS sysloginroles LEFT JOIN master.dbo.syssrvroles AS syssrvroles ON sysloginroles.srid = syssrvroles.srid LEFT JOIN sysusers ON syssrvroles.name = sysusers.name) AS rolelist ON usedlist.uid = rolelist.uid WHERE (usedlist.action = posiblegrants.action OR usedlist.action = posiblegrants.any_action) AND usedlist.id IN (tablets.table_id, 0) AND rolelist.suid = posiblegrants.suid) AND
236                       --gid NOT IN matching used records
237                       NOT EXISTS (SELECT sysprotects.uid FROM sysprotects WHERE sysprotects.uid = posiblegrants.gid AND sysprotects.action IN (posiblegrants.action, posiblegrants.any_action) AND sysprotects.id IN (tablets.table_id, 0))) AS IMPLICITGRANTS) AS COLUMNPRIVILEGES
238       WHERE
239           GRANTOR LIKE @grantor AND
240           GRANTEE LIKE @grantee AND
241           DB_NAME() = @table_catalog
242       ORDER BY
243           TABLE_CATALOG,
244           TABLE_SCHEMA,
245           TABLE_NAME,
246           PRIVILEGE_TYPE
247   
248       RETURN (0)
249   


exec sp_procxmode 'sp_oledb_gettableprivileges', 'AnyMode'
go

Grant Execute on sp_oledb_gettableprivileges to public
go
RESULT SETS
sp_oledb_gettableprivileges_rset_001

DEFECTS
 QCAR 6 Cartesian product between tables tempdb..actions_D1 actions and [tempdb..userrecord_D2 userrecord] 91
 QCAR 6 Cartesian product between tables tempdb..actions_D12 actions and [tempdb..userrecord_D13 userrecord] 197
 QJWI 5 Join or Sarg Without Index 148
 QJWI 5 Join or Sarg Without Index 150
 QJWI 5 Join or Sarg Without Index 153
 QJWI 5 Join or Sarg Without Index 155
 QJWI 5 Join or Sarg Without Index 157
 QJWI 5 Join or Sarg Without Index 229
 QJWI 5 Join or Sarg Without Index 233
 QJWI 5 Join or Sarg Without Index 235
 QJWI 5 Join or Sarg Without Index 237
 MEST 4 Empty String will be replaced by Single Space 24
 MEST 4 Empty String will be replaced by Single Space 27
 MEST 4 Empty String will be replaced by Single Space 30
 MEST 4 Empty String will be replaced by Single Space 33
 MEST 4 Empty String will be replaced by Single Space 36
 MINU 4 Unique Index with nullable columns master..sysconfigures master..sysconfigures
 MINU 4 Unique Index with nullable columns sybsystemprocs..sysprotects sybsystemprocs..sysprotects
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: sysprotects.csysprotects unique clustered
(id, action, grantor, uid, protecttype, predid)
Intersection: {protecttype}
135
 QTYP 4 Comparison type mismatch Comparison type mismatch: tinyint vs int 77
 QTYP 4 Comparison type mismatch Comparison type mismatch: tinyint vs int 135
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 231
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 235
 TNOI 4 Table with no index tempdb..COLUMNPRIVILEGES_D19 tempdb..COLUMNPRIVILEGES_D19
 TNOI 4 Table with no index tempdb..EXPLICITGRANTS_D11 tempdb..EXPLICITGRANTS_D11
 TNOI 4 Table with no index tempdb..IMPLICITGRANTS_D18 tempdb..IMPLICITGRANTS_D18
 TNOI 4 Table with no index tempdb..actions_D1 tempdb..actions_D1
 TNOI 4 Table with no index tempdb..actions_D12 tempdb..actions_D12
 TNOI 4 Table with no index tempdb..matchinggrantrecords_D6 tempdb..matchinggrantrecords_D6
 TNOI 4 Table with no index tempdb..posiblegrants_D14 tempdb..posiblegrants_D14
 TNOI 4 Table with no index tempdb..posiblegrants_D3 tempdb..posiblegrants_D3
 TNOI 4 Table with no index tempdb..rolelist_D10 tempdb..rolelist_D10
 TNOI 4 Table with no index tempdb..rolelist_D17 tempdb..rolelist_D17
 TNOI 4 Table with no index tempdb..subprotects_D4 tempdb..subprotects_D4
 TNOI 4 Table with no index tempdb..sysloginroles_D7 tempdb..sysloginroles_D7
 TNOI 4 Table with no index tempdb..syssrvroles_D8 tempdb..syssrvroles_D8
 TNOI 4 Table with no index tempdb..tablets_D15 tempdb..tablets_D15
 TNOI 4 Table with no index tempdb..tablets_D5 tempdb..tablets_D5
 TNOI 4 Table with no index tempdb..usedlist_D16 tempdb..usedlist_D16
 TNOI 4 Table with no index tempdb..usedlist_D9 tempdb..usedlist_D9
 TNOI 4 Table with no index tempdb..userrecord_D13 tempdb..userrecord_D13
 TNOI 4 Table with no index tempdb..userrecord_D2 tempdb..userrecord_D2
 TNOU 4 Table with no unique index master..sysloginroles master..sysloginroles
 MAW1 3 Warning message on %name% sybsystemprocs..sysprotects.id: Warning message on sysprotects 125
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 138
 MAW1 3 Warning message on %name% sybsystemprocs..sysprotects.id: Warning message on sysprotects 153
 MAW1 3 Warning message on %name% sybsystemprocs..sysprotects.id: Warning message on sysprotects 157
 MAW1 3 Warning message on %name% tempdb..usedlist_D9.id: Warning message on usedlist_D9 157
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 218
 MAW1 3 Warning message on %name% sybsystemprocs..sysprotects.id: Warning message on sysprotects 233
 MAW1 3 Warning message on %name% sybsystemprocs..sysprotects.id: Warning message on sysprotects 235
 MAW1 3 Warning message on %name% tempdb..usedlist_D16.id: Warning message on usedlist_D16 235
 MAW1 3 Warning message on %name% sybsystemprocs..sysprotects.id: Warning message on sysprotects 237
 MBLI 3 Integer Value of Binary Literal is Platform Dependant 79
 MGTP 3 Grant to public master..sysconfigures  
 MGTP 3 Grant to public master..sysloginroles  
 MGTP 3 Grant to public master..syssrvroles  
 MGTP 3 Grant to public sybsystemprocs..sp_oledb_gettableprivileges  
 MGTP 3 Grant to public sybsystemprocs..sysobjects  
 MGTP 3 Grant to public sybsystemprocs..sysprotects  
 MGTP 3 Grant to public sybsystemprocs..sysusers  
 MUCO 3 Useless Code Useless Brackets in create proc 8
 MUCO 3 Useless Code Useless Brackets 15
 MUCO 3 Useless Code Useless Brackets 19
 MUCO 3 Useless Code Useless Brackets 248
 QGWO 3 Group by/Distinct/Union without order by 50
 QGWO 3 Group by/Distinct/Union without order by 92
 QGWO 3 Group by/Distinct/Union without order by 101
 QGWO 3 Group by/Distinct/Union without order by 198
 QNUA 3 Should use Alias: Table sybsystemprocs..sysprotects 153
 QNUA 3 Should use Alias: Table sybsystemprocs..sysusers 155
 QNUA 3 Should use Alias: Table sybsystemprocs..sysusers 157
 QNUA 3 Should use Alias: Table master..sysconfigures 231
 QNUA 3 Should use Alias: Table sybsystemprocs..sysprotects 233
 QNUA 3 Should use Alias: Table sybsystemprocs..sysusers 235
 QNUA 3 Should use Alias: Table sybsystemprocs..sysprotects 237
 QPNC 3 No column in condition 231
 QPNC 3 No column in condition 241
 QUNI 3 Check Use of 'union' vs 'union all' 50
 QUNI 3 Check Use of 'union' vs 'union all' 92
 QUNI 3 Check Use of 'union' vs 'union all' 101
 QUNI 3 Check Use of 'union' vs 'union all' 198
 MDRV 2 Derived Table Marker 50
 MDRV 2 Derived Table Marker 53
 MDRV 2 Derived Table Marker 84
 MDRV 2 Derived Table Marker 92
 MDRV 2 Derived Table Marker 101
 MDRV 2 Derived Table Marker 113
 MDRV 2 Derived Table Marker 124
 MDRV 2 Derived Table Marker 137
 MDRV 2 Derived Table Marker 155
 MDRV 2 Derived Table Marker 157
 MDRV 2 Derived Table Marker 165
 MDRV 2 Derived Table Marker 190
 MDRV 2 Derived Table Marker 198
 MDRV 2 Derived Table Marker 207
 MDRV 2 Derived Table Marker 217
 MDRV 2 Derived Table Marker 235
 MRST 2 Result Set Marker 39
 MSUB 2 Subquery Marker 231
 MSUC 2 Correlated Subquery Marker 153
 MSUC 2 Correlated Subquery Marker 155
 MSUC 2 Correlated Subquery Marker 157
 MSUC 2 Correlated Subquery Marker 233
 MSUC 2 Correlated Subquery Marker 235
 MSUC 2 Correlated Subquery Marker 237
 MTR1 2 Metrics: Comments Ratio Comments: 5% 8
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 13 = 13dec - 2exi + 2 8
 MTR3 2 Metrics: Query Complexity Complexity: 150 8
 PRED_QUERY_COLLECTION 2 {md6=tempdb..matchinggrantrecords_D6, pd3=tempdb..posiblegrants_D3} 0 53
 PRED_QUERY_COLLECTION 2 {md6=tempdb..matchinggrantrecords_D6, pd3=tempdb..posiblegrants_D3} 0 53
 PRED_QUERY_COLLECTION 2 {md6=tempdb..matchinggrantrecords_D6, pd3=tempdb..posiblegrants_D3} 0 53
 PRED_QUERY_COLLECTION 2 {ld7=tempdb..sysloginroles_D7, md6=tempdb..matchinggrantrecords_D6, pd3=tempdb..posiblegrants_D3, sd8=tempdb..syssrvroles_D8, u=sybsystemprocs..sysusers} 0 155
 PRED_QUERY_COLLECTION 2 {ld7=tempdb..sysloginroles_D7, md6=tempdb..matchinggrantrecords_D6, pd3=tempdb..posiblegrants_D3, sd8=tempdb..syssrvroles_D8, u=sybsystemprocs..sysusers} 0 155
 PRED_QUERY_COLLECTION 2 {ld7=tempdb..sysloginroles_D7, md6=tempdb..matchinggrantrecords_D6, pd3=tempdb..posiblegrants_D3, sd8=tempdb..syssrvroles_D8, u=sybsystemprocs..sysusers} 0 155
 PRED_QUERY_COLLECTION 2 {l=master..sysloginroles, s=master..syssrvroles, u=sybsystemprocs..sysusers} 0 157
 PRED_QUERY_COLLECTION 2 {l=master..sysloginroles, s=master..syssrvroles, u=sybsystemprocs..sysusers} 0 157
 PRED_QUERY_COLLECTION 2 {l=master..sysloginroles, s=master..syssrvroles, u=sybsystemprocs..sysusers} 0 157
 PRED_QUERY_COLLECTION 2 {l=master..sysloginroles, s=master..syssrvroles, u=sybsystemprocs..sysusers} 0 157
 PRED_QUERY_COLLECTION 2 {pd14=tempdb..posiblegrants_D14, td15=tempdb..tablets_D15} 0 165
 PRED_QUERY_COLLECTION 2 {pd14=tempdb..posiblegrants_D14, td15=tempdb..tablets_D15} 0 165
 PRED_QUERY_COLLECTION 2 {pd14=tempdb..posiblegrants_D14, td15=tempdb..tablets_D15} 0 165
 PRED_QUERY_COLLECTION 2 {l=master..sysloginroles, s=master..syssrvroles, u=sybsystemprocs..sysusers} 0 235
 PRED_QUERY_COLLECTION 2 {l=master..sysloginroles, s=master..syssrvroles, u=sybsystemprocs..sysusers} 0 235
 PRED_QUERY_COLLECTION 2 {l=master..sysloginroles, s=master..syssrvroles, u=sybsystemprocs..sysusers} 0 235
 PRED_QUERY_COLLECTION 2 {l=master..sysloginroles, s=master..syssrvroles, u=sybsystemprocs..sysusers} 0 235

DEPENDENCIES
PROCS AND TABLES USED
reads table sybsystemprocs..sysprotects  
reads table master..sysconfigures (1)  
writes table sybsystemprocs..sp_oledb_gettableprivileges_rset_001 
reads table sybsystemprocs..sysusers  
reads table master..syssrvroles (1)  
reads table sybsystemprocs..sysobjects  
reads table master..sysloginroles (1)