Difficult to say without knowing more about the server config. Here's some initial thoughts ...
Is the Qlikview server running any other applications?
What DB connections are you using (ODBC/OLEDB)?
Are the DSNs configured the same?
Is the Qlikview server behind a firewall?
Is the server running data connection at same time as another process on the SQL box?
Connection pooling issues?
... think that's it for starters !
I would monitor from SQL server side first.
Answers to the questions posted;
No - Qlikview is not running any other applications including another database (e.g. Oracle, DB2)
Qlikview is behind the firewall with the database, also my laptop which is also behind the firewall runs fine.
There aren't any other connections running at the time that I ran the script. No sure about connection pooling, will follow-up with the DBA group, I think SQL Server is fine because the script on my laptop runs in a good time.
Qlikview is the only application running on the server. There aren't other database connections (e.g. Oracle or DB2) on the server. I think SQL Server is fine because the script on my laptop runs fine (15 minutes). The connection was the only one runnning at that time so I don't believe connection pooling is an issue