Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, I am hoping someone can help me with a technical question.
Let's say I am hosting 4 separate clients on one server:
DatabaseA
DatabaseB
DatabaseC
DatabaseD
And let's say I have a single view called Sales.qvw and this view needs to be there four times, once for each database. I would rename the files to:
Sales_ClientA.qvw
Sales_ClientB.qvw
Sales_ClientC.qvw
Sales_ClientD.qvw
I have already contacted Qlik Support and am told that you cannot have multiple instances of Qlik Server on one machine. So that's out.
I have two issues (maybe more but these are the ones I can think of immediately):
1) I don't want to have to hard code the database name right into the script (we are currently deploying several views per client so this becomes an admin nightmare), so I am looking to figure out if I can access a file where we store the database names. The problem I see is that Qlik Server only allows one folder, so all views would have to be stored in the same folder. So how would a view know which database belongs to which client to load the correct data without some sort of hard coding in the script? Or is this inevitable?
2) How do I prevent ClientB's users from seeing ClientA's data and vice versa and so on...?
Has anyone ever tried this? Does anyone know of a technique of which I am not aware that will make this a fairly simple thing to maintain?
Any help would be most appreciated.
You could use as many folders like you want and also various ways possible to use dynamic code to access any databases, for example reading the folder / filename of a qvw on which a connection/filepath is branched off.
Further there is no need to duplicate all applications n-times else you could use Section Access to control the access to certain applications and the data within them.
- Marcus
Hi Marcus,
Thank you for taking the time to respond.
Altering the Section Access section (or the view script in general) is the thing I am trying to avoid, as I will have multiple different servers with 4 or so different clients on each one.
As for your first statement, do you know of any articles on how to achieve this? I have been working with Qlikview for 13 years but in a very formulaic and specific way (single server for each single client, all with the same database name) so I don't even know where to start to do this.
I'm not sure that I understand what do you want to do. If you encode the client within the path with something like this:
\\YourServer\Drive\QlikView\Clients\A\Applications\...
you could for example with subfield('$(QvWorkPath)', '\', 6) identify to which client the app belonged and use this information within any condition to adjust the connection-string.
- Marcus