The Designer SDK can retrieve the connection details. Give the attached utility a try. Usage is pretty simple. Open the Excel file and click the button. You’ll be asked to log in to Designer, and it’s on its way. The second tab of the workbook will list the connection information. Universe connections - XI.xls (39.0 KB) Universe connections - v5.xls (39.0 KB)
Possible, yes, but that would be pretty much a separate utility. This one is not concerned about which universes use which connections, only the details of the connections themselves.
In order to clean up a lot of probably unused connections it would really be nice if this tool could have a new update. So I want the universe names that use the connection. Then I have more information for my decision to delete unwanted connections.
Of course I mean this is only for mass environments and when the one who is going to clean up this mess is an external consultant.
Imports System.Xml
Public iStore As New CrystalInfoStoreLib.InfoStore
Public Connections As CrystalInfoStoreLib.InfoObjects
Public ConnectItem As CrystalInfoStoreLib.InfoObject
Public ConnectObject As New CrystalConnectionPluginLib.Connection
Dim QueryStr As String = ""
Dim ElementStr As String = ""
Dim NWLayer As String = ""
Dim RDMS As String = ""
QueryStr = "select SI_ID, SI_CREATION_TIME, SI_UPDATE_TS, SI_REVISIONNUM,SI_OWNER, SI_DESCRIPTION, SI_NAME, SI_CONNUNIVERSE, SI_METADATA_PROPERTIES from CI_APPOBJECTS where SI_KIND = 'MetaData.DataConnection' and SI_PARENTID=123 order by SI_NAME"
Connections = iStore.Query(QueryStr)
For Each ConnectItem In Connections
Dim sr As New System.IO.StringReader(ConnectItem.Properties("SI_METADATA_PROPERTIES").Properties("SI_METADATA_BVCONN_ATTRIBUTES").Value)
Dim doc As New Xml.XmlDocument
doc.Load(sr)
Dim reader As New Xml.XmlNodeReader(doc)
While reader.Read()
Select Case reader.NodeType
Case Xml.XmlNodeType.Element
If reader.Name = "Name" Then
ElementStr = reader.ReadElementContentAsString
If ElementStr = "NetworkLayer" Then
NWLayer = reader.ReadElementContentAsString
End If
If ElementStr = "RdmsName" Then
RDMS = reader.ReadElementContentAsString
End If
End If
End Select
End While
Next
MsgBox(ConnectItem.Title & vbCrLf & NWLayer & vbCrLf & RDMS)
@dpetri - Will your code work in VBA (Excel Macro)? If yes , could you please let me know the references to include. I tried few, but no luck.
Thanks in Advance!
I need Service name (TNS entry/where connections are pointing) also as a column
Can you please help me with Above VBA code to get desired result for BOXI 3.1 ?
The excel file exactly what I need but doesn’t seem to work, I tried the repository documenter but this doesn’t give user names and service the connection is using.