2

In SQLcl setting spool to file gives error "SP2-0556: Invalid File Name". There are no whitespaces in file name, and the path is correct (folder C:\Temp does exist). Have tried;

spool load_data.sql
spool C:\Temp\load_data.sql
spool "C:\Temp\load_data.sql"

Using SQLcl 17.2.0 on Win10, OracleXE11. From sqlplus spool-ing works OK. How can I set SQLcl to spool to file?

Davor
  • 25
  • 1
  • 6

1 Answers1

3

There's a bug right now in sqlcl -- seems to be there up through version 17.3 This workaround appears to fix the problem in most o/ses

set encoding UTF-8
spool load_data.sql

... in windows try this ...

set encoding windows-1252
Beege
  • 665
  • 4
  • 18
  • Previous was on unix; here's something I just tried on my windows 7 and it also works in sqlcl v17.3 : set encoding windows-1252 Oh yeah, be sure you're running the .bat file – Beege Oct 23 '17 at 12:49
  • Yes, that did the trick. I've set encoding to windows-1250 (my Windows locale) and it works. – Davor Oct 24 '17 at 15:54
  • When I try this I get SP2-0158: unknown SET option "encoding" on windows 8 using sqldeveloper – justin cress Dec 15 '17 at 18:12
  • On Windows 7, defining windows-1252 solve my problem; I voted up :-) – schlebe Sep 11 '18 at 11:50