Read-only connection (new type)

Feature requests and their debate

Read-only connection (new type)

Postby syop02 » Wed May 13, 2015 12:07 pm

Hello.

The option "read-only connection" don't work on all RDBMS.
Example on DB2 LUW 9.7:
SQL Warning (DataSource: DB2-OSIOTT1-EMODA; Code: 4474; State: 01000): [jcc][t4][10217][10310][4.16.53]
Connection read-only mode is not enforceable after the connection has been established.


My suggestion.
When the connection is read-only, DBeaver does not allow the following commands:
UPDATE, INSERT, UPSERT, MERGE, DELETE, TRUNCATE, CREATE, ALTER, DROP, RENAME, GRANT, REVOKE
It is simple and safe (and works with any db).

Best regards!
syop02
 
Posts: 6
Joined: Wed May 13, 2015 12:02 pm

Re: Read-only connection (new type)

Postby sava » Tue Jun 09, 2015 12:06 pm

+1
sava
 
Posts: 4
Joined: Tue Jun 09, 2015 11:57 am

Re: Read-only connection (new type)

Postby Serge » Sun Jun 28, 2015 11:57 am

DB2 driver doesn't support standard JDBC method to make connections read-only. But they have special workaround - I'll add this workaround in DBeaver in the next version so read-only connections will work for DB2.

Regarding query type checking on DBeaver side. Unfortunately it is not so easy to determine SQL statement type because DBeaver has to understand semantic of SQL queries for all existing SQL dialects.
The only simple workaround is to restrict all non-SELECT queries. But I'm sure it will be way too restrictive. So for now we have to rely on driver implementation.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Read-only connection (new type)

Postby syop02 » Mon Sep 14, 2015 7:38 am

syop02
 
Posts: 6
Joined: Wed May 13, 2015 12:02 pm

Re: Read-only connection (new type)

Postby Serge » Tue Sep 15, 2015 11:38 am

Allowing only SELECT statements has many side-effects.
For instance there are many other ways to retrieve data. E.g. SHOW or DESCRIBE operators or stored procedures calls.
Moreover even SELECT statement can lead to data modifications (thru triggers or stored procedures).
So I still think that it is a bad way to manager read-only connections.

Could you confirm that read-only connection flag works in DB2?
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Read-only connection (new type)

Postby syop02 » Fri Sep 18, 2015 10:12 am

Attachments
2015-09-18_120739.jpg
2015-09-18_120739.jpg (79.91 KiB) Viewed 38118 times
syop02
 
Posts: 6
Joined: Wed May 13, 2015 12:02 pm


Return to Feature Requests



Who is online

Users browsing this forum: No registered users and 16 guests