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

Unable to run in thin mode #230

Closed
valhuber opened this issue Sep 14, 2023 · 6 comments
Closed

Unable to run in thin mode #230

valhuber opened this issue Sep 14, 2023 · 6 comments

Comments

@valhuber
Copy link

  1. What versions are you using?

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

  1. Is it an error or a hang or a crash?

Stacktrace

  1. What error(s) or behavior you are seeing?
with engine.connect() as connection:
    print(connection.scalar(text("""SELECT UNIQUE CLIENT_DRIVER
                                    FROM V$SESSION_CONNECT_INFO
                                    WHERE SID = SYS_CONTEXT('USERENV', 'SID')""")))
  1. Does your application call init_oracle_client()?

Thin

  1. Include a runnable Python script that shows the problem.

Full app and doc: click here

@valhuber valhuber added the bug Something isn't working label Sep 14, 2023
@anthony-tuininga anthony-tuininga added install & configuration and removed bug Something isn't working labels Sep 14, 2023
@anthony-tuininga
Copy link
Member

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!

@valhuber
Copy link
Author

valhuber commented Sep 14, 2023 via email

@anthony-tuininga
Copy link
Member

No problem! I'll close this, then.

@valhuber
Copy link
Author

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?

@anthony-tuininga
Copy link
Member

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")

@valhuber
Copy link
Author

valhuber commented Sep 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants