Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: oracleuserpriv #746

Merged
merged 4 commits into from
Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ Then `pip install cx_Oracle`.
}
```

### Oracle User permissions to run the validator tool:
* CREATE SESSION
* READ or SELECT on any tables to be validated
* Optional - Read on SYS.V_$TRANSACTION (required to get isolation level, if privilege is not given then will default to Read Commited, [more_details](https://docs.sqlalchemy.org/en/14/dialects/oracle.html#transaction-isolation-level-autocommit))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was recently pointed to an issue logged in the Oracle alert log that is caused by SQL Alchemy when the user doesn't have read privileges on V$TRANSACTION. I wonder if we should cover this too. For example:

If you encounter "WARNING: too many parse errors" messages in your Oracle alert log relating to a query from your DVT database account then a workaround is to grant READ privilege on SYS.V_$TRANSACTION. See here for background on this: https://docs.sqlalchemy.org/en/14/dialects/oracle.html#transaction-isolation-level-autocommit

Or do you think this is overkill?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nj1973 - Looking at the issue you shared ,I concur it should be a pre-requisite to have read on SYS.V_$TRANSACTION but don't see any reason to only give this privilege if the users sees the warning. from the doc

"The cx_Oracle dialect attempts to call the Connection.get_isolation_level() method when the dialect makes its first connection to the database in order to acquire the “default”isolation level."

so it seems to me that we should get a read priv on SYS.V_$TRANSACTION instead of the alternative behaviour which would be getting a background warning and setting to default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that makes sense.
Because v$transaction is an unusual privilege to require I think we should include a comment or link to explain why we expect it. Also stating that it is optional (because code continues to function fine without it).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nj1973 - have added the same to doc now.

## MSSQL Server
Please note the MSSQL Server package is not installed by default. You will need to follow [SQL Server](https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server) installation steps.
Then `pip install pyodbc`.
Expand Down