none
Checkpoint equivelent in ADO.NET and Disabling Logging RRS feed

  • Question

  • Hi

    I am running a SQL statement against a large database  from a windows forms application using ADO (not a good idea I know) and I want to do this using ADO to maximize performance and minimize the possibility of Log fill-up:

    1. Perform a checkpoint so that I can commit only after N rows (note since the query is a sql statement, I can't ask it to stop via logic like in http://stackoverflow.com/questions/2098817/sql-server-how-to-use-cursor-to-delete-records)

    2. If possible disable logging for this transaction

    Can someone guide me to the required ADO.NET statements for this. ( I am OK with the ADO.NET for executing transaction - I only need the particular statements for the above)

    Other suggestions are welcome!

    Thanks.

    EK

    Sunday, March 28, 2010 10:52 AM

Answers

  • As I understand you already have SQL statements that you are using from ADO and this approach works fine. Right? If this is the case then you can use exact same SQL statements in ADO.NET. It should work exactly the same way on a database side.
    Val Mazur (MVP) http://www.xporttools.net
    Tuesday, March 30, 2010 9:54 AM
    Moderator

All replies

  • What is exact issue that you have? The SQL statements you are trying to execute have nothing to do with ADO or ADO.NET. Those are SQL Server statements and they will work if you execute them from ADO or ADO.NET.
    Val Mazur (MVP) http://www.xporttools.net
    Monday, March 29, 2010 9:53 AM
    Moderator
  • Hi,

    Thanks fro your reply.

    The SQL I am issuing is performing will delete about million rows out of 9 million rows or so. I want make sure that the log does not fill-up during the process and make sure that the transaction executes quickly.

    I want to know what do you suggest to ensure that the execution completes without problems.

    Thanks.

    EK

    Monday, March 29, 2010 3:42 PM
  • As I understand you already have SQL statements that you are using from ADO and this approach works fine. Right? If this is the case then you can use exact same SQL statements in ADO.NET. It should work exactly the same way on a database side.
    Val Mazur (MVP) http://www.xporttools.net
    Tuesday, March 30, 2010 9:54 AM
    Moderator