Without rollback
-
Hi, I just wanted to know that is it possible to retrieve data without rollback or declaring any transaction point in sql 2005.
Rock Star
Yes.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Yes.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
So how can I solve this issue. It will be great if you can guide me for it. Thank you!
Rock Star
The answer is to not declare any transaction, just do the select. For example:
select ID,FullName from Customer
This will retrieve the data and not create any implicit or explicit transactions. No need to commit or rollback anything. -
The answer is to not declare any transaction, just do the select. For example:
select ID,FullName from Customer
This will retrieve the data and not create any implicit or explicit transactions. No need to commit or rollback anything. -
Thanx for reply My question here is that consider I excuted an update query on a table without defining any transaction point, but now I want to roll back this update query so I can recover my data. How can I do this? Thank u!
Rock Star
You need to do some work on your question construction b/c thats not what anyone would have though the OP was about. If you are talking about recovering from an error in the statement then a transaction is required, if there was not transaction you are gone. If you want to recover from an incorrect update you may be able to restore the database from a backup or possibly by working the transaction logs. Restore the DB to another SQL instance and compare the data.
Never underestimate the power of human stupidity RAH