Reconciling Changes Made by Multiple Users

In some environments, multiple users can change the same object at the same time. For example, users can update the structure of an object in the Table or Database Diagram designers or change values in the Results pane of the Query and View designers. This situation can cause conflicts that you must resolve.

Conflicts in the Table or Database Diagram designers

For example, another user might delete or rename a table while you are working with the same or a related table in Table Designer. When you attempt to save your table, the Database Changes Detected dialog box (Database Designer) notifies you that the database has been updated since you opened the table.

This dialog box also displays a list of database objects that will be affected as a result of saving your table. At this point, you can take one of the following actions:

  • Choose Yes to save your table and update the database with all the changes in the list.

    This action could affect tables that share the same database objects. For example, suppose you edit the au_id column in the titleauthors table while another user is working on the authors table, which is related to the titleauthors table by the au_id column. If you save your table, you will affect the other user's table. Similarly, another user can define a check constraint for the qty column in the sales table. If you delete the qty column and save the sales table, the other user's check constraint is affected.

  • Choose No to cancel the save action.

    You can then close the table without saving it. When you reopen the table, it will match what is in the database.

  • Choose Save Text File to save a list of the changes.

    You can save the list of database changes that appears in the Database Changes Detected dialog box to a text file so that you can investigate the cause of other users' changes. For example, if another user edited a table that you marked for deletion, you might want to research whether you should delete it before you update the database.

Conflicts in the Query and View Designer

If you run a query or return the results of a view, the data appears in the Results pane. Multiple users can work on the same set of data at the same time, which can cause conflicts.

For example, you and a colleague can each run a query to show all the data in the titleauthors table. Your colleague changes the first name in the first record returned from Barb to Barbara. At this point, the database has Barbara in that field, while your result set still shows Barb. Now you type in Barbara and click outside the row. A message appears and asks you how you want to resolve the conflict.

  • Click Yes to update the database with your changes.

    This optionl overrides your colleague's changes.

  • Click No to update your result set to match the database.

    This option overrides your changes with those of your colleague.

  • Click Cancel to continue to edit without resolving the conflict.

    In this case, you cannot commit your changes to the database.

See Also

Tasks

How to: Generate Change Scripts

Reference

Database Changes Detected dialog box (Database Designer)

Other Resources

Working with Scripts