As per online resources there are lot of articles which point, on how to track page splits using undocumented command fn_dblog and fn_dump_dblog. But, there are performance implications using this command in Production server and also such commands are not supported by Microsoft.
leaf_allocation_count
bigint
Cumulative count of leaf-level page allocations in the index or heap.
For an index, a page allocation corresponds to a page split.
nonleaf_allocation_count
Cumulative count of page allocations caused by page splits above the leaf level.
0 = Heap or columnstore
We can see leaf allocation count column value corresponds to page splits which occurred for the index. Although we would not get information about whether this page split was done on right side of index when data was added or was result of row not being able to fit on a page causing extra page to be allocated and thus fragmentation.
Please note that there is no page split for HEAP(A table without clustered index). Heaps have forwarding pointers.Below is a simple query which will allow we to track page splits
--Script to check page split for index
SELECT
IOS.INDEX_ID,
O.
NAME
AS
OBJECT_NAME,
I.
INDEX_NAME,
IOS.LEAF_ALLOCATION_COUNT
PAGE_SPLIT_FOR_INDEX,
IOS.NONLEAF_ALLOCATION_COUNT PAGE_ALLOCATION_CAUSED_BY_PAGESPLIT
FROM
SYS.DM_DB_INDEX_OPERATIONAL_STATS(DB_ID(N
'DB_NAME'
),
NULL
,
) IOS
JOIN
SYS.INDEXES I
ON
IOS.INDEX_ID=I.INDEX_ID
AND IOS.OBJECT_ID = I.OBJECT_ID
SYS.OBJECTS O
IOS.OBJECT_ID=O.OBJECT_ID
WHERE
O.TYPE_DESC=
'USER_TABLE'
Above query will give page splits for all Indexes present in database. We can add specific table name in the query to filter down page splits for indexes belonging to particular table.
We can also use EXTENDED EVENTS trace to capture page splits but that can be used for SQL server 2012 and above please refer to See Also Section for Link.