I'm writing a C# program and it needs to read SQL Server data pages. Right now what I'm doing is using SQL Server's DBCC PAGE
command to get this information and then parse the result. When the page number is huge, the performance is not very good. I want to know is there any .NET API that allows me to read SQL Server data pages? I searched around SQL Server's SMO documentation but didn't find anything interesting.
Asked
Active
Viewed 60 times
0

Dale K
- 25,246
- 15
- 42
- 71

Just a learner
- 26,690
- 50
- 155
- 234
-
2No. dbcc page is also undocumented. – SMor Apr 10 '21 at 10:53
-
1Depending on what you need from the data page, you could use the documented [sys.dm_db_page_info DMF](https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-page-info-transact-sql?view=sql-server-ver15) in SQL 2019 and Azure SQL Database. – Dan Guzman Apr 10 '21 at 11:12
-
Depending on what you are trying to do you could also look at OrcaMDF from [Mark S. Rasmussen](https://stackoverflow.com/users/12469/mark-s-rasmussen) – Martin Smith Apr 10 '21 at 17:37