Reguarly back up tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    Reguarly back up tables

    About twice a day for a few weeks I need to back up 2-3 tables, maybe more.
    1 table of 45000 and two of 18000 records.

    It needs to be automated with the facility to run manually,

    I could write the data to a CSV file or even to a MySql database.
    But I am sure a Stored Procedure run from a SQL Job would be more efficient.

    I can create the job in Enterprise Manager but cannot write the stored procedure for this task.

    Any help or examples would be appreciated
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Create a stored proc that will BCP out your table to a CSV. Just build your query dynamically. Of course, you have to check if the file is existing and all those.

    Then create a scheduled job calling your SP.

    -- CK

    Comment

    Working...