UCMDB and UD Practitioners Forum (Previously CMS)
Showing results for 
Search instead for 
Do you mean 

Using Discovery on SQL Tables

Regular Advisor

Using Discovery on SQL Tables

[ Edited ]

Hi all,

I'm trying to use discovery to run over all of my SQL DB's and find a specific one, on that DB i want to run a SELECT query and from that select query to create a CI.
My problems are so:

1. When i create the Pattern i select that the "Trigger CIT = SQL Server" and the "Input TQL = NA". when i try to load my custom "Trigger TQL" it gives me only that of the sqlServer, but when i choose "Trigger CIT = IT Universe" it gives me all the avilable discovery queries, is there a way to solve it?

2. How can i create the connection to the DB? i'm currently using the "SqlServerConnection" and the "CmdbObjectID" imports to access it but its not realy working. Any one can help me with that?

Thanks in advance,

Asaf

 

 

P.S. This thread has been moevd from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News Forum. - Hp forum moderator

5 REPLIES
Frequent Advisor

Re: Using Discovery on SQL Tables

Hi Asaf,

This functionality is included in uCMDB 8.0.
Corresponding job is named "Import from Database".

It allows you to specify SQL query and then create CIs on top of its result.

Regards,
Oleh
Regular Advisor

Re: Using Discovery on SQL Tables

Thanks.

I have succecded doing so on my BAC 7.5 but now my problem is that i have two lines with one same colum of data and the other is diiferent, like so:

Country | Name
X | Asaf
Y | Asaf

and i want it to create to CI's, but the discovery is giving me an error that its allready exists so it wont change the existing one, thats good because i dont want it to change i want it to create a new CI!
Can any one help me with that?

Asaf
Regular Advisor

Re: Using Discovery on SQL Tables

Asaf,

How did you get this to work?

Thanks

Ode
Frequent Advisor

Re: Using Discovery on SQL Tables

Please check key attributes of CI you are creating.

uCMDB works like the following:
Two CI's are considered different when and only when they have different key attributes.

If key attributes are the same, uCMDB consider them as the same CI and will manage it accordingly.

The reason why Discovery does not update CI is that you are sending two "same" CIs (with the same key attributes) in one bulk.

uCMDB will accept only one of them and ignore the second.

In order to create two different CI's make both Name and Country KEY attributes of CI.

Regards,
Oleh
Regular Advisor

Re: Using Discovery on SQL Tables

Thanks Oleh ill try it!

and about the code i will add it next week when im at that place.
//Add this to "OnDomLoad" event