Wednesday, February 15, 2012

Execute Command No transaction

How would I execute a stored procedure and turn off the transaction.
We do not care on our end if the data makes it over. So we dont need
transaciton.
Any Idea?
ThanksChris Calzaretta wrote:
> How would I execute a stored procedure and turn off the transaction.
> We do not care on our end if the data makes it over. So we dont need
> transaciton.
> Any Idea?
> Thanks
Relational databases are transactional. There is nothing you can do to
prevent a transaction when modifying data. If you don't require keeping
old transactions around in the transaction log, you can use the simple
recovery model. That will require you perform full database backups and
you can only recover a database as recent as the last full backup. In
simple recovery, SQL Server truncates (removes) committed transactions
from the log on a regular basis (every checkpoint). That doesn't mean
the transaction log won't grow, however. A large transaction could still
cause the physical transaction log file(s) to grow. Truncating the log
does not return the file to a smaller size. You would need to use DBCC
SHRINKFILE to do that if the need arises.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||So, why even run the stored procedure. If you don't care if the data makes
it over, then you shouldn't even care if you do any data modifications It
will greatly improve performance, that is for sure :)
Seriously, what do you mean transactions. Just ignore errors in your
application is most likely all you need to do. Run the proc, if it fails,
just go on. I would seriously look at logging errors to the event log,
because if it fails everytime (for some reason) you probably will want it to
be fixed, otherwise see my first comment and remove the smiley.
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Arguments are to be avoided: they are always vulgar and often convincing."
(Oscar Wilde)
"Chris Calzaretta" <ChrisCalzaretta@.discussions.microsoft.com> wrote in
message news:A7657CF8-757F-445D-9077-A2F550FB592A@.microsoft.com...
> How would I execute a stored procedure and turn off the transaction.
> We do not care on our end if the data makes it over. So we dont need
> transaciton.
> Any Idea?
> Thanks

No comments:

Post a Comment