is there any way to find the Analysis Server 2005 Lists?
i can find the SQLServerList in Network easily. But i need Analysis Servers...
I dont want the list of *** in Network. List of *** in LOCAL is enough for me. (
Dim Instance As SqlDataSourceEnumerator = SqlDataSourceEnumerator.Instance
Dim SQLServerTable As System.Data.DataTable = Instance.GetDataSources()
For Each row As DataRow In SQLServerTable.Rows
If IsDBNull(row(1)) Then
cboSQLServer.Items.Add(row(0))
Else
cboSQLServer.Items.Add(row(0) + "\" + row(1))
End If
Next
i try to find it from Services but it is very SLOW and there is no standard name for service!!!
Name = MSOLAP$INSTANCENAME
sservices = ServiceController.GetServices("ComputerName")
For i As Int16 = 0 To sservices.Length - 1
Debug.Print(sservices(i).ServiceName)
Next
You could directly read from registry to see the list of Analysis Service instances available on the local machine from the below registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\OLAP
MSSQLSERVER is the default instance (Service Name: MSSQLServerOLAPService)
every other registry key is the named instance (Service Name: MSOLAP$instanceName)
To know whether the instance is 2005 you could check the version,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<Instance ID>\Setup\Version
Instance ID is the value you get from
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\OLAP\<InstanceName> keys.
Hope this helps!
|||Thank you very much.
i didnt recognize the shortest way
No comments:
Post a Comment