Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 High Availability (2005)
 Store Procd help

Author  Topic 

h2sut
Starting Member

40 Posts

Posted - 2007-12-20 : 23:37:41
this stored proc (sp) should first backup the table if it doesn't exist and then delete all but the most recent 3.

take the number of backups (3) as a parameter to the sp and the database name as a parameter to the sp

that means it will need to build the sql dynamically and use the sp_executesql

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-20 : 23:39:05
Duplicate post http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94580.

please do not cross post.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -