• What is the account by which you have logged in?

    Most likely you account is not a member of sysadmin role, then the SQL Server 2005 will use the proxy account to run the OS command which command called by xp_cmdshell. You omer must to create a credential first and mapping a window account using this command:

    EXEC sp_xp_cmdshell_proxy_account ‘proxy account’ ,’password’