PARSE INFO

Dallas2
Tera Expert

Hello can anyone assist on script, trying to parse MSSQL15.MSSQLSERVER to be Put in table cmdb_ci_db_mssql_instance on instance_name field. this is coming from running process key parameters (running_process_key_parameters) field. I will be using a business rule, but the string below will not always be the same, the running process key parameters field will have different data, so will need to call the running process key parameters, parse and in put in the instance name field.. 

 

from this "E:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn\sqlservr.exe"-sMSSQLSERVER  

 

Thank you

 

 

 

 

16 REPLIES 16

Vishal Birajdar
Giga Sage

Hi @Dallas2 

 

If I'm not wrong then, you want to get "MSSQL15.MSSQLSERVER" this from below string ..?

 

"E:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn\sqlservr.exe"-sMSSQLSERVER  

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

that is correct, and put that on instance_name field from running process key parameters

Hi @Dallas2 

 

Okh...so you are getting that value from "running_process_key_parameters" field.

 

Here for demo I have added that value in "short_description" field on incident form

 

VishalBirajdar_0-1696478024700.png

 

 

In background script , I'm getting that value and splitting it to get desired value :

 

VishalBirajdar_1-1696478102961.png

 

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

What would need to be changed to get from the running process key parameters field, and put in instance name field in the cmdb_ci_db_mssql_instance table.