Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do you use bcp to move tables/data from SQLAnywhere to Sybase 11?

188 views
Skip to first unread message

kunsha

unread,
Feb 2, 1998, 3:00:00 AM2/2/98
to

We have a bunch of tables in SQLAnywhere database on
an NT machine. We are migrating to Sybase 11 server
running on a SUN machine. Pipelining from PowerBuilder
does seem to work but has turned out to be too slow for us.

Also, let me know if you know any other mechanism which
can be used to do this.


Any help on this is greatly appreciated.

Thanks
John.


Tom Iarusso

unread,
Feb 4, 1998, 3:00:00 AM2/4/98
to kunsha

In SQL Anywhere, you need to issue an OUTPut on the table you want to
bcp into System 11

SELECT * FROM tablename ;
OUTPUT TO filename
FORMAT ASCII
QUOTE 'unique character'

SQL Anywhere requires all strings to be enclosed by the quote string.
Use some unique character that you can remove in and editor before
bcping the file into System 11.

If your data includes commas, you'll need to also specify a column
delimiter with DELIMITED BY string. Make sure your bcp format file uses
the same delimiter string.

Good luck.

Bruce Milner

unread,
Feb 9, 1998, 3:00:00 AM2/9/98
to

1. In SQL Anywhere unload your tables as follows:

unload table umwa.user_info to '\data\@tounix\@userinf.dat'
delimited by '\x09' quotes off;

2. FTP the table to the SUN

3. on the sun, BCP the data into the table

bcp adumwa.dbo.user_info in @USERINF.DAT -e @USERINF.ERR -E -c -Uumwa
-Psysadm

In this Example, there is an autoincrement field in SQL Anywhere that
is moved to an identity filed in Sybase 11 (-E in BCP)

0 new messages