Settings of the SQL*Plus interface

Hi,
in 10g R2
how to modify settings of the SQL*Plus interface ?
SQL> show all
appinfo is OFF and set to "SQL*Plus"
arraysize 15
autocommit OFF
..............Thanks.

user522961 wrote:
Hi,
in 10g R2
how to modify settings of the SQL*Plus interface ?
SQL> show all
appinfo is OFF and set to "SQL*Plus"
arraysize 15
autocommit OFF
..............Thanks.http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/toc.htm
HTH
Aman....

Similar Messages

  • The SQL*PLUS cannot be connected

    The SQL*PLUS cannot be connected.
    When I try to connect to sqlplus, I get the following error message: ORA-12560: TNS:protocol adapter error
    I trouble shoot it according to the following steps, but have not found any problems:
    C:\Documents and Settings\Administrator>sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue Apr 27 09:45:51 2010
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    ERROR:
    ORA-12560: TNS:protocol adapter error
    Enter user-name:
    C:\Documents and Settings\Administrator>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 27-APR-2010 09:37:56
    Copyright (c) 1991, 2007, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 11.1.0.6.0 - Production
    Start Date                27-APR-2010 09:35:08
    Uptime                    0 days 0 hr. 2 min. 48 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Listener Log File         f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Services Summary...
    Service "db1" has 1 instance(s).
      Instance "db1", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    C:\Documents and Settings\Administrator>tnsping db1
    TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 27-APR-2010 09:38:46
    Copyright (c) 1997, 2007, Oracle.  All rights reserved.
    Used parameter files:
    F:\app\oracle\product\11.1.0\db_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICA
    TED) (SERVICE_NAME = db1)))
    OK (500 msec)
    C:\Documents and Settings\Administrator>echo %oracle_sid%
    db1Both the OracleServiceDB1 service and the OracleOraDb11g_home1TNSListener service are already started.

    The following is from F:\app\oracle\diag\tnslsnr\HOST1\listener\trace\listener.log
    System parameter file is F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Log messages written to f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Trace information written to f:\app\oracle\diag\tnslsnr\HOST1\listener\trace\ora_2020_1660.trc
    Trace level is currently 0
    Started with pid=2020
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    Tue Apr 27 09:21:18 2010
    System parameter file is F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Log messages written to f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Trace information written to f:\app\oracle\diag\tnslsnr\HOST1\listener\trace\ora_1984_2004.trc
    Trace level is currently 0
    Started with pid=1984
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    Tue Apr 27 09:35:08 2010
    System parameter file is F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Log messages written to f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Trace information written to f:\app\oracle\diag\tnslsnr\HOST1\listener\trace\ora_3740_3788.trc
    Trace level is currently 0
    Started with pid=3740
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    Tue Apr 27 09:37:56 2010
    WARNING: Subscription for node down event still pending
    27-APR-2010 09:37:56 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=185599488)) * status * 0
    Tue Apr 27 09:38:49 2010
    27-APR-2010 09:38:49 * ping * 0
    Tue Apr 27 10:48:44 2010
    27-APR-2010 10:48:44 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=db1)(CID=(PROGRAM=F:\app\oracle\product\11.1.0\db_1\bin\sqlplus.exe)(HOST=HOST1)(USER=Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.2)(PORT=2030)) * establish * db1 * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
      TNS-00530: Protocol adapter error
       32-bit Windows Error: 2: No such file or directory
    Tue Apr 27 10:49:26 2010
    System parameter file is F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Log messages written to f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Trace information written to f:\app\oracle\diag\tnslsnr\HOST1\listener\trace\ora_3948_1304.trc
    Trace level is currently 0
    Started with pid=3948
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    Tue Apr 27 10:50:24 2010
    27-APR-2010 10:50:24 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=db1)(CID=(PROGRAM=F:\app\oracle\product\11.1.0\db_1\bin\sqlplus.exe)(HOST=HOST1)(USER=Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.2)(PORT=2045)) * establish * db1 * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
      TNS-00530: Protocol adapter error
       32-bit Windows Error: 2: No such file or directory

  • Is the SQL * Plus Worksheet included in the Oracle 10g Express Edition?

    Hello All,
    I need to install Oracle 10g for a SQL class that I will be taking this year. I will be installing it in my laptop (Pentium 4, 1GB RAM). I was told by the Professor that I needed to have the SQL*Plus Worksheet. I would like to know which version of Oracle do I need to install, and If it includes the SQL*Plus Worksheet.
    This is my first time working & installing Oracle, so I would appreciate if anyone could guide me thru this process.
    Thanks a lot,
    Ed

    No, it is not included.
    However, the same functionality, and more, is in Oracle SQL Developer - also available free and download-able from the same area as Oracle Express Edition.
    Ask your prof why he want Worksheet. If it's only for the ability to scroll and correct previous SQL (eg: easier time correcting mistakes), and loading scripts, ask if SQL Developer would be allowed. It's much superior and allows you to use XE, which will not sink your laptop like the EE version will.

  • Unable to compile the java class in the SQL PLUS

    Hi Team,
    I am unable to compile the java class in the SQL PLUS in dev1 and dev2. It is giving the following error.
    But the same class get Compiled in the Toad(Tool) without any error and working fine. Could someone help me
    What to do for this for your reference ,Attaching the java class file.
    “ORA-29536: badly formed source: Encountered "<EOF>" at line 1, column 28.
    Was expecting one of:
    ----------------------Here is the Java class Code.....................
    create or replace and compile java source named "XXVM_ZipFileUtil_Ela"
    as
    import java.math.BigDecimal;
    import java.util.zip.Deflater;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import java.sql.*;
    import java.io.*;
    public class XXVM_ZipFileUtil_Ela
    public static oracle.sql.BLOB getZipFile(
    oracle.sql.CHAR zipFilePathCHAR, oracle.sql.CHAR zipFileNameCHAR,
    int fileBufferSize, int zipFileBufferSize,
    boolean deleteZipFile, java.sql.Array fileNames, java.sql.Array fileContents, java.sql.Array fileContentsLength)
    throws IllegalArgumentException, FileNotFoundException, IOException, java.sql.SQLException
    String zipFilePath = (zipFilePathCHAR == null) ? null : zipFilePathCHAR.stringValue();
    String zipFileName = (zipFileNameCHAR == null) ? null : zipFileNameCHAR.stringValue();
    String zipPathAndFileName = new String(
    new String(zipFilePath == null || zipFilePath == "" ? "/tmp/" : zipFilePath) +
    new String(zipFileName == null || zipFileName == "" ? System.currentTimeMillis() + ".zip" : zipFileName));
    byte[] buffer = new byte[fileBufferSize == 0 ? 100000000 : fileBufferSize];
    try
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    oracle.sql.CLOB[] fileContentsCLOB = (oracle.sql.CLOB[])fileContents.getArray();
    String[] fileNamesString = (String[])fileNames.getArray();
    BigDecimal[] fileContentsLengthNumber = (BigDecimal[])fileContentsLength.getArray();
    ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipPathAndFileName));
    zipOut.setLevel(Deflater.DEFAULT_COMPRESSION);
    for (int i = 0; i < fileNamesString.length; i++) {
    System.out.println(i);
    zipOut.putNextEntry(new ZipEntry(fileNamesString));
    InputStream asciiStream = fileContentsCLOB[i].getAsciiStream(1L);
    int asciiReadCount = asciiStream.read(buffer,0,fileContentsLengthNumber[i].intValue());
    zipOut.write(buffer, 0, fileContentsLengthNumber[i].intValue());
    zipOut.closeEntry();
    zipOut.close();
    byte zipFileContents[] = new byte[zipFileBufferSize == 0 ? 100000000 : zipFileBufferSize];
    FileInputStream zipIn = new FileInputStream(zipPathAndFileName);
    int byteCount = zipIn.read(zipFileContents);
    zipIn.close();
    byte returnFileContents[] = new byte[byteCount];
    System.arraycopy(zipFileContents,0,returnFileContents,0,byteCount);
    String returnFileContentsString = new String(returnFileContents);
    if (deleteZipFile)
    boolean deletedFile = (new File(zipPathAndFileName)).delete();
    oracle.sql.BLOB returnFileContentsBLOB = null;
    returnFileContentsBLOB = BLOB.createTemporary(conn, true, BLOB.DURATION_SESSION);
    returnFileContentsBLOB.open(BLOB.MODE_READWRITE);
    //OutputStream tempBlobWriter = returnFileContentsBLOB.getBinaryOutputStream();
    OutputStream tempBlobWriter = returnFileContentsBLOB.setBinaryStream(1);
    tempBlobWriter.write(returnFileContents);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    returnFileContentsBLOB.close();
    return returnFileContentsBLOB;
    catch (IllegalArgumentException ex) {
    ex.printStackTrace();
    throw ex;
    catch (FileNotFoundException ex) {
    ex.printStackTrace();
    throw ex;
    catch (IOException ex)
    ex.printStackTrace();
    throw ex;
    catch (java.sql.SQLException ex)
    ex.printStackTrace();
    throw ex;

    860411 wrote:
    Hi Team,
    I am unable to compile the java class in the SQL PLUS in dev1 and dev2. It is giving the following error.
    But the same class get Compiled in the Toad(Tool) without any error and working fine. Could someone help me
    What to do for this for your reference ,Attaching the java class file.
    “ORA-29536: badly formed source: Encountered "<EOF>" at line 1, column 28.
    Was expecting one of:
    I believe the error message is clear and self-explanatory.
    ----------------------Here is the Java class Code.....................
    create or replace and compile java source named "XXVM_ZipFileUtil_Ela"
    as
    import java.math.BigDecimal;
    import java.util.zip.Deflater;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import java.sql.*;
    import java.io.*;
    public class XXVM_ZipFileUtil_Ela
    public static oracle.sql.BLOB getZipFile(
    oracle.sql.CHAR zipFilePathCHAR, oracle.sql.CHAR zipFileNameCHAR,
    int fileBufferSize, int zipFileBufferSize,
    boolean deleteZipFile, java.sql.Array fileNames, java.sql.Array fileContents, java.sql.Array fileContentsLength)
    throws IllegalArgumentException, FileNotFoundException, IOException, java.sql.SQLException
    String zipFilePath = (zipFilePathCHAR == null) ? null : zipFilePathCHAR.stringValue();
    String zipFileName = (zipFileNameCHAR == null) ? null : zipFileNameCHAR.stringValue();
    String zipPathAndFileName = new String(
    new String(zipFilePath == null || zipFilePath == "" ? "/tmp/" : zipFilePath) +
    new String(zipFileName == null || zipFileName == "" ? System.currentTimeMillis() + ".zip" : zipFileName));
    byte[] buffer = new byte[fileBufferSize == 0 ? 100000000 : fileBufferSize];
    try
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    oracle.sql.CLOB[] fileContentsCLOB = (oracle.sql.CLOB[])fileContents.getArray();
    String[] fileNamesString = (String[])fileNames.getArray();
    BigDecimal[] fileContentsLengthNumber = (BigDecimal[])fileContentsLength.getArray();
    ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipPathAndFileName));
    zipOut.setLevel(Deflater.DEFAULT_COMPRESSION);
    for (int i = 0; i < fileNamesString.length; i++) {
    System.out.println(i);
    zipOut.putNextEntry(new ZipEntry(fileNamesString));
    InputStream asciiStream = fileContentsCLOB[i].getAsciiStream(1L);
    int asciiReadCount = asciiStream.read(buffer,0,fileContentsLengthNumber[i].intValue());
    zipOut.write(buffer, 0, fileContentsLengthNumber[i].intValue());
    zipOut.closeEntry();
    zipOut.close();
    byte zipFileContents[] = new byte[zipFileBufferSize == 0 ? 100000000 : zipFileBufferSize];
    FileInputStream zipIn = new FileInputStream(zipPathAndFileName);
    int byteCount = zipIn.read(zipFileContents);
    zipIn.close();
    byte returnFileContents[] = new byte[byteCount];
    System.arraycopy(zipFileContents,0,returnFileContents,0,byteCount);
    String returnFileContentsString = new String(returnFileContents);
    if (deleteZipFile)
    boolean deletedFile = (new File(zipPathAndFileName)).delete();
    oracle.sql.BLOB returnFileContentsBLOB = null;
    returnFileContentsBLOB = BLOB.createTemporary(conn, true, BLOB.DURATION_SESSION);
    returnFileContentsBLOB.open(BLOB.MODE_READWRITE);
    //OutputStream tempBlobWriter = returnFileContentsBLOB.getBinaryOutputStream();
    OutputStream tempBlobWriter = returnFileContentsBLOB.setBinaryStream(1);
    tempBlobWriter.write(returnFileContents);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    returnFileContentsBLOB.close();
    return returnFileContentsBLOB;
    catch (IllegalArgumentException ex) {
    ex.printStackTrace();
    throw ex;
    catch (FileNotFoundException ex) {
    ex.printStackTrace();
    throw ex;
    catch (IOException ex)
    ex.printStackTrace();
    throw ex;
    catch (java.sql.SQLException ex)
    ex.printStackTrace();
    throw ex;
    The last two lines above should be
    /Srini

  • Why is the Hulu Plus interface so bad?

    Why is the Hulu Plus interface so bad? The Hulu Plus interface that is presented on my Sony Blue Ray player (BDPS1500) is very difficult to access my Queue to play the shows I always watch. When you access Hulu Plus it should immediately display “Your Queue” as the highlighted default selection – that way I can click the SELECT button once and then see the list of programs in my queue with the most recent program that I watched highlighted – so I can then click SELECT a 2nd time and now I am looking at the episodes of the program series I watched last with the next episode highlighted so if I press SELECT a 3rd time I will be watching the next episode in the series. The way it is now I have to click all over the place trying to locate My Queue – as it is NOT visible when Hulu Plus initializes. And when I do finally find my queue and select it, the last program I watched is not the default highlighted item. After probably 15 or more clicks up, down, left, and right I finally get to the next episode. This should be an easy change and one that would greatly improve the user experience.

    The trick is to go do this:
    1) go to http://www.adobe.com
    2) At the top in the menu bar look for: Products (this is the first item in the Menu bar;
    3) When you click on it, you will get a list of "Top Destination"
    4) In this list, Photoshop is listed as a special item because of its popularity;
    5) Click on it and you will get this:
    http://www.adobe.com/products/photoshopfamily.html?promoid=JOLIW
    Hope this helps.

  • Question about The SQL*Plus menu item

    The help doc says we can use SQL*Plus commands. So I open it from the SQL*Plus menu item under Tools. After I gave the installed SQL*Plus location and file name, SQL*Plus was opened by itself asking for a password. The question is are all SQL*Plus commands are supported/will be supported in Raptor? Thanks.
    ben

    See this.. http://www.oracle.com/technology/products/database/project_raptor/sql_worksheet_commands.html
    Not everything in plus is supported
    -kris

  • Does SQL Developer have any way to run the SQL*PLUS COPY FROM command?

    set arraysize 100;
    set copycommit 100;
    COPY FROM SCOTT/TIGER@OtherDBinstance -
    CREATE COMPANY -
    USING SELECT * from COMPANY;

    Thanks. I have been using the create table ABC as select * from ABC@otherdb but this often runs into temp segment issues for very large tables. The SQL*PLUS version allows me to have the copy commit save after each xxxxx lines and this seems to be able to handle any size table. Can copy commit be used from SQL Developer?

  • Execute (or re-execute) commands in the SQL*Plus buffer

    I feel confused about sql plus / command. by defination, it Execute (or re-execute) commands in the SQL*Plus buffer. how do I know whether it execete or re-execute a command?
    for example, I run a select statement, seems I have to type / to get result. when I run a create table statement, it seems run twice with / and I got table exists error.
    Could someone clearify when should / be used and when not to use it.

    jz2 wrote:
    I feel confused about sql plus / command. by defination, it Execute (or re-execute) commands in the SQL*Plus buffer. how do I know whether it execete or re-execute a command?
    for example, I run a select statement, seems I have to type / to get result. when I run a create table statement, it seems run twice with / and I got table exists error.
    Could someone clearify when should / be used and when not to use it.I guess you are looking at things in the other way round. The / does what it says, it executes the command in the buffer. Don't think it "reexecutes". It simply executes the command. Be it already run or for the first time. For example,
    Running the code for 1st time.
    SQL> begin
      2  dbms_output.put_line('hi');
      3  end;
      4  .
    SQL> set serveroutput on
    SQL> /
    hi
    PL/SQL procedure successfully completed.
    Running again....
    SQL> l
      1  begin
      2  dbms_output.put_line('hi');
      3* end;
    SQL> /
    hi
    PL/SQL procedure successfully completed.
    SQL>So / simply executes. Now when you should use it and when not, that depends upon the kind of command you are trying to execute. Like you mentioned, for a select, it works by again giving the output. But for a DDL, its not the / which gives error but its the very nature of DDL that once issued, its committed so surely enough , next execution would throw an error only.
    HTH
    Aman....

  • Where's the SQL*Plus Windows GUI?

    Is the SQL*Plus Windows GUI included in XE?

    Thanks, SQL Developer is perfect. It's strange that SQL Developer isn't bundled with Express Edition. SQL*Plus reminds me of Yazoo, big hair and the 1980's.
    Interestingly SQL Developer seems to be very similar to DBVisualizer. Do you know if that's an accident or did Oracle white label DBVisualizer perhaps?

  • Errors while submitting the SQL * Plus  Report

    I am getting th efollowing Error while submitting the Concurrent request to run a report.
    FND_CANNOT FIND FILE
    concurrent manager encountered an error while running sql * plus for yours concurrent request
    Please respond ASAP

    Hi,
    Duplicate post see:
    Please advise on the Error immediately
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • How do i access the SQL*plus

    hello, i am having problems accessing my SQL*plus: its asking for a login name, password and some host string what is this? someone please help
    thank you
    A.

    I have only begun to learn database related fields. I have downloaded the iSQL*Plus (from this Oracle site), but am unable to use it due to complications in installing this product. How does one access the Oracle server? I trying to access it via my home PC (w/ windows98). Do I need to purchase additional software on my own? if so which one? How would any of you suggest I go about learning the PL/SQL (on my own as classes won't fit in schedule) ? Appreciate your help.

  • SQL *PLUS white interface in Oracle 11g XE

    I want the white interface of SQL PLUS in Oracle 11g Express Edition. Here is a image link of the SQL PLUS interface.
    [SQL *PLUS|http://www.oracle.com/ocom/groups/public/@otn/documents/digitalasset/498689.jpg]
    Please help me.
    Edited by: user13084595 on Sep 30, 2011 8:19 PM

    This is really not the place for windows questions, so try to google it:
    http://lmgtfy.com/?q=customize+command+prompt+window+site%3Amicrosoft.com
    From Run... or existing command line one could use argument to cmd.exe, or the built-in color command. Example:
    C:\Users\Public>cmd /T:F0
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\Public>color 0F
    C:\Users\Public>color F0
    C:\Users\Public>sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.2.0 Production on Sat Oct 1 14:18:57 2011
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL>Edited by: orafad on Oct 1, 2011 9:52 PM

  • Sorting of Date field in the SQL Query useing ORDER BY

    Hi
    I am facing a problem when I am getting the results of a query from the ORacle 8i database using jdbc connection.
    The query is having a date field and I have to sort the query results using ORDER By for the Date field. The query is giving exact results in the SQL PLus interface.
    When I am getting this results in the GUI where servlets are being used an Exception is coming as not supported RefreshRow method.
    If anyone has faced this problem and have got the solutions please let me know.
    thanks
    sulfy

    That doesn't sound at all like an SQL problem.
    More like you trying to do updates on the resultset which is not allowed ...
    send a some code (not to much pls :) and we'll be
    able to help more
    cu
    Spieler

  • Xml output format in sql*plus problem

    Hi all,
    In stead of seeing xml output in multiple line format, my sql*plus always returns xml output in ONE line, is there a way to change the format, it's really hard to read.
    Thanks
    1 select xmlelement("row", xmlelement("user", xmlattributes(username as "name", default_tablespa
    2 from dba_users
    3* where rownum=1
    SQL>/
    XMLELEMENT("ROW",XMLELEMENT("USER",XMLATTRIBUTES(USERNAMEAS"NAME",DEFAULT_TABLES
    <row><user name="SYS" tbs="SYSTEM"></user></row>
    however I want to see something well formatted like
    <row>
    <user name="SYS" tbs="SYSTEM"></user>
    </row>

    Not sure if there are any settings with the SQL*PLUS but if you use packages other than the SQLX operators like DBMS_XMLQUERY, DBMS_XMLGEN, SYS_XMLGEN to generate xml then the output is as desired.
    select dbms_xmlgen.getxml('select username, default_tablespace from dba_users
    where rownum=1') from dual
    DBMS_XMLGEN.GETXML('SELECTUSERNAME,DEFAULT_TABLESPACEFROMDBA_USERSWHEREROWNUM=1'
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <USERNAME>REVIEW</USERNAME>
    <DEFAULT_TABLESPACE>METRICS</DEFAULT_TABLESPACE>
    </ROW>
    </ROWSET>
    But these packages does not offer the flexibility you have with SQLX operators.
    so if you requirement is simple generation you can use the above method.

  • Can I make SQL*Plus output more readable like this ?

    Version : 11.2
    Can I make sql results more readbale like below using SqlPlus ? ie. enclosing result columns neatly in a table like structure.
    +------------+------------+
    | department | Avg Salary |
    +------------+------------+
    | Finance    | 63863.2479 |
    | Hardware   | 66308.3700 |
    | HR         | 66402.6549 |
    | QA         | 66012.7119 |
    | Software   | 61928.2700 |
    | Switch     | 66413.2231 |
    +------------+------------+I think this is from MySQL or Postgress (the below doesn't anything about that)
    http://guylichtman.com/db-spring06/hw1_solution_sql.txt
    If not possible using SQL*Plus , can this be done using some other tools like PL/SQL developer (which we have) ?
    Not a business case . I just want to send some SQL training stuff to my friend.
    Moreover , during posting in OTN, it would be better to post some sample data , so that volunteer gurus can quickly understand what they are looking at.

    Hi,
    GarryB wrote:
    Version : 11.2
    Can I make sql results more readbale like below using SqlPlus ? ie. enclosing result columns neatly in a table like structure.The default output is in a table-like structure, with rows and columns, and with the columns aligned. It looks like you want extra lines around those rows and columns.
    +------------+------------+
    | department | Avg Salary |
    +------------+------------+
    | Finance    | 63863.2479 |
    | Hardware   | 66308.3700 |
    | HR         | 66402.6549 |
    | QA         | 66012.7119 |
    | Software   | 61928.2700 |
    | Switch     | 66413.2231 |
    +------------+------------+COLSEP is an easy way to get some of what you want:
    SQL> SET  COLSEP  "  |  "
    SQL> SELECT * FROM scott.dept;
        DEPTNO  |  DNAME           |  LOC
    ----------  |  --------------  |  -------------
            10  |  ACCOUNTING      |  NEW YORK
            20  |  RESEARCH        |  DALLAS
            30  |  SALES           |  CHICAGO
            40  |  OPERATIONS      |  BOSTONSQL*Plus can also generate HTML output, but you have to use a browser, not the SQL*Plus interface, to get see the output formatted.
    I think this is from MySQL or Postgress (the below doesn't anything about that)
    http://guylichtman.com/db-spring06/hw1_solution_sql.txt
    If not possible using SQL*Plus , can this be done using some other tools like PL/SQL developer (which we have) ?
    Not a business case . I just want to send some SQL training stuff to my friend.
    Moreover , during posting in OTN, it would be better to post some sample data , so that volunteer gurus can quickly understand what they are looking at.If we could get everyone on this forum to post any kind of formatted output, that would be wonderful! Personally, the extra lines wouldn't help me any, however.

Maybe you are looking for

  • How to make custom protocol handlers work on weblogic 10.3

    Hello, BEA and community! I have created a simple "bufferedreader" protocol handler as described in JDK documentation: http://java.sun.com/developer/onlineTraining/protocolhandlers/ To activate the protocol I'm explicitly setting the system property

  • I spilled nail varnish remover on my macbook pro

    Yesterday I spilled nail varnish remover on my keyboard and wiped it off immediately (within 10 seconds), then I vigorously rubbed my keyboard with my duvet. 24 hours later my keyboard light changes so it only lights up in the centre. I checked simil

  • Trusted ca keystore

    Using WebLogic Portal 7.0 on Solaris 8. I have installed the Portal Login Framework per the instructions for mutual authentication. One of the steps says that if using Portal 7.0 to add the trusted ca root certificates to the keystore as described in

  • Install upgrade icon not showing up on desktop?

    i'm trying to upgrade my ibook os 10.2.8 to tiger 10.4, but the initial install icon is not even popping up to click on to initate the process. i restarted the computer, but still no icon to hit and get the ball rolling. anyone have any ideas? any fe

  • TREO 650 SD Card Not Showing On Desktop

    Mac OSx 10.6.1 MIssing Sync 6.05b installed but showing as 6.0.4 Treo 650 I have an 8 MG Panasonic SD Card installed in the slot. Syncing iPhoto to the Treo works fine. It was my impression that the handheld SD card should show on the Desktop when th