sqlcl 4.1.0.15.106.1020 trimspool kills sqlformat csv
with these simple commands
set trimspool on set sqlformat csv spool dual.csv select * from dual; spool off;
I get this stack trace:
Apr 23, 2015 12:54:46 PM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run SEVERE: java.lang.System.arraycopy(Native Method) java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at oracle.dbtools.raptor.newscriptrunner.WrapListenBufferOutputStream.write(WrapListenBufferOutputStream.java:183) at oracle.dbtools.raptor.newscriptrunner.WrapListenBufferOutputStream.reallywrite(WrapListenBufferOutputStream.java:227) at oracle.dbtools.raptor.newscriptrunner.WrapListenBufferOutputStream.write(WrapListenBufferOutputStream.java:217) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291) at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) at oracle.dbtools.raptor.format.ResultsFormatter.print(ResultsFormatter.java:566) at oracle.dbtools.db.ResultSetFormatter.formatResults(ResultSetFormatter.java:105) at oracle.dbtools.db.ResultSetFormatter.formatResults(ResultSetFormatter.java:61) at oracle.dbtools.raptor.newscriptrunner.SQL.processResultSet(SQL.java:494) at oracle.dbtools.raptor.newscriptrunner.SQL.executeQuery(SQL.java:418) at oracle.dbtools.raptor.newscriptrunner.SQL.run(SQL.java:56) at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQL(ScriptRunner.java:294) at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:202) at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:269) at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:180) at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:250) at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:257) at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:682) at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:297)
can someone please reproduce?
Thanks for reporting this... reproduced and placed on listening.
Tags: Database
Similar Questions
-
sqlcl 4.1.0.15.106.1020 tnsping throws NULLPointerException
While playing with sqlcl 4.1.0.15.106.1020, I can reproduce this behavior:
berx$ ./sql /nolog SQLcl: Release 4.1.0 Release Candidate on Thu Apr 16 22:05:22 2015 Copyright (c) 1982, 2015, Oracle. All rights reserved. SQL> tnsping Apr 16, 2015 10:05:27 PM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run SEVERE: oracle.dbtools.raptor.newscriptrunner.commands.PingCmd.ping(PingCmd.java:69) java.lang.NullPointerException at oracle.dbtools.raptor.newscriptrunner.commands.PingCmd.ping(PingCmd.java:69) at oracle.dbtools.raptor.newscriptrunner.commands.PingCmd.handleEvent(PingCmd.java:53) at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:380) at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:197) at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:269) at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:180) at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:250) at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:257) at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:682) at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:297) SQL>
probably should say "you want to do a ping?"
My approx. is a MacBook with OSX 10.10.3
java -version java version "1.8.0_40" Java(TM) SE Runtime Environment (build 1.8.0_40-b25) Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
Yes, it's a bug
-
sqlcl 4.1.0.15.106.1020 LOADING ignores decimal marker
Please see this unit test:
I can only reproduce it on my Windows7 PC, but not on an environment Redhat 6 (same DB (12.1.0.2) and db-user):
ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '. ' ; drop table MAMUE ; CREATE TABLE MAMUE ( SCODE VARCHAR2(54), "EDATE" DATE, "AMOUNT" NUMBER(21,3) NOT NULL ENABLE, "LDATE" DATE ); Insert into MAMUE values ('ccc', to_timestamp('24.12.15','DD.MM.RR HH24:MI:SSXFF'), 19/2, null ); set sqlformat csv spool MAMUE.csv select * from MAMUE; spool off; rollback;
the file Mamue.csv should look like this:
"SCODE","EDATE","AMOUNT","LDATE" "ccc",24.12.15 00:00:00,9.5,
Now I have load data and check the value:
LOAD MAMUE MAMUE.csv SQL> select amount from mamue; "AMOUNT" 95
I expect 9.5 but got 95.
As I can only reproduce on a single customer (but not another) I'm ready to dig into it, if someone can advise me?
Martin
This problem is fixed in sqlcl.4.1.0.15.177.0246 now.
Thank you very much!
Martin
-
without schema name, I get a correct insert statement:
set sqlformat insert select * from DUAL;
REM INSERTING into DUAL
SET DEFINE OFF;
Insert into DUAL (DUMMY) values ('X');
but
set sqlformat insert select * from SYS.DUAL;
REM INSERTING into SYS
SET DEFINE OFF;
Insert into SYS (DUMMY) values ('X');
which doesn't really make sense?
Martin
Thanks for reporting this... reproduced and placed on listening. This applies to both sqlcl and spreadsheet user interface.
-
Csv output SQLCL differs from output csv SQLPLUS
Hello
I try to replace my script sqlplus generating a csv file.
with a new one generated by sqlcl because sqlcl seem to handle it "natively".
However, I have several problems, it's not so easy... (it is not possible, in fact, as a replacement for sqlplus by sqlcl to generate a csv file)
There are several differences with the release made with my script in sqlplus. Let me explain
NB: Please note I'm french therefore:
* default csv separator is; (but I could accept this separator is)
* decimal separator is ",".
Script from SQLplus
trigger the echo
Set feedback off
fixed term off
set point
Go head
the Embedded value on
set pagesize 0
break off Set
NEWP NONE Set
set SPACE 0
TAB SET OFF
recsep off Set
left the underline
COLUMN of resource_type FORMAT A10 COLUMN TYPEE
ALTER session set nls_date_format = "dd/mm/yyyy";
ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ",";
set LINESIZE 30000
Set trimspool on
Coil test.csv
SELECT "'sysdate';'" COL1 "; "" COL2 "; "" LENGTH "' double.
SELECT
'"' || SYSDATE | « « ; » »
'"' || trunc (sysdate) | « « ; » »
|| To_char (sysdate, ' DD/MM/YYYY HH24:MI:SS'). « « ; » »
|| RM. LENGTH | '"'
Of
TABLE RM
WHERE
RM. CODE = "ABCD";
spool off
output
SQLCL script
trigger the echo
Set feedback off
fixed term off
set point
break off Set
Set trimspool on
Set sqlformat csv
Coil test2.csv
SELECT
SYSDATE,
trunc (sysdate),
To_char (sysdate, ' DD/MM/YYYY HH24:MI:SS'),
RM. LENGTH
Of
TABLE RM
WHERE
RM. COL = 'ABCD '.
;
spool off
output
SQLplus output CSV (and the result is correct)
"sysdate"; "' COL1 '; "" COL2 "; "" LENGTH ".
"11/05/2015"; 11/05/2015; "11/05/2015-11:11:27 '; "6.07"
SQLCL CSV output
< blank line >
"SYSDATE", "TRUNC (SYSDATE)", "TO_CHAR (SYSDATE," DD/MM/YYYY HH24:MI:SS) ',' LENGTH' "
05/11/15 11:12:12, 000000000, 05/11/15 00:00:00000000000, ' 11/05/2015 11:12:12 ', 6,07
--------
You can see in the output of SQL CL
* an empty line first (?)
* the fields sysdate is followed, 0000000, which breaks the structure of the csv file. Don't know why this is displayed.
* value sysdate is fine (date + hour) in sqlcl, trunc (sysdate) should not display the time (minor)
* in sqlplus then I've not used instructions ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ",".
digital data are 6.07 (whereas it should be 6.07, and default sqlplus output. (In sqlplus to 6.07, I need to put the NLS_NUMERIC statement above))
* in sqlplus, only char data are placed in square brackets. In my case it would be necessary to have each data attached to make sure that imposing CSV is safe.
If too many problems, I can't currently use sqlcl to generate a csv result...
Don (don't know if this is the place to talk about SQL imporvement, , but it would be great if the sqlcl could be improved: )
* the date of issue (000000) would be fixed (unless there is a solution?)
* Digital output default must be with '.'. And after having the opportunity to change the decimal separator, as in SQLPLUS
* We wouldn't abilty to choose whether the data should be included or not in the media (even for digital data / date)
* We would be able to change the csv separator
* no first blank line ould generated (minor)
Thanks for any suggestions you could provide, because at the moment, I can't use sqlcl to the output in csv format, although it has very promising output features
> We are working on support for that now.
What I wanted, it was, it does not work in the latest version available, but work soon.
-
SQLCL - retrieves different number of lines based on the style of SQL
SQLcl: Release 4.1.0 Release Candidate on Tue Jul 14 10:24:05 2015 Copyright (c) 1982, 2015, Oracle. All rights reserved.
I need spool on CSV for 2 SQL statements for a thorough comparison. So, my appearance of SQL statements like this,
set sqlformat csv set trimspool on spool file1.csv select blah blah blah from some_table; spool off
Second SQL looks like this,
set sqlformat csv set trimspool on spool file1.csv with s1 as (sql_statement) ,s2 as (sql_Statement) select blah blah from table join s1 ... join s2 ... ; spool off
the two SQLs are stored in individual files, when I run the first sql, it reads 4400 + lines as expected and generates a CSV. When I run the second SQL (which uses WITH clause), it gets only 50 lines and stops.
Ideas or reasons for this? The second SQL is also expected to extract about 4400 lines, it's the sql developer and I can export in csv, but wait sqlcl behaves well. I guess it I'm missing something here, can someone point me to the error?
TIA
REDA
I think I understand the problem, it was a classic user error. Sorry everyone, I have an obscure where clause that I completely missed. Once removed, it worked flawlessly.
REDA
-
Out of csv Sqlcl, and; delimiter
Hello
When I use the line tool SQLCL command, with defined option sqlformat csv or delimited, sqlformat the delimiter is ', '.
I want to change it to ';', but I can't do it.
I have seen that we can change with SQLDeveloper? I have not yet tested, but I wonder if it is possible with a within the tool sqlcl command line
Any help would be appreciated, thanks...
Is not possible today in SQLcl, but it's a natural suggestion and the progression of the function then I imagine it will happen at some point.
-
4.1 ai2 SQLcl: Y at - it a system variable corresponding to SQL * more ' EDITFILE
There is a system for SQL variable * more called EDITFILE.
Here is an example of this definition (from my login.sql script):
SET EDITFILE "U:\sql\sqlplus\temp.sql."
With SQLcl, what is the corresponding system variable (or don't that there is)?
Here are the ones I see:
Scott@ERPEN2 > view all
AppInfo is DISABLED and the value "SQLcl.
ARRAYSIZE 15
autocommit OFF
AutoPrint OFF
OFF autoTrace
Subtitles OFF
COLSEP ""
copycommit 0
define '& '.
ECHO OFF
escape to OFF
Your COMMENTS on 6 or more lines
topic ON
headsep «|» (hex 7 c)
linesize 80
80 long
longchunksize 80
null «»
formatnum «»
numLargeur 10
PageSize 9999
PAUSE is DISABLED
1102000300 release
Scan IT
SERVEROUTPUT ON SIZE 1000000
space ""
WE reel
SQLCODE 0
sqlprompt "" SCOTT@ERPEN2 > "".
suffix "sql".
termout ON
FREE time
Timing OFF
OFF trimout
trimspool OFF
OFF TTitle
The USER is 'SCOTT '.
check IT
Wrap: lines will be wrapped
Show/set editfile currently not taken in charge. But do you know the new feature alias ? For example, if you enter on the command line,
alias edt = edit U:\sql\sqlplus\temp.sql
then edt will edit your temp.sql and Edit will change the usual default value of the afiedt.buf.
-
12 Firefox just installed on MacBook Pro, OS x 106.8. FF looks great, seems faster too. BUT on the tab menu, the small triangle (to list the information on the tab) is missing; I can't find a way to reinstall using view-> toolbars-> Customize option. Can you help me?
You will see only the "List all tabs" button in Firefox 12 + if it has that many tabs open you get the scroll bar tab buttons appearing.
- Permanent list all tabs button: https://addons.mozilla.org/firefox/addon/permanent-listalltabs/
Bug 714281 - show the tabs button only when tabs band overflows
-
HP pavilion hpe h8-1020: evga geforce gtx 950 in hp pavilion hpe h8-1020
Hello guys I have a hp pavilion hpe h8-1020 and I am looking to upgrade to a nvidia gtx 950 is it compatibile, what I need to supply?
Hello
There is a unknown specification for your motherboard that will prevent you from installing a new 3.0 PCIe x 16 graphics card. Maps 3.0 is backward compatible with PCIe x 16 2.0 slots. Your motherboard may have a PCIe x 16 1.0 slot. None of these options below works on your PC if you have PCIe x 16 version 1.0
The Radeon HD 6570, an option to purchase, is a PCIe x 16 card USB2.0. You can have a 2.0 slot. It is unclear when we look at the characteristics of HP for your PC.
I got a HD 6570. You could not install drivers from AMD with the version of HP of this card. You need to use the HP drivers. It is possible that this card is not a 2.0 card even if the consumer version is a USB2.0 card. We can only guess.
MSI is rolling out hybrid Nvidiacards soon. Try anything tangible yet seen. NVIDIA is slowly releasing the 1000 series cards that require less power. Maybe some OEM will also include hybrid versions that will work on your PC any time.
The 900 series Nvidia graphics cards need the UEFI BIOS.
Your PC has a legacy BIOS.
You have a 300 Watt power supply. You will have to upgrade from food to run a card AMD and respect the strict minimum if you can install a TG 640 GDDR5 map.
You may be able to install (you need a PCIe x 16 slot 2.0) Nvidia 600 series cards or watch hybrid of AMD cards by Sapphire.
AMD cards are longer and require larger power supplies.
You should check that you have the power and the room to install two graphics cards. The cards are also double slot. You will need to verify that you can install a card double slot. Even once, you need a PCIe x 16 slot on the motherboard 2.0.
See you soon!
-
NX unsupported on the NB305-106 - cannot install Windows 10
Hello
I want to install Windows 10 on my netbook NB305-106, but I can't because the NX is not supported. How can I make NX taken care of?NX - Bit means "No eXecute" bit and it is a feature of CPU. It's important to be able requirement to install the system Windows 10 and as far as I know if the processor does not support the NX bit, Win 10 installation is not possible.
-
Issues of model libretto W100 - 106 (UK) - 3G, Windows 7, etc.
Hello forum,.
Just bought a brand-new W100-106 (old stock but sealed package, the latest version of the BIOS, etc.) and I have a few questions, I would like to ask if it's okay.
Absolutely LOVE with this machine, but would like to know:
1. is it possible at all that I can upgrade the machine so that the 3 G module sold in the W100 - 10 d on the continent (Italy and Germany only I think)?
The commercial parts on support "Topaz" page shows me several modem boards if I search on "an a" 3 G and HSDPA. The one who does belong to the Libretto W100?
I probably need a 'real' connection PCB rather than fake mounted in the W100-106. No idea what the part numbers are?
2. the U5400 is a Core i3 processor derived with x 64 using the statement. The libretto W100 will run Windows 7 64 bit?
3. is there any intention to support Windows 8 completely, i.e. some fix for metro applications requiring more than a screen resolution 1024 * 600, possibly combining two LCDs form office one? Any chance Microsoft will correct the problems for agent Windows 8 coming out later this year?
Thank you very much in advance!
> 1. Is there anything that I can upgrade the machine so that the 3G module sold in the W100 - 10 d on the continent (Italy and Germany only I think)?
Well, maybe you can do it from the module 3G is a part removable miniPCI.
AFAIK the W100 - 10 H was fitted with such module
I found a compatible 3G F3607gw module part number: P000531030> 2. The U5400 is a Core i3 processor derived with x 64 using the statement. The libretto W100 will run Windows 7 64 bit?
According to the Intel CPU support Ark page 64-bit instructions located so Win 64-bit should work
http://Ark.Intel.com/products/49156/Intel-Pentium-processor-U5400> 3. Y at - he no intention of supporting Windows 8 completely, i.e. some fix for metro apps which need more screen resolution 1024 * 600, possibly by combining the two lcd, one desk shape computer screens? Any chance Microsoft will correct the problems for agent Windows 8 coming out later this year?
I think this can be answered by Toshiba only and not by members of the community.
But I think you should wait for Win 8 and need to check if the drivers would be available for this device -
Re: Satellite P100-106 - how to pass the BIOS?
Hello
I'm trying to downgrade the BIOS on my P100-106 of 4.80 to the 3.30 original but I don't have a copy of it. No matter who or where it is available?
(Please note I looked already http://www.csd.toshiba.com/cgi-bin/tais/support/jsp/outFrm.jsp?ofId=AskIris&searchString=P100&x=0&y=0 and these BIOS are NOT for the P100-106)
your
Hey,.
It seems that you have a European model for laptop and so you need to download all the drivers and tools of Toshiba's official website:
http://EU.computers.Toshiba-Europe.comBut it seems that he not there no old version available for your laptop BIOS because you can download the newest one.
You must contact an authorized service provider and ask the guy if you have an older version of BIOS.But why you want to downgrade it?
-
Windows 8 on a Toshiba NB305-106?
Hello
Is it possible to put Windows 8 on a Toshiba NB305-106 (now, there is the version Windows 7 starter on it)?
If it is possible (but I'm afraid it isn't), I have to do something before, so my mini is ready for it?
Thanks for your response! :-)Sofie
Post edited by: svdvd
Well, I do not recommend to install Windows 8 but earn 8.1
The hardware requirements is very similar (for the most part the same), but win 8 is passed. So there s no need to start by winning 8.To use the win (Win 8) 8.1 you need computer / laptop support:
Processor: 1 gigahertz (GHz) or faster
RAM: 1 gigabyte (GB) (32-bit) or 2 GB (64-bit)
Free hard drive space: 16 GB (32-bit) or 20 GB (64-bit)
Graphics card: MicrosoftDirectX 9 graphics device with WDDM driver -
Tecra S10-106 does not see the HARD drive 1000GO
Hello
I bought a 1000MB HARD disk and build in on a TECRA S10-106.
The HARD drive was not identified.Do you have an answer why?
Thank you for the help
Hello
He recognized the HARD drive in the BIOS?
If not, then possibly the BIOS can't handle this HARD drive because of the size
Try a 500 GB or 750 GB 2.5 HDD
Maybe you are looking for
-
How can I determine the configuration of TLS/SSL in Firefox ver 38?
I received the following message (partially shown) when I tried to connect to a particular Web site. The secure connection failedAn error occurred during a connection to xxxxxx.xxx. Cannot communicate securely with counterpart: no common encryption a
-
Can I change my subscription of music Apple android on my iPhone?
I want to spend my Android device to iPhone, do I stop my subscription Apple music on my android phone before moving on to the iPhone? Or it switches automatically?
-
Often lose pix or graphics when sending e-mail. How can I fix it?
What Redirection with pix or graphic email, notification that "some pix can not send." What can I do to avoid this problem?
-
I am trying to install: Jane AH - 64 Longbow
The game was designed for Windows 95, however; I learned recently that it is designed to be compatible with XP, as well as other platforms of Windows except Windows 7. Can someone please tell me how? When I click on the installation, I get an error i
-
Hi I have a V2 E4200 and it is updated to firmware Linksys Wifi Smart... Is it possible to block a public IP address?