Skip to content

Commit df1315e

Browse files
authored
Merge pull request #34507 from rwestMSFT/rw-0623-stored-procedures-008
System stored procedure refresh - phase 8
2 parents 042cb72 + 4efe69e commit df1315e

40 files changed

+262
-242
lines changed

docs/relational-databases/system-stored-procedures/sp-helprolemember-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helprolemember returns information about the direct members of a
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -51,7 +51,7 @@ The name of a role in the current database. *@rolename* is **sysname**, with a d
5151

5252
## Remarks
5353

54-
If the database contains nested roles, `MemberName` might be the name of a role. `sp_helprolemember` doesn't show membership obtained through nested roles. For example if `User1` is a member of `Role1`, and `Role1` is a member of `Role2`, `EXEC sp_helprolemember 'Role2';` returns `Role1`, but not the members of `Role1` (`User1` in this example). To return nested memberships, you must execute `sp_helprolemember` repeatedly for each nested role.
54+
If the database contains nested roles, `MemberName` might be the name of a role. `sp_helprolemember` doesn't show membership obtained through nested roles. For example if `User1` is a member of `Role1`, and `Role1` is a member of `Role2`, `EXECUTE sp_helprolemember 'Role2';` returns `Role1`, but not the members of `Role1` (`User1` in this example). To return nested memberships, you must execute `sp_helprolemember` repeatedly for each nested role.
5555

5656
Use `sp_helpsrvrolemember` to display the members of a fixed server role.
5757

@@ -66,7 +66,7 @@ Requires membership in the **public** role.
6666
The following example displays the members of the `Sales` role in the [!INCLUDE [sssampledbobject-md](../../includes/sssampledbobject-md.md)] database.
6767

6868
```sql
69-
EXEC sp_helprolemember 'Sales';
69+
EXECUTE sp_helprolemember 'Sales';
7070
```
7171

7272
## Related content

docs/relational-databases/system-stored-procedures/sp-helprotect-transact-sql.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helprotect returns a report that's information about user permis
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -83,13 +83,13 @@ All the parameters in the following procedure are optional. If executed with no
8383
If some but not all the parameters are specified, use named parameters to identify the particular parameter, or `NULL` as a placeholder. For example, to report all permissions for the grantor database owner (`dbo`), execute the following script:
8484

8585
```sql
86-
EXEC sp_helprotect NULL, NULL, dbo;
86+
EXECUTE sp_helprotect NULL, NULL, dbo;
8787
```
8888

8989
Or
9090

9191
```sql
92-
EXEC sp_helprotect @grantorname = 'dbo';
92+
EXECUTE sp_helprotect @grantorname = 'dbo';
9393
```
9494

9595
The output report is sorted by permission category, owner, object, grantee, grantor, protection type category, protection type, action, and column sequential ID.
@@ -107,39 +107,39 @@ Information returned is subject to restrictions on access to metadata. Entities
107107
The following example lists the permissions for the `titles` table.
108108

109109
```sql
110-
EXEC sp_helprotect 'titles';
110+
EXECUTE sp_helprotect 'titles';
111111
```
112112

113113
### B. List the permissions for a user
114114

115115
The following example lists all permissions that user `Judy` has in the current database.
116116

117117
```sql
118-
EXEC sp_helprotect NULL, 'Judy';
118+
EXECUTE sp_helprotect NULL, 'Judy';
119119
```
120120

121121
### C. List the permissions granted by a specific user
122122

123123
The following example lists all permissions granted by user `Judy` in the current database, and uses `NULL` as a placeholder for the missing parameters.
124124

125125
```sql
126-
EXEC sp_helprotect NULL, NULL, 'Judy';
126+
EXECUTE sp_helprotect NULL, NULL, 'Judy';
127127
```
128128

129129
### D. List the statement permissions only
130130

131131
The following example lists all the statement permissions in the current database, and uses `NULL` as a placeholder for the missing parameters.
132132

133133
```sql
134-
EXEC sp_helprotect NULL, NULL, NULL, 's';
134+
EXECUTE sp_helprotect NULL, NULL, NULL, 's';
135135
```
136136

137137
### e. Listing the permissions for a CREATE statement
138138

139139
The following example list all users who are granted the `CREATE TABLE` permission.
140140

141141
```sql
142-
EXEC sp_helprotect @name = 'CREATE TABLE';
142+
EXECUTE sp_helprotect @name = 'CREATE TABLE';
143143
```
144144

145145
## Related content

docs/relational-databases/system-stored-procedures/sp-helpserver-transact-sql.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helpserver reports information about a particular remote or repl
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -95,7 +95,8 @@ The following example displays information about all servers by using `sp_helpse
9595
```sql
9696
USE master;
9797
GO
98-
EXEC sp_helpserver;
98+
99+
EXECUTE sp_helpserver;
99100
```
100101

101102
### B. Display information about a specific server
@@ -105,7 +106,8 @@ The following example displays all information about the `SEATTLE2` server.
105106
```sql
106107
USE master;
107108
GO
108-
EXEC sp_helpserver 'SEATTLE2';
109+
110+
EXECUTE sp_helpserver 'SEATTLE2';
109111
```
110112

111113
## Related content

docs/relational-databases/system-stored-procedures/sp-helpsort-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helpsort Displays the sort order and character set for the insta
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -57,7 +57,7 @@ Requires membership in the **public** role.
5757
The following example displays the name of the default sort order of the server, its character set, and a table of its primary sort values.
5858

5959
```sql
60-
EXEC sp_helpsort;
60+
EXECUTE sp_helpsort;
6161
```
6262

6363
[!INCLUDE [ssResult](../../includes/ssresult-md.md)]

docs/relational-databases/system-stored-procedures/sp-helpsrvrole-transact-sql.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helpsrvrole Returns a list of the SQL Server fixed server roles.
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -80,23 +80,25 @@ Requires membership in the **public** role.
8080
The following query returns the list of fixed server roles.
8181

8282
```sql
83-
EXEC sp_helpsrvrole;
83+
EXECUTE sp_helpsrvrole;
8484
```
8585

8686
### B. List fixed and user-defined server roles
8787

8888
The following query returns a list of both fixed and user-defined server roles.
8989

9090
```sql
91-
SELECT * FROM sys.server_principals WHERE type = 'R';
91+
SELECT *
92+
FROM sys.server_principals
93+
WHERE type = 'R';
9294
```
9395

9496
### C. Return a description of a fixed server role
9597

9698
The following query returns the name and description of the **diskadmin** fixed server roles.
9799

98100
```sql
99-
EXEC sp_helpsrvrole 'diskadmin';
101+
EXECUTE sp_helpsrvrole 'diskadmin';
100102
```
101103

102104
## Related content

docs/relational-databases/system-stored-procedures/sp-helpsrvrolemember-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helpsrvrolemember returns information about the members of a SQL
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -81,7 +81,7 @@ Requires membership in the **public** role.
8181
The following example lists the members of the **sysadmin** fixed server role.
8282

8383
```sql
84-
EXEC sp_helpsrvrolemember 'sysadmin';
84+
EXECUTE sp_helpsrvrolemember 'sysadmin';
8585
```
8686

8787
## Related content

docs/relational-databases/system-stored-procedures/sp-helpstats-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helpstats returns statistics information about columns and index
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -79,10 +79,10 @@ The following example creates single-column statistics for all eligible columns
7979
USE AdventureWorks2022;
8080
GO
8181

82-
EXEC sp_createstats;
82+
EXECUTE sp_createstats;
8383
GO
8484

85-
EXEC sp_helpstats
85+
EXECUTE sp_helpstats
8686
@objname = 'Sales.Customer',
8787
@results = 'ALL';
8888
```

docs/relational-databases/system-stored-procedures/sp-helptext-transact-sql.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Displays the definition of a user-defined rule, default, unencrypte
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -74,7 +74,8 @@ The following example displays the definition of the trigger `dEmployee` in the
7474
```sql
7575
USE AdventureWorks2022;
7676
GO
77-
EXEC sp_helptext 'HumanResources.dEmployee';
77+
78+
EXECUTE sp_helptext 'HumanResources.dEmployee';
7879
GO
7980
```
8081

@@ -85,7 +86,8 @@ The following example displays the definition of the computed column `TotalDue`
8586
```sql
8687
USE AdventureWorks2022;
8788
GO
88-
sp_helptext
89+
90+
EXECUTE sp_helptext
8991
@objname = N'AdventureWorks2022.Sales.SalesOrderHeader',
9092
@columnname = TotalDue;
9193
GO

docs/relational-databases/system-stored-procedures/sp-helptrigger-transact-sql.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helptrigger returns the type or types of DML triggers defined on
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -80,7 +80,8 @@ The following example executes `sp_helptrigger` to produce information about the
8080
```sql
8181
USE AdventureWorks2022;
8282
GO
83-
EXEC sp_helptrigger 'Person.Person';
83+
84+
EXECUTE sp_helptrigger 'Person.Person';
8485
```
8586

8687
## Related content

docs/relational-databases/system-stored-procedures/sp-helpuser-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: sp_helpuser reports information about database-level principals in
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -91,23 +91,23 @@ Information returned is subject to restrictions on access to metadata. Entities
9191
The following example lists all users in the current database.
9292

9393
```sql
94-
EXEC sp_helpuser;
94+
EXECUTE sp_helpuser;
9595
```
9696

9797
### B. List information for a single user
9898

9999
The following example lists information about the user database owner (`dbo`).
100100

101101
```sql
102-
EXEC sp_helpuser 'dbo';
102+
EXECUTE sp_helpuser 'dbo';
103103
```
104104

105105
### C. List information for a database role
106106

107107
The following example lists information about the **db_securityadmin** fixed database role.
108108

109109
```sql
110-
EXEC sp_helpuser 'db_securityadmin';
110+
EXECUTE sp_helpuser 'db_securityadmin';
111111
```
112112

113113
## Related content

0 commit comments

Comments
 (0)