Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit fc1739b

Browse files
authored
Merge pull request #9729 from MicrosoftDocs/master
4/03 AM Publish
2 parents 1a4aa8d + 60986c1 commit fc1739b

3 files changed

Lines changed: 16 additions & 19 deletions

File tree

docs/relational-databases/system-dynamic-management-views/sys-dm-db-page-info-transact-sql.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,22 @@ monikerRange: ">=sql-server-ver15||=sqlallproducts-allversions"
2626

2727
Returns information about a page in a database. The function returns one row that contains the header information from the page, including the `object_id`, `index_id`, and `partition_id`. This function replaces the need to use `DBCC PAGE` in most cases.
2828

29-
## Syntax
30-
29+
## Syntax
3130
```
3231
sys.dm_db_page_info ( DatabaseId, FileId, PageId, Mode )
3332
```
3433

3534
## Arguments
36-
*DatabaseId* | NULL | DEFAULT
37-
38-
Is the ID of the database. *DatabaseId* is **smallint**. Valid input is the ID number of a database. The default is NULL, however sending a NULL value for this parameter will result in an error.
35+
*DatabaseId* | NULL | DEFAULT
36+
Is the ID of the database. *DatabaseId* is **smallint**. Valid input is the ID number of a database. The default is NULL, however sending a NULL value for this parameter will result in an error.
3937

40-
*FileId* | NULL | DEFAULT
41-
38+
*FileId* | NULL | DEFAULT
4239
Is the ID of the file. *FileId* is **int**. Valid input is the ID number of a file in the database specified by *DatabaseId*. The default is NULL, however sending a NULL value for this parameter will result in an error.
4340

44-
*PageId* | NULL | DEFAULT
45-
41+
*PageId* | NULL | DEFAULT
4642
Is the ID of the page. *PageId* is **int**. Valid input is the ID number of a page in the file specified by *FileId*. The default is NULL, however sending a NULL value for this parameter will result in an error.
4743

48-
*Mode* | NULL | DEFAULT
49-
44+
*Mode* | NULL | DEFAULT
5045
Determines the level of detail in the output of the function. 'LIMITED' will return NULL values for all description columns, 'DETAILED' will populate description columns. DEFAULT is 'LIMITED.'
5146

5247
## Table Returned
@@ -143,6 +138,7 @@ CROSS APPLY sys.dm_db_page_info(r.db_id, r.file_id, r.page_id, 'LIMITED') AS pag
143138
## See Also
144139
[Dynamic Management Views and Functions (Transact-SQL)](~/relational-databases/system-dynamic-management-views/system-dynamic-management-views.md)
145140
[Database Related Dynamic Management Views (Transact-SQL)](../../relational-databases/system-dynamic-management-views/database-related-dynamic-management-views-transact-sql.md)
146-
[sys.dm_exec_requests (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql.md)
141+
[sys.dm_exec_requests (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql.md)
142+
[sys.fn_PageResCracker](../../relational-databases/system-functions/sys-fn-pagerescracker-transact-sql.md)
147143

148144

docs/relational-databases/system-functions/sys-fn-pagerescracker-transact-sql.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,16 @@ manager: "amitban"
3131

3232
Returns the `db_id`, `file_id`, and `page_id` for the given `page_resource` value.
3333

34-
3534
![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
3635

3736
## Syntax
38-
3937
```
4038
sys.fn_PageResCracker ( page_resource )
4139
```
4240

4341
## Arguments
44-
*page_resource*
45-
Is the 8-byte hexadecimal format of a database page resource.
42+
*page_resource*
43+
Is the 8-byte hexadecimal format of a database page resource.
4644

4745
## Tables Returned
4846

@@ -53,10 +51,13 @@ sys.fn_PageResCracker ( page_resource )
5351
|page_id|**int**|Page ID|
5452

5553
## Remarks
56-
`sys.fn_PageResCracker` is used to convert the 8-byte hexadecimal representation of a database page to a rowset that contains the database ID, file ID and page ID of the page. You can obtain a valid page resource from the `page_resource` column of the [sys.dm_exec_requests (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql.md) dynamic management view or the [sys.sysprocesses (Transact-SQL)](../../relational-databases/system-compatibility-views/sys-sysprocesses-transact-sql.md) system view. The primary use of `sys.fn_PageResCracker` is to facilitate joins between these views and the [sys.dm_db_page_info (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-db-page-info-transact-sql.md) dynamic management function in order to obtain information about the page, such as the object to which it belongs.
54+
`sys.fn_PageResCracker` is used to convert the 8-byte hexadecimal representation of a database page to a rowset that contains the database ID, file ID and page ID of the page.
55+
56+
You can obtain a valid page resource from the `page_resource` column of the [sys.dm_exec_requests (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql.md) dynamic management view or the [sys.sysprocesses (Transact-SQL)](../../relational-databases/system-compatibility-views/sys-sysprocesses-transact-sql.md) system view. If an invalid page resource is used then the return is NULL.
57+
The primary use of `sys.fn_PageResCracker` is to facilitate joins between these views and the [sys.dm_db_page_info (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-db-page-info-transact-sql.md) dynamic management function in order to obtain information about the page, such as the object to which it belongs.
5758

5859
## Permissions
59-
The user needs VIEW SERVER STATE permission on the server.
60+
The user needs `VIEW SERVER STATE` permission on the server.
6061

6162
## Examples
6263
The `sys.fn_PageResCracker` function can be used in conjunction with [sys.dm_db_page_info (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-db-page-info-transact-sql.md) to troubleshoot page related waits and blocking in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. The following script is an example of how you can use these functions to gather database page information for all active requests that are currently waiting on some type of page resource.

docs/t-sql/functions/error-procedure-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ERROR_PROCEDURE ( )
4343
**nvarchar(128)**
4444

4545
## Return Value
46-
When called within a CATCH block in a stored procedure or trigger, `ERROR_PROCEDURE` returns the name of the stored procedure or trigger in which the error originated.
46+
When called in a CATCH block, `ERROR_PROCEDURE` returns the name of the stored procedure or trigger in which the error originated.
4747

4848
`ERROR_PROCEDURE` returns NULL if the error did not occur within a stored procedure or trigger.
4949

0 commit comments

Comments
 (0)