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.

Tags: Database

Similar Questions

  • sqlcl error java... getting started configuration issue

    Hi all

    Enjoy everything that goes into making better equipped sql * more the type of tool.  I tried to get the sqlcl to work today for the first time, and it seems like I'm hitting an immediate road block that seems to relate to my situation of java from windows.  Here is the error in question:

    C:\oracle\sqlcl\bin > sql - optl

    Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/dbtools/raptor/scriptrunner/cmdline/Sqlcli in (UN

    supported major.minor version 51.0)

    at java.lang.ClassLoader.defineClass0 (Native Method)

    at java.lang.ClassLoader.defineClass (unknown Source)

    at java.security.SecureClassLoader.defineClass (unknown Source)

    at java.net.URLClassLoader.defineClass (unknown Source)

    in java.net.URLClassLoader.access$ 100 (unknown Source)

    java.net.URLClassLoader to $1.run (unknown Source)

    at java.security.AccessController.doPrivileged (Native Method)

    at java.net.URLClassLoader.findClass (unknown Source)

    at java.lang.ClassLoader.loadClass (unknown Source)

    to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (unknown Source)

    at java.lang.ClassLoader.loadClass (unknown Source)

    at java.lang.ClassLoader.loadClassInternal (unknown Source)

    C:\oracle\sqlcl\bin >

    You have any suggestions on how to fix this so that I can move forward?  I have to play with sql.bat to identify the java_home?  If so, do you have an example?

    Thanks in advance for any help provided.

    Tom

    Update:

    Was certainly the java version showing a very old 1.4.  The configuration error was in my windows PATH variable env, which contained a very old version of java related to a former Oracle BI installation I've had.

    The fix was to remove all references to this former location of java in the path variable.  Once this has happened, I was able to shoot to the top of sqlcl immediately without problem.

    Thanks a lot for the suggestions of Jeff.  No doubt the eureka moment I needed to sort.

    Now to start your fun with this new tool!

    Thank you

    Tom

  • CBD "Shutdown failed", then failed to connect to CBD more

    Boy I'm in trouble!  I'm in 12.1.0.2 and connected sys as sysdba to my ROOT of $ CBD, I ran ""stop " and that's what I got: "

    Instance stopped

    The database is closed.

    The database is dismounted.

    Closing the database.

    IO error: the network adapter could not establish the connection

    Failed to stop.

    I was still at the prompt of sqldeveloper sql commands and run "startup nomount" but got

    Connection to the base is not alive
    ORA-01081: cannot start already running ORACLE - he stop first
    Failed to start.
    14:02:21 SYS @ localhost:1521 / cdb1 > user sho

    11 October 2015 14:02:29 oracle.dbtools.db.DBUtil handleException
    SEVERE: Warning, unhandled exception: Connection closed
    The USER is 'null '.
    14:02:29 SYS @ localhost:1521 / cdb1 > exit


    I tried to reconnect with sqldeveloper sql but had

    / OPT/sqldeveloper/sqldeveloper/bin/SQL sys@localhost:1521/cdb1 as sysdba

    SQLcl: 4.1.0 Release Candidate on Sun Oct 11 14:02:39 2015
    Password? (**********?) ******
    USER = sys
    URL = jdbc:oracle:thin:@localhost:1521/cdb1

    Error message = IO error: the network adapter could not establish the connection


    I tried to connect with sqlplus ol ' good but had

    sqlplus / as sysdba
    SQL * more: Production of liberation 12.1.0.2.0 Sun Oct 11 14:23:10 2015
    ERROR:
    ORA-12514: TNS:listener is not currently of service requested in connect descriptor of


    How to get out this situation (no CBD, no PDB!)?

    Apparently, you have the TWO_TASK or the variable set to the LOCAL environment, or this wouldn't have happened.

    When you have this variable set oracle_sid is ignored and sqlplus will use the listener.

    ------------

    Sybrand Bakker

    Senior Oracle DBA

  • SSH port forward in upcoming white

    I am trying to set up a connection to database via a hopserver using SSH port forwarding, as described in the article by Jeff SSH Tunnel with #SQLDev 4.1 EA1 and ai2 side by side .  I have screenshots, but don't want to publish sensitive information in the forum - where the descriptive text instead.

    I have 4.1.0.18 SQL Developer build HAND - 18.37 (ai2), identical to his article.

    My laptop with SQL Developer (internal corporate network)

    My-jmpbox-01 (linux hopserver that I can ssh to)

    prod-db-01 (Server database DB on port 1521 of housing)

    From my laptop, I can't not directly to the prod-db-01.  First of all, I must first SSH to my-jmpbox-01.

    Therefore, in the developer SQL 4.1 ai2, here's what I'm trying to do:

    Display-> SSH

    click right-> new host SSH SSH hosts

    Host = my-jumpbox-01

    Port: 22

    Click OK

    Back to the host SSH window

    my_unix_user@my-JumpBox-01 right click-> TEST


    Enter your regular LDAP password

    Click OK

    Back to the host SSH pane:

    Click right my_unix_user@my-jumpbox-01 -> New Remote Port Forward

    Name prod-db-01

    Host: prod-db-01

    Port: 1521

    automatically assign the remote port

    Ok

    should now look like this:

    prod-db-01. right click-> CONNECT

    password

    and OK

    now move your mouse over the line of prod-db-01 and I see a DISTANT PORT (which probably indicates that he got a course valid tunnel).

    Back in the connections (top left) pane

    Click + icon (new connection)

    Display "new database connection:

    login name: prod-db-01

    user name: scott

    password: *.

    connection type: SSH

    Under the Port Forward Dropdown, I don't see the my_unix_user@my-jumpbox-01 or the prod-db-01-connection. It is completely empty.  The troubleshooting steps I can take? has anyone else seen this problem before?

    > Click right my_unix_user@my-jumpbox-01-> new remote Port Forward

    You want a LOCAL port forward

    Take a remote port, for example, your database server network traffic and forward on the SSH tunnel to another destination, say to your client computer.

    An attacker Local port would take your jdbc via SSH traffic to a another machine before a database connection was attempted.

  • NEX - 5N LA - ai2 with Sigma lenses

    Anyone know if the optical image stabilizer works on the Sigma lenses when it is attached to the NEX - 5N camera using the adapter LA - ai2?

    I discovered that the operating system works.

  • sqlcl or sqldeveloper for output command line html (+ other jdbc database connections)

    Hello

    I use shell, awk and php scripts to encapsulate sqlplus for html output requests

    Simple question:

    1 - What is the best (or fastest) way to generate an HTML output of a command line script (sqlplus, sqlcl, sqldeveloper)

    Subsequently, I use sqlplus on a linux machine, because he does not expect 4 or 5 seconds for the launch of all java stuff on every single batch request, and does not expect the end user to the browser page

    can 2 - I use other databases (of course with the related jdbc drivers) with sqlcl?

    (with sqldeveloper, can interrogate data bases mysql or mssql)

    Sorry for my English.

    Thanks in advance.

    Stone

    Set html sqlformat

    coil...

    Run your query

    If you don't like HTML, you might investigate our new SCRIPT function that lets you use javascript to work against your resultset - Kris examples on his blog.

    SQLcl is only for the Oracle database

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

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

  • SQLcl throws the Exception on start and stop operating within the scheduled task

    I'm on Windows Server 2012 R2 runs a script TakeCommand (jpsoft.com) as a task scheduled using SQLcl - 4.2.0.15.177.0246.

    The script is invoked, when the account (with administrative privileges) who runs the scheduled task is not connected to the machine.

    The scenario is as follows:

    • servers both windows ServerA and ServerB (virtual servers)
    • ServerA has a SAN connected directly (as E drive)
    • ServerB remotely accesses drive E on ServerA and maps in drive E (guest ServerB cmd > net use e: \\ServerA\e)
    • the problem occurs on server b.

    Corr 04/09/2015: the SAN is not the cause of the errors/exceptions - it's just that the user who runs the scheduled task is not logged on and therefore has no APPDATA

    When SQLcl is called, the following lines are recorded... (italics: private information, "BOLD": SQLcl output not visible when the user connects while work is carried out at the request)

    03/09/2015 12:16:41.979 to connect to the jdbc URL ... (this output is to the batch calling SQLcl - everything below is SQLcl or SQL script)

    Sep 03, oracle.dbtools.raptor.console.MultiLineHistory load 2015 12:18:05

    SEVERE: HIST-013 APPDATA is null

    Sep 03, oracle.dbtools.raptor.newscriptrunner.commands.net.NetEntries load 2015 12:18:55

    SEVERE: NET-013 APPDATA is null

    Sep 03, 2015 12:18:55 oracle.dbtools.raptor.newscriptrunner.commands.net.NetEntries save

    SEVERE: NET-013 APPDATA is null

    03.09.2015 12:18:56: updated information on what will be done

    0 lines merged.

    0 lines merged.

    03.09.2015 12:19:15: updated information on what will be done

    0 lines merged.

    Exception in thread "cleansing" java.lang.NullPointerException

    in java.io.File. < init > (File.java:277)

    at oracle.dbtools.raptor.newscriptrunner.commands.alias.Aliases.save(Aliases.java:132)

    at oracle.dbtools.raptor.newscriptrunner.commands.alias.Aliases.save(Aliases.java:128)

    to oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli$ 1.run(SqlCli.java:356)

    In addition, that everything works fine... the script is executed as planned, as expected, the queued files are created...

    So what I am doing wrong?

    Best regards, Peter

    Message geändert durch stueckl - information server added

    Message geändert durch stueckl - information server deleted - it's a general problem

    If we were talking about developer SQL itself rather than SQLcl, then the solution is simple... you can always force your user settings to a folder accessible in arbitrary writing using the ide.user.dir environment variable just add something like this line to the file sqldeveloper.conf to your installation:

    AddVMOption - Dide.user.dir =

    SQLcl, however, is hard-coded dependency on APPDATA in Windows (and user.home on Linux).  May not be feasible in your case, but in some cases simple, APPDATA can be overridden in the script that launches the SQLcl and the NetEntries and xml SQL history files are read from / written to this file.

    For example: value APPDATA = C:\Temp

  • 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

  • sqlcl 4.2.0.15.167.0827 - are not not in _SQLPLUS_RELEASE

    Hello

    I play with just the last sqlcl (4.2.0.15.167.0827) and the command show all + .

    In my env, it shows that DEFINES

    SET _SQLPLUS_RELEASE = 0401000000 (NUMBER)

    At least I would expect 0402000000 - or 0402015167 ? (don't know how corresponds to _SQLPLUS_RELEASE).

    Martin

    As sqlcl stuff are still considered beta, this is not something to worry much.

    What you have found with these beta versions is very close to the latest bug fixes.  In addition, the 4.1.1 patch has not been finalized yet if, so far, I guess it will not be appropriate to update _SQLPLUS_RELEASE 4.2

  • How sqlcl can connect to sql server

    Sqlcl can be used to connect to sql server?

    If so, are there references?

    No, Oracle database only.

  • Names using TNS and SQLcl resolution problems


    Hello

    I checked, but I don't see any answer to that.

    I use version 4.1 of EA of SQLcl.  In the video, Jeff says that SQLcl works using TNS, and I understand

    It's all jdbc.  But I was able to resolve names of database using TNS.

    I'm on Windows, and I'm using JRE 1.8.  I tried to set the TNS_ADMIN variable directly, and I tried settting it

    on the java command-line option - Doracle.net.tns_admin =.  But neither makes no difference.

    Here are the lines that I put in the SQL. BAT file.

    set ORACLE_HOME = C:\ProgramData\Programs\Oracle\instantclient_11_2-x64
    Set TNS_ADMIN = C:\ProgramData\Oracle\Network\Admin
    Set JAVA_HOME=c:\programdata\programs\java\jre_1.8


    SET SQL_HOME = % ~ dp0...
    REM the VALUE DEBUG = - agentlib:jdwp = transport = dt_socket, server = y, suspend = o, address = 8000

    Internal use of REM simple X for awt in
    SET STD_ARGS = - Djava.awt.headless = true
    SET JARFILE=%SQL_HOME%\lib\oracle.sqldeveloper.sqlcl.jar
    REM CUSTOM_JDBC="-Xbootclasspath/a:$ORACLE_HOME%\jdbc\lib\ojdbc6.jar.
    SET MYCLASSPATH = % MYCLASSPATH % REM; C:\drivers\3rdparty\sqlserver\jtds-1.2.jar
    SET MYCLASSPATH = % MYCLASSPATH % REM; C:\drivers\mysql\mysql-connector-Java-5.1.24-bin.jar

    %JAVA_HOME%\bin\java.exe % CUSTOM_JDBC % JAVA_OPTS % STD_ARGS %-Doracle.net.tns_admin=%TNS_ADMIN% % DEBUG % - jar '% c %' %. *
    REM - jar Java % c % *.

    But when I connect using SQLcl, it won't resolve the name of the database:

    Error message = IO error: could not resolve the 'DB1' connection identifier

    Needless to say I have 4.1 Developer SQL on the same Windows machine, and that resolves very well. So there is nothing wrong with the

    tnsnames.ora himself.  Someone at - it ideas?

    concerning

    Paul Stuart

    Paul,

    have you tried to add the parameter - optl? It should show you more info.

    So if you use - OIC (and libraries right in your path) sqlcl uses thick/BRC instead of thin.

    Can you give the complete error message with the parameter - optl, please?

    Martin

  • 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

  • sqlcl 4.1.0.15.106.1020 sqlformat insert SCHEMA not attempt schema. TABLE

    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.

Maybe you are looking for