Friday, March 23, 2012

Scheduled Task

Does anyone know how I can run a t-SQL script using the Microsoft Scheduled Task Wizard? I want either Q.A, or E.M to automatically start up and then run a script that I saved on my c: drive.
ThanksSQLAgent service account must have READ access to your C drive. You can have an OS command in the job step that fired OSQL with an -i ponting to the UNC of your C drive (\\your_pc_name\c$ or \\your_pc_name\share_name)|||Try osql and BAT.|||I've never used osql before and am having trouble logging in. It prompts me for the password and the just closes the window. I am putting in my windows password.
Thanks|||-E will let you in without having to enter the password if you have your login on the server.|||I am getting an error that says it doesn't exist or access denied.|||-S your_server_name -E|||Everything worked. Thank you very much for your help.

No comments:

Post a Comment