" /> How to find strategy dbid in ird_strategies db table, from strategy name. - Genesys CTI User Forum

Author Topic: How to find strategy dbid in ird_strategies db table, from strategy name.  (Read 2439 times)

Offline Gef Buneri

  • Sr. Member
  • ****
  • Posts: 373
  • Karma: 0
  • Madness is just a point of view.
Advertisement
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')
« Last Edit: March 27, 2017, 12:26:13 PM by Gef Buneri »

Offline Tambo

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 5
put -d at the end of Target in CME properties and this will show DBID of each folder in CME

Offline Gef Buneri

  • Sr. Member
  • ****
  • Posts: 373
  • Karma: 0
  • Madness is just a point of view.
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?

Offline Gef Buneri

  • Sr. Member
  • ****
  • Posts: 373
  • Karma: 0
  • Madness is just a point of view.
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]
« Last Edit: March 27, 2017, 03:02:34 PM by Gef Buneri »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
That is the DBID. That composite number is something else...

Offline Gef Buneri

  • Sr. Member
  • ****
  • Posts: 373
  • Karma: 0
  • Madness is just a point of view.
I see. Any clue about positive and negative IDs meaning?

[img]http://web.tiscali.it/modifiche/dbid_exmpl_0001.png[/img]

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Maybe deleted ones? No clue exactly. What is important are the positive numbers

Offline Gef Buneri

  • Sr. Member
  • ****
  • Posts: 373
  • Karma: 0
  • Madness is just a point of view.
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.
« Last Edit: March 28, 2017, 02:26:47 PM by Gef Buneri »

Offline Tambo

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 5
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...