Page 1 of 1

Disconnect users before TI processes running

Posted: Tue Mar 06, 2012 1:19 pm
by Catherine
Hi all,

I know there is no disconnect function in TI, but I'd like to submit you my problematic, in case you have some ideas to solve it.

I have an application where users send data via flat files. A treatment (ie several TI processes) is launched every 30 minutes, if new files have been sent. The treatment lasts less than a few minutes.
The problematic is the following: if users refresh some large reports during the treatment, they may have wrong data in the report (a mix of old and new data).

To avoid this, we have implemented two things in the first process:
1. We remove all the clients (except Admin) from the groups. It prevents users to "connect" during the treatement.
2. We delete all clients (except Admin) to force them to re-connect after the treatment so that they refresh again their reports.
We tested it and it seemed to work. But in the production environment, sometimes, the treatment remains blocked on that first process. It never ends, and the service can not be stopped properly. I guess it is linked to the fact that some users are connected, but not sure.

Here is the code:

Code: Select all

Nb_Clients = Dimsiz('}Clients');
Nb_Groupes = Dimsiz('}Groups');

i=Nb_Clients;
While (i>0);
   Client=Dimnm('}Clients',i);
   if(Client@<>'Admin' & Client@<>'TM1BATCH');
      k=1;
      While (k<=Nb_Groupes);
          Groupe=Dimnm('}Groups',k);
          RemoveClientFromGroup(Client,Groupe);
          k=k+1;
      End;
      DeleteClient(Client);
   endif;
   i=i-1;
End;
Do you have ideas, either to make my process work properly, or to manage my problematic in a different way?

TIA

Re: Disconnect users before TI processes running

Posted: Tue Mar 06, 2012 3:55 pm
by David Usherwood
Some ideas:
a Set the security on the cube(s) to NONE at the beginning of the load and back to READ or WRITE when done;
b Have a hidden slice where the data goes and a rule (& a feeder...) pulling the data to a public slice, controlled by a flag;
c Use BulkLoadMode in the loader. I've little experience of this but the writeups say it locks out all other activity while it runs.
HTH

Re: Disconnect users before TI processes running

Posted: Tue Mar 06, 2012 6:49 pm
by lotsaram
IMO using BulkLoadMode as David has suggested is far and away preferable to the potential hang issues of trying to delete a client who is currently logged in.

Re: Disconnect users before TI processes running

Posted: Wed Mar 07, 2012 4:18 pm
by bradohare
Hi,

Have you had success using the EnableBulkLoad call? I'm currently using 9.5.1 and if I recall correctly if it's executed while a view is running or a chore is running it ended up hanging our instance. I certainly didn't test it very throughly and it was quite some time ago, so I could very well be mistaken.

thanks,
brad

Re: Disconnect users before TI processes running

Posted: Wed Mar 07, 2012 4:23 pm
by jim wood
What Brad has seen I have also seen in 9.5.2.

Re: Disconnect users before TI processes running

Posted: Thu Mar 08, 2012 2:50 pm
by Catherine
Thanks for your answers.
David Usherwood wrote:Some ideas:
a Set the security on the cube(s) to NONE at the beginning of the load and back to READ or WRITE when done;
b Have a hidden slice where the data goes and a rule (& a feeder...) pulling the data to a public slice, controlled by a flag;
c Use BulkLoadMode in the loader. I've little experience of this but the writeups say it locks out all other activity while it runs.
HTH
a I'm currently testing this solution but it does not sound good because it provokes somme error in my process which makes a SaveDataAll (could not reacquire lock on oject...), if a user was connected before the treatment and had opened a view. I go on testing nevertheless.

b I don't want to increase the RAM used so this solution is not for me.

c I have no experience neither with this BulkLoadMode instruction.
It seems a good answer to my problem but I'm afraid by the problem two of you evoked:
jim wood wrote:What Brad has seen I have also seen in 9.5.2.
Jim, I saw you posted about this problem in the bugs part of the forum :
http://www.tm1forum.com/viewtopic.php?f=18&t=5782
What is the status of this bug? Has it been corrected? In which version?

Thank you

Re: Disconnect users before TI processes running

Posted: Thu Mar 08, 2012 4:24 pm
by jim wood
Hi Catherine,

We removed it from our processes and we didn't persue it with IBM as we never formally raised it as a ticket,

Jim.