SQL*plus not executing query

Hello,
I am new to sqlplus and I am trying to get some queries running off of an ARCH linux box that I have.
The install went ok and I can get sqlplus running and connect to my oracle DB. However when I enter something as easy as "select * from REASON" hit enter, all i get is a "2" on the next line
(screenshot http://imgur.com/KvTyD.jpg)
Is this a config issue on my sqlplus or am i Just not qualified. Any help is appreciated. thanks

>
I am new to sqlplus and I am trying to get some queries running off of an ARCH linux box that I have.
The install went ok and I can get sqlplus running and connect to my oracle DB. However when I enter something as easy as "select * from REASON" hit enter, all i get is a "2" on the next line
(screenshot http://imgur.com/KvTyD.jpg)
Is this a config issue on my sqlplus or am i Just not qualified. Any help is appreciated. thanks
>
SQL*Plus is expecting input from you; you terminate the statement by putting a forward slash or semi-colon just after your statement.
select * from REASON
/OR
select * from REASON;Regards,
Phiri

Similar Messages

  • Org.hibernate.exception.GenericJDBCException: could not execute query

    while executing sql statements with hibernate oracle this type of errors
    org.hibernate.exception.GenericJDBCException: could not execute query
    ava.sql.SQLException: ORA-01001: cursore non valido can any one suggest
    a solution for this.
    Thanks

    This is likely due to a commit/rollback being executed after the statement has been executed but befofre the result set has been processed by the application. In TimesTen, unlike Oracle, commit/rollback closes all open cursors on the connection. This could be a case of using the wrong Hibernate dialect. Are you using a TimesTen dialect in Hibernate?
    Chris

  • SQLGrammarException: could not execute query

    Hello,
    I created a table with the script belove in a Derby database and created Entity Class for that.
    create table "BAHADIR"."User"
         "id" NUMERIC(5) not null primary key,
         "name" VARCHAR(25),
         "email" VARCHAR(100),
         "password" VARCHAR(25),
         "role" VARCHAR(25)
    )In my controller class there's a method like that:
        public int getItemCount() {
            EntityManager em = getEntityManager();
            try{
                int count = ((Long) em.createQuery("select count(o) from User as o").getSingleResult()).intValue();
                return count;
            } finally {
                em.close();
        }When this method is called I get that exception stack:
    HTTP Status 500 -
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
    root cause
    javax.el.ELException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
    root cause
    javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
    root cause
    org.hibernate.exception.SQLGrammarException: could not execute query
    root cause
    java.sql.SQLSyntaxErrorException: Syntax error: Encountered "User" at line 1, column 42.
    root cause
    org.apache.derby.client.am.SqlException: Syntax error: Encountered "User" at line 1, column 42.
    note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1 logs.
    Sun Java System Application Server 9.1
    What does these mean? The IDE created the access method automatically, so it can not be wrong. So where's the error?
    Thanks.

    By fixing the HQL query that results in the query that is wrong. So step 1: trace down which HQL query is causing the misery. Step 2: turn on SQL logging to see which sql is generated for that HQL query. Step 3: figure out what is wrong. I can guess that there is something wrong with the annotations on an entity, like declaring something as nullable while it is in fact not according to the database schema. Another common culprit is using a name that is a reserved SQL keyword.
    EDIT:
    'from limit And the keyword name clash is the cause here. Limit is an SQL keyword in MySQL, so you can't use that as a table name.

  • Oracle ADF refresh as deferred does not execute query on page load

    In the oracle ADF page I have two panel boxes. (Oracle ADF 11.1.1.4)
    a) Personal information panel box with PanelFormLayout (PersonalInfoViewObj) - ReadOnly View Object
    b) Address information panel box with Table (AddressInfoViewObj) - Read Only View Object
    For the iterators in a) and b) I have kept refresh condition as deferred and cacheResult=false. Also in b) for af:table, I have kept contentDelivery="immediate"
    When page loads it fires SQL query for a) and populate the data in Personal information panel box. However for b) it does not execute the SQL query and the data is not getting populated ( in AddressInformation panel with the tables. Please note data is there in the DATABASE......)
    Becasue with the refresh as deferred it was not executing the sql query for Panel b) (panel with Table and table iterator). I have tried refresh as always and refresh ifNeeded/renderModel/prepareModel however in that case it is executing the SQL query two times (twice).
    Please let me know the best way to fix this issue.

    Hi,
    I think you need a method in an application module to init your data.
    In your AM : create a method like :
    public void init(){
    getViewObject().executeQuery();
    }In your adfc-config.xml create a methodCall from this method and a "control flow case" from the methodCall to your page.
    and keep refresh as "deferred " in your pageDef.
    Clément

  • SQL*Plus Not responding when calling edit command

    When I write a Query in SQL Plus 9.2.0.1.0, Installed in Windows XP SP2, and running EDIT command, notepad opens and then SQL Plus and Notepad both hangs. By killing notepad.exe process I can continue working in SQL Plus.
    I tried changing the default editor to ultra edit, wordpad, etc. But It seems to be a SQL Plus error, with all editors I set up, Editor Hangs.
    The same things happende me installing the Oracle 9i client in another machine.
    Need help with this, thanks!!

    Sounds strange - and does not sound like a SQL*Plus problem. SQL*Plus uses the CreateProcess() Win32 API call to create the editor process. Then it waits for this process' process handle to cease to exist before it continues. SQL*Plus does not "hang" - it simply waits for the spawned process to terminate before it continues.
    It is not possible for one process to "hang" another process it created via the CreateProcess() call. It will need to interact with that spawned process in other ways to make it hang. Caveat: unless the spawned process does not "like" the parameters passed to it via the CreateProcess() call...
    The only parameter passed is the filename (usually afiedt.buf) by SQL*Plus - and that should not cause the editor to hang.
    Unless there is a specific Oracle bug you're running in, this problem sounds more like a Windows issue. After using the ED command in SQL*Plus, can you manually view and edit the afiedt.buf file it created?

  • SQL*Plus Not Responding

    I have a query in 8i that sums the pages entered into a database by month as follows:
    SELECT DISTINCT c.study
    , DECODE(r.pass_one_by, NULL, SUBSTR(s.entered_by, 5), SUBSTR(r.pass_one_by, 5)) p1_by
    ,SUM(DECODE(TO_CHAR(TRUNC(r.pass_one_ts),'MON'),'JAN',1,NULL,DECODE(TO_CHAR(TRUNC(s.received_dci_entry_ts),'MON'),'JAN',1),0)) JAN
    ,SUM(DECODE(TO_CHAR(TRUNC(r.pass_one_ts),'MON'),'FEB',1,NULL,DECODE(TO_CHAR(TRUNC(s.received_dci_entry_ts),'MON'),'FEB',1),0)) FEB
    --- etc
    FROM received_dcms r, received_dcis s, clinical_studies c
    WHERE r.clinical_study_id = s.clinical_study_id
    AND s.clinical_study_id = c.clinical_study_id
    AND r.document_number = s.document_number
    ---other obvious joins
    I need the received_dcis table to capture information for blank pages, but this table is heavily used (updated) and the report hangs when it's included. In fact, the Windows Task Manager say that SQL*Plus is "Not Responding". Is there any way around this?
    Thanks,
    Dane

    Hi!
    Quite possible SQL*Plus is working fine, but the problem is with the query itself. When running the report check v$session, v$sql & v$sess_io views. If v$sess_io reports changing consistent_gets & physical_reads, then your query is reading data. Check explain plan, run tkprof, etc. and make sure that query is properly tuned and used best execution plan possible.
    Regards,
    Andrew Velitchko
    BrainBench MVP for Developer/2000
    http://www.brainbench.com

  • SQL Plus not work with domain user

    Hey guys,
    have a problem with sql plus in our network. when i started it with the admin it works. but when i started it with a user account, fill in the username, the password and the host and click on the ok button, the window closes and nothing happen. no error no new window, the window simply closes.
    what to do?
    regards

    Hi,
    There might be different reasons behind this.
    Check whether user is created in database or not.
    There might be possibility that, user is in different database.
    SELECT * FROM V$DATABASE; --This will help you to findout database name.
    SELECT * FROM DBA_USERS WHERE USERNAME = 'HR';  --HR is user present on database. If your user is present in database then user might not have connect privilege.
    GRANT CONNECT , RESOURCE TO HR; --HR is user. To execute this command, login as sys You can also try to login with command prompt.
    sqlplus user/password@host

  • SQL String Not a Query Trouble

    Just upgraded my JDeveloper and Oracle Application Server to 10.1.2 and some code that was working before no longer works. I suspect JDBC driver issues but I've been swapping jar files like a crazed loon and still no joy. Perhaps some here can give me a clue.. the exception I get is:
    nested exception is: org.exolab.castor.jdo.PersistenceException: Nested error: java.sql.SQLException: SQL string is not Query while executing UPDATE PER_USERS SET ACCTNM='paul',FIRSTNM='Paula',LASTNM='Sanders',MI='M',EMAIL='[email protected]',PHONEEXT='9362',ROLE_ID=1,DIVISION_ID=null,ERRTYPE_ID=null,ACTIVE='T' WHERE USER_ID=1 at ourcustomdbaccess.Query.execute(Query.java:112) at ...
    Query is a subclass of Castor's OQLQuery.
    Interestingly, before the upgrades this code would not work in JDev (9.0.4) but would work on the application server.
    Any suggestions appreciated!
    Paul

    Oooops ...
    Has the dang documentation writer (that's me) simply believed what the dang developer (that's the buddy sitting directly in front of me, nice guy by the way) has told him instead of testing it thoroughly enough.
    Unfortunately, only CHAR, CLNT, LANG, CUKY, UNIT and c are supported with operator && up to now.
    I adjust the documentation in SP09  (that's the current version, I'm working on). But maybe, that's also the SP, where the restriction will be abolished anyway (the problem as always in Open SQL - and meanwhile also in ABAP CDS - is, that each database must deliver the same result for all possible combinations and a lot of testing has to be done before the functionality can be released).
    Sorry for that and thanks for notifying me!
    Horst

  • SQL*PLUS not work in JDeveloper 10.1.3

    The Log message is :
    Invoking SQL*Plus...
    F:\oracle\ora92\bin\sqlplus.exe SCOTT@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SID=W2G)))
    java.io.IOException: CreateProcess: START.EXE F:\oracle\ora92\bin\sqlplus.exe SCOTT@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SID=W2G))) error=2
    I need a help ! thanks .

    Hi,
    This is a known issue (bug 4774715) on Windows 2003 and is due to the fact that START does not exist on that OS. It is currently fixed in the next release but I will open a bug and see if we can get the fix backported to a 10.1.3 patchset for you.
    Regards,
    Lisa
    JDev QA

  • Username password works in SQL Plus not in SQL Developer

    I have SQL Dev 1.2.1. It works fine with some databases, but with two databases with logons managed by Oracle Enterprise User it does not work. I receive an Ora 01017 error invalid username password. The user name and password work fine from SQL Plus and from a third party tool. I have a local developer client environment installed, so am using TNS. SQL Developer was installed before the client environment. I was not trying to access this database before the client environment install. I was using the basic connection before the client install. Neither basic or TNS connection works for this particular database.
    Any ideas?

    We have changed the password and it still does not work. There are no special characters in the password.
    I am tempted to think the problem is the jdbc driver versions. The logon for Enterprise user controlled databases stopped working after I installed the thick client Oracle developer. I have tried to find the threads with information on disabling the thick client jdbc but have not found them. I also have tried to enter a URL for the thin client without success. One of our DBAs is saying that the 11g clients are broken and he is in communication with Oracle about it. He says 10g works but 11g does not.
    Any further help would be appreciated.
    Gerry

  • SQL*plus not displaying the result of XMLELEMENT

    HI,
    I am using SQL*Plus: Release 10.1.0.4.2
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    When I run the following query in SQL*PLUS, I get nothing displayed. However when I run the same query connecting to the same database using SQL Developer then I get the result
    SQL> select XMLELEMENT("form_id",form_id)
    2 FROM collections;
    XMLELEMENT("FORM_ID",FORM_ID)
    In SQL developer
    <form_id>101</form_id>
    I set long and longchuncksize to 32K , and I change linesize, pages, but nothing helped
    Is there any configuration that I have to do, so that SQL*plus display the result of “ select XMLELEMENT("form_id",form_id) query.
    Appreciate you help, thanks

    From a fresh start ;) :
    SQL*Plus: Release 10.1.0.4.2 - Production on Fri Feb 26 15:29:04 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select xmlelement("value", a.object_name )
      2  from   all_objects a
      3  where  rownum <= 5;
    XMLELEMENT("VALUE",A.OBJECT_NAME)
    SQL> select xmlelement("value", (select b.object_name
      2                              from   all_objects b
      3                              where b.object_name = a.object_name
      4                              )
      5                   )
      6  from   all_objects a
      7  where  rownum <= 5;
    XMLELEMENT("VALUE",(SELECTB.OBJECT_NAMEFROMALL_OBJECTSBWHEREB.OBJECT_NAME=A.OBJE
    <value>ICOL$</value>
    <value>I_USER1</value>
    <value>CON$</value>
    <value>UNDO$</value>
    <value>C_COBJ#</value>
    SQL> show all
    appinfo is OFF and set to "SQL*Plus"
    arraysize 15
    autocommit OFF
    autoprint OFF
    autorecovery OFF
    autotrace OFF
    blockterminator "." (hex 2e)
    btitle OFF and is the first few characters of the next SELECT statement
    cmdsep OFF
    colsep " "
    compatibility version NATIVE
    concat "." (hex 2e)
    copycommit 0
    COPYTYPECHECK is ON
    define "&" (hex 26)
    describe DEPTH 1 LINENUM OFF INDENT ON
    echo OFF
    editfile "afiedt.buf"
    embedded OFF
    escape OFF
    FEEDBACK ON for 6 or more rows
    flagger OFF
    flush ON
    heading ON
    headsep "|" (hex 7c)
    instance "local"
    linesize 80
    lno 9
    loboffset 1
    logsource ""
    long 80
    longchunksize 80
    markup HTML OFF HEAD "<style type='text/css'> body {font:10pt Arial,Helvetica,sans-serif; color:blac
    newpage 1
    null ""
    numformat ""
    numwidth 10
    pagesize 14
    PAUSE is OFF
    pno 1
    recsep WRAP
    recsepchar " " (hex 20)
    release 1002000300
    repfooter OFF and is NULL
    repheader OFF and is NULL
    serveroutput OFF
    shiftinout INVISIBLE
    showmode OFF
    spool OFF
    sqlblanklines OFF
    sqlcase MIXED
    sqlcode 0
    sqlcontinue "> "
    sqlnumber ON
    sqlpluscompatibility 10.1.0
    sqlprefix "#" (hex 23)
    sqlprompt "SQL> "
    sqlterminator ";" (hex 3b)
    suffix "sql"
    tab ON
    termout ON
    timing OFF
    trimout ON
    trimspool OFF
    ttitle OFF and is the first few characters of the next SELECT statement
    underline "-" (hex 2d)
    USER is "HR"
    verify ON
    wrap : lines will be wrapped
    SQL>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • SQL* Plus not compatible with Suse Linux 10

    hi! i am using suse linux 10 and since i lost my sys/ system password i need to restore it using " / as sysdba " to login, but the problem is when i tried to install the sql* plus it says that "it does not support my platform", is there another way i can reset back my system password with out sql* plus? or can anyone guide me in the installation of sql* plus instant client? thanks a lot! :-)

    i'm sorry for the confusion. i tried to install sql* plus but running the script to install it gave me an error that "it does not support my platform, it only supports red hat, suse 9.... etc." my os is suse linux 10 (oss) and am using oracle xe... so meaning i just wanted to install sql* plus to have a command-line utility to use " / as sysdba " to reset my sys/ system password. because i can't remember my sys/ system password that's why i can't get in to http://localhost:8080/apex site to change my oracle db. thanks for the reply!

  • Callback pls/sql is not executed

    I set up an aq (single consumer) and registered a pl/sql procedure.
    When i enq a message the pl/sql procedure is not executed.
    Manually i can dequeue the message.
    init.ora settings aq_tm_processes = 1 and job_queue_processes = 10.
    Do i need to do something more here so that the pl/sql procedure will process the enqueued object automatically ?

    Double post: http://forum.java.sun.com/thread.jspa?threadID=5243520&tstart=25

  • Changing sql-statement before executing query

    I want to change the sql-statement of a query just before it is executed.
    I have tried it with a query redirector/sessionevent listener, but I could get it to work.
    Do you have any examples.
    I want to change the tablename in a sql-statement like this:
    before
    select id from emp
    after
    select id from emp_v
    Any examples out there to do this?

    ... I am using SAP NetWeaver BI 7.0
    Monique

  • SQL Plus not working in Oracle 8i personal edition

    I just installed Oracle 8i personal edition, went through all the steps. When I start SQL* Plus, I give it the SCOTT/TIGER combo, but when it tries to start up the database, it asks for another password, which I can't figurew out.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by John Meyer ([email protected]):
    I just installed Oracle 8i personal edition, went through all the steps. When I start SQL* Plus, I give it the SCOTT/TIGER combo, but when it tries to start up the database, it asks for another password, which I can't figurew out.<HR></BLOCKQUOTE>
    Fixed the problem yesterday.
    null

Maybe you are looking for

  • Upgraded from HH3 to HH5 and Speed Dropped Straigh...

    Hello All, I did a very foolish thing earlier in the week. I ordered a Home Hub 5 to replace my Hub 3. I installed it today and immediately the download speed dropped from an average 71megs (+BT WiFi Allowance) to 61megs. I spoke to online support an

  • Why Does Dynamic Link Not Work

    I purchased the CS5 Adobe Production Premium.  I have been working in Premiere and I have been learning about how to use Dynamic Link. I want to be able to alter clips in After Effects and bring them back and forth into Premiere.  When I go to File/

  • Access target entity in CRM 2013 ondemand workflow

    Hi, I have a custom workflow which is running on demand because of which i am not able to get the target entity using below line of code Entity entity = (Entity)context.InputParameters["Target"]; What is the best way to get the target entity? Do we h

  • PROBLEM WITH OUTLOOK

    GUYS FIX THIS OUTLOOK , IT DRIVERS ME CRAZY, I CANT SEND EMAIL.

  • Which iphone rubber case is the best?

    please recommend one of your best iphone rubber case, without affecting its function like camera, sensor and stuff..thx