December 20, 2004 at 10:14 am
/*
If it does not exist, create the directories for backups
*/
set @RegSQL = 'exec master..xp_cmdshell ''if not exist "' + @BackupDir + '" md "' + @BackupDir + '"'''
exec (@RegSQL)
December 20, 2004 at 10:33 am
From BOL:
When xp_cmdshell is invoked by a user who is a member of the sysadmin fixed server role, xp_cmdshell will be executed under the security context in which the SQL Server service is running. When the user is not a member of the sysadmin group, xp_cmdshell will impersonate the SQL Server Agent proxy account, which is specified using xp_sqlagent_proxy_account. If the proxy account is not available, xp_cmdshell will fail. This is true only for Microsoft® Windows NT® 4.0 and Windows 2000. On Windows 9.x, there is no impersonation and xp_cmdshell is always executed under the security context of the Windows 9.x user who started SQL Server.
Enjoy
Quand on parle du loup, on en voit la queue
December 20, 2004 at 1:50 pm
March 22, 2006 at 1:52 pm
Have this problem solved?
March 22, 2006 at 3:41 pm
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply