I have to make some reports in SQL and need to transfer those notifications to an SQL server.
It depends. In 2015R2 and beyond, Notifications are stored in EventFrames. You can get to those using PI OLEDB Enterprise or PI Connector for BA.
Before, the Notification history is stored in a set of PI Points. Getting to them is not an easy task. Don't know any method from the top of my head.
Roger is correct, the version of Notifications will determine how to do this. The PI Notifications 2012 and earlier used a series of PI tags as the back end, and we have never, to my knowledge, published a way to read through those as we didn't want customer to directly query the tags. The problem with this is that PI OLEDB Enterprise does not have a notifications table that will do this for you.
With the new version of PI Notifications, they are stored as event frames on the AF server, and therefore PI OLEDB Enterprise can certainly be used out of the box to query the event frames, and find the ones in specific that you're wanting to include in the report.
In the old Notifications (2012 and earlier), what you can do is to use AN SDK to extract out the ANNotificationInstances and write them to SQL with ADO.NET.
Retrieving data ...