Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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 🙂
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 🙂
it took a bit, but worked through how to use the tmssqlrow component to make this work properly.
thanks, Chris