Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

mssql commands

I am new to talend and am in need of executing a set of mssql commands in a sqlserver2008 Master and not finding a good way to do this. 

I need to run the following in open studio 7.01

 

IF EXISTS(SELECT * FROM master.sys.sysdatabases WHERE name = 'rawExport')
DROP DATABASE rawExport;
CREATE DATABASE rawExport;
IF EXISTS(SELECT * FROM master.sys.sysdatabases WHERE name = 'newResults')
DROP DATABASE newResults;
CREATE DATABASE newResults;

--Alter db back to multi user mode
ALTER DATABASE rawExport SET MULTI_USER
ALTER DATABASE newResults SET MULTI_USER"

 

and I need to run this as one step in a series where I am executing other ...bat files, which I have figured out using the tsystem job component.

thanks, for any help

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

    One way is to use the tMSSQLRow component and another trick is to embed all the commands under a Stored proc and call the Stored Procedure using tMSSQLSp component.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi,

 

    One way is to use the tMSSQLRow component and another trick is to embed all the commands under a Stored proc and call the Stored Procedure using tMSSQLSp component.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

it took a bit, but worked through how to use the tmssqlrow component to make this work properly.

thanks, Chris