Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Sometimes we find a need to modify publications/articles ahead of an extraction.

Naturally, there are sometimes users still in the system, since we're normally trying to make the change in the middle of a work day.

I'm curious why altering an article, say adding a WHERE clause of 1=2, would be rejected if a user has a lock on the corresponding table? By design or bug?

asked 20 Jan '12, 16:23

Calvin%20Allen's gravatar image

Calvin Allen
accept rate: 25%

This is by design. Shared schema locks are held by "ordinary" transactions to ensure that the schema remains fixed over the life of the transaction, to ensure that (for example) the transaction can issue a ROLLBACK and the transaction's updates will be undone correctly.

So any schema modification, including altering an ARTICLE, requires an exclusive lock so as to ensure that any existing transactions can complete before the schema is modified.

permanent link

answered 23 Jan '12, 08:04

Glenn%20Paulley's gravatar image

Glenn Paulley
accept rate: 43%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Jan '12, 16:23

question was seen: 1,917 times

last updated: 23 Jan '12, 08:04