Datical's Deployment Packager for SQL Server requires elevated permissions as documented here: /wiki/spaces/DDOC59/pages/795738600. These roles inclue:
...
This approach leverages Datical's baseline to capture the state of the database (establish baseline before you do anything else - this will populate changelog.xml with initial change sets). Then use custom backup/restore script that doesn't use the native SQL Server backup/restore mechanism (and require the associated privileges).
This script, as part of restoring the database, performs drop of all objects to clean out the database. By configuring to use "on_demand" backup mode, Deployment Packger will use the changelog instead of the backup file to restore the database.
...
- Create baseline of your REF database using the command:
hammer groovy project_baseline.groovy
- Save the groovy script (BackupRestoreSqlServerNoBackupFile-v5.4.groovy) to a path within Datical install directory, e.g.,
C://apps//DaticalDB//repl//scripts//extensions
.- Rename the file to
BackupRestoreSqlServerNoBackupFile.groovy
- Rename the file to
- Update deployPackager.properties with these new lines:
databaseBackupMode=on_demand
databaseBackupRestoreMethod=BackupRestoreSqlServerNoBackupFile
extensionsPath=C://apps//DaticalDB//repl//scripts//extensions
You are now configured with non-elevated use that can run Deployment Packager. Start packager your SQL scripts.
Expected Behavior
For packaging scripts using CONVERT packaging method (ddl): Deployment Packager will always perform a restore operation.
...