• Restore the database to a test server (not to the same server that the database already exists); extract the stored procedure code and permissions on the stored procedure; put the restored database offline or detach; run the extracted scripts on the required database and grant require permissions.