

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Run SQL Server job from Qlikview script
Hi, does anyone knows if it's possible to run SQL Server job directly from Qlikview script?
If it's possible, how to do it?
Thanks in advance
- Tags:
- new_to_qlikview
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. You can create stored procedures to run jobs: Simple way to create a SQL Server Job Using T-SQL
2. You can execute stored procedures that update, delete etc in the SQL Server database. But only if you have the credentials that allow that. If you only have read-only access then obviously you can only read.
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can execute SQL Server stored procedures from the qlikview script using the SQL EXECUTE keywords. See this discussion for example: Re: Ho to execute a Store Procedure in Qlikview
Ask your local friendly SQL Server database administrator for help if necessary, for example for the correct credentials needed to run the stored procedure.
talk is cheap, supply exceeds demand


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Gysbert.
Yeah, I know how to run stored procedures from Qlikview.
The question is:
1. if it's possible to run SQL Job consisting of several steps from Qlikview as well
2. if it's possible to run stored procedure that not only selects but also updates/deletes something from SQL database, when qlikview connection is to "mirror" database which is read-only. Probably not... 😕

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. You can create stored procedures to run jobs: Simple way to create a SQL Server Job Using T-SQL
2. You can execute stored procedures that update, delete etc in the SQL Server database. But only if you have the credentials that allow that. If you only have read-only access then obviously you can only read.
talk is cheap, supply exceeds demand


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah, that's right, I didn't think about creating a stored procedure that runs job.
Great, thank you!


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I looked at the link you've provided - "Simple way to create a SQL Server Job Using T-SQL".
As I understand, what's described there is the way to create a scheduled job using T-SQL instead of creating it via SSMS GUI. So it just creates the job that will still run on it's SQL Server schedule.
What I meant was to create an SQL Server job (doesn't matter how - via GUI or this stored procedure described in the link) but NOT schedule it there because I want to run it from Qlikview reload script directly. Is that possible?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm no SQL Server expert, but I seem to remember that just about anything related to managing a SQL Server instance is done with stored procedures. The UI simply executes the stored procedures in the background. But they can be executed directly too. See for example sp_start_job (Transact-SQL)
talk is cheap, supply exceeds demand


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK.
Thanks again
