Server Management - Systems Insight Manager
1836617 Members
2069 Online
110102 Solutions
New Discussion

retrieving data from the db

 
SOLVED
Go to solution
Dale Gundersen
Occasional Contributor

retrieving data from the db

I'm building a Sharepoint portal and have various web parts written in C# that display information from a number of applications. One of them I'm developing is intended for use with SIM 4.2.

I can connect to the database through the web part but it looks like most of the tables store binary data. Is there any way to retrieve from the database the same information that is contained in the "Systems Overview" page and "All Systems" page? Is this even possible since I'm using C# and I assume the binary data is Java objects?

4 REPLIES 4
NJK-Work
Honored Contributor
Solution

Re: retrieving data from the db

Hi David,

Perhaps I am over-simplifying it or not understanding what you are asking, but you should be able to write a simple SQL query to retrieve the data you need.

For example, I wrote a custom server inventory database that pulls in information from SIM tables and links the results of this query to my own custom tables. The query I use to pull the data is:

SELECT TOP 100 PERCENT dbo.devices.DeviceKey, dbo.devices.Name AS [Server Name], dbo.devices.ProductName AS [Server Model],
dbo.DB_DeviceInfoEx.TotalMemory AS [Total Memory], dbo.DB_DeviceInfoEx.ROMVersion AS [ROM Version],
dbo.DB_DeviceInfoEx.SerialNumber AS [Serial Number], dbo.DB_DeviceInfoEx.OSName AS [Operating System],
dbo.devices.ProductTypeStr AS ProductType
FROM dbo.devices INNER JOIN
dbo.DB_DeviceInfoEx ON dbo.devices.DeviceKey = dbo.DB_DeviceInfoEx.DeviceKey
WHERE (dbo.devices.ProductTypeStr = 'Server') OR
(dbo.devices.ProductTypeStr = 'Cluster')
ORDER BY dbo.devices.Name


Let me know if you are looking for something more than this?

Nelson
NJK-Work
Honored Contributor

Re: retrieving data from the db

Sorry Dale - not sure why I typed David.

Nelson
Dale Gundersen
Occasional Contributor

Re: retrieving data from the db

Thanks for the response. What you answered is basically what I'm trying to do. It turns out I was simply looking at the wrong database. :)

NJK-Work
Honored Contributor

Re: retrieving data from the db

Glad to help. Good luck with the SharePoint stuff. If willing, I would be interested to see what you come up with. We use WSS here as well and it sounds quite usefull what you are doing.

Nelson