I have a scenario in SQL Server and needs your help to get the necessary information.
1. Open SQL Analyzer. 2. Directly using a query updating 40000 records in a table in TEST db (no Begin transaction started), query started @ 11:30 hrs and running. 3. SQL Service got restarted @ 11:31 hrs.
Now, user wants to check the following:
1. Whether the table is updated with records or not. 2. If updated, how many records are updated in that table and how many missed. 3. Will there be any rollback/roll forward
Note:- There is no date time stamp column available in the table.
If it was a single statement, either all the changes would have been committed, or none would be. So either all the records that should have been affected would be or none would be affected.
Regarding the third question:
If the changes were committed, and if the data was not persisted to the data file(s), SQL server would do a roll forward, otherwise it will do a rollback when you restart the server. All of that should be transparent to you unless there was data or log file got corrupted.