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 Answer
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