Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Gef Buneri on March 27, 2017, 09:42:02 AM

Title: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: Gef Buneri on March 27, 2017, 09:42:02 AM
Hi all, searched forum but di not found nothig I could use to support me reaching this goal.

I would like to find the dbid assigned to an ird strategy (7.5) stored in the blob field, starting from strategy name. Any idea?

Regards,

Gef.

***EDIT***

It do exists a particual meaning for postive or negative DBIDs? (i.e. DBID = '-nnnnn' instead of DBID = 'nnnnn')
Title: Re: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: Tambo on March 27, 2017, 02:42:31 PM
put -d at the end of Target in CME properties and this will show DBID of each folder in CME
Title: Re: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: Gef Buneri on March 27, 2017, 02:51:00 PM
Thanks Tambo, I read this tip in another thread, but seems not to work in CME 7.5, if I'm doing it correctly... the -d is an argument for the link to app, right?
Title: Re: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: Gef Buneri on March 27, 2017, 02:54:39 PM
Oh, wait... maybe I got it. The DBID is showed between parenthesis, in the properties window tilebar?


***EDIT***

Ok, the dbid is there. With composite number like 1_4_nnnn, only the nnnn part is showed; maybe another argument will show the complete id?

[img]http://web.tiscali.it/modifiche/cme_prop_titlebar_0001.png[/img]
Title: Re: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: cavagnaro on March 27, 2017, 03:24:12 PM
That is the DBID. That composite number is something else...
Title: Re: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: Gef Buneri on March 28, 2017, 08:56:21 AM
I see. Any clue about positive and negative IDs meaning?

[img]http://web.tiscali.it/modifiche/dbid_exmpl_0001.png[/img]
Title: Re: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: cavagnaro on March 28, 2017, 02:04:10 PM
Maybe deleted ones? No clue exactly. What is important are the positive numbers
Title: Re: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: Gef Buneri on March 28, 2017, 02:23:53 PM
Thanks Cav; I agree. My first thought was for deleted scripts too, but asked just to be shure 'cause usually other object have a creation/deletion date, but this table is different in structure, so it makes sense.
Title: Re: How to find strategy dbid in ird_strategies db table, from strategy name.
Post by: Tambo on March 28, 2017, 03:45:02 PM
i found this Gef which might be of use...............

Here is how a strategy is saved into DB:
1.A new record is inserted into ird_strategies table.
This record has some long temporary negative number in DBID field (lets name it 'tmpDBID') and a new rbn-file in the RBN field.
2.If the step 1 is successful then IRD sends update/insert request to CfgServer to update/create a corresponding Script object in CME.
3.If the step 2 is successful then IRD deletes the original script record from ird_strategies and updates a temporary record created on step 1 with a permanent dbid. To do this IRDsends two sql statements:
delete from ird_strategies where dbid = <dbid of the script in CME>
update ird_strategies set dbid = <dbid of the script in CME> where dbid = tmpDBID.

I have found out that If strategies are "Stored in database" (stored in ird_strategies) then they should be deleted using Interaction Routing Designer.
If they are not "Stored in database" they they can be deleted using Config Manager or Interaction Routing Designer.

If deleted via CME, then you would certainly leave 'orphan' records in the ird_strategies table.

To prevent this, one could log the 'scripts' folder so that the average user could not delete the objects, but you would need to make sure your IRD users were not locked out.
Also, any IRD user that was logged in to CME could still delete directly...