Creating a RSS XML feed using a trigger in SQL 2000

  • Hi,

    I want to create an RSS XML feed based on information in one or more of my db tables. I have read the tutorial on creating the RSS feed - http://www.sqlservercentral.com/articles/XML/63043/ - which I am sure I can modify to retrieve the correct information and create the corresponding RSS.

    However I want the results to be written to a file, and the recreation of the file triggered when the source table is updated.

    Can anyone explain how to do this, using the tutorial as the starting point.

    Thanks.

  • A few things.

    first, writing to the file system, sending emails, etc. in a trigger is a bad idea. If there's an issue, or it's slow, it delays or confuses the clients. This is inside the update of the transaction.

    Instead, if the table is updated, mark the row somehow (or insert into another table) a marker that says this needs to be rebuilt.

    Once that's done, have a job that runs once every 5 minutes, hour, whatever, and updates the RSS feed using that code.

    I'd run this from SQL Agent, have the job call SQLCMD and then call that proc, piping the output to a file with the "|" or ">"

  • I never thought about anything like this before.

    Is there a way a query batch can trigger a process in another thread of the server? Ie - rebuild an rss feed without hanging up the client or using a job that runs every 5 minutes?

    ---
    Dlongnecker

  • I would imagine that's possible through CLR programming. Wouldn't even know where to start, but I would imagine it's possible.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

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

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