Migrating log files - should I copy file/directory permissions?
-
29-09-2020 - |
Question
I'm planning to move the log files for the databases ReportServer
, ReportServerTempDB
, tempDB
, and msdb
to a new drive.
But it seems that permissions aren´t copied with the directories and files; should I bother to move them over? (Or is that overkill?)
Solution
If you don't move the permissions too the service account under which SQL Server is running may not be able to access them.
You can use Robocopy to do this quite easily. I tend to use the following.
ROBOCOPY <source> <target> /MIR /SEC /SECFIX
More detaisl on this command can be found here
More Robocopy options can be found here
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange