Results 1 to 8 of 8

Thread: Scheduled Task

  1. #1
    Join Date
    Aug 2003
    Posts
    328

    Unanswered: 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.
    Thanks

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    SQLAgent 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)

  3. #3
    Join Date
    Sep 2003
    Location
    Dallas, Texas
    Posts
    311

    Re: Scheduled Task

    Try osql and BAT.

  4. #4
    Join Date
    Aug 2003
    Posts
    328

    Re: Scheduled Task

    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

  5. #5
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    -E will let you in without having to enter the password if you have your login on the server.

  6. #6
    Join Date
    Aug 2003
    Posts
    328
    I am getting an error that says it doesn't exist or access denied.

  7. #7
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    -S your_server_name -E

  8. #8
    Join Date
    Aug 2003
    Posts
    328
    Everything worked. Thank you very much for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •