on 09-18-2015 11:30 AM
Hello,
database user without dba right couldn`t create a datareader via SACommand.
The result is an exception from method _ExcuteReader.
The user needs read Access to sysuserperm!
It looks like a new join on sysuserperm instead of sysuserperms.
Provider before this fix works fine.
================(Build #2147 - Engineering Case #785764)================
When using the .NET GetSchemaTable() method for a query on a table whose
name was not unique, an exception could have occurred in the provider. This
problem has been fixed.
For example, suppose the following query was executed against the table
“employees” owned by DBA, and there also exists a table “Employees” owned
by the user GROUPO.
SACommand cmd = new SACommand("SELECT * FROM DBA.employees", conn);
SADataReader reader = cmd.ExecuteReader();
DataTable schema = reader.GetSchemaTable();
An exception was raised in the GetSchemaTable call. When the tables have
the same letter case, then an exception would not have occurred but the wrong
schema information could have been returned.
best regards
Jörg
This issue has been fixed in the following SQL Anywhere versions:
17.0.0.1271
16.0.0.2185
12.0.1.4321
as part of CR #790043.
You should download and apply the patches when these are available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have reproduce with SA 16.0.0.2158 on Windows 2012 and assembly 4.5:
SQL Anywhere .NET Data Provider : Permission denied: you do not have permission to select from "sysuserperm" (-121)
I have created two tables with the same name, employees, owned respectively by dba and myUser who has granted only PUBLIC system role.
The .NET code sufficient to reproduce is below:
conn = new SAConnection(uid=myUser;pwd=sql:server=sa16);
conn.Open();
SACommand cmd = new SACommand("select * from myUser.Employees",conn);
SADataReader reader = cmd.ExecuteReader();
DataTable schema = reader.GetSchemaTable();
We are looking into it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.