Options

Removal of programmable object

ebbebb Posts: 1 New member
edited July 1, 2018 7:44AM in SQL Change Automation

Hi,

I’m evaluating whether SQL Change Automation, is a good fit for our Data Warehouse development cycle.

Looking at the documentation for Programmable Objects, and also testing in Visual Studio – I can’t figure out how to handle the removal of ex. a stored procedure?

Let’s say I have some stored procedure that I want to remove from the database – I therefore delete the programmable object in my SQL Change Automation project.. But this won’t delete the stored procedure in the database, but just the SQL Change Automation project.

Therefore my question is:

How do I delete a programmable object in the SQL Change Automation project, so that it is also reflected in the actual target database?

Tagged:

Answers

  • Options
    MikielAgutuMikielAgutu Posts: 29 Silver 1
    edited July 3, 2018 8:07AM
    Hello

    If SQL Change Automation doesn't recognize the deletion of a PO then you'll have to manually delete the object from your development DB.
    1. In the target database, drop the PO (e.g. using SSMS or the SQL Server Object Explorer in Visual Studio)
    2. In the SCA tool-window, import the change from the target database by clicking Import and Generate Script (This will generate a migration to drop the PO, and also remove the contents of the PO script from the project)
    3. Optionally, delete the empty PO file from the project

    Thanks

    Mikiel Agutu | Software Engineer | Redgate Software
Sign In or Register to comment.