Home All Groups Group Topic Archive Search About

Option to delete a file

Author
7 Aug 2006 11:24 AM
Prasad
Hi,
    Is there a way to delete the trace files on the sql server without using
xp_cmdshell. Since, xp_cmdshell can be disabled in SQL Server 2005 I dont
want to go with this option.
    This option should work on both 2000 as well as 2005 :)
    Any other suggestions ?
    TIA

Thanks
Prasad

Author
7 Aug 2006 12:20 PM
Hari Prasad
Hi,

Instead of using XP_Cmdshell write a .BAT file with DEL command to delete
the trace files. You could schedule
it using SQL Server Agent scheduler.

Thanks
Hari
SQL Server MVP


Show quote
"Prasad" <ekke_nik***@yahoo.co.uk> wrote in message
news:%23JkaGQhuGHA.452@TK2MSFTNGP05.phx.gbl...
> Hi,
>    Is there a way to delete the trace files on the sql server without
> using
> xp_cmdshell. Since, xp_cmdshell can be disabled in SQL Server 2005 I dont
> want to go with this option.
>    This option should work on both 2000 as well as 2005 :)
>    Any other suggestions ?
>    TIA
>
> Thanks
> Prasad
>
>

AddThis Social Bookmark Button