It can be created under Sybase users and named Bcpoutdata.
Then chmod a+x bcpoutdata
Run Bcpoutdata under the Sybase user.
Note:
1) Change the database_name to your database name.
2 Change the PAS to your sa password.
3 Change the server to your SQL Server name.
4 to import, change out to in.
And finally, don't forget to create a directory under Sybase users,
Put the bcpoutdata into it and run it again.
What, what? You have to pack and compress.
Ah, in the back add a few:
Tar cvf Data.tar *.bcp
Compress Data.tar
RM *.bcp
Good luck to all of you.
isql -Usa -Ppas -Sserver -otables.tmp <<-EOF
USE database_name
GO
SELECT name FROM sysobjects WHERE type='U' ORDER BY name
GO
exit
EOF
vi tables.tmp </dev/null
:1,2 d
:$ d
:1,$ <<<
: x
EOF
total=`cat tables.tmp|wc -l`
current=0
for table in `cat tables.tmp`
do
current=$current+1
echo "*** $current/$total bcpout $table ***"
bcp database_name..$table out $table.bcp -Usa -Ppas -Sserver -Jiso_1 -c
echo "*** $table done ***n"
done
rm tables.tmp