December 1, 2010 at 8:22 am
I'm trying to create a SQL-job step that will be executing a powershell script.
In the Job Step Properties page:
Under Type I choose "Powershell".
Under Run as I have: "SQL Server Agent Service Account".
I then click the "Open" button and navigate to the location of the powershell script (local on the server).
I get this error when I pick the script file and click OK:
Access to the path '...\script.ps1' is denied. (mscorlib)
The SQL Agent account is local admin on the server, so there should be no access issues.
When I RDP to the server using that account, I can navigate to the script location without any problems.
Anyone seen this before? It's not making any sense...
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
December 8, 2010 at 9:14 am
Do you get an error if you set it up as a CmdExec jobstep that executes
powershell c:\myfilepath\script.ps1
Well, obviouslyyou won't get an error while creating the job step in this scenario, but when you run it I mean!
December 8, 2010 at 9:51 am
It turned out the ps1 file was readonly; as soon as I made it read-write, issue was fixed.
Silly eh?
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
December 8, 2010 at 9:53 am
Viewing 4 posts - 1 through 3 (of 3 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