Question & Answer
Question
How do you create a rollback script when replacing a stored procedure?
Answer
Contents
Question
?How do you create a rollback script when replacing a stored procedure?
?Answer
To create a backup of the stored procedure that is being replaced for rollback purposes use the following steps prior to replacing the stored procedure:
- Within the SQL Server Management Studio go to: Object Explorer --> Databases --> [Database hosting the stored procedure]? -->?Programmability--> Stored Procedures.
- Right-click on the stored procedure to be backed up.?
- From the context menu select Script Stored Procedure as.
- Select DROP and CREATE to.
- Select File ....?
- Save the stored procedure creation script.
- Grant permissions to the creation script so TLADMIN and TLUSER users can run the script by adding the following lines at the end of the script:
GRANT EXECUTE ON [dbo].[REPLACE WITH STORED PROCEDURE NAME] TO TLADMIN
GO
GRANT EXECUTE ON [dbo].[REPLACE WITH STORED PROCEDURE NAME] TO TLUSER
GO
If rollback of the stored procedure is needed run the newly created script.
?Applies to version(s): ? All SQL Server-based versions
[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SSERNK","label":"Tealeaf Customer Experience"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]
Was this topic helpful?
Document Information
More support for:
Tealeaf Customer Experience
Software version:
All Versions
Document number:
777729
Modified date:
08 December 2018
UID
ibm10777729
Manage My Notification Subscriptions