SQL Insert Error

I am trying to take data from a form and insert it into the mySQL db.
this is my update stuff:
s = "INSERT INTO users ";
s += " "(" id"," name"," email"," age"," gender"," zipcode"," username"," password")"";
s += " VALUES "("'"+name+"'"," '"+email+"'"," '"+age+"'"," '"+gender+"'"," '"+zipcode+"'"," '"+username+"'"," '"+password+"'")"";
PreparedStatement stmt = conn.prepareStatement();
stmt.executeUpdate(s);
out.write("Updating");
And then I get this error:
Ex-Message :Syntax error or access violation, message from server: "You have an error in your SQL syntax near '' at line 1" Ex-Code :1064 Ex-SQLState:42000 Ex-Next :null
Any ideas?

Your prepared statement should look something like this:
s = "INSERT INTO users ";
s += " (name, email, age, gender, zipcode, username, password)";
s += " VALUES (?,?,?,?,?,?,?)";
stmt.setString( 1, "value for name" );
stmt.setString( 2, "value for email" );
stmt.setInt( 3, 44);
// some info on how to set the type of a parameter value:
// http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC208
...http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC207
Try to fill out the following value for name:
"(=enter)
UNION select 1 as 'one' --"
I am not sure if prepared statements take care of sql insertion
http://www.sensepost.com/misc/SQLinsertion.htm
If it doesn't I would replace the ' with '' (1 single quote with 2 single quotes)

Similar Messages

  • SQL Insert Error Error in allocating a connection. Cause: No PasswordCreden

    Friends,
    While testing my connection in the Sun java Application Server , I get the following error .
    "SQL Insert Error Error in allocating a connection. Cause: No PasswordCredential found "
    Can somebody please guide ?
    regards
    Dhiraj

    If you are using Netbeans, then this link might help:
    http://forum.java.sun.com/thread.jspa?forumID=136&threadID=598423
    Otherwise, have you try this ?
    Verify your sun-ejb-jar.xml does not use default-resource-princinpal element:
    <res-ref-name>jdbc/pdisasdb</res-ref-name>
    <jndi-name>jdbc/pdisasdb</jndi-name>
    <default-resource-principal>
    <name>myname</name>
    <password>geheim</password>
    </default-resource-principal>
    </resource-ref>

  • SQL Insert Error - Please help. RESOLVED

    I have a page with several VOs and search options. One of the search options is a list of Emp IDs which (when one is selected and user clicks 'search') results in an editable table of profiles for that Emp Id.
    I have in the Footer of the results table an input field and a button 'add' bound to a method that takes two params and inserts a 'new' profile for the searched Emp Id and the value entered in the input field.
    When I enter a value and click 'add' I get the following:
    JBO-29000: Unexpected exception caught: oracle.jbo.DMLConstraintException, msg=JBO-26048: Constraint "BADGE_ACCESS_EMP_FK" violated during post operation:"Insert" using SQL Statement "BEGIN INSERT INTO BADGE_ACCESS(EMPLOYEE_ID,BADGE,ROW_ID) VALUES (?,?,?) RETURNING ROW_ID INTO ?; END;".
    JBO-26048: Constraint "BADGE_ACCESS_EMP_FK" violated during post operation:"Insert" using SQL Statement "BEGIN INSERT INTO BADGE_ACCESS(EMPLOYEE_ID,BADGE,ROW_ID) VALUES (?,?,?) RETURNING ROW_ID INTO ?; END;".
    ORA-02291: integrity constraint (HR.BADGE_ACCESS_EMP_FK) violated - parent key not found ORA-06512: at line 1
    My Emp table is simple - just an ID, First and Last names with ID as PK. My profile table (called Badge_Access) has the EmpId as FK and it's own PK set by a DBSequence. The other column in Badge_Access is for the input value (number).
    I do not know how to debug in JDeveloper such that I can see the values that are being passed to the method. My 'add' button method is:
    public void createBadgeAccess(Number empId, Number badge) {
    BadgeAccessImpl ba = (BadgeAccessImpl)getDBTransaction().createEntityInstance(BadgeAccessImpl.getDefinitionObject(), null);
    ba.setEmployeeId(empId);
    ba.setBadge(badge);
    getDBTransaction().commit();
    I have the 'value' of the empId param = ${bindings.AccessByEmployeeEmployeeId.inputValue}
    This is the selectOneChoice field the user uses to search...
    and the 'value' of the badge param = ${bindings.Badge.inputValue}
    This is the input field the user fills in before clicking 'add'...
    The values I think I am passing are empId=106 and badge=102 - both are valid & the 'parent key' 106 is valid...
    any help will be greatly appreciated!!! Thanks
    Ginni
    Message was edited by:
    ginnim
    I found a Tip that described what was happening.

    Wrap some try/catch around the statements instead of trying to decipher the Java junk. Could be a problem in the PS, could be a number of things. At least figure where in the application the error takes place.

  • How to resolve ORA-00001 Error in SQL Insert?

    Hi all, I need your appreciated help.
    I make a plsql procedure that is inserting a row according cursor value, I'm having oracle error ORA-00001: unique constraint (constraint_name) violated.
    You may see this message if a duplicate entry exists at a different level: in RDBMS MySQL I have the syntax IGNORE to resolve this duplication error... and in Oracle ?
    Thanks for your time and hints.
    Miguelito

    user6317803 wrote:
    How to resolve ORA-00001 Error in SQL Insert?ORA-00001 means table has unique/primary key/index and you are trying to insert a row with key value that already exists in the table. I'll assume table COUNTRIES has primary key on COUNTRY_ID. Then change SQL to:
    SQL = "INSERT INTO COUNTRIES(COUNTRY_ID,COUNTRY_NAME,REGION_ID) SELECT 'BZ','BLZ',3 FROM DUAL WHERE NOT EXISTS(SELECT 1 FROM COUNTRIES WHERE COUNTRY_ID = 'BZ')"There is a good chance table COUNTRIES also has unique key/index on COUNTRY_NAME. If so use:
    SQL = "INSERT INTO COUNTRIES(COUNTRY_ID,COUNTRY_NAME,REGION_ID) SELECT 'BZ','BLZ',3 FROM DUAL WHERE NOT EXISTS(SELECT 1 FROM COUNTRIES WHERE COUNTRY_ID = 'BZ' OR COUNTRY_NAME = 'BLZ')"SY.

  • SQL 2005 Insert Error

    Hi Folks-
    It has been a while and I hope this finds you all doing well. 
    I am working oin a customer application and we are experiencing intermitment MS SQL 2005 insert errors.  We have isolated the cause as the use of the special character, the apostrophe (i.e. " " ") in a material/item description.  The underlying MES application can accept the apostrophe along with the SAP MM back-end, but not MII,  The MII version is 12.0.6 Build 14.  The application also uses the Java Plug-in version 1.6.0_07, which is also the Java Runtime version.  I am not sure of the SQL jdbc being used but was hoping that perhaps there was a version that could "handle" this special character issue or if there was a non-programmatic way to address this.  At this point we are anxious about changing Master Data.
    Any insights or suggestions would be appreciated.  Thanks in advance and I look forward to your responses.
    Kevin Fitzgerald
    Invensys Operation Management

    Hi Kedar-
    This is great information and I thank you for your insights.  I do have what I hope are 2 brief follow-on questions:
    1. Does the single quote/apostrophe represent a general escape character that can be used in all cases?  Are there others (i.e. \n, etc.)
    2. Your special characters cited above do not include the asterik, *.  My customer has also decided to use this special character in a new product description (go figure!!).  Can this be "escaped out" via the same means?
    I have been able to successfully use the java function stringreplace to alter the text as you suggest- even for a local and I hope transaction variable.  Any additional comments per my questions above would certainly advance the cause.
    Thanks again and I look forward to your comments.  Take care and be safe.
    Kevin

  • SQL Insert Statement Data Type Mismatch Error

    I am doing a very simple web application that has a Microsoft Access database as the data source. I have been able to sucessfully create update and query statements using parameters but am having issues with an insert statement. I am using JSTL 1.1.2
    The following code creates the data type mismatch error.
    <sql:update
         sql="insert into tblTtoF(TFToolID,TFFeatID) values(?,?)">
            <sql:param value='$(ID}'/>
         <sql:param value='${feature}'/>
            </sql:update>The table has NUMBER as the data type for both of these fields and the variables I am feeding into it are both numbers. If I hard code the first number into the sql statement then it works. I have tried swapping the variables around and as long as the first one is hard coded the parameter for the second one works no matter which is first or second.
    However I can get the following code to work, which of course leaves me vulnerable to sql injection attacks which is not really a good thing.
    <sql:update>
         insert into tblTtoF(TFToolID,TFFeatID) values('<c:out value="${ID}"/>','<c:out value="${feature}"/>')
            </sql:update>So I am just looking for any suggestions as to why my first piece of code doesn't work seeing as it is the simplest of SQL statements and the most standard syntax.
    Thanks

    I changed it to the following
         <c:set var="featurenew" value="${0 + feature}"/>
         <c:set var="IDnew" value="${0 + param.toolID}"/>
              <sql:update
              sql="insert into tblTtoF(TFToolID,TFFeatID) values(?,?)">
              <sql:param value='$(IDnew}'/>
              <sql:param value='${featurenew}'/>
              </sql:update>And got the following error in the localhost.log
    31/07/2006 09:31:41 org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.sql.SQLException: SQL Exception : [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement.java:1437)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement.java:1072)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement.java:1063)
         at org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport.setParameters(UpdateTagSupport.java:254)
         at org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport.doEndTag(UpdateTagSupport.java:156)
         at org.apache.jsp.dataUpdated_jsp._jspx_meth_sql_update_1(dataUpdated_jsp.java:975)
         at org.apache.jsp.dataUpdated_jsp._jspx_meth_c_if_0(dataUpdated_jsp.java:879)
         at org.apache.jsp.dataUpdated_jsp._jspx_meth_c_forEach_0(dataUpdated_jsp.java:680)
         at org.apache.jsp.dataUpdated_jsp._jspService(dataUpdated_jsp.java:151)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
         at java.lang.Thread.run(Thread.java:595)
    I have also tried the following in the past with no luck
    <fmt:parseNumber value="${ID}" type="number" var="IDnew"/>
    AND......
    <sql:query
       sql="select TFToolID from tblTtoF where TFToolID = ?"
       var="toolresults">
       <sql:param value="${ID}"/>
    </sql:query>
    <c:forEach var="getID" items="${toolresults.rows}">
         <c:set var="theID" value="${getID.TFToolID}"/>
    </c:forEach>
    AND when that didn't work, added this....
    <fmt:parseNumber value="${theID}" var="IDnew"/>

  • I am geeting problem whem i run bulk insert query i got error Location:_ bcpimp.cpp:1797 Expression:_ cbOutTemp cbOutputStr SPID:__ 52 Process ID:_ 2364 Msg 3624, Level 20, State 1, Line 3 A system assertion check has failed. Check the SQL Server error

    Location: bcpimp.cpp:1797
    Expression: cbOutTemp < cbOutputStr
    SPID: 52
    Process ID: 2364
    Msg 3624, Level 20, State 1, Line 3
    A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to
    Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a QFE from Technical Support. 
    Msg 0, Level 20, State 0, Line 0
    A severe error occurred on the current command.  The results, if any, should be discarded.

    If you check your sql server error log folder you will see dump files created. You need to send those dump files to Microsoft for inspection because outside of microsoft product support the symbols for reading the dumps are not available without which it
    wont be easy to find the issue.
    http://support.microsoft.com/kb/2028589
    In the meantime check if you are on the latest version of Service Pack and if not apply the latest service pack. Majority of these kind of assertions are bugs which are solved in Service Packs/Cumulative Updates.
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Wait on the Database Engine recovery handle failed. Check the SQL server error log for potential causes in SQL Server 2012 Developer Edition

    I m using SQL Server 2012 Developer Edition. Even I tried 2012 express and enterprise edition but all
    gave same error. I browsed msdn blog. But nothing help me out.
    Below is the error log details--
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2061893606
      Start time:                    2013-10-21 12:58:05
      End time:                      2013-10-21 13:52:30
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for RS:              Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for SQLEngine:       Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for DQ:              Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for FullText:        Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for Replication:     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
    Machine Properties:
      Machine name:                  CROY-TOSH
      Machine processor count:       4
      OS version:                    Windows 7
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered 
    Package properties:
      Description:                   Microsoft SQL Server 2012 Service Pack 1
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      SPLevel:                       0
      Installation location:         C:\Users\CRoy\Downloads\SQL Server 2012 Developer Edition (x86 and x64) - DVD (English)\x64\setup\
      Installation edition:          Developer
    Product Update Status:
      None discovered.
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      false
      AGTSVCACCOUNT:                 NT Service\SQLSERVERAGENT
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Manual
      ASBACKUPDIR:                   C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Backup
      ASCOLLATION:                   Latin1_General_CI_AI
      ASCONFIGDIR:                   C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config
      ASDATADIR:                     C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data
      ASLOGDIR:                      C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  NT Service\MSSQLServerOLAPService
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            CRoy-TOSH\CRoy
      ASTEMPDIR:                     C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CLTCTLRNAME:                   ROY
      CLTRESULTDIR:                  C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir\
      CLTSTARTUPTYPE:                Manual
      CLTSVCACCOUNT:                 NT Service\SQL Server Distributed Replay Client
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir\
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\ConfigurationFile.ini
      CTLRSTARTUPTYPE:               Manual
      CTLRSVCACCOUNT:                NT Service\SQL Server Distributed Replay Controller
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     CRoy-TOSH\CRoy
      ENABLERANU:                    false
      ENU:                           true
      ERRORREPORTING:                true
      FEATURES:                      SQLENGINE, REPLICATION, FULLTEXT, DQ, AS, RS, RS_SHP, RS_SHPWFE, DQC, BIDS, CONN, IS, BC, SDK, BOL, SSMS, ADV_SSMS, DREPLAY_CTLR, DREPLAY_CLT, SNAC_SDK, MDS
      FILESTREAMLEVEL:               2
      FILESTREAMSHARENAME:           MSSQLSERVER
      FTSVCACCOUNT:                  NT Service\MSSQLFDLauncher
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  false
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    MSSQLSERVER
      INSTANCENAME:                  MSSQLSERVER
      ISSVCACCOUNT:                  NT Service\MsDtsServer110
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          <empty>
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              SharePointFilesOnlyMode
      RSSVCACCOUNT:                  NT Service\ReportServer
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  SQL
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  Latin1_General_CI_AI
      SQLSVCACCOUNT:                 NT Service\MSSQLSERVER
      SQLSVCPASSWORD:                *****
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           CRoy-TOSH\CRoy
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      TCPENABLED:                    0
      UIMODE:                        Normal
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\ConfigurationFile.ini
    Detailed results:
      Feature:                       Management Tools - Complete
      Status:                        Passed
      Feature:                       Client Tools Connectivity
      Status:                        Passed
      Feature:                       Client Tools SDK
      Status:                        Passed
      Feature:                       Client Tools Backwards Compatibility
      Status:                        Passed
      Feature:                       Management Tools - Basic
      Status:                        Passed
      Feature:                       SQL Server Data Tools
      Status:                        Passed
      Feature:                       Reporting Services - Native
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       Data Quality Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       Full-Text and Semantic Extractions for Search
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A001A
      Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
      Feature:                       Master Data Services
      Status:                        Passed
      Feature:                       Distributed Replay Client
      Status:                        Passed
      Feature:                       Distributed Replay Controller
      Status:                        Passed
      Feature:                       Integration Services
      Status:                        Passed
      Feature:                       Data Quality Client
      Status:                        Passed
      Feature:                       Analysis Services
      Status:                        Passed
      Feature:                       Reporting Services - SharePoint
      Status:                        Passed
      Feature:                       Reporting Services Add-in for SharePoint Products
      Status:                        Passed
      Feature:                       SQL Browser
      Status:                        Passed
      Feature:                       Documentation Components
      Status:                        Passed
      Feature:                       SQL Writer
      Status:                        Passed
      Feature:                       SQL Client Connectivity
      Status:                        Passed
      Feature:                       SQL Client Connectivity SDK
      Status:                        Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\SystemConfigurationCheck_Report.htm

    Hi,
    This 3rd time I followed this link. But nothing new, same error.
    Can you please tell me how to do follow, I cannt do the 1st step, how to change the local system to windows level account, vice-versa. It is shown mine as
    Server Configuration Manager(Local) 
    From here I folllowed the steps ---[I cannt insert link/image :-(]
    SQL 2008/R2 setup fails with "Wait on the database engine recovery handle failed" 
    If I right clicked on SQL Server Service, there is no option to change the account. 
    Hello,
    Thanks for your patience,did you tried stesp mentioned in below article
    http://blogs.msdn.com/b/sqljourney/archive/2012/03/16/sql-2008-r2-setup-fails-with-quot-wait-on-the-database-engine-recovery-handle-failed-quot.aspx
    To resolve it, follow these steps:-
    When the installation throws this error, click on OK and allow it to proceed. It will fail for Database Engine, but the SQL Server service should have
    been created. Check the Services console.
    If the service is present, perform the following steps:-
    1. Go to SQL Server Configuration manager, right click on the SQL Server service, and change the service account (if it is local system, give
    it a windows level account, and vice-versa). It might throw a WMI error but you will see the account getting updated anyway. If not, then use the Services console. Change the account for SQL Agent as well.
    Use this link to change sql server service account
    http://technet.microsoft.com/en-us/library/ms345578.aspx
    2. Next, try to start the service. It should come online.
    3. However, you will not be able to log in to the SQL Server
    4. Now stop the service and start it from the command prompt using -m -c -T3608 parameters.
    5. Now try logging in to the server using admin connection from sqlcmd (sqlcmd admin:<server name>\<instance name> ...)
    6. Once logged in, use the sp_addsrvrolemember '<domain\username>','sysadmin'.
    Also add the builtin/administrators to the sysadmin role
    7. Now stop the service from the command prompt and start it from SQL Server configuration manager
    You should be able to log in to the server now.
    Hope this helps someone.
    Please revert if it helps or even if it does not
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • SQL insert statement in java with Excel file

    Dear all,
    I wrote a program is as the follow:
    import java.io.*;
    import java.sql.*;
    public class handleExcel
         Connection con = null;
         Statement stmnt = null;
         public handleExcel()
              String excel = "C:\\EGS\\app_files\\info_update_form_exported_data.xls";
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   String str="jdbc:odbc:DRIVER=Microsoft Excel Driver (*.xls);DBQ=" + excel + ";";
         String sql = "insert into [Sheet1$] (Name, Age, Test1, Test2, Test3) values ('mary','16','aa','bb','vv')";
                   con = DriverManager.getConnection(str, "", "");
                   stmnt = con.createStatement();
                   stmnt.executeUpdate(sql);
              catch(Exception e)
                   System.out.println("con is error!!");
                   e.printStackTrace();
         public static void main(String[] args)
              handleExcel TestHpc = new handleExcel();
    But when I run it, the error is as the follow:
    java.sql.SQLException: [Microsoft][ODBC Excel Driver]
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3111)
         at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
         at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:288)
         at hk.gov.edb.util.handleExcel.<init>(handleExcel.java:31)
         at hk.gov.edb.util.handleExcel.main(handleExcel.java:97)
    Please help me to solve this problem. Thank you so much for your help!
    Regards,
    kzyo

    Hi
    You can use the[b] jakarta POI api in order to read/write Excel file from java. Pure Java, no drivers nedeed.
    I tested and ok.
    Hope this helps

  • SSIS - Using Variables in Execute SQL Task Error

    The following query in my Execute SQL Task throws the following error when run - [Execute SQL Task] Error: Executing the query "SELECT @columnz = COALESCE(@columnz + ',[' + times..." failed with the following error: 
    "Must declare the scalar variable "@columnz".". Possible failure reasons: Problems with the query, 
    "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Query:
    drop table tmpNCPCNCDownstreamMaxUtilization3wks
    select node, max(utilization) as max_Utilization, DATE
    into tmpNCPCNCDownstreamMaxUtilization3wks
    from stage_ncpcncdownstream_temporal
    WHERE Date BETWEEN DATEADD(day, -20, GETDATE()) AND GETDATE() 
    group by node, date
    order by node
    go
    alter table tmpNCPCNCDownstreamMaxUtilization3wks add Timestamp varchar(50)
    go
    update tmpNCPCNCDownstreamMaxUtilization3wks
    set Timestamp = 'WeekOf_' + cast(left(Date, 11) as varchar)
    go
    --drop table tmpNCPCNC_DownstreamNodeUtilizationMaxPivot
    --go
    declare @columnz varchar (8000)
    go
    SELECT @columnz = COALESCE(@columnz + ',[' + timestamp + ']','[' + timestamp+ ']')
    FROM tmpNCPCNCDownstreamMaxUtilization3wks group by timestamp order by timestamp
    go
    --pivot contents in @columns
    declare @query varchar(8000)
    SET @query ='select * into tmpNCPCNC_DownstreamNodeUtilizationMaxPivot from 
    (select node, timestamp, Max_Utilization from tmpNCPCNCDownstreamMaxUtilization3wks)a
    pivot
    sum(max_Utilization) for timestamp in('+ @columnz +')
    )as p'
    execute (@query)
    --empty contents from NCPCNCDownstreamMaxUtilization3wks
    update tmpNCPCNCDownstreamMaxUtilization3wks
    set timestamp =''
    truncate table tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    --load to table to be joined to Node feature class
    insert into tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    (Node, TwoWeeksAgo, PreviousWeek, CurrentWeek)
    select * from tmpNCPCNC_DownstreamNodeUtilizationMaxPivot
    --calculate average utilization for all values in each record
    update tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    set average = (coalesce(twoweeksago, 0) + coalesce(previousweek, 0) + coalesce(currentweek, 0))/3
    from tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    Scott

    Issue is with variable @columnz.
    Scope of variables is only limited to the batch and if batch is over Variable is no more accessible.
    Reproduce Steps: 
    DECLARE @columnz int = 0
    Go --Scope of @columnz ends here
    SELECT @columnz -- Ends up with error
    So you have to remove GO keyword. I have commented 2 of them in below:
    DROP TABLE tmpNCPCNCDownstreamMaxUtilization3wks
    SELECT node
    ,max(utilization) AS max_Utilization
    ,DATE
    INTO tmpNCPCNCDownstreamMaxUtilization3wks
    FROM stage_ncpcncdownstream_temporal
    WHERE DATE BETWEEN DATEADD(day, - 20, GETDATE())
    AND GETDATE()
    GROUP BY node
    ,DATE
    ORDER BY node
    GO
    ALTER TABLE tmpNCPCNCDownstreamMaxUtilization3wks ADD TIMESTAMP VARCHAR(50)
    GO
    UPDATE tmpNCPCNCDownstreamMaxUtilization3wks
    SET TIMESTAMP = 'WeekOf_' + cast(left(DATE, 11) AS VARCHAR)
    GO
    --drop table tmpNCPCNC_DownstreamNodeUtilizationMaxPivot
    --go
    DECLARE @columnz VARCHAR(8000)
    --GO
    SELECT @columnz = COALESCE(@columnz + ',[' + TIMESTAMP + ']', '[' + TIMESTAMP + ']')
    FROM tmpNCPCNCDownstreamMaxUtilization3wks
    GROUP BY TIMESTAMP
    ORDER BY TIMESTAMP
    --GO
    --pivot contents in @columns
    DECLARE @query VARCHAR(8000)
    SET @query = 'select * into tmpNCPCNC_DownstreamNodeUtilizationMaxPivot from
    (select node, timestamp, Max_Utilization from tmpNCPCNCDownstreamMaxUtilization3wks)a
    pivot
    sum(max_Utilization) for timestamp in(' + @columnz + ')
    )as p'
    EXECUTE (@query)
    --empty contents from NCPCNCDownstreamMaxUtilization3wks
    UPDATE tmpNCPCNCDownstreamMaxUtilization3wks
    SET TIMESTAMP = ''
    TRUNCATE TABLE tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    --load to table to be joined to Node feature class
    INSERT INTO tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week (
    Node
    ,TwoWeeksAgo
    ,PreviousWeek
    ,CurrentWeek
    SELECT *
    FROM tmpNCPCNC_DownstreamNodeUtilizationMaxPivot
    --calculate average utilization for all values in each record
    UPDATE tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    SET average = (coalesce(twoweeksago, 0) + coalesce(previousweek, 0) + coalesce(currentweek, 0)) / 3
    FROM tmpNCPCNC_MaxDownstreamNodeUtilzationChart3Week
    -Vaibhav Chaudhari

  • Execute SQl Task Error SSIS Package

    Hi all,
    I`m using for each loop container in my package to grab the file name from the source path. I have created 2 vairables
    FilePath and SourceFolder
    I`m using execute sql task inside the container and this is my query
    Insert into [dbo].[DCA_FF_TEST] (File_Name,File_Date) SELECT File_name = ?,
    File_Date = GetDate()
    Please not the Table I am trying to insert has more columns but at this stage I dont need them.
    When i execute the task I get an error
    [Execute SQL Task] Error: Executing the query "
    INSERT INTO   [dbo].[DCA_FF_TEST] ([File_Name],[F..." failed with the following error: "The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters
    not set correctly, or connection not established correctly.
    Can someone point me in the right direction? Am I missing anything?
    Resultset property Set to None
    Parameter Mapping: Variablename: FilePath , Direction: Input, datatype : Varchar, Parametername: 0, ParameterSize: 100.
    I`ve checked the connection as well it works.
    FM

    Did you try
    Insert into  [dbo].[DCA_FF_TEST] (File_Name,File_Date)
    SELECT ?, GetDate()
    Or
    Insert into  [dbo].[DCA_FF_TEST] (File_Name,File_Date) VALUES (?, GetDate())
    A Fan of SSIS, SSRS and SSAS

  • Apostrophe in a String bombs a SQL insert

    I am having an issue with a Customer String parameter that is being used in a SQL INSERT. The customer name may from time to time have an apostrophe in it that causes our SQL INSERT to bomb on a missing comma error. I have tried to do this two separate ways:
    1)
    String query = "INSERT into CUSTOMER VALUES(" + account[0].custAcctNbr + ",'" + account[0].companyNm + "'," +
                   "'IN',null," + salesPerson[0].salespersonID + "," + "null,null,null,null,null," +
                   "null,null,null,null,null,null,null,null,null)";
    This works until an apostrophe is in the companyNm varaiable.
    2)
         PreparedStatement insertCustomer = bcc_conn_cust.prepareStatement(
         "INSERT into CUSTOMER VALUES(?,?,?,null,?,null,null,null,null,null,null,null,null,null,null,null,null,null,null");
         insertCustomer.setInt(1,Integer.parseInt(account[0].custAcctNbr));
         insertCustomer.setString(2,account[0].companyNm);
         insertCustomer.setString(3,"IN");
         insertCustomer.setInt(4,salesPerson[0].salespersonID);
         insertCustomer.executeUpdate();
    This also works when there is no apostrophe. However both bomb when it is present. Is there anyway to get around this, short of parsing a company name every single time we insert a new customer?

    Do you have any idea why this is not working? yes, whatever driver you are using isn't implementing this properly.
    variable I am using is a String variable, that has a
    value of Bates' Brownies. According to all I read, it
    seems I have used the Prepared Statement correctly but
    it is giving me that missing comma error. I would
    really rather not have to search every single company
    name as it is entered.well unless you can either find another driver or fix the one you've
    got i can't see what else you can do...
    here is some code to help you along with that.
    private String replaceQuotes(String toReplace){
      StringBuffer buff = new StringBuffer(toReplace);
      for(int i=0;i<buff.length();i++){
        if(buff.charAt(i)=='\''){
          buff.insert(i,'\'');
          i++;
      return buff.toString();

  • How I can make SQL Insert file on schedule

    Dear Community Members;
    Hope all you will be perfect. I required your urgent response on my query. I want to make an SQL Insert file, means I want to insert data from query in one table and after that, the data export in an SQL file as a SQL Insert file.
    All these things want to do on schedule not manually.
    Can anyone help and guide me how I can do it?

    Dear Members;
    Actually, we are working on two different applications, like sale and account. Now we want to post sale information in account system without any DBLink, for that I want to make a file where my data store in SQL Insert Statement format on scheduling, means I want to create a procedure which create this file on scheduling. After that same as I want to create a procedure in other system for read that file and execute. Now I have been found Oracle functionality but still I am facing a problem. The problem is that my procedure create a file with a single record not the all fetched record. My Procedure is as:
    DECLARE
      fileHandler UTL_FILE.FILE_TYPE;
      INSERT1 VARCHAR2(200);
      INSERT2 VARCHAR2(200);
      cursor c1 is
        select T.QTY, T.SLIP_NO, T.STORE_NO, T.Item_Code
        from test t
        where T.STORE_NO = 1;
    BEGIN
        for cur_rec in c1 loop
        INSERT1 := 'INSERT INTO TEST_2(Item_Code,STORE_NO,QTY,SLIP_NO) VALUES(';
        INSERT2 := INSERT1||CUR_REC.Item_Code||','||CUR_REC.STORE_NO||','||CUR_REC.QTY||','||CUR_REC.SLIP_NO||')' ;
      fileHandler := UTL_FILE.FOPEN('E:\Oracle\admin\udump', 'test_file2.SQL', 'W');
      --UTL_FILE.PUTF(fileHandler, 'Writing TO a file\n');
      UTL_FILE.PUTF(fileHandler, INSERT2);
      UTL_FILE.PUTF(fileHandler, '\n commit;');
      UTL_FILE.FCLOSE(fileHandler);
      END LOOP;
    EXCEPTION
      WHEN utl_file.invalid_path THEN
         raise_application_error(-20000, 'ERROR: Invalid PATH FOR file.');
    END;
    Please suggest/guide me where I am doing something wrong or missing. I'll thankful for your help.

  • SQL Statement error when running ETL from DAC

    Dear all,
    I installed and configured biapps 7.9.6.3, then I run the full load of Subject CRM - Loyalty in DAC. And I got the error of task fail, I check the Session log files in Informatica server.
    $ view SEBL_VERT_811.DATAWAREHOUSE.SDE_SBL_Vert_811_Adaptor.SDE_GeographyDimension_Business.log
    DIRECTOR> VAR_27028 Use override value [0] for user-defined workflow/worklet variable:[$$passInStatus].
    DIRECTOR> VAR_27028 Use override value [DataWarehouse] for session parameter:[$DBConnection_OLAP].
    DIRECTOR> VAR_27028 Use override value [SEBL_VERT_811] for session parameter:[$DBConnection_OLTP].
    DIRECTOR> VAR_27028 Use override value [SEBL_VERT_811.DATAWAREHOUSE.SDE_SBL_Vert_811_Adaptor.SDE_GeographyDimension_Business.log] for session parameter:[$PMSessionLogFile].
    DIRECTOR> VAR_27028 Use override value [1] for mapping parameter:[MPLT_LOAD_W_GEO_DS.$$DATASOURCE_NUM_ID].
    DIRECTOR> VAR_27028 Use override value [] for mapping parameter:[$$Hint1].
    DIRECTOR> VAR_27028 Use override value [] for mapping parameter:[$$Hint2].
    DIRECTOR> TM_6014 Initializing session [SDE_GeographyDimension_Business] at [Mon Jul 25 17:29:47 2011].
    DIRECTOR> TM_6683 Repository Name: [Oracle_BI_DW_Base]
    DIRECTOR> TM_6684 Server Name: [Oracle_BI_DW_Server]
    DIRECTOR> TM_6686 Folder: [SDE_SBL_Vert_811_Adaptor]
    DIRECTOR> TM_6685 Workflow: [SDE_GeographyDimension_Business] Run Instance Name: [] Run Id: [260]
    DIRECTOR> TM_6101 Mapping name: SDE_GeographyDimension_Business [version 1].
    DIRECTOR> TM_6963 Pre 85 Timestamp Compatibility is Enabled
    DIRECTOR> TM_6964 Date format for the Session is [MM/DD/YYYY HH24:MI:SS]
    DIRECTOR> TM_6827 [u01/app/oracle/biapps/dev/Informatica/9.0.1/server/infa_shared/Storage] will be used as storage directory for session [SDE_GeographyDimension_Business].
    DIRECTOR> CMN_1802 Session recovery cache initialization is complete.
    DIRECTOR> TM_6708 Using configuration property [DisableDB2BulkMode,Yes]
    DIRECTOR> TM_6708 Using configuration property [ServerPort,6325]
    DIRECTOR> TM_6708 Using configuration property [overrideMpltVarWithMapVar,Yes]
    DIRECTOR> TM_6708 Using configuration property [SiebelUnicodeDB,SIEBEL@ANSDEV dwhadmin@ANBDEV]
    DIRECTOR> TM_6703 Session [SDE_GeographyDimension_Business] is run by 64-bit Integration Service [node01_hkhgc01dvapp01], version [9.0.1 HotFix2], build [1111].
    MANAGER> PETL_24058 Running Partition Group [1].
    MANAGER> PETL_24000 Parallel Pipeline Engine initializing.
    MANAGER> PETL_24001 Parallel Pipeline Engine running.
    MANAGER> PETL_24003 Initializing session run.
    MAPPING> CMN_1569 Server Mode: [UNICODE]
    MAPPING> CMN_1570 Server Code page: [UTF-8 encoding of Unicode]
    MAPPING> TM_6151 The session sort order is [Binary].
    MAPPING> TM_6185 Warning. Code page validation is disabled in this session.
    MAPPING> TM_6156 Using low precision processing.
    MAPPING> TM_6180 Deadlock retry logic will not be implemented.
    MAPPING> TM_6187 Session target-based commit interval is [10000].
    MAPPING> TM_6307 DTM error log disabled.
    MAPPING> TE_7022 TShmWriter: Initialized
    MAPPING> DBG_21075 Connecting to database [ANBDEV], user [dwhadmin]
    MAPPING> CMN_1716 Lookup [MPLT_LOAD_W_GEO_DS.LKP_W_LST_OF_VAL_G] uses database connection [Relational:DataWarehouse] in code page [UTF-8 encoding of Unicode]
    MAPPING> CMN_1716 Lookup [MPLT_LOAD_W_GEO_DS.LKP_W_GEO_DS] uses database connection [Relational:DataWarehouse] in code page [UTF-8 encoding of Unicode]
    MAPPING> DBG_21694 AGG_COUNTRY_CITY_ZIPCODE Partition [0]: Index cache size = [1048576], Data cache size = [2097152]
    MAPPING> TE_7212 Increasing [Index Cache] size for transformation [AGG_COUNTRY_CITY_ZIPCODE] from [1048576] to [2402304].
    MAPPING> TE_7212 Increasing [Data Cache] size for transformation [AGG_COUNTRY_CITY_ZIPCODE] from [2097152] to [2097528].
    MAPPING> TE_7029 Aggregate Information: Creating New Index and Data Files
    MAPPING> TE_7034 Aggregate Information: Index file is [u01/app/oracle/biapps/dev/Informatica/9.0.1/server/infa_shared/Cache/PMAGG14527_3_0_260.idx]
    MAPPING> TE_7035 Aggregate Information: Data file is [u01/app/oracle/biapps/dev/Informatica/9.0.1/server/infa_shared/Cache/PMAGG14527_3_0_260.dat]
    MAPPING> TM_6007 DTM initialized successfully for session [SDE_GeographyDimension_Business]
    DIRECTOR> PETL_24033 All DTM Connection Info: [<NONE>].
    MANAGER> PETL_24004 Starting pre-session tasks. : (Mon Jul 25 17:29:47 2011)
    MANAGER> PETL_24027 Pre-session task completed successfully. : (Mon Jul 25 17:29:47 2011)
    DIRECTOR> PETL_24006 Starting data movement.
    MAPPING> TM_6660 Total Buffer Pool size is 36000000 bytes and Block size is 128000 bytes.
    LKPDP_2> DBG_21097 Lookup Transformation [MPLT_LOAD_W_GEO_DS.LKP_W_GEO_DS]: Default sql to create lookup cache: SELECT CITY,COUNTRY,ZIPCODE,STATE_PROV FROM W_GEO_DS ORDER BY CITY,COUNTRY,ZIPCODE,STATE_PROV
    LKPDP_1> DBG_21312 Lookup Transformation [MPLT_LOAD_W_GEO_DS.LKP_W_LST_OF_VAL_G]: Lookup override sql to create cache: SELECT W_LST_OF_VAL_G.VAL AS VAL, W_LST_OF_VAL_G.R_TYPE AS R_TYPE FROM W_LST_OF_VAL_G
    WHERE
         W_LST_OF_VAL_G.R_TYPE LIKE 'ETL%' ORDER BY R_TYPE,VAL
    LKPDP_1> TE_7212 Increasing [Index Cache] size for transformation [MPLT_LOAD_W_GEO_DS.LKP_W_LST_OF_VAL_G] from [1048576] to [1050000].
    LKPDP_2> TE_7212 Increasing [Index Cache] size for transformation [MPLT_LOAD_W_GEO_DS.LKP_W_GEO_DS] from [20000000] to [20006400].
    LKPDP_2> TE_7212 Increasing [Data Cache] size for transformation [MPLT_LOAD_W_GEO_DS.LKP_W_GEO_DS] from [20000000] to [20004864].
    READER_1_1_1> DBG_21438 Reader: Source is [ANSDEV], user [SIEBEL]
    READER_1_1_1> BLKR_16051 Source database connection [SEBL_VERT_811] code page: [UTF-8 encoding of Unicode]
    READER_1_1_1> BLKR_16003 Initialization completed successfully.
    WRITER_1_*_1> WRT_8146 Writer: Target is database [ANBDEV], user [dwhadmin], bulk mode [ON]
    WRITER_1_*_1> WRT_8106 Warning! Bulk Mode session - recovery is not guaranteed.
    WRITER_1_*_1> WRT_8221 Target database connection [DataWarehouse] code page: [UTF-8 encoding of Unicode]
    WRITER_1_*_1> WRT_8124 Target Table W_GEO_DS :SQL INSERT statement:
    INSERT INTO W_GEO_DS(CITY,CONTINENT,COUNTRY,COUNTY,STATE_PROV,ZIPCODE,DATASOURCE_NUM_ID,X_CUSTOM) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?)
    WRITER_1_*_1> WRT_8020 No column marked as primary key for table [W_GEO_DS]. UPDATEs Not Supported.
    WRITER_1_*_1> WRT_8270 Target connection group #1 consists of target(s) [W_GEO_DS]
    WRITER_1_*_1> WRT_8003 Writer initialization complete.
    READER_1_1_1> BLKR_16007 Reader run started.
    WRITER_1_*_1> WRT_8005 Writer run started.
    WRITER_1_*_1> WRT_8158
    *****START LOAD SESSION*****
    Load Start Time: Mon Jul 25 17:29:47 2011
    Target tables:
    W_GEO_DS
    READER_1_1_1> RR_4029 SQ Instance [SQ_S_ADDR_ORG] User specified SQL Query [SELECT  DISTINCT
    S_ADDR_ORG.CITY,
    S_ADDR_ORG.COUNTRY,
    S_ADDR_ORG.COUNTY,
    S_ADDR_ORG.PROVINCE,
    S_ADDR_ORG.STATE,
    S_ADDR_ORG.ZIPCODE,
          '0' AS X_CUSTOM
    FROM
    V_ADDR_ORG S_ADDR_ORG
    READER_1_1_1> RR_4049 SQL Query issued to database : (Mon Jul 25 17:29:47 2011)
    READER_1_1_1> CMN_1761 Timestamp Event: [Mon Jul 25 17:29:47 2011]
    READER_1_1_1> RR_4035 SQL Error [
    ORA-00942: table or view does not exist
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT DISTINCT
    S_ADDR_ORG.CITY,
    S_ADDR_ORG.COUNTRY,
    S_ADDR_ORG.COUNTY,
    S_ADDR_ORG.PROVINCE,
    S_ADDR_ORG.STATE,
    S_ADDR_ORG.ZIPCODE,
    '0' AS X_CUSTOM
    FROM
    V_ADDR_ORG S_ADDR_ORG
    Oracle Fatal Error
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT DISTINCT
    S_ADDR_ORG.CITY,
    S_ADDR_ORG.COUNTRY,
    S_ADDR_ORG.COUNTY,
    S_ADDR_ORG.PROVINCE,
    S_ADDR_ORG.STATE,
    S_ADDR_ORG.ZIPCODE,
    '0' AS X_CUSTOM
    FROM
    V_ADDR_ORG S_ADDR_ORG
    Oracle Fatal Error].
    READER_1_1_1> CMN_1761 Timestamp Event: [Mon Jul 25 17:29:47 2011]
    READER_1_1_1> BLKR_16004 ERROR: Prepare failed.
    WRITER_1_*_1> WRT_8333 Rolling back all the targets due to fatal session error.
    WRITER_1_*_1> WRT_8325 Final rollback executed for the target [W_GEO_DS] at end of load
    WRITER_1_*_1> WRT_8035 Load complete time: Mon Jul 25 17:29:47 2011
    LOAD SUMMARY
    ============
    WRT_8036 Target: W_GEO_DS (Instance Name: [W_GEO_DS])
    WRT_8044 No data loaded for this target
    WRITER_1__1> WRT_8043 ****END LOAD SESSION*****
    MANAGER> PETL_24031
    ***** RUN INFO FOR TGT LOAD ORDER GROUP [1], CONCURRENT SET [1] *****
    Thread [READER_1_1_1] created for [the read stage] of partition point [SQ_S_ADDR_ORG] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [TRANSF_1_1_1] created for [the transformation stage] of partition point [SQ_S_ADDR_ORG] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [TRANSF_1_2_1] created for [the transformation stage] of partition point [AGG_COUNTRY_CITY_ZIPCODE] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [WRITER_1_*_1] created for [the write stage] of partition point [W_GEO_DS] has completed. The total run time was insufficient for any meaningful statistics.
    MAPPING> CMN_1791 The index cache size that would hold [0] aggregate groups of input rows for [AGG_COUNTRY_CITY_ZIPCODE], in memory, is [0] bytes
    MAPPING> CMN_1790 The data cache size that would hold [0] aggregate groups of input rows for [AGG_COUNTRY_CITY_ZIPCODE], in memory, is [0] bytes
    MAPPING> CMN_1793 The index cache size that would hold [0] rows in the lookup table for [MPLT_LOAD_W_GEO_DS.LKP_W_LST_OF_VAL_G], in memory, is [0] bytes
    MAPPING> CMN_1792 The data cache size that would hold [0] rows in the lookup table for [MPLT_LOAD_W_GEO_DS.LKP_W_LST_OF_VAL_G], in memory, is [0] bytes
    MAPPING> CMN_1793 The index cache size that would hold [0] rows in the lookup table for [MPLT_LOAD_W_GEO_DS.LKP_W_GEO_DS], in memory, is [0] bytes
    MAPPING> CMN_1792 The data cache size that would hold [0] rows in the lookup table for [MPLT_LOAD_W_GEO_DS.LKP_W_GEO_DS], in memory, is [0] bytes
    MANAGER> PETL_24005 Starting post-session tasks. : (Mon Jul 25 17:29:47 2011)
    MANAGER> PETL_24029 Post-session task completed successfully. : (Mon Jul 25 17:29:47 2011)
    MAPPING> TE_7216 Deleting cache files [PMLKUP14527_524289_0_260L64] for transformation [MPLT_LOAD_W_GEO_DS.LKP_W_LST_OF_VAL_G].
    MAPPING> TE_7216 Deleting cache files [PMLKUP14527_524293_0_260L64] for transformation [MPLT_LOAD_W_GEO_DS.LKP_W_GEO_DS].
    MAPPING> TM_6018 The session completed with [0] row transformation errors.
    MANAGER> TE_7216 Deleting cache files [u01/app/oracle/biapps/dev/Informatica/9.0.1/server/infa_shared/Cache/PMAGG14527_3_0_260.idx] for transformation [AGG_COUNTRY_CITY_ZIPCODE].
    MANAGER> TE_7216 Deleting cache files [u01/app/oracle/biapps/dev/Informatica/9.0.1/server/infa_shared/Cache/PMAGG14527_3_0_260.dat] for transformation [AGG_COUNTRY_CITY_ZIPCODE].
    MANAGER> PETL_24002 Parallel Pipeline Engine finished.
    DIRECTOR> PETL_24013 Session run completed with failure.
    DIRECTOR> TM_6022
    SESSION LOAD SUMMARY
    ================================================
    DIRECTOR> TM_6252 Source Load Summary.
    DIRECTOR> CMN_1740 Table: [SQ_S_ADDR_ORG] (Instance Name: [SQ_S_ADDR_ORG])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> TM_6253 Target Load Summary.
    DIRECTOR> CMN_1740 Table: [W_GEO_DS] (Instance Name: [W_GEO_DS])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> TM_6023
    ===================================================
    DIRECTOR> TM_6020 Session [SDE_GeographyDimension_Business] completed at [Mon Jul 25 17:29:48 2011].
    After review the log, I found the select statement was fail, the SQL below was wrong:
    SELECT DISTINCT
    S_ADDR_ORG.CITY,
    S_ADDR_ORG.COUNTRY,
    S_ADDR_ORG.COUNTY,
    S_ADDR_ORG.PROVINCE,
    S_ADDR_ORG.STATE,
    S_ADDR_ORG.ZIPCODE,
    '0' AS X_CUSTOM
    FROM
    V_ADDR_ORG S_ADDR_ORG
    There is no table V_ADDR_ORG but S_ADDR_ORG in the Siebel transaction database. So I don't know why it generate this sql when transfering data to OBAW. This is the out of box bi application.
    Experts! How could I fix this problem?? Please help, thank you very much!!
    Best regards,
    Ryan

    Ryan,
    Yes you missed to create views for source tables. so in dac design>> tables tab, select any table and right clieck on it then click on change capture scripts>> generate view scripts. it will ask you whether it can generate script for all the tables. so it will generate view script for you. now run the entire esript in source database. then your problem will be solved.
    if this answered your question . make my answer correct.
    Thanks
    Jay.

  • Cfquery insert error

    I am trying to use the attached code to insert records into a
    table. BUT, it gives me the following error:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator) in query expression '[email protected]'.
    The error occurred in
    C:\ColdFusion8\wwwroot\silvereagles\manotify.cfm: line 94
    92 : (rosterkey, eventnumber, playernumber, firstname,
    lastname, emailaddr,
    93 : notifieddate)
    94 : VALUES (#matchkey#, #eventnumber#, #keymine#,
    #playerfirst#, #playerlast#, #playeremail#, #today#)
    95 : </cfquery>
    96 : </cfif>
    SQLSTATE 42000
    SQL INSERT INTO matchroster (rosterkey, eventnumber,
    playernumber, firstname, lastname, emailaddr, notifieddate) VALUES
    (52, 5, 2, Art, Bushey, [email protected], {ts '2009-03-03
    11:51:57'})
    VENDORERRORCODE -3100
    DATASOURCE connsilvereagles
    If I remove the playerermail element (which has an @ in it)
    it will insert without fail....this is happening on other scripts
    as well for me......I have been on many forums seeking assistance
    with this to no avail. Hopefully, someone in your organization will
    be familiar with this issue.
    Thanks in advance

    You really should use the <cfqueryparam> tag.
    You can read more about it on ColdFusio's documentation
    http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_18.html#1102474
    See also:
    http://www.adobe.com/devnet/coldfusion/articles/cfqueryparam.html
    Massimo Foti, web-programmer for hire
    Tools for ColdFusion, JavaScript and Dreamweaver:
    http://www.massimocorner.com

Maybe you are looking for