Error in entering to sql*plus

I am getting TNS unable to resolve service name when i am logging onto sql*plus8.0 to oracle8.0.what should i type in username and password and hoststring at the prompt

Hi,
there is a file called tnsname.ora which is used to define your servicename/sid and the address of oracleserver.when user/client try to connect to oracle it first look into this file for the SID entry and ip addres of oracle server.
make this entry into your tnsname which is avilable under $ORACLE_HOME/network/admin either manually or with the help of net8config assistent tool installed with oracle client.
hope this will help you
Yogi
[email protected]

Similar Messages

  • Error 45 Initializing In SQL*Plus When Running A Sql Script

    Hi All
    I have a daily scheduled jobs running on Windows server 2003 and 2008. Oracle Version :10.2.0.1 and 10.2.0.4
    right now jobs are not even starting when i run them manually. Found the error Error 45 Initializing In SQL*Plus When Running A Sql Script.
    it says Bug:3039738.
    what is the solution to fix this Bug ?
    thanks
    Shawn

    user9174724 wrote:
    Hi
    do you think the Problem is not with the script ?
    when i run the job its reaching SQLPLUS and giving error
    Error 45 Initializing In SQL*Plus When Running A Sql Script .
    Server:windows 2003 and oracle version :10.2.0.1
    CMD /C %ORACLE_HOME_PRIME%\bin\sqlplus.exe /NOLOG @ %xxxx_HOME%\DBA_Backup\BackupDo.sql testdb BackupFull
    The above line does the following:
    1) launches a command procesor
    2) passes that command processor the following command line parms:
    /C
    (process the following command, then terminate)
    %ORACLE_HOME_PRIME%\bin\sqlplus.exe
    the launched processor will process the executable 'sqlplus.exe' found in the \bin subdirectory, found in the directory indicated by the environment variable ' ORACLE_HOME_PRIME'. The remainder of the command line will be passed to sqlplus.exe for interpretation and processing
    /NOLOG
    tell sqlplus to start up without trying to immediately log on to a database
    typically used to indicate to sqlplus that the immediately following string names a file of sql and sqlplus commands to be processed.
    %xxxx_HOME%\DBA_Backup\BackupDo.sql
    tell sqlplus to execute the commands found in the file 'BackupDo.sql', found in the subdirectory DBA_Backup, found in the directory name by the environment variable 'xxxx_HOME'.
    testdb
    BackupFull
    pass the values 'testdb' and 'BackupFull' to be used as values for substitution variables &1 and &2 in the file 'BackupDo.sql'
    Script:
    rmanbackup.rman
    BACKUP AS COMPRESSED BACKUPSET DATABASE FORCE PLUS ARCHIVELOG;
    DELETE NOPROMPT ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE DISK;
    LIST BACKUP SUMMARY;
    LIST BACKUP;
    EXIT;I don't know what you expect of this. It is an rman script and we've seen no sign of an rman script being executed in any of what you've shown us. RMAN commands are processed by rman, not sqlplus.
    Unfortunately, you didn't think showing us the contents of BackupDo.sql was of any value in finding out what your problem was.
    Edited by: EdStevens on Jul 11, 2011 7:58 PM

  • Error in statement with sql plus

    Hi,
    I have written this sql statement:
    SELECT  rtrim('Cambio di: '
            || (CASE WHEN nvl(A.DESCRIZIONE_EMITTENTE ,' ') <> nvl(B.DESCRIZIONE_EMITTENTE ,' ') THEN 'Descrizione emittente, ' ELSE '' END)
            || (CASE WHEN nvl(A.INDIRIZZO_SEDE_EMITTENTE,' ') <> nvl(B.INDIRIZZO_SEDE_EMITTENTE,' ') THEN 'Indirizzo sede emittente, ' ELSE '' END)
            || (CASE WHEN nvl(A.SOTTOGRUPPO_ATTIVITA_ECONOMICA,' ') <> nvl(B.SOTTOGRUPPO_ATTIVITA_ECONOMICA,' ') THEN 'Sottogruppo attività economica, ' ELSE '' END)
            || (CASE WHEN nvl(A.RAMO_ATTIVITA_ECONOMICA, ' ') <> nvl(B.RAMO_ATTIVITA_ECONOMICA,' ') THEN 'Ramo attività economica, ' ELSE '' END)
            || (CASE WHEN nvl(A.GRUPPO_EMITTENTE, ' ') <> nvl(B.GRUPPO_EMITTENTE, ' ') THEN 'Gruppo emittente, ' ELSE '' END)
            || (CASE WHEN nvl(A.CAPITALE_SOCIALE_EMITTENTE, 0) <> nvl(B.CAPITALE_SOCIALE_EMITTENTE, 0) THEN 'Capitale sociale emittente, ' ELSE '' END)
            || (CASE WHEN nvl(A.SECTOR, ' ') <> nvl(B.SECTOR, ' ') THEN 'Sector, ' ELSE '' END)
            ,', ') TIPO_VARIAZIONE,
           A.ISICOD ,
           A.EMICOD , 
           A.DESCRIZIONE_EMITTENTE AS DESCRIZIONE_EMITTENTE_T, B.DESCRIZIONE_EMITTENTE AS DESCRIZIONE_EMITTENTE_T1,
           A.INDIRIZZO_SEDE_EMITTENTE AS INDIRIZZO_SEDE_EMITTENTE_T, B.INDIRIZZO_SEDE_EMITTENTE AS INDIRIZZO_SEDE_EMITTENTE_T1,
           A.SOTTOGRUPPO_ATTIVITA_ECONOMICA AS SOTT_ATTIVITA_ECONOMICA_T, B.SOTTOGRUPPO_ATTIVITA_ECONOMICA AS SOTT_ATTIVITA_ECONOMICA_T1,
           A.RAMO_ATTIVITA_ECONOMICA AS RAMO_ATTIVITA_ECONOMICA_T, B.RAMO_ATTIVITA_ECONOMICA AS RAMO_ATTIVITA_ECONOMICA_T1,
           A.GRUPPO_EMITTENTE AS GRUPPO_EMITTENTE_T, B.GRUPPO_EMITTENTE AS GRUPPO_EMITTENTE_T1,
           A.CAPITALE_SOCIALE_EMITTENTE AS CAPITALE_SOCIALE_EMITTENTE_T, B.CAPITALE_SOCIALE_EMITTENTE AS CAPITALE_SOCIALE_EMITTENTE_T1,
           A.SECTOR AS SECTOR_T, B.SECTOR AS SECTOR_T1,
            A.START_DATE AS DATA_AGG_T, B.START_DATE AS DATA_AGG_T1
    FROM SPR_KLERS_IEM A, SPR_KLERS_IEM B
    WHERE A.START_DATE=TRUNC(SYSDATE)
          AND A.ISICOD=B.ISICOD
          AND A.EMICOD=B.EMICOD
          AND B.START_DATE = decode(trim(to_char(sysdate, 'Day')), 'Monday',trunc(sysdate-3), trunc(sysdate-1))
          AND
            nvl(A.DESCRIZIONE_EMITTENTE ,' ') != nvl(B.DESCRIZIONE_EMITTENTE ,' ')
            OR
            nvl(A.INDIRIZZO_SEDE_EMITTENTE,' ') != nvl(B.INDIRIZZO_SEDE_EMITTENTE,' ')
            OR
            nvl(A.SOTTOGRUPPO_ATTIVITA_ECONOMICA,' ') != nvl(B.SOTTOGRUPPO_ATTIVITA_ECONOMICA,' ')
            OR
            nvl(A.RAMO_ATTIVITA_ECONOMICA, ' ') != nvl(B.RAMO_ATTIVITA_ECONOMICA,' ')
            OR
            nvl(A.GRUPPO_EMITTENTE, ' ') != nvl(B.GRUPPO_EMITTENTE, ' ')
            OR
            nvl(A.CAPITALE_SOCIALE_EMITTENTE, 0) != nvl(B.CAPITALE_SOCIALE_EMITTENTE, 0)
            OR
            nvl(A.SECTOR, ' ') != nvl(B.SECTOR, ' ')
            )If I execut it from toad I obtain the correct result but if I execute the statement from sql/plus I obtain these errors:
    SP2-0734: unknown command beginning "nvl(A.DESC..." - rest of line ignored.
    SP2-0042: unknown command "OR" - rest of line ignored.
    SP2-0734: unknown command beginning "nvl(A.INDI..." - rest of line ignored.
    SP2-0042: unknown command "OR" - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning "nvl(A.SOTT..." - rest of line ignored.
    SP2-0042: unknown command "OR" - rest of line ignored.
    SP2-0734: unknown command beginning "nvl(A.RAMO..." - rest of line ignored.
    SP2-0042: unknown command "OR" - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning "nvl(A.GRUP..." - rest of line ignored.
    SP2-0042: unknown command "OR" - rest of line ignored.
    SP2-0734: unknown command beginning "nvl(A.CAPI..." - rest of line ignored.
    SP2-0042: unknown command "OR" - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning "nvl(A.SECT..." - rest of line ignored.
    SP2-0042: unknown command ")" - rest of line ignored.
    ERROR at line 26:
    ORA-00936: missing expression Why this behaviour? The statement is the same and from toad works!
    I do not succed to understand.
    Pleas could someone help me?
    Thanks a lot, bye bye.

    Your are forget = between nvl
    SELECT rtrim('Cambio di: '
    || (CASE WHEN nvl(A.DESCRIZIONE_EMITTENTE ,' ')= nvl(B.DESCRIZIONE_EMITTENTE ,' ') THEN 'Descrizione emittente, ' ELSE '' END)
    || (CASE WHEN nvl(A.INDIRIZZO_SEDE_EMITTENTE,' ') = nvl(B.INDIRIZZO_SEDE_EMITTENTE,' ') THEN 'Indirizzo sede emittente, ' ELSE '' END)
    || (CASE WHEN nvl(A.SOTTOGRUPPO_ATTIVITA_ECONOMICA,' ') = nvl(B.SOTTOGRUPPO_ATTIVITA_ECONOMICA,' ') THEN 'Sottogruppo attivit&agrave; economica, ' ELSE '' END)
    || (CASE WHEN nvl(A.RAMO_ATTIVITA_ECONOMICA, ' ') = nvl(B.RAMO_ATTIVITA_ECONOMICA,' ') THEN 'Ramo attivit&agrave; economica, ' ELSE '' END)
    || (CASE WHEN nvl(A.GRUPPO_EMITTENTE, ' ') = nvl(B.GRUPPO_EMITTENTE, ' ') THEN 'Gruppo emittente, ' ELSE '' END)
    || (CASE WHEN nvl(A.CAPITALE_SOCIALE_EMITTENTE, 0)= nvl(B.CAPITALE_SOCIALE_EMITTENTE, 0) THEN 'Capitale sociale emittente, ' ELSE '' END)
    || (CASE WHEN nvl(A.SECTOR, ' ') = nvl(B.SECTOR, ' ') THEN 'Sector, ' ELSE '' END)
    ,', ') TIPO_VARIAZIONE,
    A.ISICOD ,
    A.EMICOD ,
    A.DESCRIZIONE_EMITTENTE AS DESCRIZIONE_EMITTENTE_T, B.DESCRIZIONE_EMITTENTE AS DESCRIZIONE_EMITTENTE_T1,
    A.INDIRIZZO_SEDE_EMITTENTE AS INDIRIZZO_SEDE_EMITTENTE_T, B.INDIRIZZO_SEDE_EMITTENTE AS INDIRIZZO_SEDE_EMITTENTE_T1,
    A.SOTTOGRUPPO_ATTIVITA_ECONOMICA AS SOTT_ATTIVITA_ECONOMICA_T, B.SOTTOGRUPPO_ATTIVITA_ECONOMICA AS SOTT_ATTIVITA_ECONOMICA_T1,
    A.RAMO_ATTIVITA_ECONOMICA AS RAMO_ATTIVITA_ECONOMICA_T, B.RAMO_ATTIVITA_ECONOMICA AS RAMO_ATTIVITA_ECONOMICA_T1,
    A.GRUPPO_EMITTENTE AS GRUPPO_EMITTENTE_T, B.GRUPPO_EMITTENTE AS GRUPPO_EMITTENTE_T1,
    A.CAPITALE_SOCIALE_EMITTENTE AS CAPITALE_SOCIALE_EMITTENTE_T, B.CAPITALE_SOCIALE_EMITTENTE AS CAPITALE_SOCIALE_EMITTENTE_T1,
    A.SECTOR AS SECTOR_T, B.SECTOR AS SECTOR_T1,
    A.START_DATE AS DATA_AGG_T, B.START_DATE AS DATA_AGG_T1
    FROM SPR_KLERS_IEM A, SPR_KLERS_IEM B
    WHERE A.START_DATE=TRUNC(SYSDATE)
    AND A.ISICOD=B.ISICOD
    AND A.EMICOD=B.EMICOD
    AND B.START_DATE = decode(trim(to_char(sysdate, 'Day')), 'Monday',trunc(sysdate-3), trunc(sysdate-1))
    AND
    nvl(A.DESCRIZIONE_EMITTENTE ,' ') != nvl(B.DESCRIZIONE_EMITTENTE ,' ')
    OR
    nvl(A.INDIRIZZO_SEDE_EMITTENTE,' ') != nvl(B.INDIRIZZO_SEDE_EMITTENTE,' ')
    OR
    nvl(A.SOTTOGRUPPO_ATTIVITA_ECONOMICA,' ') != nvl(B.SOTTOGRUPPO_ATTIVITA_ECONOMICA,' ')
    OR
    nvl(A.RAMO_ATTIVITA_ECONOMICA, ' ') != nvl(B.RAMO_ATTIVITA_ECONOMICA,' ')
    OR
    nvl(A.GRUPPO_EMITTENTE, ' ') != nvl(B.GRUPPO_EMITTENTE, ' ')
    OR
    nvl(A.CAPITALE_SOCIALE_EMITTENTE, 0) != nvl(B.CAPITALE_SOCIALE_EMITTENTE, 0)
    OR
    nvl(A.SECTOR, ' ') != nvl(B.SECTOR, ' ')
    {code}
    Edited by: Salim Chelabi  on 2008-12-09 09:10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

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

  • Error when connecting to SQL*PLUS via ODBC to Excel

    OS: Windows 2000 Professional
    Oracle DB: 9i release 2
    SQL*Plus: Release 9.2.0.1.0
    MS Excel: 2000
    ===================
    When I try to connect to SQL*PLUS via ODBC to Excel with "connect scott/tiger@odbc:libro" I get the following error:
    ORA-03121: no interface driver connected - function not performed

    SQL Server objects are commonly case sensitive, so please surround the column and table names by double quotes:
    SELECT "Type_PK_ID" FROM "dbo"."boundaries"@sqlserver
    SIDE NOTE: Oracle is by default not case sensitive and all object names are stored in upper case. To get case sensitive objects they need to be surrounded by double quotes. In HSODBC case sensitive table names were commonly found even when not surrounded by double quotes as the gateway used internal SQL Server methods to find the correct table nameing - this method does not work for column names. So to be able to query a case sensitive column it needs to be surrounded by double quotes and the table name must be written as stored in the source database.

  • Problem entering password sql plus in wnidows vista

    hello,
    after i successful installation in windows vista, i try run SQL Plus
    when i try running SQL PLUS, i have to entered my username and password.
    Entering my username is no problem. but when i try entering password, i cannot entering input password because no matter what i do, my password does not appear on the screen SQL Plus
    Is something wrong about installation?
    Please help me.

    Well, that is why it is called password. You do not want anyone to see it while you are typing, right? Just type in the password (you should see * for each typed password character) and hit enter. And if you are running non-gui version of SQL*Plus (in command window) you will not see any characters (even *) while typing password.
    SY.
    Edited by: Solomon Yakobson on Jun 5, 2010 7:36 AM

  • ERROR IN CONNECTING IN SQL PLUS(ORACLE DEVELOPER SUIT 10g)

    hi Friends
    I have just installed ORACLE DEVELOPER SUIT 10g. my DATABASE is ORACLE XE(express edition) and username ,password for database is "SYSTEM","*****".
    when i log in SQL PLUS witn this user name and password ,and HOST STRING=XE.it shows an ERROR =             ORA-12154: TNS:could not tesolve the connect identifier specified.
    my tnsname.ora is
    XE =
      (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ARUNSOROUT-PC)(PORT = 1521))
        (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)   )  )
    EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) )
        (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )
    ORACLR_CONNECTION_DATA = (DESCRIPTION =   (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))   )
        (CONNECT_DATA =   (SID = CLRExtProc) (PRESENTATION = RO) )  )
    please help me in solving this ERROR.

    This forum is for the SQL Developer tool, not for general SQL or PL/SQL questions.  The clue is in the name.
    Try asking in the Database General or SQL and PL/SQL forums.

  • ORA-12154 error when logging into SQL*Plus

    I installed Oracle 10g (10.2.0.3.0) server on a Hyper-V virtual machine running Windows Server 2008 Enterprise as a standalone server. I did a software only install and then ran the Database Configuration Assistant to create a database. I also ran the Oracle Net Configuration Assistant to configure the Listener, Naming Methods, and Local Net Service Name. I ran the test in the Net Configuration Assistant and it was successful after I changed the login credentials to use the SYSTEM account and password. TNSPING of the net service name is successful. I can also successfully connect to the database via Enterprise Manager using the SYSTEM account and password. What I can NOT do is connect locally to the database via SQL*Plus (either through the gui or command line). I get the following error:
    ERROR:
    ORA-12154: TNS: Could not resolve the connect identifier specified
    I've checked and double-checked the LISTENER.ORA, SQLNET.ORA, and TNSNAMES.ORA files. They all seem correct to me, especially since I used the configuration assistants to create them.
    Anyone have an idea what might be wrong or what I can check next? Any help would be appreciated!
    Thanks!

    They all seem correct to me, especially since I used the configuration assistants to create them. Garbage In, Garbage Out.
    Since Oracle throws an error, I strongly suspect you are mistaken.
    Simply put, you are using something like "@REMOTE" someplace & somehow and the error indicates SQL*Net does not know to what @REMOTE refers.
    How many systems are involved, names, OS version, etc?
    post connection string & post contents of tnsnames.ora file.

  • Script having Chinese characters throws error when run from SQL PLUS

    Dear All,
    I have a script file(.sql) which contains Chinese characters ....
    I have saved the file in unicode Format.
    When I run this file using @D:\filename from SQL PLUS it throws an error "unknown Command at line 1"...
    My database is Oracle 10g...
    Can anyone suggest anything???
    Thanks In Advance
    Dev
    Edited by: Devarsh on Oct 21, 2009 8:16 AM

    I think you may need to set your local NLS_LANG setting for your client (SQL*Plus) to recognize the characters.
    You may also consider posting your question on the Globalization forum which pertains more to these types of questions.
    Globalization Support

  • ORA-6502 Value or Numeric Error while connecting to Sql-Plus - URGENT

    Hello,
    I am getting ORA-6502 error, "Error accessing Package Dbms_application_info" everytime I connect to Sqlplus. I tried running catproc and catalog but still getting the same message. I dont get this message when I connect to SVRMGR. I am not able to perform export also due to this error. Can anybody help me please??
    Thanks,
    R. Magesh.

    Hello,
    I am getting ORA-6502 error, "Error accessing Package Dbms_application_info" everytime I connect to Sqlplus. I tried running catproc and catalog but still getting the same message. I dont get this message when I connect to SVRMGR. I am not able to perform export also due to this error. Can anybody help me please??
    Thanks,
    R. Magesh. Did you run catproc and catalog as SYS while the database was opened in RESTRICT mode? If not, then do that. Also, do SELECT * FROM dba_objects WHERE status='INVALID'; to see if there are other invalid objects that need to be compiled.

  • This Query IS giving divide by zero error when executed in sql plus

    UPDATE grn G
    SET g.OPT_WA_FAIR_VAL_A = (SELECT
    ROUND(SUM(NVL(ga.OPT_FAIR_VAL_A, 0) * NVL(gvs.GRN_VEST_OPT_Q, 0)) / SUM(NVL(gvs.GRN_VEST_OPT_Q, 0)), 6)
    FROM
    GRANT_VESTING_SCHEDULE gvs,
    GRANT_ASSUMPTION ga
    WHERE
    gvs.ORG_GRP_I = ga.ORG_GRP_I AND
    gvs.grn_n = ga.grn_n AND
    ga.ORG_GRP_I = g.ORG_GRP_I AND
    ga.GRN_N = g.GRN_N AND
    NVL(ga.GRN_ASMPN_EFF_D, gvs.grn_vest_d) <= gvs.grn_vest_d AND
    NVL(ga.GRN_ASMPN_END_D, gvs.grn_vest_d) >= gvs.grn_vest_d
    WHERE G.ORG_GRP_I =5
    Any suggestions

    hi
    What should be result if divide by zero e.g
    SQL> SELECT * FROM emp;
        EMPNO ENAME        JOB             MGR HIREDATE        SAL      COMM    DEPTNO
         7901 SMITH        CLERK          7902 17-DEC-80         0         0        20
         7499 ALLEN        SALESMAN       7698 20-FEB-81      2100      1800        30
         7521 WARD         SALESMAN       7698 22-FEB-81      2300      2000        30
         7566 JONES        MANAGER        7839 02-APR-81      1000      3000        20
         7654 MARTIN       SALESMAN       7698 28-SEP-81      3200       700        30
         7698 BLAKE        MANAGER        7839 01-MAY-81      1000      3000        30
         7782 CLARK        MANAGER        7839 09-JUN-81      1000      3000        10
         7788 SCOTT        ANALYST        7566 19-APR-87      1000      1900        20
         7839 KING         PRESIDENT           17-NOV-81      1000      1700        10
         7844 TURNER       SALESMAN       7698 08-SEP-81      1800       700        30
         7876 ADAMS        CLERK          7788 23-MAY-87      1000      1300        20
         7900 JAMES        MANAGER        7698 03-DEC-81      1000      3000        30
         7902 FORD         ANALYST        7566 03-DEC-81      1000      2000        20
    13 rows selected.
    SQL> SELECT sal/DECODE(comm,0,1,comm) FROM emp;
    SAL/DECODE(COMM,0,1,COMM)
                            0
                    1.1666667
                         1.15
                    .33333333
                    4.5714286
                    .33333333
                    .33333333
                    .52631579
                    .58823529
                    2.5714286
                    .76923077
                    .33333333
                           .5
    13 rows selected.Khurram

  • "ORA-1722 Invalid number" error while runing a SQL script in SQL*Plus

    Hello,
    I created a SQL script that is intended to populate tables with
    baseline data. When I run the script in the SQL*Plus program
    that comes with the Oracle 8.1.6 (client), I receive an "ORA-
    1722 Invalid number".
    The error always occurs when SQL*Plus tries to execute the
    following SQL statement:
    insert into components(db_ind,module_id,ext_compid,active) values
    ('cm',modules_seq.currval,1046682,'y');
    The datatypes for the columns on the components table are as
    follows:
    db_ind varchar2(2);
    module_id number;
    ext_compid number;
    active varchar2(1);
    It seems that for some reason Oracle is having trouble
    recognizing 1046682 as a number.
    I also tried the following INSERT statements to see if that
    would work:
    insert into components(db_ind,module_id,ext_compid,active) values
    ('cm',modules_seq.currval,to_number('1046682'),'y');
    insert into components(db_ind,module_id,ext_compid,active) values
    ('cm',modules_seq.currval,'1046682','y');
    but I still receive the same error message
    Is there some NLS setting(s) I need to modify so that Oracle
    does not give me this error? Does anyone know the answer to
    this problem?
    Your help is greatly appreciated.
    Oscar
    (NOTE: I also receive this same error when trying run the
    script in SQL Navigator and Toad programs)

    Please see the following docs.
    R12: JBO-27122 Error Message Clicking On Supplier Accounting Link With Unexpected Error [ID 1218903.1]
    Supplier Management Accounting Link Gives Unexpected Error and JBO-27122 at SELECT * FROM (select pvsa.ADDRESS_STYLE [ID 1340655.1]
    Adding Accounting Information or Operating Unit Information fails with APP-FND-1564: ORACLE error 1722 in FDFGVD [ID 364265.1]
    Thanks,
    Hussein

  • Sql*plus worksheet error

    Hi there,
    I'm using Windows 2000 SP3 with Oracle 9i Database Server release 92010
    The sql*pl worksheet work fine several time until now, when I'm clicking on SQL*PL worksheet I'm getting an error message that says:
    SQL*Plus executable may not have been installed in C:\oracle\ora92\bin.
    CreateProcess: C:\oracle\ora92\bin\sqlplus -r 3/nolog
    @c:\oracle\ora92\sysman\config\sqlplusworksheetInit.
    sql error = 193
    Thanks,
    Oded Dror
    Email: [email protected]

    changing the env variable at dos prompt will not change it for other processes. It will be changed
    only while the dos prompt window is running. to change it permanently, you need to right click on
    My Computer" icon and go to properties -> Advance Options. and change the environment values there.

  • Error in calling SQL plus program with parameter from Shell script

    This is my Shell script. I am trying to call in the SQL plus program with the parameter and the shell script is registered as a concurrent program.
    PARAMETERS=`echo $1 |tr -d '\"'`
    DB_USER_ID=`echo $PARAMETERS|cut -d" " -f3|cut -d"=" -f2`
    CONN_STRING=$DB_USER_ID
    REQ_DATE=`echo $PARAMETERS|cut -d" " -f9|cut -d"=" -f2`
    timestamp=`date +%m-%d-%y-%H:%M:%S-%Z`
    timestam=`date +%y-%m-%d`
    sqlplus -s $CONN_STRING @ar_statement.sql $REQ_DATE
    chmod 755 statement.sh
    . statement.sh
    My Sql plus program is like this.
    set pagesize 0
    set heading off
    set feedback off
    spool $GEC_TOP/log/ge_ar_statement.sh
    select output_file_name
    from fnd_concurrent_requests
    where trunc(actual_completion_date) = '&2';
    spool off;
    exit;
    When i run the concurrent program, i am getting the following error:
    ar_statement: line 14: REQ_DATE: command not found
    Enter value for 2:
    User requested Interrupt or EOF detected.
    ar_statement.sh: line 1: Enter: command not found
    ar_statement.sh: line 2: User: command not found
    ar_statement
    Program exited with status 127
    I am not strong at Unix Porgamming and i would request someone who can
    help me out as soon as possible.
    I need this solution quickly and thank everyone in advance.
    Thanks.

    Can you put your coding between code statements, like shown in the FAQ. It will be easier to read.
    Looking at your script, my first guess is that crontab will not find your sqlplus since your script does not have $HOME/bin in the $PATH. From what I understand, running .profile in your script will not work either because variables are exported to sub-shells, not to the shell above. You can call your script with a dot like . ./script which means that the script will run like it was typed at the command prompt. But it will be less confusing to define appropriate variables in the script. eg.
    ORACLE_SID=my_instance_name
    ORACLE_HOME=/my_path_to_oracle_home_directory
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    PATH=$ORACLE_HOME/bin:$PATH
    I remember some slightly different way of coding to handle the sqlplus return codes.
    For instance:
    sqlplus -s /nolog > /dev/null <<-EOF
    connect system/manager
    @ssm.sql
    whenever oserror exit failure
    whenever sqlerror exit failure
    EOF
    sql_err=$?
    if [ $sql_err -ne 0 ]; then
       echo "FAILURE"
    else
       echo "SUCCESS"
    fiThe - in -EOF supresses tab's
    Using connect will prevent ps from showing your login credentials
    In some versions of bash the ending EOF needs to be at the beginning of the line to work.
    Edited by: waldorfm on Jul 14, 2010 7:05 PM
    complaining about putting code between code delimiters and forgot myself ;-)
    Edited by: waldorfm on Jul 14, 2010 7:08 PM
    Btw, if you "source" a script running it like . .script, than an exit in that script will log you out.

  • PLS-00201 error occurs when batching a stored procedure in SQL*Plus

    I have a batch file to run a stored procedure and spool the results to file. When I enter the commands manually in sql*plus the output works fine and my results are spooled to the output file. But when I run the same commands in the batched script I get an error.
    Any ideas?
    Stored Procedure:
    create or replace procedure MMP( p_cursor in out SYS_REFCURSOR)
    as
    begin
    open p_cursorfor select name, id from table;
    end;
    batch file 1:
    sqlplus -S user/pw@REPORTDV @sp_output_spooled.sql
    script file sp_output_spooled.sql
    Pasting these commands directly to the SQL*Plus command prompt spools the result set to file as expected.
    set colsep '|'
    set echo off
    set feedback off
    set termout off
    set heading off
    set linesize 9000
    set pagesize 0
    set trimspool on
    set headsep off
    spool output.TXT
    var rc refcursor
    execute MMP(:rc)
    print rc
    spool off
    exit
    The errors printed to output.TXT file after the batch is run and error occurs:
    BEGIN MMP(:rc); END;
    ERROR at line 1:
    ORA-06550: line 1, column 8:
    PLS-00201: identifier 'MMP' must be declared
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    ERROR:
    ORA-24338: statement handle not executed
    SP2-0625: Error printing variable "rc"

    Hi,
    Your code worked fine for me.
    Is MMP procedure owned by the same user that is running the batch file or does it have proper privileges and synonym?
    vr,
    Sudhakar

Maybe you are looking for