move the files

  • charipg (8/13/2009)


    i am new to sql..........first time i am using extended sp.............

    thanks.............

    That's not really an answer to the question I asked. Here is it again in case you have forgotten it:

    RBarryYoung (8/13/2009)


    charipg (8/13/2009)


    in server1 , file is C:\folder1

    i want to copy that file in server2 , file is D:\folder2

    pls give the complete command.

    I'm curious. What is your position in your organization and how is it that you do not know how to copy a file? Please give us complete details.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • sorry for post the qustion...........

    thanks.............

  • charipg (8/13/2009)


    sorry for post the qustion...........

    thanks.............

    You still haven't answered Barry's question.......seems like a simple, valid request - IMO.

    -- You can't be late until you show up.

  • Don't apologize for asking a question. It would be nice, however, if you'd answer the questions asked of you. It would actually help us help you better.

  • charipg (8/13/2009)


    i want to copy through xp_cmdshell ?

    what is the command.............

    Charipg,

    (Teach a man to fish...) There's a whole "language" for DOS/CMD and a full reference to boot. You can get to it by clicking the Windows "Start" button and then click on "Help and Support" from there. Then enter "Command-line reference" (without the quotes) in the search field and click the green arrow to search. The first item returned will be "Command-line reference A-Z". Double click on that and the world of DOS commands will be open to you.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Hi,

    I would like to share one more way to copy huge size files from one server to another without files getting corrupted.Please download the robocopy.zip from the below URL

    http://www.devhood.com/tools/tool_details.aspx?tool_id=321

    Save the robocopy.exe to one of the drive in the server say D:

    Now open cmd

    In cmd goto the location where robocopy.exe is located

    now type the following command in cmd:

    ROBOCOPY \\sourceserverip\share\path \\destinationserverip\share\path filename

    and than press the enter key the copying of the file will start....:)

  • If you want to copy a file from a Server to another server you can use this command.

    master..xp_cmdshell 'xcopy G:\SMSDTH2003_Diff_backup\SMSDTH2003_Diff_backup_latest\DIFF_Backup.sqb \\172.16.6.249\j$\SMSDTH2003_Diff_backup\SMSDTH2003_Diff_backup_latest\'

    Regards,
    Sarabpreet Singh 😎
    Sarabpreet.com
    SQLChamp.com
    Twitter: @Sarab_SQLGeek

  • But... but... why use TSQL at all? Am I missing something?

    Random Technical Stuff[/url]

  • may be the OP is trying to create some script. I'm doubtful though....



    Pradeep Singh

Viewing 9 posts - 16 through 23 (of 23 total)

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