November 8, 2022 at 11:57 am
Hi!
If the SQL Server service is manually stopped (not task killed) does that commit transactions? Could you theoretically then take the MDF files of a database to a new server and use them to start the database up there without having to bring over the existing LDF files too?
Thanks for your thoughts!
November 8, 2022 at 12:04 pm
Check Shutdown
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
November 8, 2022 at 12:09 pm
if the SQL Service is stopped, one of the things it does is puts a pointer in thelog, to track what is committed or not committed as far as transactions go.
when the service starts again, it will rollback any transactions not committed at that point.
you can attach the mdf/ndf files without the log, but I believe you have to do it via script, I don't think there is a GUI prompt.
the command looks something like this:
CREATE DATABASE PROD_Copy ON
(FILENAME = 'D:\MSSQL14.MSSQLSERVER\MSSQL\PROD.mdf')
FOR ATTACH_REBUILD_LOG
GO
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply