Setting database options w/ SQL Packager

Brian DonahueBrian Donahue Posts: 6,590 New member
edited September 23, 2004 5:08PM in SQL Packager Previous Versions
Hi Kevin,

You can customize the package lots of ways by adding a bit of SQL code to the SQL Packager template project. You could, for instance, change the dboption by adding the SQL after the Packager batches have run.

If you have Visual Studio, you can open C:\program files\red gate sql bundle\SQL Packager Code Templates\c#\Package.csproj, then open PackageExecutor.cs and add the line

ExecuteSQLCommand("exec sp_dboption N'db_name', N'recursive triggers', N'true'");

...right after the 'finally' statement in the Execute() method.
This discussion has been closed.