Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Password protected shared drive access through QV Script

Hi,

I have quite a few files in my shared drive/path that are to be read. Please note that this shared drive is in another Windows server. This drive is password protected.

Is there any way I can embed the credential in QlikView script to access files in this shared path?

Thanks!

Tags (1)
1 Solution

Accepted Solutions

Re: Password protected shared drive access through QV Script

I think you will need to mount this storage before you could access it with qlikview. Maybe you could use a batch-file like this:

IF NOT EXIST T: net use T: \\YourServer\d$  /User:YourUser YourPassword


- Marcus

7 Replies

Re: Password protected shared drive access through QV Script

I think you will need to mount this storage before you could access it with qlikview. Maybe you could use a batch-file like this:

IF NOT EXIST T: net use T: \\YourServer\d$  /User:YourUser YourPassword


- Marcus

Not applicable

Re: Password protected shared drive access through QV Script

Thanks Marcus! I mounted the drive and now I can access it in my Script. I can read files from there. Only problem is I am not able to store through Script in that location.

I think that is related to 'Write Permission' and system admin will take care of that.

Re: Password protected shared drive access through QV Script

Yes this will be a matter of the permissions. But you should consider not to store data there else on the local drive from the qv server then most often are local storages a lot faster then the network.

- Marcus

dgreenberg
Contributor III

Re: Password protected shared drive access through QV Script

Why can't you grant permission to the service account used by QlikView?

This way you don't have to fool around with passwords and mounting drives just grant RW permission to the QlikView service account.

Re: Password protected shared drive access through QV Script

That's not always so easy and you might need to ask the IT for it which needs by us some efforts and a uncertain amount of time. Further you might need also to be able to load manually with the desktop client by using your own account.

Therefore it's easier for me to use various batches which mount, read, copy and synchronize and so on things between production and development environment, our network storages and storages from other companies our group. This meant I need in anyway a bunch of batches and to include checks on which machine it runs and which drives are available and so on isn't much effort. Further if necessary the things will be done per runas:

runas /user:YourUser /savegred "D:\ DataSynchronisation.bat"

- Marcus

dgreenberg
Contributor III

Re: Password protected shared drive access through QV Script

Marcus - just because it's easy doesn't mean it's a best practice

The best practice is to use service accounts and control access that way.

Many companies would consider it a significant security violation to not use Windows Authentication and instead use a username and password which could be shared, read as clear text from your batch file and so on.

Not sure why you would need a runas if the QlikView service account has the appropriate permissions.

Not starting a flame war, just expressing an opinion.

It's easier not to backup

It's easier not to use source control

It's easier if the developers can put files directly on the production servers

It's easier not to document

It's easier not to use comments when needed

I did or didn't do  it because it's easier is something a boss never wants to hear.

Re: Password protected shared drive access through QV Script

Of course, you are right - it's far away from best practices and I'm sure if we would have more support from the management and the IT we would have other solutions for this and probably by some more other topics. I'm not sure if I will ever see that in my company.

- Marcus

Community Browser