Solved

Generating a Format File in Sybase ASE BCP

Posted on 2013-10-22
1
1,111 Views
Last Modified: 2013-10-23
I cannot figure out for the life of my how to generate a format file in a batch file in sybase. I use the following to create my bcp of data file:

bcp mytester.dbo.XTABLE out XTABLE.bcp -U sa -P mypass -T -n

I would think I could do like in sql server:

bcp mytester.dbo.XTABLE format XTABLE.bcp -U sa -P mypass -T -n
or
bcp mytester.dbo.XTABLE out XTABLE.bcp -U sa -P mypass -T -n  -f XTABLE.fmt

but it doesnt seem to work. it seems the only way to do it is in the mode when it prompts me for all details, which is unacceptable for waht I want to do (many tables in a BAT file).

Anyone know how to pull this off?
0
Comment
Question by:Jay Redd
1 Comment
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 500 total points
Comment Utility
That is how it works, sadly. If you want bcp to generate a format file for you, it does so interactively.

However the format file has a well documented structure and there's nothing stopping you from writing your own, programatically, in a batch file or script.

See the Utility Guide for ASE of your version, available for free from the Sybase site.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now