ORA-00942 error in simple stored proc

Guys,
I'm trying to learn to write some procedures in oracle and have started with the following;
CREATE OR REPLACE PROCEDURE sp__who
IS
BEGIN
FOR rec IN (SELECT s.SID, s.serial#, p.spid, s.osuser, s.program,
s.status
FROM v$process p, v$session s
WHERE p.addr = s.paddr)
LOOP
DBMS_OUTPUT.put_line ('SID: ' || rec.SID);
DBMS_OUTPUT.put_line ('Serial Nbr: ' || rec.serial);
DBMS_OUTPUT.put_line ('SPID: ' || rec.spid);
DBMS_OUTPUT.put_line ('OS User: ' || rec.osuser);
DBMS_OUTPUT.put_line ('Program: ' || rec.program);
DBMS_OUTPUT.put_line ('Status: ' || rec.status);
DBMS_OUTPUT.put_line ('------------------------------');
END LOOP;
END sp__who;
SHOW ERRORS;
This is failing with a PL/SQL: ORA-00942: table or view does not exist - it seems to be complaining about v$session and v$process - I do have access to these as I can run the select by itself fine...
Any ideas why?
Also, can anyone suggest a good website for learning PL/SQL and oracle procedure writing?
Cheers!
Pete

I'm a DBA (Sybase / SQL Server DBA!) and I'm learning to support oracle instances in my current role.
The stored procedure will be used to extract a list of users active or otherwise in the database... Ideally giving enough information to make decisions easier when it comes to killing processes, etc. Replicating in part, the sybase equivalent stored procedures. (long term plan will be to recreate all the sybase sp_ procedures in oracle)
What's written so far is obviously very basic and will need further enhancements to make it useful as intended - but having zero experience of writing procs in Oracle I thought it best to start with a simple select :-)

Similar Messages

  • Security problem? (ORA-00942 error when creating procedure)

    First, in SQL*Plus connect as system user:
    SQL>connect system/oracle
    Then, create table proctest for user scott and insert records:
    SQL>create table scott.proctest ( name varchar2(10)) ;
    SQL>insert into scott.proctest values ( 'bigboy' ) ;
    SQL>select * from scott.proctest ;
    NAME
    bigboy
    Then, create procedure testproc for user system using table scott.proctest:
    SQL>CREATE OR REPLACE PROCEDURE testproc AS
    2 v_name VARCHAR2(10) ;
    3 BEGIN
    4 SELECT Name INTO v_name FROM scott.proctest WHERE rownum < 2 ;
    5 DBMS_OUTPUT.PUT_LINE( 'Name: ' || v_name ) ;
    6 END ;
    7 /
    Then, errs report:
    SQL>show err;
    LINE/COL ERROR
    4/2 PL/SQL: SQL
    4/2 PL/SQL: SQL Statement ignored
    4/37 PL/SQL: ORA-00942: Table or view does not exist
    Then, explicitly grant select privilege on proctest to system:
    SQL>grant select on scott.proctest to system ;
    And at this time compile the above precedure again, there's no errors.
    I have got some instruction that if a procedure wants to use some table,
    the owner of this procedure has to have corresponding privileges to use this table and
    these privileges have to be granted directly to the user. It doesn't work if
    the privileges are granted i.e. through roles.
    And in the example above the user has select on scott.proctest privilege but
    this privilege is granted through DBA role. So it doesn't work if
    I do not explicitly grant select privilege to system.
    My question is:
    Why does Oracle define this rule? Is it a kind of security consideration?

    Since stored procedures rely on privileges that are granted directly to the user, Oracle only needs to re-validate stored procedures when direct grants to the schema owner change. In general, the rate at which the privileges assigned to roles are changed is much higher than the rate at which privileges assigned to a particular user are changed, so this cuts down on on the cost of revalidating procedures.
    More importantly, Oracle roles can be assigned to users, but a user can also have non-default roles and password-protected roles. If Oracle allowed privileges through roles to affect the privileges of a stored procedure, handling these sorts of cases would be quite difficult and would result in far more confusion than in today's implementation.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Error while Compiling Stored proc

    I am having problem while compiling stored proc.It gives the following error
    "Error while trying to retrieve text for error - ORA-03113"
    I have my SQL file in which i am adding the input parameters (aroung 100 parameters). Till 53 parameters i added it created the procedure now after that i am adding the parameteres one by one but its giving the same error.
    null

    Hi Minish,
    Whatever you wrote in crontab is fine. But we can call a stored procedure from Shell Script provide the shell script must have a sql file which contain the procedure to be excuted.
    Follow the things...
    Assume that,
    1. you have file called load.sql
    it contains...
    load_data;
    2. your shell script must have this code
    . /home/nimish/.profile
    sqlplus scott/tiger@orcl_bk load.sql
    *** make sure that sql file should have executable permissions
    Good Luck
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Nimish Buch:
    I want to run a stored procedure as an end of day process. I wrote a small unix shell script to run the procedure from a sql session, similar to following.
    . /home/nimish/.profile
    sqlplus scott/tiger@orcl_bk < execute load_data;
    If I run this script manually, it runs fine. I get the following errors when I attempt to run it as a cron job.
    Message file sp1.msb not found
    I have checked sp1us.msb does exist in ORACLE_HOME/sqlplus/mesg directory. I even tried giving it's path in PATH variable.
    Any help with this will be appreciated.
    Thanks a lot.
    Nimish<HR></BLOCKQUOTE>
    null

  • ORA-03113 with pool and stored proc

    We are experiencing a strange error when calling a stored procedure using a
    connection pool (WLS 5.1 SP10, Oracle 8). Everything works fine until the
    stored procedure raises a user-defined exception. When the connection is
    used again, we get the 03113 error. It appears that the connection is OK
    due to the testConnsOnReserve not returning an error, but on the next stored
    procedure call, the error happens. The database guys have no answers. Does
    anyone have a clue?
    Here is an ouput log showing what happens (this was done with a pool with
    only one connection):
    Got the exception for no BPI Record
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
    :7, :8); end;
    SQLException: SQLState() vendor code(20003)
    java.sql.SQLException: ORA-20003: Error at step- Select..,procedure
    p_getBPITrckIdForDataTblPk No BPI Record Found...
    ORA-01403: no data found
    ORA-06512: at "CIFPROC.PKG_UTIL", line 381
    ORA-06512: at "CIFPROC.PKG_BPI", line 901
    ORA-06512: at line 1
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
    Compiled Code)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
    Code)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
    Compiled Code)
    at com.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
    .java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Release test worked!
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    Obtain the connection again
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Reserve test worked!
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Calling stored proc and get comm error
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
    :7, :8); end;
    SQLException: SQLState() vendor code(3113)
    java.sql.SQLException: ORA-03113: end-of-file on communication channel
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
    Compiled Code)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
    Code)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
    Compiled Code)
    at com.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
    .java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Release test fails!
    Parsing: select count(*) from dual
    SQLException: SQLState() vendor code(3114)
    java.sql.SQLException: ORA-03114: not connected to ORACLE
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
    Code)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java,
    Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    at
    weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
    Compiled Code)
    at weblogic.jdbcbase.pool.Connection.close(Connection.java, Compiled
    Code)
    at
    com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.ja
    va, Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
    .java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Regenerating connection
    DriverManager.getDriver("jdbc20:weblogic:oracle:DCIF")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    trying
    driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d1
    fcf]
    getDriver returning
    driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d1
    fcf]
    weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
    Connecting to database using: bmgr/********@DCIF at 0
    SQLException: SQLState() vendor code(1012)
    java.sql.SQLException: ORA-01012: not logged on - (bmgr/********@DCIF)
    at
    weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
    at
    weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connection
    EnvFactory.java:153)
    at
    weblogic.jdbc.common.internal.ConnectionEnvFactory.refreshResource(Connectio
    nEnvFactory.java:207)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.refresh(ConnectionEnv.java:677)
    at
    weblogic.common.internal.ResourceAllocator.resetThisOne(ResourceAllocator.ja
    va, Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    at
    weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
    Compiled Code)
    at weblogic.jdbcbase.pool.Connection.close(Connection.java, Compiled
    Code)
    at
    com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.ja
    va, Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
    .java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
    Connecting to database using: bmgr/********@DCIF at 0
    Connected to database at: 160
    Parsing: select length(SYSDATE) from dual
    Executing: select length(SYSDATE) from dual
    Parsing: select VALUE from V$NLS_PARAMETERS where
    PARAMETER='NLS_NUMERIC_CHARACTERS'
    Executing: select VALUE from V$NLS_PARAMETERS where
    PARAMETER='NLS_NUMERIC_CHARACTERS'
    Done logging in at: 170
    Connection: using OCI API: OCI8
    Done with connection regen
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
    :7, :8); end;
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
    :7, :8); end;
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
    Executing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: select count(*) from dual

    Well, this seems to do the trick. We'll keep testing, but the errors have
    now disappeared for all instances of this problem.
    Thanks for the help!
    JDB
    "John Bauer" <[email protected]> wrote in message
    news:[email protected]...
    We'll try this, but it seems to be connection-oriented. If we have a pool
    of 5 connections, and an exception happens, only that connection seems tobe
    affected. The other connections in the pool work fine, and the proc works
    for those connections.
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Hi.
    The issue is likely related to our caching of PreparedStatements
    for performance. If some DBMS failure occurs which could invalidate
    a PreparedStatement/cursor such that it could never be re-used,
    even after clearParameters) are called etc, then this case might
    occur. Please take the attached jar file, and add it to the
    weblogic.classpath ahead of the standard weblogic stuff, by
    editing your startWebLogic script. This will turn off caching, and
    should make the problem go away. Let me know...
    Joe
    John Bauer wrote:
    Here is our configuration.
    weblogic.jdbc.connectionPool.CifPool=\
    url=jdbc20:weblogic:oracle:QCIF,\
    driver=weblogic.jdbc20.oci.Driver,\
    loginDelaySecs=1,\
    initialCapacity=5,\
    maxCapacity=20,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=30,\
    testTable=dual,\
    testConnsOnRelease=true,\
    props=user=BMGR;password=djr0t$
    We are using OCI 8.1.6
    "Maria Salzberger" <[email protected]> wrote in message
    news:[email protected]...
    Hi John,
    I have researched about this - but could not find a known issue
    which
    may
    be
    related to this.
    Which JDBC driver are you using?
    Kind Regards
    Maria Salzberger
    Developer Relations Engineer
    BEA Customer Support
    John Bauer schrieb in Nachricht <[email protected]>...
    We are experiencing a strange error when calling a stored procedure
    using
    a
    connection pool (WLS 5.1 SP10, Oracle 8). Everything works fine
    until
    the
    stored procedure raises a user-defined exception. When the
    connection is
    used again, we get the 03113 error. It appears that the connectionis OK
    due to the testConnsOnReserve not returning an error, but on the
    next
    stored
    procedure call, the error happens. The database guys have no
    answers.
    Does
    anyone have a clue?
    Here is an ouput log showing what happens (this was done with a
    pool
    with
    only one connection):
    Got the exception for no BPI Record
    getConnection returningdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
    :5,
    :6,
    :7, :8); end;
    SQLException: SQLState() vendor code(20003)
    java.sql.SQLException: ORA-20003: Error at step- Select..,procedure
    p_getBPITrckIdForDataTblPk No BPI Record Found...
    ORA-01403: no data found
    ORA-06512: at "CIFPROC.PKG_UTIL", line 381
    ORA-06512: at "CIFPROC.PKG_BPI", line 901
    ORA-06512: at line 1
    at
    weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    atweblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
    Compiled Code)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
    Code)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
    Compiled Code)
    atcom.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
    j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
    s
    .java, Compiled Code)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
    a
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
    t
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Release test worked!
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    Obtain the connection again
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Reserve test worked!
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Calling stored proc and get comm error
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
    :5,
    :6,
    :7, :8); end;
    SQLException: SQLState() vendor code(3113)
    java.sql.SQLException: ORA-03113: end-of-file on communication
    channel
    atweblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    atweblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
    Compiled Code)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
    Code)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
    Compiled Code)
    atcom.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
    j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
    s
    .java, Compiled Code)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
    a
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
    t
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Release test fails!
    Parsing: select count(*) from dual
    SQLException: SQLState() vendor code(3114)
    java.sql.SQLException: ORA-03114: not connected to ORACLE
    atweblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
    Code)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java,
    Compiled Code)
    atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    atweblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
    Compiled Code)
    at weblogic.jdbcbase.pool.Connection.close(Connection.java,Compiled
    Code)
    at
    com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.j
    a
    va, Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
    j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
    s
    .java, Compiled Code)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
    a
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
    t
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Regenerating connection
    DriverManager.getDriver("jdbc20:weblogic:oracle:DCIF")
    tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    trying
    driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d
    1
    fcf]
    getDriver returning
    driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d
    1
    fcf]
    weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
    Connecting to database using: bmgr/********@DCIF at 0
    SQLException: SQLState() vendor code(1012)
    java.sql.SQLException: ORA-01012: not logged on -
    (bmgr/********@DCIF)
    atweblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connectio
    n
    EnvFactory.java:153)
    at
    weblogic.jdbc.common.internal.ConnectionEnvFactory.refreshResource(Connecti
    o
    nEnvFactory.java:207)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.refresh(ConnectionEnv.java:677)
    atweblogic.common.internal.ResourceAllocator.resetThisOne(ResourceAllocator.j
    a
    va, Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    atweblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
    Compiled Code)
    at weblogic.jdbcbase.pool.Connection.close(Connection.java,Compiled
    Code)
    at
    com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.j
    a
    va, Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
    j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
    s
    .java, Compiled Code)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
    a
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
    t
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
    Connecting to database using: bmgr/********@DCIF at 0
    Connected to database at: 160
    Parsing: select length(SYSDATE) from dual
    Executing: select length(SYSDATE) from dual
    Parsing: select VALUE from V$NLS_PARAMETERS where
    PARAMETER='NLS_NUMERIC_CHARACTERS'
    Executing: select VALUE from V$NLS_PARAMETERS where
    PARAMETER='NLS_NUMERIC_CHARACTERS'
    Done logging in at: 170
    Connection: using OCI API: OCI8
    Done with connection regen
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
    :5,
    :6,
    :7, :8); end;
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,:5,
    :6,
    :7, :8); end;
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
    Executing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: select count(*) from dual
    B.E.A. is now hiring! (12/14/01) If interested send a resume to
    [email protected]
    DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco,
    CA
    E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
    SOFTWARE ENGINEER (DBA) Liberty Corner,NJ
    SENIOR WEB DEVELOPER San Jose, CA
    SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTHCAROLINA San Jose, CA
    SR. PRODUCT MANAGER Bellevue, WA
    SR. WEB DESIGNER San Jose, CA
    Channel Marketing Manager - EMEA Region London, GBR
    DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
    SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
    E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
    QUALITY ASSURANCE ENGINEER Redmond, WA
    Services Development Manager (Business Development Manager - Services)Paris, FRA; Munich, DEU
    SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
    E-Marketing Programs Specialist EMEA London, GBR
    BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
    MANAGER, E-SALES Plano, TX

  • ORA-00942 Error during unicode export of BI 7.0

    Hello Everyone,
    I am doing an export of a non-unicode BI 7.0 system to convert and import it into a Unicode database. All the jobs have passed except one and I see the following error in the log file (SAPAPPL0_3.log)
    /usr/sap/ABD/SYS/exe/run/R3load: START OF LOG: 20080302124247
    /usr/sap/ABD/SYS/exe/run/R3load: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#13 $ SAP
    /usr/sap/ABD/SYS/exe/run/R3load: version R7.00/V1.4
    Compiled Jun  9 2007 09:20:06
    /usr/sap/ABD/SYS/exe/run/R3load -e SAPAPPL0_3.cmd -datacodepage 4102 -l SAPAPPL0_3.log -stop_on_error
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): WE8DEC
    (RSCP) INFO: I18N_NAMETAB_TIMESTAMPS not in env: checks are ON (Note 738858)
    (RSCP) WARN: UMGCONTAINER has 1 problems.
    (RSCP) INFO: UMGSETTINGS nametab creation: ok.
    (RSCP) INFO: Global fallback code page = 1100
    (RSCP) INFO: Common character set is  not  7-bit-ASCII
    (RSCP) INFO: Collision resolution method is 'fine'
    (RSCP) INFO: R3trans code pages = Normal
    (RSCP) INFO: EXPORT TO ... code pages = Normal
    (RSCP) INFO: Check for invalid language keys: active, by default
    (RSCP) INFO: I18N_NAMETAB_NORM_ALLOW = 999999999
    (RSCP) INFO: I18N_NAMETAB_NORM_LOG   = 1000000002
    (RSCP) INFO: I18N_NAMETAB_ALT_ALLOW  = 10000
    (RSCP) INFO: I18N_NAMETAB_ALT_LOG    = 10003
    (RSCP) INFO: I18N_NAMETAB_OLD_ALLOW  = 0
    (RSCP) INFO: I18N_NAMETAB_OLD_LOG    = 500
    (GSI) INFO: dbname   = "ABD20070922100908
    (GSI) INFO: vname    = "ORACLE                          "
    (GSI) INFO: hostname = "ussbbdd5                                                        "
    (GSI) INFO: sysname  = "HP-UX"
    (GSI) INFO: nodename = "ussbbdd5"
    (GSI) INFO: release  = "B.11.23"
    (GSI) INFO: version  = "U"
    (GSI) INFO: machine  = "ia64"
    (GSI) INFO: instno   = "INITIAL   "
    (EXP) ERROR: DbSlExeRead failed
      rc = 103, table "/BIC/SZTERR_CD"
      (SQL error 942)
      error message returned by DbSl:
    ORA-00942: table or view does not exist
    (DB) INFO: disconnected from DB
    /usr/sap/ABD/SYS/exe/run/R3load: job finished with 1 error(s)
    /usr/sap/ABD/SYS/exe/run/R3load: END OF LOG: 20080302124251
    When I run the following command on /BIC/SZTERR_CD, I do not get any table information back. I am not sure how to fix it though.
    SELECT * FROM DBA_OBJECTS WHERE OBJECT_NAME = '/BIC/SZTERR_CD '; 
    I did finish all the unicode preconversion steps and also ran the SMIGR_CREATE_DDL program. I had exported recently from the same system but I never got this error during that run.
    Another question is about the order in which the steps need to be performed. I completed the preconversion steps, then ran the SMIGR_CREATE_DDL program before proceeding to the export phase. Is this right or does it not matter?
    Thanks again for your help!

    Hello Stacy,
    > When I run the following command on /BIC/SZTERR_CD, I do not get any table information back. I am not sure how to fix it though.
    > SELECT * FROM DBA_OBJECTS WHERE OBJECT_NAME = '/BIC/SZTERR_CD ';
    If the object does not exists on the source target database, please check if the ddic of sap still contains the table definition. (SE11 or SE14)
    If yes you can set the status of the table /BIC/SZTERR_CD to "ok" in the corresponding task file.
    You can not fix this problem in other way after you have started the conversion, because of the export files are already generated (with the information of the sap ddic)...
    > I completed the preconversion steps, then ran the SMIGR_CREATE_DDL program before proceeding to the export phase. Is this right or does it not matter?
    That was the right way.
    Regards
    Stefan

  • ORA-00942 error on truncating a table with a XML Index

    Oracle Version: 11.2.0.1.0
    When truncate command fails with error "ORA-00942: table or view does not exist" when run against a table with an XML Index defined
    SQL> CREATE TABLE XML_TEST
    2 (
    3 ID INTEGER,
    4 TESTXML SYS.XMLTYPE
    5 );
    Table created.
    SQL> truncate table XML_TEST;
    Table truncated.
    SQL> CREATE INDEX xmlindex ON XML_TEST(TESTXML)
    2 indextype IS xdb.xmlindex
    3 parameters ('PATH TABLE MY_PATH_TABLE');
    Index created.
    SQL> truncate table XML_TEST;
    truncate table XML_TEST
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> Drop Index xmlindex;
    Index dropped.
    SQL> truncate table XML_TEST;
    Table truncated.

    No, I don't think that explanation is correct. I don't think it has to do with user privs. besides, we don't
    adjust rowids on an import -- we recreate the index, just like a b-tree index import would.
    This should be working. It's most likely a bug in our (i.e. Text) import code -- SYS.XMLTYPE is a little
    strange because under the covers it's actually a function-based index.
    I will test it out and file a bug if I can reproduce the behavior on solaris.

  • Error executing DB2 stored proc

    Hi,
    We are trying to execute a Stored Proc in Mainframe DB2. We've prepared a PreparedStatement. The problem the stored proc works fine in some cases, but in some it fails even thouhg the data passed is same. Even the whole JVM crashes and there is no log in error.log file.
    Do you have any idea as to what might be the problem. We are using IBM WebSpehere5.0 and DB2v7.0
    Regards,
    Rohit

    For starters you should be using CallableStatement and not PreparedStatement.
    And if the VM goes down and no errors are thrown anywhere than it's time to talk to the vendor or consult the docs because that is beyond the scope of help you could be given here.

  • ORA-00942 error when exporting db

    Hi,
    Has anyone encountered the following error before? Kindly help.
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export the entire database ...
    . exporting tablespace definitions
    . exporting profiles
    . exporting user definitions
    . exporting roles
    . exporting resource costs
    . exporting rollback segment definitions
    . exporting database links
    . exporting sequence numbers
    . exporting directory aliases
    . exporting context namespaces
    . exporting foreign function library names
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions
    EXP-00008: ORACLE error 942 encountered
    ORA-00942: table or view does not exist
    EXP-00024: Export views not installed, please notify your DBA
    EXP-00000: Export terminated unsuccessfully
    My exp parameters are full=y grants=y indexes=y rows=y

    Hi,
    I have executed catexp.sql but when I run the exp it produced the ff error:
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export the entire database ...
    . exporting tablespace definitions
    . exporting profiles
    . exporting user definitions
    . exporting roles
    . exporting resource costs
    . exporting rollback segment definitions
    . exporting database links
    . exporting sequence numbers
    . exporting directory aliases
    . exporting context namespaces
    . exporting foreign function library names
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions
    . exporting system procedural objects and actions
    . exporting pre-schema procedural objects and actions
    EXP-00008: ORACLE error 21779 encountered
    ORA-21779: duration not active
    ORA-06512: at "SYS.DBMS_AW", line 106
    ORA-06512: at "SYS.DBMS_AW", line 222
    ORA-06512: at "SYS.DBMS_AW_EXP", line 264
    ORA-06512: at line 1
    EXP-00083: The previous problem occurred when calling SYS.DBMS_AW_EXP.schema_info_exp
    . exporting cluster definitions
    EXP-00056: ORACLE error 31600 encountered
    ORA-31600: invalid input value EMIT_SCHEMA for parameter NAME in function SET_TRANSFORM_PARAM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3926
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 4050
    ORA-06512: at "SYS.DBMS_METADATA", line 836
    ORA-06512: at line 1
    EXP-00056: ORACLE error 31600 encountered
    ORA-31600: invalid input value EMIT_SCHEMA for parameter NAME in function SET_TRANSFORM_PARAM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3926
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 4050
    ORA-06512: at "SYS.DBMS_METADATA", line 836
    ORA-06512: at line 1
    EXP-00000: Export terminated unsuccessfully

  • Intermittent ORA-00942 error

    Hi,
    I'm getting an intermittent ORA-00942 (Table or View Does Not Exist) error in Oracle 9i. We're getting it in several different packages, and they all have one thing in common.
    They are all either joining to a table type that had previously been populated with a BULK COLLECT INTO or a temp table that was populate with a CAST (from the same table type) or has a TABLE CAST directly in the join.
    This is the type:
    CREATE OR REPLACE TYPE fe_id_tab AS TABLE OF INTEGER NOT NULL;
    This is the table:
    create global temporary table FE_TMP_ID
    ID INTEGER not null
    on commit delete rows;
    Again, this is an intermittent error. It only happens occasionally, and when it does happen, if you immediately run the same query, it works fine.
    Thanks,
    Karin

    smuthuku wrote:
    The customer is getting the below error in the alert log intermittently when running utlrp script in 11.2.0.2
    ORA-12012: error on auto execute of job "SYS"."UTL_RECOMP_SLAVE_24"
    ORA-00942: table or view does not exist
    As this happens in a production environment, the customer doesn't want to turn on the tracing but wants to know
    if this is a problem with the data dictionary or someother issue. Any inputs appreciated.
    Yes, it is a problem with data dictionay or some other issue.
    do as below so we can know complete Oracle version & OS name.
    Post via COPY & PASTE complete results of
    SELECT * from v$version;

  • Trying to change the Release/Debug connection string (ORACLE) of a VS13 Lightswitch project. Getting ORA-00942 error...

    Hello,
    i try to change the connection string of a Lightswitch 2013 project. I have a database for developers and a 'productive' database for releases. Both are similar (table names, entries etc..) and they are from ORACLE. First i attached the developer database
    as an external source. Everything works fine. Now I'm trying to change the connection string  whether my application is in a release state or in a developer state.
    I found a hint in the following question to solve that issue: Question
    from a LS-User 
    It is possible to change the connection string during the runtime. I tried it out and added to my DataBaseService.lsml.cs:
    partial void DataBase_InitializingConnection(DatabaseConnectionState state)
    state.ConnectionString = "DATA SOURCE=DB.productive;PASSWORD=password;PERSIST SECURITY INFO=True;USER ID=USER_PROD";
    Well, Lightswitch is using the new connection. But when i run the application, i am getting the error "ORA-00942: table or view does not exist". The views and tables definitely exist. The two schemas are the same. So what am i doing wrong?
    Regards from Munich

    HI Munich,
    Welcome to Lightswitch forum.
    According to your description above, you want to connect to external datasource in Lightswitch application.
    Oracle is not a supported data source for LightSwitch, it's recommended to use SQL Server database.
    If you want to change the connection string, you can update the connection string for a data source using the data source wizard. For example in VS2013: 
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error in Simple Stored Precedure!!

    Hi Folks,
    I am new to oracle...At present i'm working in MS SQL Server...I am trying to write a small stored procedure which retrieves a result set(ie rows) from a given table in Oracle 8i.I have written a procedure as
    create procedure test is
    begin
    select * from stu;
    end
    and I executed the above procedure.It was showing Procedure created with compilation errors.What would be the problem?.Same procedure is executing with out any errors in SQL Server.
    Can anyone pls give me a solution for this?.
    Thanks in advance,
    Murali

    Murali,
    I answered a question just like this a little while ago. I programmed TSQL for about 5 years and yes it would be nice if PL/SQL could return a data stream, but it doesn't. However as I explain below I use a method I like even better, since I would rather have an object (a view) that I can get this data from anyway. Do remeber a function can return a data stream though so you might want to consider that as well. Anyway this is what I had said ...
    --[START NOTE]
    I've run into this problem allot with Oracle. If I was to point out the biggest difference between PL/SQL and TSQL it is this ability your wanting, to have a data stream come back from a oracle function/proc/package. In TSQL you can make a proc that simply says, SELECT * from T1, and when you execute this, you get a data stream back. Oracle does not do this, but there is a flip side. There is a different approach I've realized to this and I would NOT use this data return stream ability even if it was supported. This is what I usually do when I want data from a package ...
    Use a VIEW.
    Call a procedure that creates a database VIEW of the SELECT query you want. (you will have to remember the name of the view) , Then simply do SELECT * FROM <view name you made>. Doing it in this fashion allows so many more abilities than just getting a data set back. Your data set is now an object which you can query over again and even other sessions have access to it. See the basic example below ...
    SQL> create or replace PROCEDURE sp_sql (ps_in_sql in varchar2)
    2 as
    3 ls_sql varchar2(2000) := upper(trim(ps_in_sql));
    4 BEGIN
    5 execute immediate ls_sql;
    6 end sp_sql;
    7 /
    Procedure created.
    SQL> show errors
    No errors.
    SQL>
    SQL> execute sp_sql('create or replace view v1 (N1) as select distinct t1.n1 from t1 order by t1.n1'
    PL/SQL procedure successfully completed.
    SQL> select * from v1;
    N1
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    10 rows selected.
    This is just the basic principle to get a data stream back from running a single execute command, with one additional SELECT * from VIEW. The main way I use this ability is just passing the WHERE clause and recompile the view inside the procedure, since I may want a date range, an IN clause, other criteria, but in the end I just do 1 EXECUTE and SELECT * from VIEW.
    This method is better that just trying to get a proc to return a data stream. Make the proc create an object that you can bind to with active objects (like grids, drop down boxes, etc.), and after you now have the view to even do more complex SQL on, since you CANT query your data stream to get only the 'JOHN DOE' entries back.
    Anyway I hope this helps a little, try it and you'll find this works very well.
    Tyler.
    --[END NOTE]

  • ORA-00942 Error when trying to deploy a mapping in Paris

    Hey all,
    I am encountering a "Table or view does not exist" and "SQL Statement Ignored" Error when I deploy a mapping. I have granted all the necessary privileges for each schema but still keep getting the errors, hence the deployment remains invalid. Any thoughts on why this is happening?
    The situation is I have created a mapping that maps data from an external table in the source module to a staging table in the staging module, and besides the regular column length and data type mismatch warning, the mapping is valid. The problem is not being able to deploy this mapping.
    Any feedback would be appreciated. Thanks.

    Did you register your target schema with the WB repository? I found that this happened to me sometimes when I forgot to do that.
    HTH,
    --oswaldo
    [osantos]

  • Error Expanding Database Node :  ORA-00942 table or view does not exist

    I just installed the ODT for Visual Studio.NET. It installed fine and I can connect to my databases. However, I am having trouble expanding adatabase node to see all of its object nodes (tables, views, ...). I get the ORA-00942 error when connecting with a user id and password used by an application. If I use my personall user id an password, I can expand the database node. What table or view is it looking for that it cannot find? Is this something that our DBA has prevented? Any ideas would be appreciated.

    Only guessing, but I wouldn't expect an application id to have anything like the same rights as a normal id. I wouldn't expect it to have any rights to tables, just to stored procedures and/or views, but this would be up to the standards in your organisation. This will be something the DBA has done, probably granting the absolute minimum of rights to the application id. It might be looking for one of the system views, so if there's an option to ignore system objects try setting it.

  • APEX 4.0 SQL ERROR -ORA-00942

    Hi, I'm new to APEX. I'm having some trouble getting the following which creates a view to execute. I keep getting the ora-00942 table or view does not exist when it reaches the code in bold. When i look at the objects in APEX and SQL Developer the table is right in front of me. Any insight as to why i'm getting this error?
    select ctt.firstname
    , ctt.lastname
    , ctt.contact_type
    , ads.address_type
    , ads.address_line1
    , ads.address_line2
    , ads.postcode
    , ads.city
    , ads.state
    , ads.country
    , aac.default_yn
    , ctt.id
    , ads.id
    from app_contacts ctt
    , app_addresses ads
    , app_ads_ctt aac
    where aac.ctt_id = ctt.id
    and aac.ads_id = ads.id
    The code is from a new book by Packt Publishing "APEX 4.0 Cookbook" which i'm using to get up to speed on APEX 4.0. I don't want to take any shortcuts. I'd really appreciate some help.
    Thanks

    Hi Ben,
    Here is the complete statement and i've indicated in bold where the error occurs. The problem area is enclosed in asterisks when encapsulated by
    create or replace view "APP_VW_CONTACTS" as
    select ctt.firstname
    , ctt.lastname
    , ctt.contact_type
    , ads.address_type
    , ads.address_line1
    , ads.address_line2
    , ads.postcode
    , ads.city
    , ads.state
    , ads.country
    , aac.default_yn
    , ctt.id
    , ads.id
    from app_contacts ctt
    , app_addresses ads
    , app_ads_ctt aac
    where aac.ctt_id = ctt.id
    and aac.ads_id = ads.id
    This code generates the ora-00942 error (table or view does not exist)  in SQL Developer and ora-00957 (duplicate column name) in APEX SQL WORKSHOP.
    Your code,SELECT * FROM user_tables WHERE LOWER(table_name) = 'app_ads_ctt';
    returns i row with a status of 'VALID' in SQL WORKSHOP.
    Edited by: 844466 on Mar 16, 2011 4:24 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • ORA-00600 Error Help required

    I am getting Error ORA-00600 for a procedure which tries get
    a CLOB as output paramater. It is a simple stored proc which is
    just querying to get this data.
    However it fails at times giving ORA-00600 error which we have
    no clue why it's happening.
    There is sufficient space in the server and also we have
    restarted the database several times.
    Any pointers to why is this happening.
    Sunil

    Cause:     This is a catchall internal error message for Oracle
    program exceptions. It indicates that a process has met a low-
    level, unexpected condition.
    Various causes of this message include:
    time-outs
         file corruption
         failed data checks in memory
         hardware, memory, or I/O errors
         incorrectly restored files
    The first argument is the internal message number. Other
    arguments are various numbers, names, and character strings. The
    numbers may change meanings between different versions of the
    Oracle Server.
    Action:     Report this error to customer support after gathering
    the following information:
    -events that led up to the error
         -the operations that were attempted that led to the
    error
    -the conditions of the operating system and database at
    the time of the error
         -any unusual circumstances that occurred before
    receiving theORA-00600 message
         contents of any trace files generated by the error
         the relevant portions of the Alert file
    Copyright (C) 1995, Oracle Corporation

Maybe you are looking for

  • Xml-fragment Issue retrieving Nested element data

    Hi, I've problem retrieving the nested element data from the xml. Using XmlBeans I am getting null when retriving the inner element. I printed the nested element xmlobject it has Xml-Fragment wrapped. I tired using below code it doesn't throw any err

  • How do I Audit Remote Control?

    A requirement of us implementing SCCM Remote Control, is that were able to report on what/when technicians are connecting to client systems. Upon investigating the canned reports in SCCM, I've found 3 reports that do some of this, specifically the 3 

  • Email HTML form as PDF

    I've spent 10+ hours researching this, and still can't come up with a good solution. Q: What's the BEST WAY to translate/convert/import/export from an HTML form input (PHP processor; i.e. text file) to either an HTML email or a PDF email? Online Appl

  • Photo template 3rd party hosted malbehaviour

    I published to folder for 3rd party hosting. Go to the page that has been done with the photos template. On that particular page i moved the photo grid page a few hundred pixels page-downwards to give room for a large text box that i want to stand fi

  • Multiple outputs from LE9 ( to soundcard cuemix/ outs? )

    I know it is possible in Logic PRO 9 but I got confused by the comparison charts saying express cannot do 7.1 mixing.. Differences between the Logic Pro 9 and Logic Express 9 applications The 3 Logic Pro 9 features that are not found in Logic Express