Ally
Ally

Reputation: 61

SSIS Task - Create Database and Assign that Database to Connection Manager

I am very new to SSIS and struggling with a issue.

I have a very simple Task. I have one excel file and I need to transfer data from that excel file to a New Database and New Table.

1) I created a Execute Sql Task and in that have Create Database and Create Table Sql Command. New Database = Sql2014.

2) Then I have Data Flow. In there I have Excel Source and OLEDB Destination.

3) When I run the Package I get an Error message saying Sql2014 doesn't existing in the connection manager you used.

4) My Execute Task should create that database and in connection manager it should pick that new database but it is not.

Upvotes: 0

Views: 991

Answers (1)

Greg the Incredulous
Greg the Incredulous

Reputation: 1846

You will need to set the DelayValidation property of the task to true as it tries to check if the database exists at run time. Then you should be able to pass the name as a variable to your task through the connection manager. Actually I am not sure if you'll need to set it in the connection manager too.

Upvotes: 1

Related Questions