Skip to Main Content

SQLcl: MCP Server & SQL Prompt

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!

Can't run a sql script using environment variable anymore (25.1)

Erik van RoonApr 24 2025

Just upgraded to 25.1 and immediately ran into a thousand errors when logging in.
Narrowed it down to the fact that when running a script using an OS environment variable fails.
(Working on windows 11)
spooling to a file, using the same variable is no problem at all.
This functionality worked without any issues pre-25.1.

Running this:

version
host echo %temp%

spool %temp%\TestScript.sql

prompt -- test script to see if I can access it using environment variables
prompt select 'Result of the query in the testscript'  as result
prompt from   dual
prompt /

spool off

host type %temp%\TestScript.sql

@%temp%\TestScript.sql

Everything works fine pre-25.1, but in 25.1 the last statement failes with
SP2-0310: Unable to open file: "%temp%\TestScript.sql"

25.1:

24.2:

This post has been answered by Bilal Oumehdi-Oracle on Jun 9 2025
Jump to Answer
Comments
Post Details
Added on Apr 24 2025
3 comments
248 views