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.

As DBA I freqeuently use SETUSER to impersonate other users or to impersonate a role that owns a schema (often "dbo", as we have used that for user-defined objects out ot MS SQL compatibility).

With a database running on, I often (but not always) get an error message when issuing SETUSER dbo - claiming SQLCODE -121 ("Permission denied: you do not have permission to set user "dbo"). It does also fail for some other users.

Of course the DBA user does have that privilege, as the following query reveals:

select * from sp_displayroles ('DBA', 'expand_down') where role_name = 'SET USER';

I don't notice that behaviour with and have never noticed that in previous versions...

What could cause this effect?

asked 17 Nov '23, 06:41

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

edited 17 Nov '23, 06:42

Sorry about that. I see that we failed to generate a bug fix entry for SQL Anywhere (we did for SAP IQ).

The issue is fixed in version

permanent link

answered 10 May, 10:44

JBSchueler's gravatar image

accept rate: 20%


Thanks, that's great. We'll get updated.

(10 May, 12:40) Justin Willey

Re: What could cause this effect?

A bug was introduced in a recent change. It can be caused by executing grant/revoke statements on a separate connection. It is corrected in an upcoming release.

permanent link

answered 20 Nov '23, 11:12

JBSchueler's gravatar image

accept rate: 20%

Hi - I can't see a fix for this between builds 7458 & 7672. Does anyone know if it is still an issue in the latest build?

(10 May, 08:18) Justin Willey
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: 17 Nov '23, 06:41

question was seen: 356 times

last updated: 10 May, 12:40