Forum Discussion

Fer_Mic's avatar
Fer_Mic
Copper Contributor
Oct 30, 2024

what is the correct process to deploy SQL server developer script as DBA?

I am DBA currently deploying sql scripts from developers but is not clear to me what is the correct way or process to do it, my concern is about how can I reverse the changes or guarantee data integrity before or after deployment in case of something wrong happen. Should I make a backup every time I deploy? (Some times a day) is there any way to lock specific database to avoid deployment in production by mistake? any recomended tool to make it? Should the developers use always rollback in their scripts? as additional information we are implementing GIT, I am not sure if this tool can handle these thasks better and safely than SQL SSMS Can someone provide feedback please? any comment can help. Thank you all

 

I hope to find the best and safest way to make this task

  • Mike_Lemay's avatar
    Mike_Lemay
    Copper Contributor

    If I'm doing a schema change I always either make a Full backup if the database is in SIMPLE recovery mode, or if the database is in FULL recovery mode, I mark down the time I kicked off the change and do a Point in Time recovery a couple of minutes prior to the change if their script fails.

    You can do transactional rollbacks as well if all that is changed is data.

Resources