• Hi OldHand

    1) do i have to activate in the Surface area configuration the xp_cmdshell to use your procedure?

    No. Thats not required.

    2) Where do you stored this stored procedure? In the MSDB or in the Master Database?

    I always create a DBA/Management database on my SQL servers to hold these type of stored procs/functions/tables/logging/performance info/service broker queues...etc. Personally, I try to avoid adding customisations to any of the system databases, although I'm aware this is commonly done.

    Cheers