Filename With Special Characters like "$" Generates SP2-332 Spooling It Or SP2-310 "Unable To Open File" (Doc ID 761384.1)

Last updated on MARCH 08, 2017

Applies to:

SQL*Plus - Version 10.2.0.1 to 10.2.0.3 [Release Oracle10g]
Information in this document applies to any platform.

Symptoms

SQL*Plus 10g rel2 or 11g in Unix/Linux displays an error trying to create or read a file that includes a special character like the dollar sign in the name, ie, test$.lst

-- Steps To Reproduce:

SQL> spool test$.lst
SP2-0332: Cannot create spool file.

Or

SQL>start /tmp/test$.lst
SP2-0310: unable to open file "/tmp/test$.lst"

-- Business Impact:

Scripting the extraction of DDL files from the database, but some user objects have "$" in the name and it causes the SPOOL command to fail.  In other cases, it is an application requirement having files including a $ symbol.

-- What is working:

Scripts work on MS Windows platform.

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms