To show the connection info (like connection status) in the Properties window after opening a .sql file, you need to open the file using the SQL editor used by Visual Studio.
Use this code:
Guid sqlEditorGuid = new Guid("FBA1F4DC-8EC1-49E4-A09D-A8FE6D4F8B24"); // SQL editor GUID
VsShellUtilities.OpenDocumentWithSpecificEditor(
ServiceProvider.GlobalProvider,
filePath,
sqlEditorGuid,
VSConstants.LOGVIEWID_Primary,
out IVsUIHierarchy hierarchy,
out uint itemID,
out IVsWindowFrame windowFrame
);
windowFrame?.Show();