0

How can I restore everything except stored procedures, functions, users from SQL Server 2019 native backup into another DB Server?

We are planning to setup a QA environment from clone of PROD SQL Server 2019. The QA environment will have a few custom changes to the "Programmability(SPs, functions etc.)" section which we want to retain.

In order to refresh the latest data from PROD, the custom changes will be wiped off after the next backup/restore.

How can I restore everything except stored procedures and functions from SQL Server 2019 native backup into another DB Server? Is it possible in SQL Server 2019?

asked Feb 16, 2024 at 4:40

1 Answer 1

1

How can I restore everything except stored procedures and functions from SQL Server 2019 native backup into another DB Server? Is it possible in SQL Server 2019?

No, not directly. Backups need to be consistent and restored fully.

Indirectly, you can script these objects to a secondary copy of the database, temporarily, and manually restore them after the backup restore finishes. I do similar post-restore scripts in a SQL Agent Job so that I can repeatedly run the restore process I need in my QA environment.

answered Feb 16, 2024 at 5:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.