Results 1 to 2 of 2

Thread: BCP usage

  1. #1
    Luciano Jesus Guest

    BCP usage

    Hi .... I'd like to know if I can use BCP to transfer the whole database to a device or file and then back to the server(I mean,using only one server) with a new char set/sort order configuration,or I have to do it table by table??? How do I use BCP to perform this task?What commands and parameters should I use???

    Thanks for your attention,
    Luciano

  2. #2
    Dan Wardle Guest

    BCP usage (reply)

    If you don't have a second server to use transfer manager to do this BCP will move your data into a different code page, but you can only do it on a by table process. Quickest method is write a batch file and just modify each line by the table name and file name you're using.

    I've used bcp between codepage 850 and the ISO default. Try

    rem Export data
    bcp database..table out filename.txt -Uuser -Ppassword -Sserver -c
    rem import data
    bcp database..table in filename.txt -Uuser -Ppassword -Sserver -c

    Try this on small data first and check whether extended characters are appearing correctly. If they do not it's adjusted by SQL Client Config - OEM to ANSI should be turned on or off, depending on the code page you're importing to or from (note - it might be necessary to import with OEM off and then turn it on when using ISQL_W).

    Good luck
    Dan

Posting Permissions

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