Hi All,

SQL AnyWhere There is a table "dba.TEST1". User "User1" has no rights to insert data into this table. There is a stored procedure "Proc1". The user "User1" has the right to execute this procedure..

procedure dba.Proc1
   GET_IDENTITY('dba.TEST1') as nKEY,
   10 as F1

When calling this procedure, I get the error message: "You do not have permissions to insert into "TEST1"".

If the procedure is slightly changed, then there is no error.

procedure dba.Proc1
declare nID integer;
 set nID = GET_IDENTITY('dba.TEST1'); 
   nID as nKEY,
   10 as F1

Question: Why does an error occur in the first case ? After all, the user has the rights to the procedure, or the request at the end of the procedure does not fall under these rights ? Maybe this is a server error ?

asked 07 Feb '19, 03:30

Stalker's gravatar image

accept rate: 11%

How do you call that procedure, via CALL() or as part of the FROM clause of a SELECT statement?

(I'm asking because in the latter case, the first variant could be inlined because it is just one single SELECT statement, and that might explain the error message...)

(07 Feb '19, 04:01) Volker Barth

I call the procedure as call dba.Proc1()

The procedure “Proc1” is actually a simplified version of the actual procedure. And there before the "select" is still a lot of other sql-code.

(07 Feb '19, 04:38) Stalker
Be the first one to answer this question!
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](http://url.com/ "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: 07 Feb '19, 03:30

question was seen: 985 times

last updated: 07 Feb '19, 04:38