1

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?

craig
  • 25,664
  • 27
  • 119
  • 205

2 Answers2

1

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.

Tab Alleman
  • 31,483
  • 7
  • 36
  • 52
  • How do you *actually* add a `.SQL` file to the folder? Drag and drop doesn't work and I can't seem to locate the actual folder within the project itself. – craig Jan 16 '16 at 14:33
  • 1
    Found the answer: [How to Add a File to the SSIS Project Miscellaneous Folder](https://stackoverflow.com/questions/14193169/how-to-add-a-file-to-the-ssis-project-miscellaneous-folder) – craig Jan 16 '16 at 19:06
1

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
Dave Sexton
  • 10,768
  • 3
  • 42
  • 56