August 2, 2010 at 9:16 pm
Is this a bug or am I missing something? I created a sql agent job that runs a powershell command. It basically checks for a file and deletes it. Fairly simple. I ran the job and it runs successfully, but when you check the file, its still there.
I poke a run abit and finally added the SqlServerSQLAgentUser$xxx group to the folder and now when I ran it, it work. It seems logical that I need to add the security group, but what's not logical is why the job ran successfully. Shouldn't the job failed as it would have encountered a security error? You can verify this interactively by logging onto the server with the sql agent service account. Anybody seen this?
$Database = "DataFile"
$DatabaseFilePath = "H:\SqlBackup\"
$DatabaseBackupDescription = ""
#remove old file
If (Test-Path ($DatabaseFilePath + $Database + ".cbak.02")) {Remove-Item ($DatabaseFilePath + $Database + ".cbak.02")}
I
August 4, 2010 at 12:41 pm
I think this is more of a security question and so I will re-post this in the sql security section.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy