CB Protection: How To Backup and Restore Stored Procedures Before Performing a Server Upgrade
search cancel

CB Protection: How To Backup and Restore Stored Procedures Before Performing a Server Upgrade

book

Article ID: 290928

calendar_today

Updated On:

Products

Carbon Black App Control (formerly Cb Protection)

Issue/Introduction

How to backup and restore stored procedures before performing a Server upgrade

Environment

  • CB Protection Server: All Versions
  • Microsoft SQL Server: All Supported Versions

Resolution

Backup Stored Procedures
  1. Open SQL Management Studio 
  2. Expand the Databases 
  3. Click down to DAS> Programability > Stored Procedures
  4. Right click on each of the stored procedures that came up as changed by the schema validation part of the CBP_Analysis_Script.sql
  5. For each stored procedure, go to 'Script Stored Procedure As' > 'DROP and CREATE To" > File and save them to a safe location.
 Restore Stored Procedures 
  1. Open SQL Management Studio 
  2. Open each .sql file in a Query Window and Execute the saved copy. 
  3. The backed up stored procedure will DROP the current procedure and CREATE the one we backed up. 

Additional Information

  • There will be one saved file version of each of the stored procedures to continue. Each .sql file is designed to drop the stored procedure if it exists, then create it again based on the setting from when we backed up. 
  • These steps are useful for CB Protection Server upgrades if hotfixes and custom changes have been applied to stored procedures that are not included in the version that is being applied.
  • CBP_Analysis_Script.sql can be provided by Carbon Black Support team. This is used to analyze many aspects of the DAS database to determine installation health.