Sample SQL query need for knowing BFEnterprise Database

Hi,

Sample SQL query need for knowing BFEnterprise Database

Thanks,
Nagaraj.

Hi @Nagaraj

Can you explain what you just need? BFEnterprise Database is a SQL DB, so you can perform all SQL queries on the DB (not recommended though!). But what is your goal or what SQL queries do you need?

Greetings

Hi,
For Example
How to find out the list of computer and computer IP address

Thanks,
Nagaraj.

Hi

If you want that, I suggest you use REST API. This has less impact on the DB and on the performance. Or you can just use the console. There are already a lot of properties in it (like IP address etc).

If your not familiar with SQL queries, I would also not recommend to mess around in the DB.

Besides that, an answer to your question:
open SQL Management Studio, Open BFEnterprise and look for the table/view you really need. It is a big DB with a lot of different tables, so you’ll probably need to join a few tables with each other.

For Computer names:

SELECT [ComputerID]
      ,[IsDeleted]
      ,[LastReportTime]
      ,[IsRelay]
      ,[ReportNumber]
      ,[Sequence]
      ,[OriginServerID]
      ,[OriginSequence]
  FROM [BFEnterprise].[dbo].[COMPUTERS]

For IP address, you need to find the correct table, join it with this table etc.

So again, it’s a lot easier to just use the console or the REST API with session relevance. If you can avoid the DB, please avoid the DB.

1 Like

Hi,

How to use RESTAPI

is there any sample guide?

Thanks,
Nagaraj.

HI @Nagaraj

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Tivoli%20Endpoint%20Manager/page/REST%20API

You do know you can find a lot by just googling it? You can also find examples of REST API on this forum or online.

Another tool to help you create the session relevance for the REST API, is the session relevance Editor of IBM.

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Tivoli%20Endpoint%20Manager/page/Session%20Relevance%20Editor

2 Likes

Its easier and also more compatible in the long run. If you rely on doing SQL queries then your queries will start failing if the DB Schema is changed (which does happen)

2 Likes