Results 1 to 10 of 10

Thread: bcp

  1. #1
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322

    Unanswered: bcp

    Can anyone see the problem with this syntax? Also, the original server name was like -S"DEV_UVTS"...how is that name set up?

    C:\Sybase\OCS-12_5\bin\bcp.exe "MMRS_INST.dbo.cloned_with" out "C:\MMRS\dev_mmrs_inst\dbo.cloned_with.DAT" -e"C:\MMRS\dev_mmrs_inst\dbo.cloned_with.ERR" -S"DEV_UVTS" -U"X002548" -P"xxx" -f"C:\MMRS\dev_mmrs_inst\dbo.cloned_with.FMT" -b1000 -c -t|
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Sybase Server names are set up in a configuration file somewhere in the client folders. On Windows, you need to look for an INI file. It has been a while, but I think it is sql.ini. There is also a utility to modify the INI file for you. I think it was called DSEdit.exe. This is based on knowledge of a Sybase 12.0 that we retired a couple years ago. Good luck.

  3. #3
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    Brett
    What's the error you're getting?
    Does the | symbol need to be escaped?

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Yeah got the ini file...just wonder if it's in the correct path...left it where I found it

    Yes, the pipe needs to be "escaped"...the double quotes around it work well

    I have some contacts here....not very cooperative contacts...they are losing their sybase to sql migrations....but I have some contacts

    They exclusively use dbartisan though, so they don't look under the hood....and I wonder what they really know....

    In any case....a pipe delimiter didn't work either....they gave use data files...but we find pipe, tilda, and (their original unload) commas in the data...so rows fall out on bcp in...I want to go with a delimiter of "|~|"

    I tested it on the sql side and works fine...now I just need to do it on the bcp out of sybase

    btw...just to be clear...sybase bcp and sql sevrer bcp ARE different, are they not? I did load sybase "client tools" (or so I was told) but there is no interface is there? I just see config tools for the most part

    Am I missing something

    Thanks for all you help people
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    You still get isql with the Sybase tools. Unfortunately, you may have pathing problems with teh SQL Server isql, so run it from the bin directory under Sybase. You could get one of your contacts to send you a copy of his sql.ini file. Offer him a coffee for it, if you have to. for the good of the business ;-)

  6. #6
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    Perhaps it might help if you just give us the first few lines of the bcp file, the create table syntax and whatever error you're getting. Then we'd have enough info to give you a proper answer

    EDIT: I hope you appreciate the speed of response this time

  7. #7
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by MCrowley
    You still get isql with the Sybase tools. Unfortunately, you may have pathing problems with teh SQL Server isql, so run it from the bin directory under Sybase. You could get one of your contacts to send you a copy of his sql.ini file. Offer him a coffee for it, if you have to. for the good of the business ;-)

    her...offer her coffee...

    Hell she already asked for wine....

    Bee + Yacht
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  8. #8
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    looking at the original command, you have -f and -c -t. If I remember, these are mutually exclusive. Not sure which one takes precedence, though.

    (edit: Tried to post this three times, today, but vBulletin is having trouble getting out of bed.)

  9. #9
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    It's gotta be a generated statement out of artisan

    on a conf call today she said she had no time to teach sybase....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  10. #10
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Quote Originally Posted by Brett Kaiser
    Yeah got the ini file...just wonder if it's in the correct path...left it where I found it
    Use dsedit to edit the settings (using %SYBASE% as sybase home folder)
    Quote Originally Posted by Brett Kaiser
    In any case....a pipe delimiter didn't work either....they gave use data files...but we find pipe, tilda, and (their original unload) commas in the data...so rows fall out on bcp in...I want to go with a delimiter of "|~|"
    if you specify -f for a format file and the -c for character data
    the last one specified take precedence.
    Quote Originally Posted by Brett Kaiser
    I tested it on the sql side and works fine...now I just need to do it on the bcp out of sybase
    ?? just change bcp in to bcp out. What's your error?
    Quote Originally Posted by Brett Kaiser
    btw...just to be clear...sybase bcp and sql sevrer bcp ARE different, are they not?
    Yes the 2 bcp programs are different but the data file created with -c flag can be used by either one. i.e. you can use bcp to transfer data between MS SQL and ASE.
    Quote Originally Posted by Brett Kaiser
    I did load sybase "client tools" (or so I was told) but there is no interface is there? I just see config tools for the most part
    There should be a sql.ini file in the ini sub dir, use dsedit to add entries.

Posting Permissions

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