Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    3

    Unanswered: Bulk Copy Program

    Hi Techies,

    I have a bcp which generates .txt file perfectly. I just wanted to know how can i generate a text file in distributed environment.

    Assuming that my Sql Server is running in machine A. I wanted the bcp to generate in Machine B. What are the permission's i should give in order to generate it in Machine B.


    Regards
    --Tanveer

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    the user who executes the bcp-command would need write access. read access is usually handy to validate the file has been written but I don't think its required. In case machine B only has a filesystem, that user obviously needs filesystem write access. In case machine B is a sqlserver that user would need write access on the table the file is insert into.

  3. #3
    Join Date
    Jun 2004
    Posts
    3
    Thanks for the reply... I guess i have not mentioned that the above program would be executed through stored procedure. In this scenario what are the permission i should give and to which users.

    --Tanveer

  4. #4
    Join Date
    Feb 2004
    Posts
    492
    Assuming bcp and the copy is executed using xp_cmdshell, the user is the user configured to run sqlserver (exec master..xp_cmdshell 'set'). If it's local user (only known to the server) you'll find it difficult to do the windows-copy. If it's a domain user it'll be easier to grant the write access. Do you have difficulty creating the .txt file using the stored procedure?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •