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
 Transact-SQL (2005)
 maintanece paln

Author  Topic 

yadhu_cse
Constraint Violating Yak Guru

252 Posts

Posted - 2011-05-13 : 06:39:45
Hi,

how t create folder on daily basis to store backup file using maintanace plan.

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-05-13 : 16:42:11
You can create the directory using OS level commands. You access the OS commands by executing xp_cmdshell. See BOL for details. Remember, though, that xp_cmdshell is disabled by default so you'll need to enable it.
Oh, and don't use the built in Maintenance Plan capability. Create your own SQL Job(s) and write your own custom code (or just borrow some examples from the interwebs and modify to your liking).

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)
Go to Top of Page
   

- Advertisement -