I’d like to share one bug that has been irritating me over a long time. It is very easy to handle, once you know what the problem is. I’ve seen it when I want to open a file XE target:
Here’s the relevant text in the message box, to facilitate searching:
The storage failed to initialize using the provided parameters. (Microsoft.SqlServer.XEventStorage)
Cannot view the function ‘fn_MSXe_read_event_stream’, because it does not exist or you do not have permission. (Microsoft SQL Server, Error: 15151)
The problem is that Object Explorer in SSMS tries to use that function from the current database, not the master database (where the function exists, so to speak). So the solution is to open Object Explorer making sure that the current database for Object Explorer is the master database.
This bug has been reported on UserVoice, April 2016. Go vote for it if you want to add your voice: https://feedback.azure.com/forums/908035-sql-server/suggestions/32902330-cannot-view-the-function-fn-msxe-read-event-strea
When opening several large extended events files, this error can occur. It won’t go away even after restarting SSMS.
===================================
The storage failed to initialize using the provided parameters. (Microsoft.SqlServer.XEventStorage)
——————————
Program Location:
at Microsoft.SqlServer.XEventStorage.XEStorage.InitStorage(String[] fileNames, String[] metaFileNames)
at Microsoft.SqlServer.XEventStorage.ComputedGridStorage..ctor(String[] fileNames, String[] metaFileNames)
at Microsoft.SqlServer.Management.XEventUI.TraceToolWindowControl.SetStorageData(String[] fileNames, Boolean isAuditData)
===================================
filename (Microsoft.SqlServer.XEvent.Linq)
——————————
Program Location:
at Microsoft.SqlServer.XEvent.Linq.Internal.XEventFileReaderMessageHandler.NotifyInvalidParameter(XEventFileReaderMessageHandler* , UInt16* paramName, UInt64 value)
at Microsoft.SqlServer.XEvent.Linq.Internal.XEventInteropFileReader..ctor(String[] fileList, String[] mdFiles)
at Microsoft.SqlServer.XEvent.Linq.XEventFileProvider`1..ctor(QueryableXEventData queryable, String[] fileList, String[] metadataFiles)
at Microsoft.SqlServer.XEvent.Linq.QueryableXEventData..ctor(String[] fileList)
at Microsoft.SqlServer.XEventStorage.XEStorage.InitStorage(String[] fileNames, String[] metaFileNames)
NOTE: This occurs even when the master database is selected in the Object Explorer, and the current query is using master. My login is set to use master as default.