We can use below command for bcp out a table to *.dat file,
$SYB_BIN/bcp hnwreport.dbo.TblHNWCustomer out ${SYB_DATA}/${TABLE}.prod.dat -I/opt/muni/HNWEnv/HNW_interfaces.txt -U hnwuser -P Lip0v123 -S STEP_PROD_NY_DS –t’|’ -b 10000 -e${ERRFILE} -T –c
Please be vigilant that if you want to use self-defined interface file rather than default system interface, you have to use –I option and define interface file in place.
If you want to use bcp utility, you can export Sybase,
export SYBASE=/optware/aseclient1503x/ase155b/
$SYBASE/OCS-15_0/bin/bcp hnwreport.dbo.TblHNWCustomer out /opt/HNW/HNWFileAnalysis/HNWOutput/TEST.dat -I/opt/muni/HNWEnv/HNW_interfaces.txt -U hnwuser -P Lip0v123 -S STEP_PROD_NY_DS -t'|' -b 10000 -e${ERRFILE} -T –c
$SYBASE/OCS-15_0/bin/isql -I/opt/muni/HNWEnv/HNW_interfaces.txt -U hnwuser -P Lip0v123 -S STEP_PROD_NY_DS < /tmp/test.sql
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。