Discovery pattern connection for MySQL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 12:13 PM - edited 08-14-2023 01:16 PM
Hi All,
I have one query for discovery pattern.
I'm adding one step under pattern for fetching sql data but I'm getting error that
Example: "sqlcmd -U $$username$$ -P $$password$$ -Stcp:" + $computer_system.primaryHostname + "," + $tcp_port + " -Q \"sql query;\""
"sqlcmd -U $$username$$ -P $$password$$ -Stcp:" + $computer_system.primaryHostname + "," + $tcp_port + " -Q \"select * from (SELECT @@SERVERNAME FROM sys.availability_groups AS ABC INNER JOIN sys.dm_cluster_states AS RGS) a left join (select @@SERVERNAME s1,cluster_name from sys.dm_cluster) b on a.s1=b.s1;\""
Error is : Failed to retrieve remote data: Applicative credentials for CI type cmdb_ci_appl are not defined.
I have added the Applicative credentials and provide sql access server as well. But still I'm getting same error.
Can anyone help me on below?
1) is my sql query format is correct?
2) Did i correctly setup the credentials?
3) if yes then why I'm getting this error?
Thanks
Mehak
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 10:15 PM
Hi @mehak1890 ,
Your error complains about credentials for cmdb_ci_appl but your credentials are for cmdb_ci_db_mssql_instance.
Try to connect your parse operation to the cmdb_ci_mssql_instance ci type. Something like this:
Regards,
Niklas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 01:23 AM
Hi Niklas,
I tried this but now I'm getting another error that "msva is not recognised as an internal or external command operable program or batch file"
Can you or anyone pls help me?
Thanks,
Mehak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 10:04 AM
Hi All, can anyone reply on this? I'm getting this error under pattern that "msva is not recognised as an internal or external command operable program or batch file"
Pls help.
Thanks
Mehak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 10:30 AM
Hi,
That looks very strange. Can't say I have any clue on where "MsVa" comes from. My first guess would be that the command string is not built correctly but I can't find any logic in how it would combine those 4 letters into a command.
Can you test with another command string?
Regards,
Niklas