SQL Developer 1.5.5   SPOOL command

Hello,
I have a question to SQLplus command SPOOL
Testsetting:
SQL Developer 1.5.5_5969
Oracle 10g Release 10.2.0.3.0
The output from SPOOL in the log file is only a subset from what I get in the Script Output Panel.
I don't see the SQL Error Message and the number of rows selected or updated. See the scenario below.
Does anybody know, how I can get the whole output to the log file?
Testcase: Start ScriptRunner (F5)
=================================
SET ECHO ON
SPOOL C:\tmp\test.log
SET SERVEROUTPUT ON
SET FEEDBACK ON
WHENEVER SQLERROR EXIT ROLLBACK
select lcode from test_table;
update test_table set lcode = NULL where 1=2;
update test_table set lcode == NULL where 1=2;
SET SPOOL OFF
EXIT
A.) Output from ScriptRunner (F5) at Script Output Panel:
=========================================================
SET ECHO ON
SPOOL C:\tmp\test.log
SET SERVEROUTPUT ON
SET FEEDBACK ON
WHENEVER SQLERROR EXIT ROLLBACK
select lcode from test_table
LCODE
GL
GL
SK
3 rows selected
update test_table set lcode = NULL where 1=2
0 rows updated
update test_table set lcode == NULL where 1=2
Error starting at line 3 in command:
update test_table set lcode == NULL where 1=2
Error at Command Line:3 Column:28
Error report:
SQL Error: ORA-00936: Ausdruck fehlt
00936. 00000 - "missing expression"
*Cause:   
*Action:
Rollback
B.) Output from SPOOL in log file:
==================================
SET SERVEROUTPUT ON
SET FEEDBACK ON
WHENEVER SQLERROR EXIT ROLLBACK
select lcode from test_table
LCODE
GL
GL
SK
update test_table set lcode = NULL where 1=2
update test_table set lcode == NULL where 1=2
Thanks
Markus

The connections are in
C:\Documents and Settings\Application Data\SQL Developer/system1.5.0.53.38/o.jdeveloper.db.connection.11.1.1.0.22.49.35/connections.xml
If you want to back them up, you can just right-click export from the tree.
-kris

Similar Messages

  • SQL Developer 3.0 Unit Test

    Hi all,
    I'm hoping that one of you very knowledgeable individuals may be able to assist me!
    I'm an APEX developer, and I'm trying to make use of Hudson (www.hudson-ci.org) to automate my build process. I can successfully check files out of a source control repository and run them on my database, but I'm falling down when I try to use SQL Developer 3.0 from the command line to execute some unit tests.
    My test environment is a Windows XP SP3 machine running an 11g DB, APEX 4.1 and SQL Developer 3.0. In SQL Developer, I've set up a connection called APPHOME and currently, my unit test repository is on the same connection. If I open a command prompt and execute:
    C:\sqldeveloper\bin>ututil -run -suite -name TEST_PROCEDURE_SUITE -repo APPHOME -db APPHOME -log 1
    It works fine. The suite of tests execute OK, I get UT_SUCCESS back and when I look in SQL Developer, the result is there.
    However, if in a Hudson project I include an instruction that tries to fire exactly the same command, I get a response of: "Connection not found: APPHOME".
    Do I need to do anything special to ensure that ututil will be able to see the connection? The only thing that I can think of is that when I execute ututil from the command line, it does so as the logged in user (me, and I'm the one who has created the connections in SQL Developer) whereas when its fired by Hudson, it is executing as some other user that doesn't have my connections?
    Does anybody have any thoughts about this?
    Thanks in advance!
    Nick

    Hi Nick,
    I think your diagnosis is correct i.e. the connections are specific to your user. To resolve, you can try logging onto the Hudson server as the user that will run ututil, run up sqldeveloper client and import the connections into that user.
    I hope this helps.
    Philip Richens
    SQLDEV Development Team

  • Spool command in SQL Developer 3.1

    Hi,
    I am using sqldeveloper-3.1.05.97 .
    There are few scripts that I need to run on a EBS sandbox to generate txt files for a analysis tool input .
    The script is meant to be run with SQL * Plus but I am getiing a TNS listener error due to which I want to use SQL Developer.
    The Spool command is able to create file in local directory but the oputput is not the query result but the query itself. Please help if anything is wrong in the syntax below:
    ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY';
    SET NEWPAGE 0
    SET SPACE 0
    SET PAGESIZE 0
    SET ECHO OFF
    SET FEEDBACK OFF
    SET COLSEP |
    SET MARKUP HTML OFF
    SET LINESIZE 600
    SPOOL FND_USER.txt
    SELECT USER_ID, USER_NAME, LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, START_DATE, END_DATE, DESCRIPTION, LAST_LOGON_DATE, PASSWORD_DATE, PASSWORD_ACCESSES_LEFT, PASSWORD_LIFESPAN_ACCESSES, PASSWORD_LIFESPAN_DAYS, EMPLOYEE_ID, CUSTOMER_ID, SUPPLIER_ID
    FROM APPS.FND_USER;
    SPOOL OFF

    Hi Partha,
    It seems the line "SET PAGESIZE 0" is suppressing all output in SQL Developer, and not just "all headings, page breaks, titles, the initial blank line, and other formatting information" as documented for SQL*Plus. Keep in mind that SQL Developer does not yet provide full support for all SQL*Plus formatting commands. For example, without SET PAGESIZE 0, the script output tab shows these messages:
    line 2: SQLPLUS Command Skipped: set NEWPAGE 0
    line 3: SQLPLUS Command Skipped: set SPACE 0
    line 8: SQLPLUS Command Skipped: set MARKUP HTML OFF
    I will log a bug for this.
    Regards,
    Gary
    SQL Developer Team

  • SPOOL Command in PL/SQL developer

    Hi,
    Iam executing below command in PL/SQL Developer7.0
    SPOOL 'U:/MyFiles/test.txt';
    select sysdate from dual;
    spool off;
    Iam getting ORA-00900: Invalid SQL Statement. Please let me know what is the exact syntax for SPOOL in PL/SQL Developer.

    Hi;
    Please see below note which is mention to using of spool wiht example:
    http://www.scribd.com/doc/4542950/How-to-Spool-in-Oracle
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12043.htm
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1317802337341
    spool sql*plus's output
    Regard
    Helios

  • SPOOLing in sql developer does not take into consideration SET ECHO OFF

    I'm running SQL Developer 3.1.07.42 on Windows 7 64 bit with java 1.7
    I have the following very simple script just to show the problem:
    SET ECHO OFF;
    SET FEEDBACK OFF;
    SET SERVEROUTPUT ON;
    SET VERIFY OFF;
    SET PAGES 0;
    SET HEAD OFF;
    SPOOL c:\test.sql
    SELECT 1, 2, 3 FROM DUAL;
    SPOOL OFF;
    /if I run it in TOAD 10.6.0.42 it creates the file with
             1          2          3This is as expected (by me)
    if I run the exact same query in SQL Developer 3.1.07.42 , it creates the file with:
    < SELECT 1, 2, 3 FROM DUAL
    1 2 3(the < above is actually ">" but the CODE formatting software is screwing ">")
    but I don't want the ECHOed command to be spooled. For the life of me, I cannot find a way to disable the ECHO from spooling in sql developer.
    Tried the same in 3.0.4 and 2.1.1 with the same (bad) result (plus some warning on some of the unsupported SET commands).
    Am I missing something obvious? Cause like this, the spool command cannot be used in sql developer to generate a CSV file for example, because of the echoed command. And windows doesn't come with SED by default so that is out. (plus that my original script is integrated into a much larger and complex set of scripts and the main script using them is executed from SQL Developer as a company policy (so that everybody uses the same tool and the code runs the same for everybody))
    Any ideas/suggestions are welcome
    Thanks.

    Hi Gary, you seem to have some extensive knowledge. I'd like to follow-up on this thread and try to understand why SQL Developer won't hide the code even though I'm already running the code as a Worksheet (I assume you mean Run Script F5 button in SQL Developer).
    I generally develop in SQL Developer that does a lot of dbms_output to echo data using a Spool command. When I'm in SQL Developer I can't get the code NOT to spool, it typically is echoed directly in the spool file at the top followed by the dbms_output data. If I save the sql file and run in in sqlplus it only outputs the data (good). If I use @C:\xyz_script.sql and hit F5 in SQL Developer it only outputs the data (per your previous answer) -- good.
    So why can't I hit F5 in SQL Developer in the script file and have it only output the data? It just doesn't work no matter how many "SETs" you turn-off.
    Looks like Echo, Term, Feed are supported in SQL Developer, maybe supported means something other than work.
    http://www.oracle.com/technetwork/developer-tools/sql-developer/sql-worksheet-commands-097146.html

  • Using the equivalent of a BREAK ON command in SQL Developer SQL window

    Folks.
    In SQL*PLUS "BREAK ON Col1 ON Col2;", I can generate a report similar to the following:
    Col1Value1 Col2Value1 Col3Value1
    Col3Value2
    Col3Value3
    Col2Value2 Col3Value1
    Col3Value2
    Col3Value3
    Col1Value2 Col2Value1 Col3Value1
    Col3Value2
    Col3Value3
    Col2Value2 Col3Value1
    Col3Value2
    Col3Value3
    etc.
    I want to be able to do the same thing in my SQL Developer SQL window so that I can export the results to a spreadsheet file.
    Does anyone know if this is possible?
    I've tried using the SQL*PLUS BREAK command in my SQL Developer window but it appears to be ignored. My resultset looks something like
    Col1Value1 Col2Value1 Col3Value1
    Col1Value1 Col2Value1 Col3Value2
    Col1Value1 Col2Value1 Col3Value3
    Col1Value1 Col2Value2 Col3Value1
    Col1Value1 Col2Value2 Col3Value2
    Col1Value1 Col2Value2 Col3Value3
    Col1Value2 Col2Value1 Col3Value1
    Col1Value2 Col2Value1 Col3Value2
    Col1Value2 Col2Value1 Col3Value3
    Col1Value2 Col2Value2 Col3Value1
    Col1Value2 Col2Value2 Col3Value2
    Col1Value2 Col2Value2 Col3Value3
    .

    OK thanks.
    I did get around this by using SQL*PLUS to generate an output file with a separation character between the columns and spooling the SQL*PLUS output to a text file.
    I then open the text file with Excel and specify the same character as a column separator. Seems to load properly into Excel.

  • Does SQL Developer allow file spooling?

    Hello, I'm asking whether SQL Developer application allows me to use the spool command to save all the queries I entered during a session into a text file, just like we used to do in sqlplusw.exe, so that they can be used for reference? or do we have to save each single query we enter?

    You can also select All in the output windows. Then you can right click to export the data from the output in several format.
    Regards

  • Spool from SQL Developer 2.1

    Hi all, i have various scripts that use spool to write results to text files. When i run these scripts i get errors for commands like "spool" and "prompt". It's possible to run this scripts and generate spools from my SQL Developer 2.1? Thanks in advance.

    We've found that scripting in SQL*PLUS is easier for us. Of course, we've been using it for years and years ...
    Evita pointed out that SQL*Developer's scriptiing capabilities are more limited than SQL*PLUS'. You can simulate spooling by executing the query(queries) as a script in the SQL worksheet and then saving the output pane.
    Athough the prompt command probably won't work in SQL*DEVELOPER you can still use substitution variables, instead getting a default window with the name of your substitution variable allowing data entry.

  • SQLPLUS commands in SQL Developer

    We are using 11g with Sql Developer. We have some script such as healthcheck etc provided by oracle support, which has SQLPLUS commands in it.
    We are not able to run those in SQL Developer. We are getting errors.
    Are there any way, we could invoke SQLPLUS shell within SQL Developer?
    Thanks in helping.

    Hi qwe16235
    SQLPLUS command failed - not enough arguments
    line 36: SQLPLUS Command Skipped: set lines 300
    line 37: SQLPLUS Command Skipped: set pages 999
    These are formatting commands we do not do yet.
    The other command seems like an error in the middle of a PL/SQL block which we should have covered, just the start of it is not enough to know what the error is.
    An example of bad pl/sql error reporting:
    input:
    show parameter error <-------------- Dummy command so the plsql block does not begin at 1
    begin <----------------starting at line 3
    broken plsql; <------------- bad plsql at line (start)3+(from ora error)2 = 5 (should be 4 - must be one off)
    end;
    output:
    NAME TYPE VALUE
    sec_protocol_error_further_action string CONTINUE
    sec_protocol_error_trace_action string TRACE
    Error starting at line 3 in command:
    begin
    broken plsql;
    end;
    Error report:
    ORA-06550: line 2, column 8:
    PLS-00103: Encountered the symbol "PLSQL" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "PLSQL" to continue.
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    -Turloch
    SQLDeveloper team

  • How to execute command(program) from external file in Oracle SQL developer

    Hi,
    Does anyone know, Oracle SQL developer version 1.0.0.14.67 got any function that can execute command from an external file?
    Example, i have 100 insert SQL inside a text file,
    and i want to use Oracle SQL developer to execute it. How do i read from my text file? Thanks a lots.

    If you're new to Oracle, do yourself and us a favour: read some tutorials and manuals. What sqldev's worth, better download the latest version (1.1.2), lots of fixes and enhancements...
    Now for the big popper: to run an external file: @file
    Best of luck,
    K.

  • How to execute sqlplus command like 'show parameters '  in SQL Developer?

    Hi guys,
    here's another problem i just ran into, is it possible to run sqlplus cmd like 'show parameters ' in this tool? anyone can help? thanks in advance.

    thanks.
    and i just looked into the user guide and found that several sqlplus commands were unsupported in SQL Developer, including 'show '. i don't know why but anyway i get the answer, i can go back to use sqlplus itself.

  • UTL_HTTP, different error codes: APEX SQL Commands vs. Oracle SQL Developer

    Hi, omniscient all!
    I have a code sample where I try to request some URL from an inactive server:
    declare
      l_text varchar2(32000);
    begin
      l_text := utl_http.request('http://inactive.url:7777');
    exception
      when others then
        declare
          l_errcode number := utl_http.get_detailed_sqlcode;
        begin
          dbms_output.put_line(l_errcode);
          dbms_output.put_line(sqlerrm(l_errcode));
        end;
    end;
    /When I run it in Oracle SQL Developer it shows:
    anonymous block completed
    -12541
    ORA-12541: TNS:no listenerWhen I run it in the APEX 4.0 SQL Commands window it shows:
    -29263
    ORA-29263: HTTP protocol error
    Statement processed.The question is: why?
    In real world, I need to make a HTTP POST request (no problem) and catch some exceptions. But instead of the usual ORA-12541 error APEX throws an ORA-29261 one.

    Any thoughts?

  • Is Sql plus command avaliable in sql developer

    SQL developer is able to do most of thing can be done with sql plus with GUI , cool.
    However, seems sql command, such as show parameter, start database have to be done in sql plus.
    is this true?
    most of time in my development, I just open sql developer now. but seems in this statuation, i have to use sql plus.

    jz2 wrote:
    SQL developer is able to do most of thing can be done with sql plus with GUI , cool.
    However, seems sql command, such as show parameter, start database have to be done in sql plus.
    is this true?
    most of time in my development, I just open sql developer now. but seems in this statuation, i have to use sql plus.As far as I know you still have to start the database from SQL*PLUS. If your schema has privileges you can get parameter values in SQL*Developer by querying V$PARAMETER (SET_CATALOG_ROLE privilege).
    The two tools are not the same. Much of what you can do with SQL*PLUS you can do with SQL*Developer but I feel that SQL*PLUS still has better scripting abilities along with its bind variable storate. On the other hand the GUI interface of SQL*Developer Is fairly easy to use. The danger is editing procedures/functions/packages in the database forgetting to back them up from SQL*Developer first; SQL*PLUS forces me to use scripts.
    Depending on what I am doing I use either SQL*PLUS or SQL*Developer (which I like better for queries with long select lists).
    I'm having trouble getting DBMS_OUTPUT.PUT_LINE to work the way I expect in SQL*Developer; sometimes the output just does not appear without repeated executions of the generating program.

  • AddVMOption command in SQL developer configuration files

    Greetings developers,
    I'm a newbie in database and Java world trying to understand what the Oracle sql developer configuration files do by executing AddVMOption commands. I'm guessing this command is something to do with Jdeveloper. Please enlighten me what the command does.
    Regards,
    Valerie

    Valerie,
    Nothing to do with JDeveloper at all.
    SQL Developer (and JDeveloper incidentally) are created using Java - the AddVMOption's that you are referring to are arguments passed to the Java Virtual Machine that is used to run SQL Developer. For example, you can use AddVMOption to give more memory to SQL Developer.
    Hope this clarifies,
    John

  • Can I create a SQL Developer command script?

    I have a frequently repeated process where I:
    open SQL Developer (v3.2.2 because of 32-bit requirements),
    connect to a previously-defined database connection,
    connect to a previously-defined MS Access database connection,
    select 3 tables in Access
    use the context menu to Copy To Oracle
    specify Append on conflict
    and I'm done.
    I would like to automate that process. Can it be done?
    Thanks!

    Sorry; I had read "don't see a 'copy to oracle' action" as a deprecation. I see now you meant that as "not [yet] in the command list." I was also reflecting on the migration tools for MS Access, which seemed to have both grown and shrunk in utility through versions 2, 3, and 4 (which we discussed earlier in another topic).
    And, no, I do not object to bringing sqlplus features into the new product. What I found confusing was the deprecation of sqlplusw, to be replaced by a product that did not provide the same capabilities. But that's mainly a symptom of "everybody wants improvements without any changes." As long as you're making the improvements, keep up the good work!

Maybe you are looking for

  • Output volume on my MacBook Pro is not working

    My output volume on my MacBook Pro is not working. When I go to "Settings", then "Sounds", then "Output", I can not slide the volume bar at all, or change it in the menu bar?

  • Lightroom cc screen blanks while editing

    Just trialling LR CC and I find that using editing tools like the adjustment brush, that the screen blanks after each application of the brush and sometimes the adjustment doesn't happen. I never experienced this with 5.7 My system is OS X 10.10.3 on

  • Starting with a BSP

    Hi everybody, I am starting with a tutorial of BSPs and I am having a problem. I have followed all the steps that the tutorial says but when I want to see the BSP application I don't have anything in the browser. It is like nothing was found. Everyth

  • What is the best 8gb ram upgrade for my new (mid 2012) 15" MBP?

    4gb isn't enough, but Apple's official ram prices are just silly.

  • Relative time

    How can I measure a relative time? System.currentMillis does not work in all circumstances e.g. if the current time is canged outside the current java process.