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?

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.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.