Setting database options w/ SQL Packager
Brian Donahue
Posts: 6,590 Bronze 1
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.
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.