Using v12.0.1.3817, I have created a remote server with READ ONLY and would like to change the afterwards. The syntax of ALTER SERVER does not seem to allow for that, and just restating the original definition (i.e. simply replacing "CREATE SERVER" with "ALTER SERVER" and omitting the READ ONLY clause) does not change that property, either. So I suspect I have to drop the remote server and create it again - and therefore have to drop and recreate all according remote tables? - Sigh. Question: Or is there a way to modify this property without dropping/recreating? |
FWIW, v17 has enhanced the ALTER SERVER statement to modify the READ ONLY state with the according clause:
|
You are correct that you cannot use the ALTER SERVER statement to change a remote server from read only to non-read only and vice versa. I would categorize what you have found as a bug and will open a bug report to get the problem fixed. |
Interesting... the READ ONLY clause isn't described, just shown in the syntax.
You're relating to CREATE SERVER, aren't you? FWIW, it's not described but surely does have the expected effect:
Trying to modify the contents of a proxy table on a READ ONLY server issues a -658 error ("Remote server '%1' is currently configured as read-only").
In contrast, ALTER SERVER does not allow that clause:
issues a -131 sintax error for "READ".