Skip to Main Content

Oracle Developer Tools for VS Code

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Valid Oracle SQL receives "Unexpected Packet" error when run through VS Code

user-wpxhgApr 4 2023

I was debugging a SQL query when I ran across a strange error. After some work we obtained the following minimal query to cause the bug.

select /** :'*/ dummy --'
from dual;

Running this in VS Code with the extension Oracle Developer Tools for VS Code (SQL and PLSQL) v21.5.0 results in the following error.

TTCExecuteSql:ReceiveExecuteResponse - Unexpected Packet received.

The query runs entirely fine in SQL Developer on the same databases. I have run this against multiple 19c databases, and one 12c database as well.

Any character in the comments of the query can be removed and the query will run correctly. Almost any character can be replaced with 'a' and the query will run as well--except for the space after the colon.

I can fix the error by removing parts of the offending query. Strangely enough, you can insert a lot of text within the comments and the error will persist. We originally found the error in a working query.

Why does this happen, and how can it be fixed?

Comments
Post Details
Added on Apr 4 2023
3 comments
836 views