Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170:

Hi all,
I have an Windows XP OS with SP3.
I have installed the Oracle 11g server.
On trying to connect to the ODBC connection, i get the following error message:
Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170: TNS: Connect timeout occured
On trying the tnsping,
TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 09-OCT-2
011 13:11:05
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
E:\app\Gautam\product\11.1.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.
5.207)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))
TNS-12535: TNS:operation timed out
On trying to connect with SQL Developer, i get the following error:
Status: Failure - Test failed: Io Exception: The Network Adapter could not establish the connection
However i am able to connect to the same using SQL Plus
Another issue that occurs is that the Oracle Enterprise Manager shows the following error after a while:
Agent Connection to Instance
Status Failed
Details ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)
The following services are all up during this point of time:
OracleDBConsoleorcl
OracleOraDb11g_home1TNSListener
OracleServiceORCL
Any help in this regard will be very useful as this is hindering the progress of my work.
Thanks in advance for the help.
- Gautam

841683 wrote:
Hi,
I did try and delete my listener.ora and then create a new one..
That did not solve my issue..
What are the steps for configuring the listener again.
Thanks for the response..
- Gautamno listener.ora file is required.
just do as below
lsnrctl start

Similar Messages

  • Adding a field to an sql statement in Oracle Reports error ORA-00933

    We have been requested to add a field that already exists in the table referred to by the sql statement in Oracle Reports Builder. The report was set up by a consultant about 3 yrs ago and we don't really have much skill in this area. What is happening when I try to modify the SQL statement, either adding a field or deleting a field to the SELECT statement, causes an error message preventing the statement from being saved. The only way out of the error message is to click Cancel. The error message is
    ORA-00933:SQL command not properly ended
    ORDER BY Program ==> NAME
    Even adding or deleting a space anywhere in the SQL statement causes the error (not adding any new fields). A coworker found that if we comment out the ORDER BY, the statement will accept the new field in the SELECT section, however then we lose the order by functionality. I would like to add one additional field before the FROM. Not sure if any additional data are needed. Thank you.
    SELECT p.person_uid PIDM_KEY, p.id_number ID,
                   p.full_name_lfmi name,            
                    p.BIRTH_DATE, p.GENDER Sex,
                    Decode(a.residency,'D',p.Primary_ethnicity,'F')  Ethn,
                    a.academic_period TERM,        
                    CASE WHEN :p_group_by = 'PROGRAM' THEN a.program
                                 ELSE ' '
                    END AS Program,
                    a.COLLEGE, a.degree, a.major, ' ' rule,
                    a.STUDENT_POPULATION,a.STUDENT_LEVEL,    a.application_status Status,  a.application_status_date app_sts_dte,
                    ad.decision_date1 Last_Dec_Date,
                    ad.decision1||' '||ad.decision2||' '|| ad.decision3||' '|| ad.decision4||' '|| ad.decision5 Decisions,
                    /*  Deposit Date uses the last term entered in :p_term parameter string */
                    (SELECT MAX(deposit_effective_date) FROM usf_as_deposit WHERE account_uid = a.person_uid &term_clause group by account_uid)   AS "DEPOSIT DATE",     
                    ph.phone as PHONE,
                    CASE WHEN PS.FIRST_CONTACT IN ('NET','PAP','COM','COP') THEN PS.First_Contact
                     ELSE CASE WHEN ps.latest_contact IN ('NET','PAP','COM','COP') THEN PS.Latest_Contact
                                ELSE '  '
                                END
                    END AS FIRST_CONTACT,
                    DECODE(:p_address,'Y',REPLACE(adr.street1||' '||adr.street2||' '||adr.street3||' '||adr.city||','||adr.state||' '||adr.nation||' '||adr.zip,'  ',' '),' ') as  address, adr.nation, adr.state,
                    goremal_email_address email, a.residency, a.application_date, p.primary_ethnicity, c.cohort
    FROM MST_ADMISSIONS_APPLICATION A,
               MST_PERSON p,mst_pre_student PS,  Admissions_Cohort c, usf_v_phone_pr_ma ph,
               MST_admissions_decision_slot AD, usf_v_email, usf_v_address_dr_lr_ma_pr adr
    WHERE a.PERSON_UID = p.person_uid
            AND a.curriculum_priority  = 1
            AND a.person_uid = ps.person_uid
           AND a.person_uid = ad.person_Uid(+)
           AND a.person_uid = goremal_pidm(+)
           AND a.person_uid = adr.pidm(+)
           AND a.person_uid = ph.pidm(+)
           AND ph.rnum(+) = 1
           AND a.person_uid = c.person_uid(+)
           AND a.academic_period = c.academic_period(+)
      &Where_Clause
           /*    TAKE OUT FOLLOWING LINE AFTER DATA IS CLEANED UP  */
            AND NOT(p.id_number = '00000000'   OR SUBSTR(p.id_number,1,1) = 'B'  OR UPPER(p.full_name_lfmi)  LIKE '%TESTING%')
           AND  a.application_status_date >= NVL(:p_as_of_date,sysdate-8000)
           AND a.academic_period = ad.academic_period(+)
            AND a.application_number = ad.application_number(+)
            AND a.degree <> 'ND'    /*   AND a.college <> 'LW'                         --  Does not need non-degree and law students    */
           &Cohort_Clause 
    ORDER BY Program  &ORDER_CLAUSE

    Hi Denis,
    I tried your suggestion. The good thing is that adding the comma allowed me to be able to add a.campus to the select statement, unfortunately, another error message happened.
    ORA-00936: missing expression SELECT p . person_uid PIDM_KEY ,
    p . id_number , p . full_name_lfmi name , p . BIRTH_DATE , p . GENDER Sex ,
    Decode ( a . residency , 'D' , p . Primary_Ethnicity , 'F' ) Ethn , a . academic_period TERM ,
    CASE WHEN : P_group_by = 'PROGRAM THEN a I started over and tried only putting in the comma and get the same message even though I didn't add campus. After that, removed the comma which led to the ORA-00933 error message. So once again, I had to close the file without saving, in order for the report to run at all.

  • Bind variables in DB Connect SQL Statement in Oracle

    We are looking for ways to improve performance of DB Connect extract from an Oracle database.
    An example command that is created by the Info-Package using a DB-Connect:
    Current
    SELECT "A", "B", "C", "D", "E", "F", "G", "H"
    FROM "GSF_BW"."V_BW_FORCAST_FACT"
    WHERE ("A" = '200904') AND ("B" BETWEEN '100801' AND '101412')
    The calculated cost (calculated by Oracle Optimizer) is 25.145
    Oracle recommends the usage of bind-variables.
    In that case the Statement would need to look like:
    SELECT "A", "B", "C", "D", "E", "F", "G", "H"
    FROM "GSF_BW"."V_BW_FORCAST_FACT"
    WHERE ("PG0R_SUBD" = :b1) AND ("ZCALMONTH" BETWEEN :b2 AND :b3)
    This would reduce the cost to 11.000 which is 40% of the statement before.
    My question now is: Can anything be done to influence the generation of the SQL statement to make it better performing?

    Hi,
    It is always better to test yourself. Using bind variable is always a good practice and optimizer avoids hard parsing (soft parsing will be done here) if bind variables are used.
    So yes, if this function is being executed several times frequently then second execution onwards it may run faster.
    If you want to see actually what is happening behind it, trace it (using tkprof) and see the result.
    See the below link to know more about SQL TRACE and tkprof.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/sqltrace.htm#PFGRF01020
    Regards,
    Avinash
    Edited by: Avinash Tripathi on Nov 16, 2010 11:46 PM

  • Unable to connect SQL Developer 4.0.2 to Oracle REST Data Services 2.0.7 (Apex Listener)

    Background
    1. Weblogic 10.3.6.0 running on Oracle Linux 6.5 with Oracle JRockit(R) (build R28.2.3-13-149708-1.6.0_31-20120327-1523-linux-x86_64, compiled mode)
    2. Oracle Apex 4.2.1
    3. Apex Listener 1.1.3
    4. Apex and Apex Listener running on the Weblogic box above
    5. SQL Developer 4.0.2 running on Windows 7 64 bit / Java 1.7.0_55
    Updated Apex to 4.2.5 via p17966818_425_Generic.zip patchset. Apex environment running fine as do all applications via Listener 1.1.3
    Updated Oracle Listener to the latest version of Oracle REST Data Services 2.0.7
    Current Status
    Apex Applications and RESTful services are running fine.
    Problem
    Unable to connect SQL Developer 4.0.2 to Oracle REST Data Services 2.0.7
    Error message in SQL Developer - Cannot connect to DEV. HTTP/1.1 403 Target service not allowed
    Additional Information
    Steps followed -
    1. The oracle users APEX_LISTENER and APEX_REST_PUBLIC_USER did not exist, so I ran apex_rest_config.sql from the APEX 2.4.1 patchset whilst connected sys as sysdba and provided the same password as APEX_PUBLIC_USER for both users.
    2. I also ran
    grant insert, delete on APEX_040200.wwv_flow_rt$privilege_groups to APEX_LISTENER;
    alter session set current_schema = APEX_LISTENER;
    create or replace synonym wwv_flow_rt$privilege_groups for APEX_040200.wwv_flow_rt$privilege_groups;
    as per Oracle SQL Developer User's Guide Release 4.0
    3. copied ords.war to apex.war
    4. java -jar apex.war configdir /u01/app/oracle/admin/apex/devdomain1/
    5. java -jar apex.war
    Jun 5, 2014 5:15:31 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
    INFO: Using configuration folder: /u01/app/oracle/admin/apex/devdomain1/apex
    Enter the name of the database server [localhost]:dbservername
    Enter the database listen port [1521]:
    Enter 1 to specify the database service name, or 2 to specify the database SID [1]:1
    Enter the database service name:dbservicename
    Enter the database user name [APEX_PUBLIC_USER]:
    Enter the database password for APEX_PUBLIC_USER:
    Confirm password:
    Enter 1 to enter passwords for the RESTful Services database users (APEX_LISTENER,APEX_REST_PUBLIC_USER), 2 to use the same password as used for APEX_PUBLIC_USER or, 3 to skip this step [1]:2
    Jun 5, 2014 5:16:52 PM oracle.dbtools.common.config.file.ConfigurationFiles update
    INFO: Updated configurations: defaults, apex, apex_al, apex_rt
    Enter 1 if you wish to start in standalone mode or 2 to exit [1]:2
    6. java -jar apex.war user adminlistener "Listener Administrator"
    Jun 5, 2014 5:18:52 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
    INFO: Using configuration folder: /u01/app/oracle/admin/apex/devdomain1/apex
    Enter a password for user adminlistener:
    Confirm password for user adminlistener:
    Jun 6, 2014 5:19:12 PM AM oracle.dbtools.standalone.ModifyUser execute
    INFO: Created user: adminlistener in file: /u01/app/oracle/admin/apex/devdomain1/apex/credentials
    7. Updated the defaults.xml file
    Added
    <entry key="apex.security.user.roles">RESTful Services</entry>
    <entry key="apex.security.developer.roles">OAuth2 Client Developer, SQL Developer</entry>
    as per Oracle SQL Developer User's Guide Release 4.0
    Changed
    <entry key="debug.printDebugToScreen">false</entry>
    to
    <entry key="debug.printDebugToScreen">true</entry>
    for RESTful debugging
    Added
    <entry key="security.verifySSL">false</entry>
    to use OAuth2 in Non HTTPS Environment as per Oracle® REST Data Services Installation and Configuration Guide, Release 2.0
    8. Deleted the Admin and Manager Roles within the apex application deployment which were part of the Apex Listener 1.1.3 install
    9. Deployed the apex.war in weblogic
    10. Stopped and started the weblogic server to which apex.war was deployed
    11. In SQL Developer, View, RESTful Services. In the RESTful services windows hit connect, Create a new connection,
    Connection Name DEV
    Username adminlistener
    selected http protocol
    Hostname weblogicservername
    Port 7250
    Server Path /apex
    Workspace (blank)
    On the Authentication dialog
    Username adminlistener
    Password passwordsuppliedabove in step 6
    Response is a dialog box titled Authentication Failed
    message - Cannot connect to DEV. HTTP/1.1 403 Target service not allowed
    NOTHING UNUSUAL IN ANY OF THE WEBLOGIC LOG FILES, EXCEPT THAT IT STATES
    'Oracle REST Data Services version : 2.0.6.27.18.06' when I've installed 2.0.7.
    Any help much appreciated

    Further to the above post, I thought I'd simplify my Apex Listener install just to see if I can connect to it via SQL Developer
    So downloaded the latest version 2.0.8 and decided to configure and run the Listener on my pc whilst still connecting to the same database.
    Operating system : Window 7 Pro 64 bit
    Oracle Apex Listener 2.0.8
    Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
    Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
    Went through the configuration as above, once started I tried again to access the listener via SQL Developer. This time I received this output from the listener:
    INFO: Error: ORA-02291: integrity constraint (APEX_040200.WWV_FLOW_RT$APPROVALS_SGID_FK) violated - parent key not found, occurred during execution of: [CALL, insert into wwv_flow_rt$approvals (user_name,status,client_id,security_group_id,created_by,created_on,updated_by,updated_on) values(/*in:user_id*/?,/*in:status*/?,/*in:client_id*/?,/*in:tenant_id*/?,upper(/*in:user_id*/?),/*in:created*/?,upper(/*in:user_id*/?),/*in:created*/?), [tenant_id, in, class java.math.BigInteger], [client_id, in, class java.math.BigInteger], [user_id, in, class java.lang.String], [status, in, class oracle.dbtools.rt.oauth.ApprovalRequest$Status], [created, in, class java.sql.Timestamp]]with values: [adminlistener, APPROVED, 3858401374580004, -1, adminlistener, 2014-06-23 12:19:18.785, adminlistener, 2014-06-23 12:19:18.785]
    SQL Developer responded with an Authentication Failed titled dialog with the following displayed in the body of the dialog
    Cannot connect to DEV.
    <!DOCTYPE html>
    <!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
    <!--[if IE 7 ]> <html class="ie7 no-css3"> <![endif]-->
    <!--[if IE 8 ]> <html class="ie8 no-css3"> <![endif]-->
    <!--[if IE 9 ]> <html class="ie9"> <![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!-->
    <html>
    <!--<![endif]-->
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <style type="text/css" media="screen">html,body,div,span,h3,p,ol,ul,li,header,hgroup{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}header,hgroup{display:block}body{font:normal 12px/16px Arial,sans-serif;margin:0 auto;background:#6a9cda}header#xHeader{border-bottom:1px solid #8fa4c0;position:relative;z-index:10;background:none #000}header#xHeader hgroup{width:974px;margin:0 auto;position:relative;height:36px;background:none #000}header#xHeader a#uLogo{margin:8px 0;display:inline-block;font:bold 14px/20px Arial,sans-serif;color:#AAA;text-decoration:none}header#xHeader a#uLogo span.logo{color:#F00}.no-css3 div#xContentContainer div.xContent{padding-top:14px}.no-css3 div#xContentContainer div.xContent div.xMainLeft h2{margin-top:0}div#xWhiteContentContainer{margin-bottom:30px}div#xWhiteContentContainer.xContentWide{background:#FFF;margin-bottom:0}div#xWhiteContentContainer.xContentWide div.xWhiteContent{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}div#xWhiteContentContainer div.xWhiteContent{width:974px;margin:0 auto;padding:0 0 20px 0;background:#FFF;min-height:500px;-moz-border-radius:0 4px 4px 4px;-webkit-border-radius:0 4px 4px 4px;border-radius:0 4px 4px 4px;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.15);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.15);box-shadow:0 1px 2px rgba(0,0,0,0.15)}div#xContentHeaderContainer{background:#6a9cda;-moz-box-shadow:0 -1px 0 rgba(0,0,0,0.15) inset;-webkit-box-shadow:0 -1px 0 rgba(0,0,0,0.15) inset;box-shadow:0 -1px 0 rgba(0,0,0,0.15) inset}div#xContentHeaderContainer div.xContentHeader{width:974px;margin:0 auto;padding:30px 0 32px 0;position:relative;min-height:60px}div#xContentHeaderContainer div.xContentHeader h3{font:bold 24px/24px Arial,sans-serif;color:#fff;text-shadow:0 2px 1px rgba(0,0,0,0.25);margin:0 0 20px 0}div#xFooterContainer{min-height:200px;border-top:1px solid rgba(0,0,0,0.15);background:#6a9cda}body.errorPage div#xContentHeaderContainer div.xContentHeader{min-height:30px}body.errorPage div#xContentHeaderContainer div.xContentHeader h3{font:bold 30px/30px Arial,sans-serif;color:#FFF;text-shadow:0 1px 2px rgba(0,0,0,0.25);margin:0}div.errorPage p{font:normal 14px/20px Arial,sans-seri;color:#666;padding:0 0 10px 0}div.errorPage ul{list-style:disc outside;padding:0 10px 0;margin:0 0 20px 0}div.errorPage ul li{font:normal 12px/16px Arial,sans-serif;color:#666;margin:0 0 8px 10px}pre{font-family:Consolas,"Lucida Console","Courier New",Courier,monospace}
    </style>
    <script type="text/javascript" charset="utf-8">
      'header hgroup'.replace(/\w+/g,
      function(n) {
      document.createElement(n)
    </script>
    <title>Internal Server Error</title>
    </head>
    <body class="errorPage">
      <header id="xHeader">
      <hgroup>
      <a id="uLogo" href="./"><span class="logo">ORACLE</span>
      REST DATA SERVICES</a>
      </hgroup>
      </header>
      <div id="xContentHeaderContainer">
      <div class="xContentHeader">
      <h3>
      <span class="statusCode">500</span> - <span
      class="statusMessage">Internal Server Error</span>
      </h3>
      </div>
      </div>
      <div id="xWhiteContentContainer" class="xContentWide">
      <div class="xWhiteContent">
      <div class="errorPage">
      <p>
      <ul class="reasons">
      </ul>
      </p>
      <p>
      <pre>Request Path passes syntax validation
    Mapping request to database pool: PoolMap [_failed=false, _lastUpdate=-1, _pattern=null, _poolName=apex, _regex=null, _type=REGEX, _workspaceIdentifier=null, _serviceName=null]
    Applied database connection info
    Attempting to process with PL&#x2F;SQL Gateway
    Not processed as PL&#x2F;SQL Gateway request
    Attempting to process as a RESTful Service
    Choosing: oracle.dbtools.rt.oauth.TokenHandler as current candidate with score: Score [handle=null, score=0, scope=SecurityConfig [constraint=secure, realm=OAUTH_CLIENT, logonConfig=NONE], originsAllowed=[], corsEnabled=true]
    Determining if request can be dispatched as a Tenanted RESTful Service
    Request path has one path segment, continuing processing
    No Tenant Principal established yet, continuing processing
    APEX_LISTENER pool exists, continuing processing
    No matching tenant found for: oauth2, cannot dispatch
    Chose oracle.dbtools.rt.oauth.TokenHandler as the final candidate with score: Score [handle=null, score=0, scope=SecurityConfig [constraint=secure, realm=OAUTH_CLIENT, logonConfig=NONE], originsAllowed=[], corsEnabled=true] for: POST oauth2&#x2F;token
    oauth2&#x2F;token authorized as: p6xycV-2QceFnFHkWyJlnA..
    </pre>
      </p>
      <p>
      <pre>WebException [statusCode=500]
      at oracle.dbtools.rt.web.WebException.webException(WebException.java:343)
      at oracle.dbtools.rt.web.WebException.internalError(WebException.java:262)
      at oracle.dbtools.rt.oauth.jdbc.JDBCOAuthDataAccess.createApproval(JDBCOAuthDataAccess.java:514)
      at oracle.dbtools.rt.oauth.jdbc.JDBCOAuthDataAccess.createApprovedRequest(JDBCOAuthDataAccess.java:181)
      at oracle.dbtools.rt.oauth.OAuthAuthorization.resourceOwnerCredentials(OAuthAuthorization.java:654)
      at oracle.dbtools.rt.oauth.OAuthAuthorization.tokenRequest(OAuthAuthorization.java:273)
      at oracle.dbtools.rt.oauth.TokenHandler.post(TokenHandler.java:44)
      at oracle.dbtools.rt.web.RequestHandler.response(RequestHandler.java:268)
      at oracle.dbtools.rt.web.RequestHandler.dispatch(RequestHandler.java:361)
      at oracle.dbtools.rt.web.RequestHandler.dispatch(RequestHandler.java:85)
      at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:93)
      at oracle.dbtools.rt.web.ETags.checkPrecondition(ETags.java:93)
      at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:426)
      at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:164)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1059)
      at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:999)
      at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:434)
      at oracle.dbtools.standalone.SecureServletAdapter.doService(SecureServletAdapter.java:91)
      at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:379)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:196)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Unknown Source)
    Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (APEX_040200.WWV_FLOW_RT$APPROVALS_SGID_FK) violated - parent key not found
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
      at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1046)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3713)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378)
      at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:230)
      at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:124)
      at com.sun.proxy.$Proxy44.execute(Unknown Source)
      at oracle.dbtools.common.jdbc.JDBCInsert.execute(JDBCInsert.java:58)
      at oracle.dbtools.rt.oauth.jdbc.JDBCOAuthDataAccess.createApproval(JDBCOAuthDataAccess.java:487)
      ... 34 more
    </pre>
      </p>
      </div>
      </div>
      </div>
      <div id="xFooterContainer">
      </div>
    </body>
    </html>
    I am assuming this must be part of the problem I am seeing this the Weblogic deployment in my original post.
    Does anyone have any suggestions on how best to tackle this?
    Regards,
    Derek

  • Executing multiple SQL statements fails using ODBC

    Executing multiple SQL statements will fail with error 'ORA-00911 invalid character' when connecting to an Oracle database using ODBC driver version 8.01.07.00.
    When I use either my application or the Oracle ODBC Test client utility connecting using ODBC driver version 8.01.07.00 I can only get a single CALL statement (as shown below) to execute:
    CALL BHInsert (TO_DATE('2003.07.23 10:04:28','YYYY.MM.DD HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','
    ','Event File
    Name','\\KILLIANS\BATCHCTL\SampleDemo1\JOURNALS\1.evt','','AREA1','','','','','','1','','','','','',' ','');
    When I try to execute the following string with multiple CALL statements (as shown below) it fails with the following error being returned - ORA-00911: invalid character
    CALL BHInsert (TO_DATE('2003.07.23 10:04:28','YYYY.MM.DD HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','
    ','Event File
    Name','\\KILLIANS\BATCHCTL\SampleDemo1\JOURNALS\1.evt','','AREA1','','','','','','1','','','','','',' ','');
    CALL BHInsert (TO_DATE('2003.07.23 10:04:28','YYYY.MM.DD
    HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','Version','Recipe Header','1.0','','AREA1',' ','
    ','','','','1','','','','','',' ','');
    CALL BHInsert (TO_DATE('2003.07.23 10:04:28','YYYY.MM.DD
    HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','Version Date','Recipe Header','5/18/2001 1:28:32
    PM','','AREA1',' ',' ','','','','1','','','','','',' ','');
    CALL BHInsert (TO_DATE('2003.07.23
    10:04:28','YYYY.MM.DD HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','Author','Recipe Header','Mark
    Shepard','','AREA1',' ',' ','','','','1','','','','','',' ','');
    I've tried adding a line feed in addition to the space at the end of each call but that doesn't seem to help. Also have tried unsuccessfully to change the seperator used between each call using various valid continuation characters.
    Executing multiple CALL statements from within Oracle's SQL Worksheet connecting as the same user and password, as my application executes successfully. However when I try this from within the Oracle ODBC test client, it fails with the same ORA-00911 error that I'm seeing in my application.
    I'm currently trying the more recent ODBC drivers, however any ideas or suggestions would be greatly appreciated.

    Can you take the begin ... end block and run it using SQL*Plus?
    I can't think of any documentation that would specifically answer this question. I'm sure if you read & absorbed the ODBC Programmers Reference (2000+ pages) you'd be able to find out, but I don't know of a quick way to find out.
    You can enable SQL*Net tracing. There are a fair number of options for enabling this tracing-- http://tahiti.oracle.com has all the Oracle manuals online, which should give you enough info to configure exactly what you want.
    I would suggest, however, that you look into more performant/ scalable alternatives rather than going too far down this path. A block with lots of SQL statements with literals isn't going to make your database happy even if you get it to work.
    Justin

  • Where to run SQL statements in Oracle Database 11gR1 ?

    Folks,
    Hello. I have just installed Oracle Database 11gR1 and login to Database Control page. There are 4 tabs on the top: Database, Setup, Preference, Help and Logout.
    I just create a table "table1" in "Database" tap. But I don't see anywhere to run SQL statement such as Select, Insert, Update.
    Can any folk tell me where to run SQL statements in Oracle Database 11gR1 ?
    Or
    Can any folk provide a User Manual for Oracle DB 11gR1 ?

    You can run from a terminal or install an SQL client and connect from there.
    http://www.articlesbase.com/databases-articles/how-to-install-oracle-11g-client-1793770.html
    Best Regards
    mseberg
    Assuming you have an oracle OS user on Linux you can try typing sqlplus at you OS command prompt. Generally you will have a .bash_profile with setting like this:
    # User specific environment and startup programs
    PATH=$PATH:$HOME/bin
    export PATH
    # Oracle Settings
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0
    #export DISPLAY=localhost:0.0
    export TZ=CST6CDT 
    export ORACLE_SID=ORCL
    export ORACLE_TERM=xterm
    #export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin
    export NLS_LANG=AMERICAN;
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    export LD_LIBRARY_PATH
    # Set shell search paths
    PATH=/usr/sbin:$PATH; export PATH
    export PATH=$PATH:$ORACLE_HOME/bin
    # CLASSPATH:
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
    CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
    export EDITOR=vi
    set -o vi
    PS1='$PWD:$ORACLE_SID >'Edited by: mseberg on Jul 11, 2011 3:18 PM

  • Steps to connect SQL Server to Oracle works but WHY ??

    The following steps is what I have to do in order to get SQL Server to talk to an Oracle database.
    These steps, for me, work 100% of the time. Any deviation from the following steps will result in failure.
    Rebooting the machine didn't make any difference between each of the steps.
    My question is why I have to install the client a second time?
    All the documentation that I have found at Oracle, Microsoft, or elsewhere state that I only need the InstantClient.
    =========================================
    Some server I don't have access to
    with Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit installed
    Windows XP SP3 - 32bit
    with Microsoft SQL Server 2005 SP3 installed
    The following steps are done on the Windows XP machine.
    1) install win32_11gR2_client
    Select: InstantClient (174.0MB)
    Path: C:\Oracle
    2) install ODTwithODAC112021
    Select: Oracle Data Access Components for Oracle Client
    Oracle Base: C:\Oracle
    Name: OraClient11g_home1
    Path: C:\Oracle\product\11.2.0\client_1
    3) Add entries for tnsnames.ora and sqlnet.ora
    4) Ensure environmental variable ORACLE_HOME is set to C:\Oracle\product\11.2.0\client_1
    5) SQL Server Management Studio
    Check "Allow Inprocess" for Oracle Provider OraOLEDB.Oracle
    Restart SQL Server
    Try to add link to Oracle - fails to connect
    "The test connection to the linked server failed."
    Additional information:
    An exception occurred while executing a Transact-SQL statement or batch.
    (Microsoft.SqlServer.ConnectionInfo)
    Cannot initialize the data source object of OLE DB Provider "OraOLEDB.Oracle" for linked server "ORACLEDB".
    OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLEDB" returned message "".
    (Microsoft SQL Server, Error: 7303)
    6) install win32_11gR2_client
    Select: Administrator (1.02GB)
    Oracle Base: C:\Oracle
    Software Location: C:\Oracle\product\11.2.0\client_1
    7) Ensure environmental variable ORACLE_HOME is set to C:\Oracle\product\11.2.0\client_1
    8) Ensure tnsnames.ora and sqlnet.ora still exist and are unchanged.
    9) SQL Server Management Studio
    Restart SQL Server
    Add link to Oracle - Successful

    You actually installed the client *3* times there.
    I'm fairly sure install Instant client via win32_11gR2_client will not give you oraoledb. ODAC and administrator/runtime will though.
    You should only need install ODTwithODAC112021 OR win32_11gR2_client (with runtime or administrator option) and be able to connect using SQLServer.
    Greg

  • Unable to connect SQL server 2005 databse with JSF applications !

    Hello guys!
    Help me out to connect SQL server 2005 Databse with JSF applications using JDBC-ODBC bridge. I'm working with Netbeans 6.1 IDE.
    I tried for the basic applications but instead got this error:
    "unable to deploy jdbc drivers to the <project>domain/lib"
    Please help me out with working sample codes that connects MS SQL server 2005 DB with JSF!!
    Thank you guys!

    1) don't use the bridge driver
    2) don't do database access from JSF
    3) learn how to use your application server
    4) learn how to use your IDE

  • SQLException: Closed Connection, SQL state [null]; error code [17002]

    Hello All,
    I am supporting a Java 5 project on Tomcat. We've used Spring and Stored Procedure in the project.
    Recently we deployed our application in a GoLive environment and have started seeing Timeout errors in log files. After around two days we also have to restart Tomcat as users are no more able to login to access the application.
    Same application runs fine without any timeout issues on another environment.
    The only difference between two environments is that the Go-Live env has a firewall between Tomcat and Database and the other environment hosts both Tomcat and Database on same machine (i.e. no firewall).
    For GoLive env the only port open on firewall for JDBC connection is 1521 and is used in the connection string url for obtaining the connections.
    When there is a Timeout error, the N/w admin guy observed that the JDBC connection was not attempted on 1521 port, but on some random port which is not open on firewall, due to which the Database server logs also do not show entry for this connection attempt as it gets blocked by the firewall.
    I am not sure why a randam port should be used to connect when a specific port is mentioned in the connection url? Also what can be making this port switching?
    Application uses Apache DBCP with Spring to obtain connections.
    Has anyone experienced similar errors?
    Any suggestions/help on this issue is greatly appreciated!
    Many Thanks,
    CD
    ===============================
    Error Log Extract:
    Error while extracting database product name - falling back to empty error codes
    org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is java.sql.SQLException: Closed Connection
    java.sql.SQLException: Closed Connection
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:1605)
    at org.apache.commons.dbcp.DelegatingConnection.getMetaData(DelegatingConnection.java:247)
    at org.apache.commons.dbcp.DelegatingConnection.getMetaData(DelegatingConnection.java:247)
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.getMetaData(PoolingDataSource.java:231)
    at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:172)
    at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:207)
    at org.springframework.jdbc.support.SQLErrorCodesFactory.getErrorCodes(SQLErrorCodesFactory.java:187)
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:126)
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:92)
    at org.springframework.jdbc.support.JdbcAccessor.getExceptionTranslator(JdbcAccessor.java:96)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:294)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:348)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:352)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:356)
    at com.o2.morse.dao.impl.sql.UserDaoImpl.batchLoad(UserDaoImpl.java:371)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    at $Proxy3.batchLoad(Unknown Source)
    at com.o2.morse.domain.User.doHousekeeping(User.java:667)
    at com.o2.morse.domain.User$$FastClassByCGLIB$$372ff70b.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:705)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
    at com.o2.morse.domain.User$$EnhancerByCGLIB$$d5ac966a.doHousekeeping(<generated>)
    at com.o2.morse.scheduler.EndOfDay.run(EndOfDay.java:63)
    at com.o2.morse.scheduler.EndOfDay$$FastClassByCGLIB$$3b2d4927.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:705)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
    at com.o2.morse.scheduler.EndOfDay$$EnhancerByCGLIB$$488a9f86.run(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:248)
    at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
    at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
    Could not close JDBC Connection
    java.sql.SQLException: Already closed.
    at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:77)
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:180)
    at org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:286)
    at org.springframework.jdbc.datasource.DataSourceUtils.releaseConnection(DataSourceUtils.java:247)
    at org.springframework.jdbc.datasource.DataSourceTransactionManager.doCleanupAfterCompletion(DataSourceTransactionManager.java:297)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:754)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:615)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:560)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.doCloseTransactionAfterThrowing(TransactionAspectSupport.java:284)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    at $Proxy3.batchLoad(Unknown Source)
    at com.o2.morse.domain.User.doHousekeeping(User.java:667)
    at com.o2.morse.domain.User$$FastClassByCGLIB$$372ff70b.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:705)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
    at com.o2.morse.domain.User$$EnhancerByCGLIB$$d5ac966a.doHousekeeping(<generated>)
    at com.o2.morse.scheduler.EndOfDay.run(EndOfDay.java:63)
    at com.o2.morse.scheduler.EndOfDay$$FastClassByCGLIB$$3b2d4927.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:705)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
    at com.o2.morse.scheduler.EndOfDay$$EnhancerByCGLIB$$488a9f86.run(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:248)
    at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
    at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
    Application exception overridden by rollback exception
    org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [SELECT ID_USER_DETAILS, USERNAME, CREATED_ON, LAST_LOGIN FROM USER_DETAILS  WHERE STATUS = 157 AND SUPERUSER <> 'Y']; SQL state [null]; error code [17002] ; Io exception: Connection timed out; nested exception is java.sql.SQLException: Io exception: Connection timed out
    java.sql.SQLException: Io exception: Connection timed out
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
    at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:820)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1049)
    at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:845)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1154)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1313)
    at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
    at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
    at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:333)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:282)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:348)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:352)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:356)
    at com.o2.morse.dao.impl.sql.UserDaoImpl.batchLoad(UserDaoImpl.java:371)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    at $Proxy3.batchLoad(Unknown Source)
    at com.o2.morse.domain.User.doHousekeeping(User.java:667)
    at com.o2.morse.domain.User$$FastClassByCGLIB$$372ff70b.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:705)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
    at com.o2.morse.domain.User$$EnhancerByCGLIB$$d5ac966a.doHousekeeping(<generated>)
    at com.o2.morse.scheduler.EndOfDay.run(EndOfDay.java:63)
    at com.o2.morse.scheduler.EndOfDay$$FastClassByCGLIB$$3b2d4927.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:705)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
    at com.o2.morse.scheduler.EndOfDay$$EnhancerByCGLIB$$488a9f86.run(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:248)
    at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
    at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
    Batch Job Failed: org.springframework.transaction.TransactionSystemException: Could not roll back JDBC transaction; nested exception is java.sql.SQLException: Closed Connection

    I am using latest Jrockit 16)5, ojdbc6_g.jar,spring.jar Weblogic 10.3 and Oracle 10G 10.2.4 .. whatever but always get "Closed Connection"
    java.lang.Throwable: Closed Connection
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
    at oracle.jdbc.driver.PhysicalConnection.createStatement(PhysicalConnection.java:750)
    at oracle.jdbc.OracleConnectionWrapper.createStatement(OracleConnectionWrapper.java:183)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7053)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)

  • How to audit alter user sql statements in Oracle 11g.

    I want to audit all the alter user sql statements that show who is altered with what sql stment including the connections performed by sys and system.
    Ex: If I use the command : alter user xxx quota 50 GB on users;
    Then how can i grab this sql stement and who performed it with the timings.

    Pl post OS and database versions.
    What have you learned from the documentation ?
    http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_4007.htm#SQLRF01107
    http://download.oracle.com/docs/cd/E11882_01/network.112/e16543/guidelines.htm#DBSEG508
    What have you tried to implement so far ?
    HTH
    Srini

  • Unable to connect using sqlplus using Oracle 11.2.0.1 32bit(x86) client

    I have database running on Oracle 11.2.0.3 on Linux 5.5 64bit. Another server where I have installed Oracle Client 11.2.0.1 32-bit (x86). (http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linuxsoft-085393.html).
    But I can not do tnsping, I get segementation fault. Additionally, I can not to database using sqlplus <user>@SID. I get prompted for the password, then I am back the unix prompt again without any error.
    For debugging, I installed 64bit version of the client, which can connect to database. I am using same version/copy of tnsnames.ora. No special character (^M) in the tnsnames.ora.
    Any suggestions how do I get this fixed?
    Thanks,
    KP

    I figure I should update my findings on the resolution.
    during Oracle 11.2.0.1 client installation, there was an error/warning message about oracle net configuration assistant unable to run. So, I had ignore it thinking its benign and created the tnsnames.ora file manually. On a hunch after 9 days of debugging, i decided to look into this warning message, and found some info in the ora32Inventory/logs/installAction-<date>.log. It had following error about java when running oracle net config.
    INFO: # Java VM: Java HotSpot(TM) Server VM (1.5.0_17-b02 mixed mode)
    INFO: # Problematic frame:
    INFO: # C [libnnz11.so+0x3c35e]
    So, I google the error, and after some research and reading, found an oracle patch to address this error:
    ORA-24550: SQL*Plus 32-Bit Client May Crash On Linux X86-64 OS With AMD Processor [ID 1120724.1]
    Patch info: 8670579 - DBBETA :NETCA/DBCA FAILED WITH HOTSPOT VIRTUAL MACHINE
    Typically, this patch (8670579) is installed on Oracle RAC. however I tried on my app server (oracle client). It resolved my sqlplus issue and more importantly it resolve my application (Business Objects/BSAE) installation issue where it was unable to connect to oracle database using 11.2.0.1 client.
    Cheers,
    KP

  • How to execute SQL statement with oracle jdev

    Please I'm a beginner in oracle jdeveloper. I want to know how to use and execute sql statememt within oracle Jdeveloper 10 g release 3 to manipulate objects in oracle database. I want for e.g. to Enable/disable trigger using sql statement "ALTER TRIGGER trigername DISABLE" explicitly. Please tell me how to proceed.
    i am sure you can help me
    Sincerly yours.

    Hi,
    Using following tutorial http://www.oracle.com/technology/obe/ADF_tutorial_1013/10131/index.htm
    you will found how to connect from Jdev to a database (chapter 1 or 2 ?). Then you just have to go under Tool>SQL*Plus or Tools>SQL Worksheet depending on what you need.
    Luck,
    Tif

  • How to connect sql server using oracle Client

    Hi,
    I am working in oracle9i and windows os 32 bit.
    I need to connect SQL server 2000 from my oracle client..
    I heard about heterogeneous connectivity ...
    Please expalin me the steps what to add and how to connect the sql server...
    Regs....

    Are you trying to connect to SQL Server from your Oracle database (i.e. create a database link in Oracle to SQL Server)? Or are you trying to connect to SQL Server using your Oracle client software (i.e. SQL*Plus)?
    The former just requires Heterogeneous Services with Generic Connectivity. The latter is functionality that has been depricated and probably no longer works in your environment.
    Justin

  • Unable to upload sql scripts in oracle database express edition 10g

    Hi!
    To start, I inform you that I am beginner with Oracle. I installed Oracle 10g Express Edition on my Ubuntu 9.10 like this:
    :~$ dpkg -i oracle-xe-universal_10.2.0.1-1.0_i386.deb
    :~$ /etc/init.d/oracle-xe configure
    and I keep default value. Then I go on http://127.0.01:8080/apex, I login with system account, I create another dba account etc ... all looks very well ! Then I follow this tutorial: http://st-curriculum.oracle.com/tutorial/DBXETutorial/index.htm
    and I am unable to load sql script which is given in this tutorial: load_sample.sql (page:What to do first> Loading Data). I try with a little sql script and same result. I use gedit with UTF-8 and load in UTF-8, my browser is Firefox (I try with Epiphany also).
    The result is: when I upload a script, The browser returns "script uploaded." Then I can click on my script but the file is empty ! Nothing is done when i click on "run". Also I can' create a script; With Epiphany browser, the frame to write is all red. To import a script I have to copy one by one request in sql commands. I try also to change the owner of load_sample.sql:
    -rw-r--r-- 1 oracle dba 49969 2010-01-10 12:05 load_sample.sql
    But it doesn't work. If someone has an idea ? Thanks for your help.
    regards
    Alex.
    load_sample.sql:
    CREATE TABLE regions
    ( region_id NUMBER
    CONSTRAINT region_id_nn NOT NULL
    , region_name VARCHAR2(25)
    CREATE UNIQUE INDEX reg_id_pk
    ON regions (region_id);
    ALTER TABLE regions
    ADD ( CONSTRAINT reg_id_pk
    PRIMARY KEY (region_id)
    ) ;

    Hi,
    So, go to shell ,position yourself in the path where load_sample.sql is, login to the XE as the user with whom you need to run load_sample.sql , and execute
    +@load_sample.sql.+
    Sorry to hijack this thread but I am having exactly the same problem in Ubuntu, it seems as if IE is the only browser that allows you to do this, but installing that in Ubuntu looks like a whole other world of pain I do not really want to get involved in at the moment.
    I like the sound of just shortcutting the sql upload through the shell but I'm a beginner and I do not understand your comment well enough to implement it myself.
    Could you please explain these in more granular layman's terms for someone who is unfamiliar with Linux syntax?
    By 'Shell' do you mean the Terminal or the SQL Command Line? What exactly should I be typing in there to execute the sql?
    I have saved the SQL file on my desktop (jon@jon-pc, it's a virtual Ubuntu machine on a Windows Vista host).
    Thanks in advance
    Jon

  • SQL statement in Oracle

    As I know in SQL server, i can create a field called customer name, can be two words. But in the SQL statement I need to use double quote to quote the customer name, such like: select * from "customer name"
    Can Oracle accept two words field name or table name. If Yes, then do I need to use double quote, or single quote or other things?

    As I know in SQL server, i can create a field called
    customer name, can be two words. But in the SQL
    statement I need to use double quote to quote the
    customer name, such like: select * from "customer
    name"
    Can Oracle accept two words field name or table name.
    If Yes, then do I need to use double quote, or single
    quote or other things?Yes, you can do it.
    However, most DBAs (even MS SQL Server ones) will tell you that that is bad form.
    And of course the reason for doing that should never be because those field names are being displayed. Displaying field names breaks every model that seperates data from display (GUI.)

Maybe you are looking for