How to Write automatic trigger on a specified time in sql server 2005 Express

  • hii

    I need a trigger query which fired automatically after a specific time interval.

    please help me!

  • That will not be called a "trigger"!

    You need to look into SQL Server Agent. You can create SQL Job which can be scheduled to run with requested frequency...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • thanks a lot for giving valuable suggestion

    could you please explain me procedure to do such job?

    thanks again !

  • You write a query you want (or you can wrap it into stored proc), then,

    using SQL Server Management Studio, you can create a job in SQL Server Agent, which will execute your query or call you stored proc. Schedule it too run at the required time/interval.

    Creation of job can be scripted...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • don't forget that the Express edition does not include the SQL Agent;

    you should spend the $49 dolalrs and get the Developer Edition, which includes the SQL Agentand so much more.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply