How to restrict Apache Zeppelin JDBC Interpreter to only select queries - jdbc

I am doing POC for Apache Zeppelin for reporting purpose. I created a JDBC Interpreter to connect Oracle database. This way our user can execute queries and generate reports. Currently they have to login through toad to fetch data/report every day. We must restrict that.
But problem is, they can also execute update/delete queries. I want our user to run the Select queries and not any DML queries or Inserts.
Is there a way to restrict it? I expected some setting in configuration,
I tried to look on their documentation but couldn't find any clue.

Related

Does cypress support database queries execution

My testing is purely DB queries validation in sql server and need to do automate sql queries.
I am wondering Cypress will support or not .
If yes please get me more information.

Oracle report about executed queries for a specific user before TDE activation

I need to run a performance comparison before activating Oracle TDE on our database (12c).
My idea was to monitor executed queries for a specific user (Java EE App Server) and then replay these queries on a cloned Oracle TDE instance to compare response times.
We found the Oracle AWR feature, however, in this report over 90% of the queries are "system" queries which were not triggered by the App Server's JDBC driver(, but by internal oracle jobs/optimizations?).
Is there some functionality to restrict AWR monitoring to only use queries of a specific user/driver or is there another functionality I could use for conducting my performance tests?
Thanks!
Oracle's Automated Workload Repository (AWR) captures all database activity. You have some flexibility in the depth of statistics it captures, but you can't filter the way you are asking for. When you product an AWR report, you will get everything the database performed, and specifically for the SQL data, you'll get the top or highest load SQL's. There are some additional thresholds you can set to get more SQL in the report, so instead of the top-10, you can get the top-50. This can be set as a default or per AWR report.
More can be found here
Oracle workload repository package

How can you restrict a user to making only SELECT statements on Google cloudSQL

I am currently writing an application that uses google cloud SQL to query and display certain data.
Is there a way that I can programatically enforce that all queries made by the user will be SELECT statements? Or at least ruling out DML statements. For obvious reasons analysing the Query string is quite impractical.
If not, is there a way I can configure the SQL statements accepted by cloud SQL on the app engine configuration?
You can create a new 'read only' user with only SELECT privileges and then use that user from your AppEngine app.
Instructions for setting up user permissions in MySQL:
https://dev.mysql.com/doc/refman/5.6/en/grant.html

OBIEE sql statment generation for jdbc

How does OBIEE generate the sql statements that are then run against the target database? I have a report that generates one SQL statement when executed against Oracle database and completely different when executed via jdbc driver against Apache Drill. My problem is that in the second case the query is not even syntactically valid.
I've read this - http://gerardnico.com/wiki/dat/obiee/query_compiler
but still don't understand the mechanism through which Oracle decides on the actual query to be executed based on the driver.
OBIEE uses a "common metadata model" known as the RPD. This has a logical model of your data, along with the physical data source(s) for it. When a user runs a report it is submitted as a "logical" query that the BI Server then compiles using the RPD to generate the necessary SQL query (or queries) against the data sources.
Whilst Hive and Impala definitely work with OBIEE, I've not heard of Drill being successfully used. If you've got the connectivity working then to sort out the query syntax it generates you need to fiddle with the DBFeatures configuration which OBIEE uses to understand what SQL statements are valid for a given database. So if Drill doesn't support, for example, INTERSECT, you simply untick INTERSECT_SUPPORTED (I'm paraphasing the exact dialog terminology).

How to find sql query in weblogic

I support an application whose UI is built on weblogic server. I need to know the sql query fired in the database whenever any action is performed on UI. Since there a lot of users hence I need to know is there any specific action through which I can identify it ?
Your managed server logs should give you queries run through a PreparedStatement. Any database will give you auditing capabilities so you can track what SQL was run, origins and parameters passed.

Resources