My Oracle Support Banner

SQL*Plus Prompt Hangs on READ(0) When Call to a Script on Last Line Without CR and SQLPROMPT Set (Doc ID 2996543.1)

Last updated on JANUARY 08, 2024

Applies to:

SQL*Plus - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

On : 12.1.0.2 version, SQL*Plus

ACTUAL BEHAVIOR

When SQLPROMPT is used, and a call to a script is on the last line of the SQL script file, then the prompt hangs on read(0), waiting for user input.

A workaround is to add a line (CR) at end of calling script.

This reproduces on 10.2.0.1, 12.1.0.2, 19.x, both with remote clients and directly on the server.

EXPECTED BEHAVIOR

Expect it to work regardless if there is a CR at the end of calling script.

STEPS TO REPRODUCE
Given two scripts:

invoke-sqlplus-prompt-bug.sql :

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.