Solved

Generating a Format File in Sybase ASE BCP

Posted on 2013-10-22
1
1,243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 500 total points
ID: 39593423
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read  the original post  on Monitis Blog. Hi.  My name is Erik Dietrich, and this is the first time I’ve posted on the Monitis blog.  By way of introduction, I thought it would make sense to talk about my initial experience with Monitis.   Befo…
Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime is disastrous for companies and can lead to major hits on a brand, reputation, an…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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