Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Location
    Norway
    Posts
    7

    Question Unanswered: Query Analyzer (Scripts)

    I have saved a set of commands that I've typed into Query Analyzer.

    Is there any way I can make a shedule that runs these set of commands?

  2. #2
    Join Date
    Oct 2003
    Posts
    11

    Cool

    Hi,
    I'm not sure what you're looking for but try to create a stored proc with these commands and schedule them with SQL Agent/Jobs.

    Good luck..
    Tsz

  3. #3
    Join Date
    May 2003
    Posts
    60
    This is if your using the client tools for SQL 2000 although they are very similiar in SQL 7.0

    You need to create a scheduled job in Enterprise Manager. Make sure you have the appropriate Server permissions to accomplish this task.

    Using Enterprise Manager go and open the Management Folder under the Server name. Check to see if SQL Server Agent is running. SOME THINGS TO CHECK - If not right click and choose properties and go to the General Tab. Check to see if the "Service startup account" is using the "This account" option w/ a valid domain account with Admin permissions. When done click OK. Right click again on the SQL Server Agent and check to see if it is running - the start option should be dimmed out. If its not running start it, also you should see a green arrow as part of the SQL Server agent icon in EM if it is running. NOTE: SQL Server Agent must be running to execute scheduled jobs

    Expand out SQL Server Agent, find the Jobs icon and right click on it and then pick "New Job." On the General tab give a name to the job. Go to the Steps tab and click on the button at the bottom called New. Give the step a name. Then copy and paste your code to the command window. Click OK. Go to the Schedules tab and click on "New Schedule" button. Give the schedule a name and choose one of the scheduling option and click OK, click OK again and your done.

    Best regards

  4. #4
    Join Date
    Oct 2003
    Location
    Norway
    Posts
    7
    Thank you, both of you.

    Sorry for not giving enough info:

    It is MSSQL 2000 and I already have several jobs (and therefor SQLAGENT is running).

    I will try to add these commands, as steps. Thanks again.

Posting Permissions

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