470,571 Members | 2,310 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,571 developers. It's quick & easy.

Reguarly back up tables

code green
1,726 Expert 1GB
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
Nov 4 '08 #1
1 972
2,878 Expert 2GB
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
Nov 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Andy Hall | last post: by
2 posts views Thread by Jeff Pritchard | last post: by
4 posts views Thread by Tempy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.