summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2022-01-06 19:15:42 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2022-01-06 19:15:42 +0000
commitbfd66239250190114560114ef2ed324d58abedf3 (patch)
tree0b79ffc73a16de7ed9f592c80b6781d3b927bc2d
parentdd5f9c2039731adb6c019c4cc3a39694f9b236ad (diff)
parenta316caa098e7380beaee63a9f274366b3499d6dc (diff)
downloadsqlalchemy-bfd66239250190114560114ef2ed324d58abedf3.tar.gz
Merge "Add oracle docker instructions to readme unittest" into main
-rw-r--r--README.unittests.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/README.unittests.rst b/README.unittests.rst
index 539df5adf..145311e1a 100644
--- a/README.unittests.rst
+++ b/README.unittests.rst
@@ -297,6 +297,27 @@ NOTE: with this configuration the url to use is not the default one configured
in setup, but ``mssql+pymssql://scott:tiger^5HHH@127.0.0.1:1433/test``. It can
be used with pytest by using ``--db docker_mssql``.
+**Oracle configuration**::
+
+ # create the container with the proper configuration for sqlalchemy
+ docker run --rm --name oracle -p 127.0.0.1:1521:1521 -d -e ORACLE_PASSWORD=tiger -e ORACLE_DATABASE=test -e APP_USER=scott -e APP_USER_PASSWORD=tiger gvenzl/oracle-xe:21-slim
+
+ # enter the database container and run the command
+ docker exec -ti oracle bash
+ >> sqlplus system/tiger@//localhost/XEPDB1 <<EOF
+ CREATE USER test_schema IDENTIFIED BY tiger;
+ GRANT DBA TO SCOTT;
+ GRANT UNLIMITED TABLESPACE TO scott;
+ GRANT UNLIMITED TABLESPACE TO test_schema;
+ EOF
+
+ # To stop the container. It will also remove it.
+ docker stop oracle
+
+NOTE: with this configuration the url to use is
+``oracle+cx_oracle://scott:tiger@127.0.0.1:1521/?service_name=XEPDB1``. It can
+be used with pytest by using ``--dburi oracle+cx_oracle://scott:tiger@127.0.0.1:1521/?service_name=XEPDB1``.
+
CONFIGURING LOGGING
-------------------
SQLAlchemy logs its activity and debugging through Python's logging package.