Closed valhuber closed 9 months ago
The sample app you provided shows the use of Oracle Database 11g which is not supported in thin mode! If you use 19c or the more recent 23c free database release thin mode should work for you just fine!
Blush, I misread he version number, sorry about that
On Thu, Sep 14, 2023 at 8:55 AM Anthony Tuininga @.***> wrote:
The sample app you provided shows the use of Oracle Database 11g which is not supported in thin mode! If you use 19c or the more recent 23c free database release thin mode should work for you just fine!
— Reply to this email directly, view it on GitHub https://github.com/oracle/python-oracledb/issues/230#issuecomment-1719723005, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKSG33EXU2OOEAM2XTGABLX2MSHRANCNFSM6AAAAAA4YFQ37E . You are receiving this because you authored the thread.Message ID: @.***>
No problem! I'll close this, then.
So, I got the database up, can access it fine. Many thanks...
I use a connect string like oracle+oracledb://system:tiger@localhost:1521/?service_name=ORCL
.
How do I restrict that to a specific schema, so that find-tables returns only tables in that schema?
That connect string suggests you are using SQLAlchemy so there might be a way to do that using that tool. If you are using python-oracledb directly you can do this:
cursor.execute("select table_name from all_tables where owner = :owner", owner="MY_SCHEMA_NAME")
Actually, I did some more research, and discovered that one way (most common?) is to define a user with the target schema as default. Your HR example does exactly that.
Then, use the following with SQLAlchemy:
connect_string = ***@***.*** :1521/?service_name=ORCL'
You might want to include this in your docs... I inferred it from elsewhere...
Thanks again for your help, I seem to be up now.
On Thu, Sep 14, 2023 at 2:33 PM Anthony Tuininga @.***> wrote:
That connect string suggests you are using SQLAlchemy so there might be a way to do that using that tool. If you are using python-oracledb directly you can do this:
cursor.execute("select table_name from all_tables where owner = :owner", owner="MY_SCHEMA_NAME")
— Reply to this email directly, view it on GitHub https://github.com/oracle/python-oracledb/issues/230#issuecomment-1720181530, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKSG3YPUZMJJFQOOFPJYOLX2NZ25ANCNFSM6AAAAAA4YFQ37E . You are receiving this because you authored the thread.Message ID: @.***>
-- Thanks, Val
510-703-5909 valhuber on skype
platform.platform: macOS-13.5.2-x86_64-i386-64bit sys.maxsize > 2**32: True platform.python_version: 3.11.4
oracledb.version: 1.4.1
Stacktrace
Full app and doc: click here