You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using sqlpackage to deploy and manage my database schema. Recently I renamed a stored procedure and notice that a new object was created using the new name while the old procedure is still active on the database. I tried to use DropObjectsNotInSource in my command thinking this would fix the issue but now I am getting the following error:
*** Could not deploy package.
Warning SQL72012: The object [MyDatabase] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Warning SQL72012: The object [MyDatabase_log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 50000, Level 20, State 1, Procedure rds_deny_backups_trigger, Line 34 You cannot GRANT/REVOKE 'BACKUP DATABASE' or 'BACKUP LOG' permission for a user.
Error SQL72045: Script execution error. The executed script:
REVOKE BACKUP DATABASE TO [engineering] CASCADE;
It seems like sqlpackage is trying to drop my database entirely because it is not explicitly defined in the files generating the dacpac. If I try and create the database explicitly I get a different error trying to generate the dacpac with dotnet build.
Build error SQL70001: This statement is not recognized in this context.
I'm struggling to find what I'm missing here. Is there a sqlpackage option I am not seeing?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using sqlpackage to deploy and manage my database schema. Recently I renamed a stored procedure and notice that a new object was created using the new name while the old procedure is still active on the database. I tried to use
DropObjectsNotInSource
in my command thinking this would fix the issue but now I am getting the following error:It seems like sqlpackage is trying to drop my database entirely because it is not explicitly defined in the files generating the dacpac. If I try and create the database explicitly I get a different error trying to generate the dacpac with
dotnet build
.Build error SQL70001: This statement is not recognized in this context.
I'm struggling to find what I'm missing here. Is there a sqlpackage option I am not seeing?
Beta Was this translation helpful? Give feedback.
All reactions