0

We have two SQL Server instances with log shipping set on a database. Can I alter the schema (add columns, remove columns etc.) of the table in the Primary instance/db while the table is being used in the Secondary instance/db?

1
  • 1
    Simply put: no. Well, the two instances will remain different until the next log ships and gets applied. So, kind of, temporarily. Feb 22, 2016 at 17:04

1 Answer 1

0

Can I alter the schema (add columns, remove columns etc.) of the table in the Primary instance/db while the table is being used in the Secondary instance/db?

Yes you can. You can run alter command on primary database and at same time a select query can run on secondary database accessing same table this is perfectly fine and allowed. But when the changes you made on primary are replayed on secondary then the users might be disconnected and unless restore operation completes you wont be able to run query. This is subject to condition that you have selected check box Disconnect users in database while restoring

Your Answer

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

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