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

Similar Messages

  • 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

  • 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.

  • 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 connect using sqlplus, cannot using SQL Developer

    Hi
    I cannot find out why I cannot connect using SQL developer, while sqlplus works fine with the same login information.
    *1. TNS ping:*
    C:\>TNSPING manila
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-GRU-2
    010 13:28:38
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.171)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
    OK (370 msec)
    *2. sqlplus*
    SQL> CONNECT SULU_DEV/<pass>@MANILA
    Connected.
    *3. sqlplus - by IP*
    SQL> CONNECT SULU_DEV/<pass>@10.0.0.171:1521/XE
    Connected.
    *4. SQL Developer*
    Username: SULU_DEV
    Connection type: TNS
    Network alias: MANILA
    Error: I/O Exception: Connection reset
    *5. SQL Developer - by IP*
    Username: SULU_DEV
    Connection type: Basic
    Hostname: 10.0.0.171
    Port: 1521
    SID: xe
    Error: I/O Exception: Connection reset
    *6. SQL Developer - without username*
    Username: <blank>
    Connection type: TNS
    Network alias: MANILA
    Error: ORA-01017: invalid username/password
    It seems that I have connection to the server, but from some reason it is disconnected when I'm using SQL Developer, but works fine with sqlplus.
    Any ideas on what it might be?
    Thank you in advance,
    Regards,
    Marek

    The connection export function it's available in 2.1.1.64, you need to right click on the main Connections node, and it will allow you to export all or part of the current connections, or import from a previously exported file.
    As for the highlight statement feature it's available in SQLDeveloper; actually you do not even have to highlight the required statement, as long as you take the habit of ending every statement with a ";", in this case you only need to place the caret inside the statement and SQLDeveloper will automatically highlight it for you (if you want to manually highlight a statement you can still do so without problems).
    Finally as a last try to solve your connection problem without having to call for network support you could try to check
    Preferences -> Database -> Advanced -> Use OCI/Thick DriverThis will force SQLDeveloper to use your oracle client for connections instead of it's native JDBC based connections (even if you use TNS based connections you will still use JDBC unless you have this checked).
    As for other graphical tools for Oracle there are many both free or for a price.
    1) In the for price world Toad stands out, i heard of a free option too but I'm not sure of the limitations.
    2) For free you can use DBVisualizer which is fairly good (never used it too much thou).
    3) Finally there is SQuirreL which is both free and open source but it has fairly basic functionality compared to the two above.
    Obviously there are many others, but IMHO few will provide you with the same functions of SQLDeveloper or Toad for Oracle databases

  • SQL Developer, SQL Server and the ampersand

    Hello,
    I am connected to a SQL Server database (2008) and am having difficulty getting a query to run properly in SQL Developer (3.1.07).
    Simplified Example
    select table_field
    from table
    where table_field <> 'This & That';
    Expected results
    table_field
    Other stuff
    Other stuff
    Other stuff
    Actual results
    table_field
    Other stuff
    This & That
    This & That
    I cannot seem to get SQL Developer to recognize the & as a literal ampersand. I've tried escaping it numerous ways, but it always thinks it is a variable.
    The query works exactly as expected in MS SQL Management Studio and Toad. Of course, I can just run it in one of those but I'd like to try to get this to work in SQL Developer. Suggestions?
    Please let me know if I can provide further information. Thanks.

    Hi,
    SQL Developers worksheet is designed for Oracle, but we allow you to run statements against SQL Server and other non Oracle databases.
    This can lead to some quirks, like the one you experienced.
    Oracles SQL*Plus uses ampersand to define substitution variables.
    Oracle SQL Developer has implemented the same concept.
    Unfortunately this does not make sense when running something against a non Oracle database.
    As a workaround, you can run the following SQL*Plus command in SQL Developer, before your SQL Server query.
    SET DEFINE OFF;
    select 'hello & goodbye';
    The following maybe of some help as well.
    http://dermotoneill.blogspot.com/2010/11/workheet-hints.html
    http://dermotoneill.blogspot.com/2010/12/sql-server-and-sybase-browsing.html
    Regards,
    Dermot.
    SQL Developer Team.

  • Executing a procedure - Works on Isql Plus but not SQL Developer??

    Hi folks.
    I am playing around with some design and structure stuff, mostly just passing values around procedures. I have one procedure (procedure1) which takes a sysdate and then passes it to another procedure (procedure2) which takes the parameter and does a dbms_output.put_line.
    Both objects are valid, and compile correctly. I use
    exec procedure1;
    in iSql Plus and it works perfectly. It prints the dates out and all.
    However if I use the exact same command in SQL Developer it gives me error "ORA-00900: invalid SQL statement"
    I don't understand why this happens?? The code executes perfectly in one but not the other...

    Remember that SQL*Plus commands don't work in the worksheet. So, this would fail
    exec my_procIn the worksheet you have to declare an anonymous block....
    begin
        my_proc;
    end;
    /If you right-click on the procedure in the Navigator and select Run then SQL*Dev will throw up a harness for you. Very handy if you want to get DBMS_OUTPUT, set variables, etc.
    Cheers, APC
    http://radiofreetooting.blogspot.com

  • 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.

  • ORACLE SQL DEVELOPER and SQLPLUS

    How can I run the sqlplus command inside of ORACLE SQL DEVELOPER?
    Whe I try to run show SGA command , I get "SQLPLUs command skipped"

    jung1975,
    I have SQL Developer version 1.0.0.14 installed on my PC.
    Under the "Tools" menu, there is a "SQL*Plus" item.
    However, you need to have access to the "SQL*Plus" executable.
    Since my database server is on a different machine (to my PC), that means I need to have Oracle Client also installed on my PC.
    Good Luck,
    Avi.

  • Newbie blues: Oracle Sql Developer showing different data from Sqlplus.

    Newbie blues: Oracle Sql Developer showing different data from Sqlplus.
    First of all; it would be difficult to know less about Oracle than myself.
    I just installed a recent copy of the server and am running SQl Developer 3.2.20.10.
    I made a small test table , borrowed some pl sql code to add rows, then wrote code to delete some rows. Lots of fun.
    In SQL Developer “Select * from t1;” now shows 7 records, which seems right.
    I wanted other views of the data and so logged in from the command line using SQLPlus.
    The same code here shows the table prior to the delete, with 600 plus rows. Needless to say I’ve logged out and back in again, with no changes.
    No fun ! What am I not understanding here ?

    5e33d18c-3b32-48d4-82a7-676feeaa97c9 wrote:
    Newbie blues: Oracle Sql Developer showing different data from Sqlplus.
    First of all; it would be difficult to know less about Oracle than myself.
    I just installed a recent copy of the server and am running SQl Developer 3.2.20.10.
    I made a small test table , borrowed some pl sql code to add rows, then wrote code to delete some rows. Lots of fun.
    In SQL Developer “Select * from t1;” now shows 7 records, which seems right.
    I wanted other views of the data and so logged in from the command line using SQLPlus.
    The same code here shows the table prior to the delete, with 600 plus rows. Needless to say I’ve logged out and back in again, with no changes.
    No fun ! What am I not understanding here ?
    Others sessions never see uncommitted data
    > then wrote code to delete some rows. Lots of fun.
    did you ever actually issue COMMIT so other session can see the changed data?

  • 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

  • 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!

  • W'azup with SQL Developer barfing on SQL*Plus "set" commands

    Check out this short script and the results it generates, as pasted below.
    I can't find anything in the SQL Dev documenation re: what SQL*Plus set commands it supports and which it considers "passe." I'm particularly puzzled by the "column ... format ..." command getting ignored.
    set heading off
    set pagesize 0
    set linesize 80
    set feedback off
    prompt ...start...
    column x format a5
    select 'abcdefghij' x from dual;
    prompt ...end...
    line 1: SQLPLUS Command Skipped: set heading off
    line 2: SQLPLUS Command Skipped: set pagesize 0
    line 3: SQLPLUS Command Skipped: set linesize 80
    ...start...
    X ----------
    abcdefghij 1 rows selected
    ...end...

    For supported SQL*Plus commands: SQL Developer Help > SQL Developer Concepts and Usage > Using the SQL Worksheet > SQL*Plus Statements Supported and Not Supported in SQL Worksheet.
    The "column ... format ...." command is not supported. A workaround is to use substr in your select statement.
    See also How to set a column size in sqldeveloper?

  • Explain Plan in SQL Developer vs. SQLPlus

    Hi everyone,
    I've got a quick question. Why would an explain plan hang in SQL Developer but come back immediately in SQL Plus?
    For example, in SQL developer, I write my statement and use the F6 command to bring up the explain plan and it just hangs and hangs. It looks like it's trying to generate an explain plan, but it's been running for hours now.
    When I log into SQL Plus, I do a
    SQL> explain plan for <query>:
    SQL> select * from table(dbms_xplan.display);That whole process takes less than a minute to get the explain plan.
    Is there something fundamentally different being executed by SQL Developer?
    Thanks!
    -Joe

    Joe,
    F6 in SQL Developer runs an AutoTrace, which actually runs the SQL and also displays timings and the explain plan. If you only want the explain plan, use F10.
    Regards,
    Bob

  • 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.

Maybe you are looking for

  • Mail messages window disappear when searching

    Hello, I'm using Mail 8.0 on OS X 10.10 (14A389). With French language and localisation. This is something I already noticed in Public Beta. I have my Sent folder selected (maybe it would happen with another). I start typing something in the search b

  • Applet fails in Linux but works on Windows and MAC

    Hey I've been testing my RMI Chat and everything seems to work fine when I connect to it from a MAC machine or Windows machine but when I try to connect on Linux (openSUSE) the applet gets a connection timeout. The applet will load initially but when

  • Disable "Open PDF in Broswer"

    Hi, I have created a customized install of Reader 8.2.5 with the "Open PDF in Browser" disabled and greyed out. I would like to know which registry key makes this setting stick because about 50% of my network doesn't have the correct setting after de

  • N9 sync contacts and calendar

    hi, asI unterstand there is no way to sync outlook with the n9 at the moment (why?). could you please add then somewhere a tutorial how to get/sync contacts/calender from the ms outlook to the n9 (if possible not using online services from google or

  • Can i buy previous model imacs from the apple store?

    if i wanted to buy the last imac model shipped with snow leopard (for software compatibility reasons), where can i do that? is it available in the online store? years ago, i remember seeing old model imac/products sold there. i don't mean the pre own