on 2017 Apr 01 9:21 AM
Is the GRANT DBA privilege required to call DB_EXTENDED_PROPERTY for a different database, from a Version 12 or earlier database?
Testing indicates "yes" but the V12 Help is silent on the subject of privileges for DB_EXTENDED_PROPERTY.
For Version 16 or later, GRANT MONITOR or GRANT SERVER OPERATOR is required and documented.
According to the v16 What's New docs, no privileges should be necessary for v12 and below:
Returning information for other databases now requires privileges For version 12 and earlier databases, you did not need any permissions to execute the following system procedures and functions to return information for any database.
[...]
* DB_EXTENDED_PROPERTY function [System]
[...]
With 12.0.1.4403, I can confirm that behaviour: A restricted user with no particular privileges connected to his database 0 (db_id 0) can query the properties of another database 1 (although he is no user there at all), such as
select db_name(), db_name(1), db_extended_property('File', 'system', 1);
returns
'MyDatabase', 'demo' , 'C:\\Users\\Public\\Documents\\SQL Anywhere 12\\Samples\\demo.db'
Similarily, calling sa_db_info() and sa_db_properties() list the properties of all loaded databases when called by that user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.