User should have permission to run xp_cmd command.

  • we made a feature that requires run bcp command from database

    server. for that

    Requirement is

    User should have permission to run xp_cmd command. (MSSQl2005)

    but normal user can not run the xp_cmd

    so we gave sysad access resolves the same issue as

    EXEC master..sp_addsrvrolemember @loginame = N'DEMO_NEWTEST', @rolename =

    N'sysadmin'

    but after running the above command the user(customer login) cannnot

    automatically identifies the default schema. So HBM file needs to be changed.

    So our requirment is that normal user can run xp_cmd command without admin role

    How we can do it ?

    (Our server is not in Domain)

  • Add the user in master database and grant execute on xp_cmdshell and try.

    If still U R not able to use xp_cmdshell then add windows account (If U R not in domain, then local windows account on the system) which has rights to run xp_cmdshell using sp_xp_cmdshell_proxy_account & then give a try.

  • Can you explain mi in detail how to add user in master account ?

    As my serve is not in doamin

  • As U R not in domain, I think U R using SQL Logins. So first create SQL logins using Management Studio or Create login.....

    Then using either Create user or thru SSMS U can create user in Master similar to other databases.

    (For exact syntax, refer to BOL)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply