Solved

Generating a Format File in Sybase ASE BCP

Posted on 2013-10-22
1
1,304 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

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

690 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