Log records updated from sql statement

I'm using MS SQL Server 2008 and I need to run an Update Script and I want to log each record that was updated by my script.  Is there a way to turn on a logging feature on a particular file, run the update statement, then turn of the logging and query the logging result?  All of this will be done through MS SQL Server Management Studio.
weimhaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chapmandewCommented:
You can use SQL Server Profiler to capture the changes.  Not really clear on exactly what you want?
0
DBAduck - Ben MillerPrincipal ConsultantCommented:
You may also turn on Change Data Capture (read up on it in Books Online) and query from that.  But I am also not sure 100% what you are looking to accomplish with the logging.
0
chapmandewCommented:
Right, but CDC has to be completely setup for such a thing...not something you can easily turn on and off.
0
weimhaAuthor Commented:
I have to run an update statement over my production data and would like a report of the records changed.  
I expect approx 20 records out of a total of 100,000 to be changed, but I would like confirmation that only those 20 were changed.
I was hoping there was something built into SQL Server 2008 that could do this for me easily.
0
chapmandewCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.