How do you prevent InfoStore Query Timeout after 9 Minutes When Using the BusinessObjects Enterprsie COM SDK?

[] [] [] []

Symptom
BusinessObjects Enterprise COM SDK used to query the Central Management Server (CMS) repository.The query times out after 9 minutes.How do you make the query more efficient?
Resolution
Default CMS query timeout is set to 9 minutes – it is not recommended to change this value, since it’s per-CMS, and will affect overall performance.It is recommended to batch your query, such that each request takes a shorter time to return.Sample code – for returning all Enterprise User defined in the system in batches of 200 User objects – is below.Dim min_id, Users, User
min_id = 0
For safety_count = 1 TO 1000 ‘ Prevent infinite loop

Set Users = iStore.Query("SELECT TOP 200 SI_EMAIL_ADDRESS, SI_FORCE_PASSWORD_CHANGE, SI_NAME, SI_ID, SI_USERGROUPS, SI_USERFULLNAME, SI_ALIASES, SI_DESCRIPTION, SI_LASTLOGONTIME, SI_PASSWORDEXPIRE FROM CI_SYSTEMOBJECTS Where SI_KIND=’User’ And SI_ID > " & CStr(min_id) & " Order By SI_ID ASC ")
If Users.Count = 0 Then
Exit For
End If?For Each User In Users
 ?’ Do stuff with User here ?min_id = User.ID?’ Update minimum value for next batch
?Next
Next

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment