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

Post version upgrade getting error: ORA-03115: unsupported network datatype or representation #464

Closed
shloktech opened this issue Mar 10, 2025 · 16 comments
Labels
bug Something isn't working patch available

Comments

@shloktech
Copy link

  1. What versions are you using?
  1. Is it an error or a hang or a crash?
  • It is a error
  1. What error(s) or behavior you are seeing?
  • I am getting ORA-03115: unsupported network datatype or representation once I upgraded to 3.0.0 version. For previous version which is 2.5.1 it is working fine.
  1. Does your application call init_oracle_client()?
  • Nope
  1. Include a runnable Python script that shows the problem.
connection = oracledb.connect(
        user=lorem_ipsum,
        password=lorem_ipsum,
        dsn=dsn_connection_string)

In the above code It is giving the ORA-03115 while doing oracledb.connect.

@shloktech shloktech added the bug Something isn't working label Mar 10, 2025
@shloktech
Copy link
Author

Hello @anthony-tuininga , @cjbj
Can you please look into this issue? Downgrading to 2.5.1 works as per expectations

@anthony-tuininga
Copy link
Member

Is this a database that I can access directly? If so, the fastest solution would be to provide me temporary credentials so I can find out what the database is complaining about. If not, you can set the environment variable PYO_DEBUG_PACKETS to any value before running your script and e-mail me the output.

@anthony-tuininga
Copy link
Member

It is useful to know the precise version of the Oracle Database. You can do that by looking at connection.version after a successful connect with 2.5.1 - or by using SQL*Plus if you do have an instant client installation available to you.

@shloktech
Copy link
Author

Hello @anthony-tuininga ,
I cannot provide you access to connect to this database. Sharing the full detail of database versions on which it is working and on which it is not.

Working version:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.26.0.0.0

Not working version:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.24.0.0.0

I got this version using below query:

SELECT * FROM v$version;

@anthony-tuininga
Copy link
Member

Interesting. Thanks for providing the version information. Please e-mail me the packet output. That might be helpful in determining the source of the issue.

@shloktech
Copy link
Author

Hello @anthony-tuininga ,
Unfortunately I cannot e-mail you that but to give you quick heads up on the traceback I have added the oracledb package code traceback. I have removed the internal code that we use and used a lorem_ipsum dummy code which mocks the internal code block:

DatabaseError: ORA-03115: unsupported network datatype or representation
Help: https://docs.oracle.com/error-help/db/ora-03115/
---------------------------------------------------------------------------
DatabaseError                             Traceback (most recent call last)
File <command-3115321176845448>:18
---> 18 connection = oracledb.connect(
     19         user=lorem_ipsum,
     20         password=lorem_ipsum,
     21         dsn=dsn_connection_string)

{location_to_package}/python/lib/python3.9/site-packages/oracledb/connection.py:1257, in _connection_factory.<locals>.connect(dsn, pool, pool_alias, conn_class, params, **kwargs)
   1255     message = "pool must be an instance of oracledb.ConnectionPool"
   1256     raise TypeError(message)
-> 1257 return conn_class(dsn=dsn, pool=pool, params=params, **kwargs)

{location_to_package}/python/lib/python3.9/site-packages/oracledb/connection.py:575, in Connection.__init__(self, dsn, pool, params, **kwargs)
    573     else:
    574         impl = thin_impl.ThinConnImpl(dsn, params_impl)
--> 575         impl.connect(params_impl)
    576 else:
    577     impl = thick_impl.ThickConnImpl(dsn, params_impl)

File src/oracledb/impl/thin/connection.pyx:439, in oracledb.thin_impl.ThinConnImpl.connect()

File src/oracledb/impl/thin/connection.pyx:435, in oracledb.thin_impl.ThinConnImpl.connect()

File src/oracledb/impl/thin/connection.pyx:395, in oracledb.thin_impl.ThinConnImpl._connect_with_params()

File src/oracledb/impl/thin/connection.pyx:376, in oracledb.thin_impl.ThinConnImpl._connect_with_description()

File src/oracledb/impl/thin/connection.pyx:345, in oracledb.thin_impl.ThinConnImpl._connect_with_address()

File src/oracledb/impl/thin/protocol.pyx:333, in oracledb.thin_impl.Protocol._connect_phase_two()

File src/oracledb/impl/thin/protocol.pyx:440, in oracledb.thin_impl.Protocol._process_message()

File src/oracledb/impl/thin/messages.pyx:103, in oracledb.thin_impl.Message._check_and_raise_exception()

DatabaseError: ORA-03115: unsupported network datatype or representation
Help: https://docs.oracle.com/error-help/db/ora-03115/" target="_blank" rel="noopener noreferrer">https://docs.oracle.com/error-help/db/ora-03115/</a>

@anthony-tuininga
Copy link
Member

That traceback shows that the error is taking place during authorization phase two. Unfortunately, that doesn't really help much, but I have asked internally to see what might be the source of the issue.

@shloktech
Copy link
Author

Thank you @anthony-tuininga
Let me check on this within my team and get back to you.

@anthony-tuininga
Copy link
Member

Ok. I tried a 19.24 database and I was able to connect successfully. This is on Linux for both client and server. Can you clarify what your client and server operating systems are? It they also are Linux then that suggests something specific to your database. It would be useful to know what your "compatible" parameter is set to and if you could provide any information about the database that differs from a vanilla installation.

@shloktech
Copy link
Author

Hello @anthony-tuininga ,
I had a discussion within my team and due to company policy we won't be able to update you the above details. The team has decided to migrate towards cx_Oracle package to avoid this issue.

Thank you for your support. Personally I would had liked to solve this problem with you but due to the policy we have to stop here. Closing this issue.
cc: @cjbj

@anthony-tuininga
Copy link
Member

I'm sorry to hear that! There is no reason to use cx_Oracle to avoid the issue, however! You can simply add init_oracle_client() to your code and use thick mode instead.

@cjbj
Copy link
Member

cjbj commented Mar 11, 2025

@shloktech to make it clear in case you need to explain to your team: you should not use the obsolete, unmaintained cx_Oracle driver. Instead use the Thick mode of python-oracledb as @anthony-tuininga suggested - this is equivalent to the cx_Oracle architecture. See Enabling python-oracledb Thick mode.

@cjbj
Copy link
Member

cjbj commented Mar 11, 2025

@shloktech if you do want to progress this, you could open an Oracle Support request and upload details. Even if the Support team won't handle the problem, we will still be able to securely access what you upload.

@shloktech
Copy link
Author

Thank you @cjbj ,
Let me inform the developer who is working on implementing the solution to give a try to: #464 (comment)

If required will open a oracle support request as per: #464 (comment)

@cjbj
Copy link
Member

cjbj commented Mar 29, 2025

@shloktech an ORA-3115 was investigated in #476 and fixed in 8888127. @anthony-tuininga has initiated a build at https://github.com/oracle/python-oracledb/actions/runs/14141151136. When it completes you can download the python-oracledb bundle and install the appropriate package to test. Let us know if it works for you. We hope to make a PyPI release soon and would like confirmation the fix is complete.

@shloktech
Copy link
Author

Thank you @cjbj ,
It is helpful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch available
Projects
None yet
Development

No branches or pull requests

3 participants