automatically run a SQL statement quarterly or monthly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joe Farage
    New Member
    • Mar 2011
    • 26

    automatically run a SQL statement quarterly or monthly

    I have a SQL statement that I need to run on my databases quarterly (monthly would work too). It compresses the database and speeds up the searching of it for my company. As of right now, I just have a reminder on my calender to tell me when I need to run it. My question is, is there a way to set it up so that this statement will run automatically?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Depending on what version of SQL Server you're using, you will either setup a DTS package or SSIS package and schedule it.

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      Create a job to call your t-sql.

      Good Luck!!!


      ~~ CK

      Comment

      • Joe Farage
        New Member
        • Mar 2011
        • 26

        #4
        That's the thing. My knowledge of SQL and SQL server is all self taught and mainly is of writing basic statements. I don't know where I even go to create a job. I'm a beginner self-taught SQL server user.

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #5
          When you log in through SSMS, if you have the permissions, there should be a folder near the bottom of the object list called SQL Server Agent. If you expand that, there's a folder called jobs.

          Comment

          Working...