/* ** File: Stats IO reads part 0.sql ** ** Summary: Run in a job to run indirect checkpoints prior to SQL 2012 ** set the percentage limit before running. ** ** SQL Server Versions: 2005 onwards ** ---------------------------------------------------------------------------- ** Written by Rainer Unwin (c) 2015 ** ** For more scripts check out http://www.rmuniwn.com ** ** You may alter this code for your own non-commercial purposes (e.g. in a ** for-sale commercial tool). ** You may republish altered code as long as you include this copyright and ** give due credit, however you must obtain my prior permission before blogging ** this code. ** ** this code and information are provided "as is" without warranty of ** any kind, either expressed or implied, including but not limited ** to the implied warranties of merchantability and/or fitness for a ** particular purpose. You use the script at your own risk and should ** always test in a pre-production or test environment before running ** in production. */ if object_id( N'dbo.reads_pages','V' ) is not null drop view dbo.reads_pages; go create view dbo.reads_pages as select is_iam_page , allocated_page_file_id , allocated_page_page_id from sys.dm_db_database_page_allocations( 2 , object_id( 'dbo.reads', 'U' ) , 0 , 1 , 'detailed' ) where is_allocated = 1; go