Check database integrity throws 665 error when executing check database integrity task in SSMS.

I have read all other cases that relate to this error and cannot get this to work. Running SQL Server 2012 sp1 on Windows server 2012 R2. Disk space and permissions are fine, but I get the error below when I try and use the check database integrity task
within my maintenance plan on both system and user databases. I have researched this and fragmentation is not the issue. I'm lost at this point and would appreciate at least some steps to try. databases are not "read only" as I have read this may
contribute to the problem. All other maintenance tasks run fine.
Error message from SQL LOG
Check Database integrity on Local server connection
Databases: All system databases
Task start: 2014-01-13T11:00:04.
Task end: 2014-01-13T11:00:04.
Failed:(-1073548784) Executing the query "DBCC CHECKDB(N'master', NOINDEX)
" failed with the following error: "A database snapshot cannot be created because it failed to start.
A database snapshot cannot be created because it failed to start.
MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to expand the physical file 'E:\\SQLdata\\MSSQL11.MSSQLSERVER\\MSSQL\\DATA\\master.mdf:MSSQL_DBCC9'.
The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.
The database could not be exclusively locked to perform the operation.
Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous
errors for more details.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Error Message from Log File Viewer in SSMS:
Source: Check Database Integrity Task      Executing query "USE [ReportServer]  ".: 50% complete  End Progress  Error: 2014-01-13 11:31:54.92     Code: 0xC002F210    
Source: Check Database Integrity Task Execute SQL Task     Description: Executing the query "DBCC CHECKDB(N'ReportServer')  WITH NO_INFOMSGS  " failed with the following error: "A database snapshot cannot be created
because it failed to start.  A database snapshot cannot be created because it failed to start.  MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to
expand the physical file 'E:\SQLdata\MSSQL11.MSSQLSERVER\MSSQL\DATA\ReportServer.mdf:MSSQL_DBCC9'.  The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not
support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.  The database could not be exclusively locked to perform the operation.  Check statement aborted. The database could not be checked as a database
snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details.". Possible failure reasons: Problems with
the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.  End Error  Progress: 2014-01-13 11:31:54.93     Source: Check Database Integrity Task     
Executing query "USE [ReportServerTempDB]  ".: 50% complete  End Progress  Error: 2014-01-13 11:31:55.02     Code: 0xC002F210     Source: Check Database Integrity Task Execute SQL Task    
Description: Executing the query "DBCC CHECKDB(N'ReportServerTempDB')  WITH NO_INFOM..." failed with the following error: "A database snapshot cannot be created because it failed to start.  A database snapshot cannot be created because
it failed to start.  MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to expand the physical file 'E:\SQLdata\MSSQL11.MSSQLSERVER\MSSQL\DATA\ReportServerTempDB.mdf:MSSQL_DBCC9'. 
The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.".
Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.  End Error  Progress: 2014-01-13 11:31:55.02     Source:
Check Database Integrity Task      Executing query "USE [AddressUpload]  ".: 50% complete  End Progress  Error: 2014-01-13 11:31:55.13     Code: 0xC002F210     Source:
Check Database Integrity Task Execute SQL Task     Description: Executing the query "DBCC CHECKDB(N'AddressUpload')  WITH NO_INFOMSGS  " failed with the following error: "A database snapshot cannot be created because
it failed to start.  A database snapshot cannot be created because it failed to start.  MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to expand
the physical file 'E:\SQLData\MSSQL11.MSSQLSERVER\MSSQL\DATA\database1.mdf:MSSQL_DBCC9'.  The database snapshot for online checks could not be created. Either th...  The package execution fa...  The step failed.

ReFS is NOT supported in use with SQL Server 2012. Once such item, which you've stumbled upon is the fact that alternate streams and sparse files are not implemented in ReFS and thus these issues are caused. You *could* force the checkdb to execute by using
WITH TABLOCKX but that'll require exclusive access to the database for the duration of the checkdb scan and that's not something I would advise to do.
Sean Gallardy | Blog |
Twitter

Similar Messages

  • Webi report throwing error when executed

    HI Experts,
    While executing a Webi Report we are gettign following error when executing with more than one characteristics -
    A Database error occured. The database eror text is : The MDX Query select { [Measures].[4225B1TBMEMOYKZGDKLVINMAW] } ON COLUMNS FROM [ZMEPSC01/ZMEPSC01_QRY_0001]
    failed to execute with the error Unknown error.(WIS 10901).
    We tried changing the Universe -> Parameter -> Control -> Limit size of result set to -> unchecked it.
    But still the error remains. Can u put some light over it.
    Thanks.

    Hello ,
    Just Check with the BI the people they might change the the column name or some thing else in the bex Query that s way It is showing error.
    Refresh the universe and generate the report then check it.
    Thanks
    Santhosh V

  • ORA-29902 Error when executing context query

    We sometimes get the following error when executing a search based on keywords entered by a user:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Error generating context stmt ORA-29902: error in executing ODCIIndexStart() routine ORA-20000: interMedia Text error: DRG-50901: text query <HR></BLOCKQUOTE>
    A demonstration of the error can be seen by going to the main
    http://technet.oracle.com technet page and then performing a site search. Type in any of the following search phrases:
    Oracle and not Microsoft
    not Microsoft
    and database
    In my brief experimentation, the presence of any of
    not, and, or
    at the beginning of the keywords, or next to each other 'and not' within the keywords set causes the above oracle error.
    OK, I could train the users not to do this, but with the potential for every net user on the planet using my site, it might take me some time to speak to all of them.
    So how do I stop Intermedia from throwing up the error? I have written a quick parser to try to strip out offending entries, but that is not, imho, a good solution, as I do not know all the rules that will break it.
    tia

    You need to write a text query parser. Check the Query Translator code samples from http://technet.oracle.com/sample_code/products/text/content.html

  • Error processing request in sax parser: Error when executing statement...

    Hello,
    I want to INSERT data from R/3 System to AS400 via JDBC adapter into a DB2 database. The interfaces from R/3 are Ok. but i have some problems to use the JDBC in DB2 Systems. The message in comunitation channel is:
    " Error processing request in sax parser: Error when executing statement for table/stored proc. 'SPE106TST' (structure 'STATEMENT'): java.sql.SQLException: SPE106TST de SADMT1 no válido para la operación."
    in the SXMB_MONI -> Request Message Mapping payloads this:
    The connection to the database is fine, Sender adapter with a SELECT * works perfect.
    Please Can anyone help me solve this problem? I'm lost.
    Best regards,
    Edited by: Nicola Occhipinti on May 22, 2008 7:40 PM

    Hi Nicola,
    This error occurs when the receiver side structure is incorrect.
    Your structure seems to be correct.
    Please use lower case for action, access and table.
    Please check whether the field names are exactly the same as in the actual Database table sadmt1.SPE106TST.
    Check if the table has permissions to write.
    You can try an alternate structure without using table tag.
    <ns0:MT_XMLSQL_SPEC xmlns:ns0="urn:damm.com/pi/EmployeeMasterData">
    <STATEMENT>
    <sadmt1.SPE106TST action="INSERT">
    <access>
    <CODEMP>D</CODEMP>
    <CODPRO>00202339</CODPRO>
    <NOMPRO>ROSIQUE PERALSGENIS</NOMPRO>
    <DIRPRO>GIRONA</DIRPRO>
    <POBPRO>S. VICENS HORTS</POBPRO>
    <RUTA>0</RUTA>
    <ORDEN>0</ORDEN>
    <NOMINA>S</NOMINA>
    </access>
    </sadmt1.SPE106TST>
    </STATEMENT>
    </ns0:MT_XMLSQL_SPEC>
    Hope your problem gets solved.
    -Shamly

  • Unknown error when executing MDX when refreshing Crystal Report with BEx

    Hello Experts,
    I have created a Crystal Report (Crystal 2008 SP1) with BEx Query (7.10) and have been able to refresh successfully when the SAP_ALL authorization is included in my user role. I don't want my end users to have SAP_ALL so I created a role and assigned the authorizations recommended in the SAP Integration Kit for BusinessObjects 3.1 Install Guide.
    When I run the report as one of the users assigned to my new role I get the following error in the trace file.
    ERROR: .\crdb_bwmdx_execution.cpp [200]: l_bapiGetStreamInfo failed with return code RFC_RC = 0 Exception:  BAPI Error: BAPI Error #:0
    Unknown error when executing MDX
    2188     6556     Caught DbError #1 with Message 'BAPI Error #:0
    Unknown error when executing MDX'
    2188     6556     Caught DbError #1 with Message 'BAPI Error #:0
    Unknown error when executing MDX'
    2188     6556     Caught DbError #1 with Message 'BAPI Error #:0
    Unknown error when executing MDX'
    I tried all the Fix Packs (ie 1.1., 1.2 and 1.3) for XI 3.1 Integration Kit to try resolving the error but it didn't work.
    The same query works fine in BEx Web when running as one of the users in the new role I created for Crystal Report users.
    Are there any other Authorizations that I need to include in the role?
    Cheers.
    Paul.

    We have been able to identify what causes the MDX driver to error and I will explain what we are trying to implement with the hierarchies.
    Firstly, we are creating reports of the HR cube Mutliprovider using the SAP MDX Driver which works well when there are no authorization analysis set on the cube. But with the authorization analysis set for on 0ORGUNIT for BEx Explorer Crystal returns the MDX error.
    Each of the Business Unit managers are assigned to an Organization Unit that will be used to restrict the employees that will be reported. To restrict the Managers to only see their Org Unit we have set the 0ORGUNIT object to use authorization ananlysis and a custom authorization variable to return only data for the Org Unit they belong too.
    In Crystal this works well when a manager has an Org Unit that is a head department of other Org Units. This scenario will give Crystal the NodeID and Parent NodeID to create the hierarchies in the report. But when a manager does not have any other Org Units beneath there own department then Crystal doesn't have a Parent NodeID to create the Hierarchies with the NodeID. In the RFC trace I can see an error when Crystal is trying to get the Parent NodeID but the user is not authorized to that Org Unit then it throws the error.
    We have got a temporary workaround which is to create the managers a dummy Org Unit below their own department. The workaround will do for now but shouldn't the MDX driver be able to recognise that it has returned the last level in the Org Unit Hierarchy and not return an error?
    The customer is looking for a product fix as they believe this should be handled by the driver. Is this a bug or a limitation of the product?
    Paul.

  • Error when executing a .irpt page

    Hi,
    I am getting the below error when executing a .irpt from the workbench. I am on MII 12.2.2 Build (235).
    404   Not Found
    SAP NetWeaver Application Server 7.20 / AS Java 7.30
    Error: S:usrsapALXJ10j2eeclusterappssap.comxappsxmiiearservlet_jspXMII
    oot/XMII/CM/<Project>/<File.irpt>
    Troubleshooting Guide https://sdn.sap.com/irj/sdn/wiki?path=/display/jstsg/home
    Details: No details available.
    Please share your thoughts on this.
    Regards,
    Chanti.

    Hi Chanti,
    This sounds obvious, but check to make sure your irpt page has the extension .irpt in the workbench.  Depending on how you saved it, it might have been dropped.
    Also make sure the page is published by either saving it to web:// (not db://) or by right clicking and selecting Publish.
    Regards,
    Mike

  • Error when executing DBMS_ERRLOG through Stored Procedures...

    Hi,
    We have TWO schemas like IDWH_ODS and IDWH_ERR running on Oracle 10g Rel.2.
    The schema IDWH_ERR has direct SELECT privilege on all the base tables in IDWH_ODS schema. (As Pl/sql doesn't support ROLE, we have granted direct SELECT on each of the tables)
    IDWH_ODS schema has tables like ACCOUNT & CUSTOMER, for which I need to create DML Error logging tables in IDWH_ERR schema.
    I have one procedure 'Cr_Errlog_Tabs' in IDWH_ERR schema which gets all tables in IDWH_ODS and creates Error logging table in IDWH_ERR schema using DBMS_ERRLOG package. My problem starts here,
    When I execute the DBMS_ERRLOG package in IDWH_ERR through SQL*Plus LIKE,
    > exec DBMS_ERRLOG.CREATE_ERROR_LOG('idwh_ods.ACCOUNT','ERR$_ACCOUNT','idwh_err');
    it's creating the error log table 'ERR$_ACCOUNT' in IDWH_ERR schema.
    (...the same will be working when execute through Anonymous plsql block)
    BUT, when i execute the DBMS_ERRLOG package with same parameters through the stored Procedure 'Cr_Errlog_Tabs', it throws the following error...
    ORA-01031: insufficient privileges
    Please let me know how the solution at the earliest.

    WHY DO YOU FEEL YOU HAVE TO START A NEW THREAD FOR YOUR PROBLEM!?
    Insufficient priv error when executing DBMS_ERRLOG through PLSQL

  • Error when executing DBMS_ERRLOG pkg through Stored Procedures...

    Hi,
    We have TWO schemas like IDWH_ODS and IDWH_ERR running on Oracle 10g Rel.2.
    The schema IDWH_ERR has direct SELECT privilege on all the base tables in IDWH_ODS schema. (As Pl/sql doesn't support ROLE, we have granted direct SELECT on each of the tables)
    IDWH_ODS schema has tables like ACCOUNT & CUSTOMER, for which I need to create DML Error logging tables in IDWH_ERR schema.
    I have one procedure 'Cr_Errlog_Tabs' in IDWH_ERR schema which gets all tables in IDWH_ODS and creates Error logging table in IDWH_ERR schema using DBMS_ERRLOG package. My problem starts here,
    When I execute the DBMS_ERRLOG package in IDWH_ERR through SQL*Plus LIKE,
    > exec DBMS_ERRLOG.CREATE_ERROR_LOG('idwh_ods.ACCOUNT','ERR$_ACCOUNT','idwh_err');
    it's creating the error log table 'ERR$_ACCOUNT' in IDWH_ERR schema.
    (...the same will be working when execute through Anonymous plsql block)
    BUT, when i execute the DBMS_ERRLOG package with same parameters through the stored Procedure 'Cr_Errlog_Tabs',
    it throws the following error...
    ORA-01031: insufficient privileges
    Please let me know the solution at the earliest.
    Thanks.
    -Saravanan

    duplicate post
    Insufficient privilege error when executing DBMS_ERRLOG through PLSQL

  • File to JDBC :Error when executing statement for table/stored proc.

    Hi,
    I am getting following error when i am trying to insert data into z-table using JDBC recr adapter.
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ZTEST' (structure 'STATEMENT'): java.sql.SQLException: <u>[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name '<b>ZTEST</b>'.</u>
    But the database table name 'ZTEST' exists in the system.
    XML structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_RECR xmlns:ns0="http://urn:srini/FileToJDBC">
       <STATEMENT>
          <TEST action="INSERT">
             <table>ZTEST</table>
             <access>
                <ROLLNO>123</ROLLNO>
                <FIRSTNAME>ABC</FIRSTNAME>
                <LASTNAME>XYZ</LASTNAME>
             </access>
          </TEST>
       </STATEMENT>
    </ns0:MT_RECR>
    Regards,
    Srinivas

    Hi,
    I have changed my MT str but still getting the same error.Is it possible to insert/ update a z-table using JDBC adapter.
    XML str:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_RECR xmlns:ns0="http://urn:srini/FileToJDBC">
       <STATEMENT>
          <ZTEST action="INSERT">
             <access>
                <ROLLNO>123</ROLLNO>
                <FIRSTNAME>abc</FIRSTNAME>
                <LASTNAME>XYZ</LASTNAME>
             </access>
          </ZTEST>
       </STATEMENT>
    </ns0:MT_RECR>
    Regards,
    Srinivas

  • Error when executing function in MSS launchpad report ???

    In MSS lanchpad report, we have the following problem:
    Error in Manager Sef-Service
    When calling the report, the following error occurred:
    System: HRP
    Error when executing function
    Basically in MSS report, I select employees in the first iView which calls another ABAP query in back-end to display back-end t-code inside iView of portal through ITS service. What could be the reason for it? please advice.
    Thanks,
    Anthony

    Please try converting the standadrd-delivered scenario RPT0, then check
    out the things.
    Also problem may be that your function code names contain
    the character '&'. This causes a problem when the selected function
    code is passed to the ITS-WebGUI as a URL parameter. Please use only
    standard characters (A..Z and _) when you define a function code.
    Then it should work.
    Please go through the following link also
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/3a/
    3198408d953154e10000000a1550b0/frameset.htm
    Please test in backend using Se38 > PWPC_RPT_START_REPORT_TEST
    The Reporting Iview in the portal has the Report category type, by
    the report category type is set to "RPT0". Therefore, when the
    application is launched, the reporting category type is also sent as URL
    parameter to the backend system. As of ECC 6.0 only the reporting
    category type "RPT0" is supported. ensure this is set for your custom reports if you are using own scenarion
    then set in the Iview property of reports as well
    ie example
    1)Change the Iview property "Scenario" of the Reporting iview from
    "RPT0" to your own "ZRPT", than this set of reports will work. however,
    the standard reports will not work.
    pwpc_convert_mdt_to_lpa >>
    The following list of reports have been converted.

  • SQL2005 cluster error MDB-05053  Errors when executing sql command: p nr="

    Hi all,
    We are migrating from 32 bit to x64 bit machines. SQL 2005 database on windows 2003.
    I am trying to install E 4.7-200 SR1 on the clustered nodes. The installation manuals for 4.7 are very old and there is nothing for SQL2005 installation.
    Now that some how we were able to have SQL up and running in clustered environment (It only took 10 days), After installing CI, I am not able to deploy the database and database creation phase is failing with the following error:
    MDB-05053  Errors when executing sql command: <p nr="0"/>.
    I am heavily relying on our server managment team on clustering and hoping they have done a good job, However I need some guidelines which can help me in verifying what they have done is correct and meets SAP and SQL requirments and issues we are facing is actually install problems not cluster.
    SAP install manuals are not detailed in this regards. Also manuals are out dataed and they only show the sql 2000 clustering pre-requisit for 4.7 installls.
    Can any one with clustering experience please help.
    Calling out NPC, As his sql installation and upgrade manual has helped me with stand alone installs, Hoping he has some thing for clustering as well.
    Regards,
    KG

    Hi,
    What installation CD/DVD are you using?
    Try look at SAP note [924288|https://service.sap.com/sap/support/notes/924288],
    and note [969699|https://service.sap.com/sap/support/notes/969699],
    and note [967124|https://service.sap.com/sap/support/notes/967124],
    and note [106275|https://service.sap.com/sap/support/notes/106275].
    In special the last note say at the end:
    "3. You must use the 51031444 CD to install Enterprise 4.7 on an x64 platform with SQL Server 2005. This CD installs the central instances and database instances. To convert the A and B nodes in MSCS, use the SAP NetWeaver 04 SR1 installation master CD or DVD."
    Hope this helps
    Regards
    Rolf

  • Error when executing CPACache mode = full

    Hi,
    I had error, when executing this CPACache mode = full and delta, I am using this link below:
    http://demokl:50100/CPACache/refresh?mode=full.
    Full :
    Error message =
    <?xml version="1.0" encoding="UTF-8" ?>
    - <CacheRefreshError>
      <EngineType>AE</EngineType>
      <EngineName>af.px6.demokl</EngineName>
      <RefreshMode>F</RefreshMode>
    - <GlobalError>
      <Message>Couldn't parse Configuration Data cache update XML string from Directory.</Message>
      <Trace>org.xml.sax.SAXException: JavaErrors Tag found in cache update XML. at com.sap.aii.af.service.cpa.impl.cache.directory.DirectoryDataSAXHandler.startElement(DirectoryDataSAXHandler.java:148) at com.sap.engine.lib.xml.parser.handlers.SAXDocHandler.startElementEnd(SAXDocHandler.java:146) at com.sap.engine.lib.xml.parser.XMLParser.scanElement(XMLParser.java:1814) at com.sap.engine.lib.xml.parser.XMLParser.scanContent(XMLParser.java:2440) at
    Delta :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <CacheRefreshError>
      <EngineType>AE</EngineType>
      <EngineName>af.px6.demokl</EngineName>
      <RefreshMode>C</RefreshMode>
    - <GlobalError>
      <Message>CPA Cache not updated with directory data.</Message>
      <Trace>com.sap.aii.af.service.cpa.impl.exception.CPADirectoryCacheException: Couldn't open Directory URL (http://demokl:50100/dir/hmi_cache_refresh_service/ext?method=CacheRefresh&mode=C&consumer=af.px6.demokl), due to: HTTP 503: Service Unavailable at com.sap.aii.af.service.cpa.impl.cache.directory.DirectoryAccess.getDataFromDirectory(DirectoryAccess.java:382) at
    </Trace>
      </GlobalError>
    - <GlobalError>
      <Message>Confirmation handling failed.</Message>
      <Trace>com.sap.aii.af.service.cpa.impl.exception.CPADirectoryCacheException: Couldn't send confirmation, due to: Couldn't access Confirmation URL, due to: HTTP 503: Service Unavailable at
    Thank you and Regards
    Fernand

    Hi,
    I already using user PIDIRUSER to execute CPACache full mode, but still unsuccessfull.
    Hi Srinivas,
    Which parameter that you mention, i couldn't find in the SXMB_ADM Integration Configuration ?
    Thank you and Regards
    Fernand

  • Getting Cost Center Does not exist error when executing BAPI_ACC_GL_POSTING

    Hi Champs,
    I am getting Cost Center Does not exist error when executing BAPI_ACC_GL_POSTING_CHECK.
    But when I checked for the particular Cost center, it is mapped to the same company code the program has got executed.
    Example:
    Cost center 1000/150402 does not exist on 17.11.2009.
    Cost center 1000/150402 does not exist
    Cost center 1000/150402 does not exist on 17.11.2009.
    Cost center 1000/150402 does not exist on 17.11.2009.
    Please let me know if you have any guess on this. It is very critical issue for me.
    Thanks for all your help in advance.
    With Best Regards,
    Ravi kanth Yechuri

    Use 0000150402 not 150402 .
    Rob

  • Error when executing statement for table/stored proc.  : ORA-00911

    Hi All,
    I am posting IDOC->XI->JDBC, approx 5000 Idocs.
    But few messages are giving following error in XI-_SXMB_MONI
    Can any one guide me what is the cause of error? I check whole Idoc data I am not able to see bad character? can any once guide me what are the bad character in XML to post data in oracle? so that i can search in XML and how to avoide this error.
    "com.sap.aii.af.ra.ms.api.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'HRP1001' (structure 'INSERT_PAD34'): java.sql.SQLException: ORA-00911: invalid character"

    > I am talking about following IDOC.<ZRMD_A06> ->
    > <E1PLOGI SEGMENT="1">-> <E1PITYP SEGMENT="1"> ->
    > <E1PAD34 SEGMENT="1"> -><PROZT>0.00 #</PROZT>.
    > Can we remove this # during message mapping in XI??
    sure you can remove it using Replace function or by writing UDF.
    as I am seing # is last character..<b>so remove # with " " (single space) and then use the TRIM fucntion.</b>
    Thanks
    Farooq.
    *<b>Rewards points if you find it useful*</b>

  • Avoiding concurrency errors when updating a database through AJAX

    What are some strategies for avoiding concurrency errors when updating a database through AJAX. That is, in cases where a given user could attempt to modify the same row in the database with simultaneous requests (say, that he updates one column with information with an AJAX call, then immediately submits a form that updates the same row), what are some good ways yo prevent the two updates from colliding? On the JavaScript side one might make the AJAX call synchronous, but I question whether that is the best way to do it. Has anyone else confronted this?

    Well, since no one seems to have any ideas so far, I'll throw in my two cents worth.
    I'm not too familiar with AJAX so my advice may be limited.
    I suggest you do a google search on Optimistic concurrency database to get some ideas on how to handle it.
    If your update/insert/delete query is thread safe, then even if the same user double clicks the button fast enough to immediately have another update to the same record, then the first update will complete before the second one is carried out. Therefore no harm is done since he is just updating the same record. Since a typical update/insert/delete takes only a few milliseconds (querying may take a lot more time), its not likely he can click the button that fast. (I assume your using connection pooling for speed).
    The trouble comes up when two people call up data from the same record in different browsers. The first one updates/inserts/deletes the record. Now the other user is looking at old data. When he updates/inserts/deletes, there is a problem. One way to handle this is to keep a copy of all the fields from that record in each user's session scope when they first fetch it from the database (example: oldName). Then when you go to update some time later, to this:
    sql= update person set name=newValue where personID=3344 and name=oldName
    Note oldName is from session scope.
    If name in the database has changed, the update will not occur and will return 0 records updated. If it didn't change, it will update.
    Note your update function should not throw an exception if it cant update, it should return false. Return true if it worked.
    Example: public boolean updateName(String name)
    Similiarly, your insert should not throw an exception if the record already exists, it should return false meaning it cant insert.
    Exaple: public bolean insertName(String name). Same thing with delete function.
    If a record cant be updated due to someone else updating the record while the user was looking at data, return a message that it wasn't updated due to that problem. Then show the user the new value in the database ask him if he wants to overwrite the new change.
    Note even if you show 100 records on the JSP, only update the ones that have changed and not all 100. This way, its not likely he has updated the same records someone else has altered. Less likely a colision compared to updating all 100.
    If your updating/inserting/deleting more than 1 record (say, 3), then you should look into setting up a transaction in addition to all the above and rolling back all of them if one fails.
    Reading the section on databases from http://www.javapractices.com/home/HomeAction.do may also help.

Maybe you are looking for

  • Goods Receipt in STO with delivery ( SD Route ) problem

    Hi, there is issue related to Goods Receipt in STO with delivery ( SD Route) here 1. PO with delivery is created ( SD rote ) 2. with reference to above STO outboud delivery & PGI is done but after this Goods Receipt is done but outbound delivery docu

  • Use of NI6711 card.

    How I have asked before, i need generate four signal: 1) One sine- wave signal from 0 to -4 Volt, and frequency less than 100 KHz. 2) One trigger signal, amplitude 10 V, frequency 3200 Hz and pulse- width from 1 to 10 micro Seconds. 3) Two trigger si

  • Sharepoint 2010

    Hi All, i am new to sharepoint, i developed few reports in ssrs 2012 and deployed in sharepoint 2010. reports and parameters are working fine in local reporting server. In sharepoint the report is running but the issue is the cascading parameters are

  • Deleting hidden pictures

    Hi,I've a problem deleting pictures that I've saved under "hidden".Whenever i try to delete it,it first tells me that the item is for reading only,then asks if im sure i wanna delete.I then reply with yes, then gets the following response -File canno

  • Checking user priviledges

    what's the query to check some user priviledges?