craig
craig

Reputation: 26262

Include SQL scripts in SSIS package?

I have a few SQL scripts (e.g. create tables) that I would like to include in my SSIS project for the sake of tidiness and inclusion in the Git repository. They aren't used by the package itself.

Is there a good place for them (perhaps the Miscellaneous folder) ? Are there any issues with including them in the project?

Upvotes: 1

Views: 1197

Answers (2)

Dave Sexton
Dave Sexton

Reputation: 11188

Another option that I have often used to store all setup tasks is to place them all in an Execute SQL Task and then right-click on it an select disable. That way it doesn't effect the package when running, but should you need to recreate the database/tables it becomes as simple as:

  1. Right-click and select Enable
  2. Right-click and select Execute Task
  3. Right-click and select Disable

Upvotes: 1

Tab Alleman
Tab Alleman

Reputation: 31775

We use this approach all the time, storing CREATE TABLE and other set-up scripts in the Misc folder. We've never had a problem with this approach.

Upvotes: 1

Related Questions