Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: larsenc at pathfinder dot com (Cliff Larsen (Pathfinder))
Subject: Re[2]: bcp parameters
Date: Sep 19 1997 8:22PM

Thanks Michael.

I'll make use of your advice.


Michael Peppler  wrote on Fri, 19 Sep 1997 10:52:45 -0700:
> Cliff Larsen (Pathfinder) wrote:
> > 
> > I am working on a script to perform bulk copy operations
> > in/out of database tables.
> > 
> > As part of my bcp script, I'd like to utilize the bcp parameters
> > "-E" (explicitly specify identity column values) and "-A" (packet size).
> > I haven't found any information on the use of bcp parameters in the
> > Sybperl man pages or the Open Client DB-Library/C Reference Manual.
> > 
> > Does the Sybperl BCP library allow for the use of bcp parameters?
> > If so, how?
> I looked around in sybooks, and it seems that the -E flag can only
> be set with a language call.
> So you need to do something like
> $dbh->sql("set identity_insert off");
> before you run your bcp operation.
> For the packet size this can be set via DBSETLPACKET():
> DBSETLPACKET($packet_size);
> This must be called before you call new Syabse::BCP or new Sybase::DBlib
> Michael
> -- 
> Michael Peppler       -||-  Data Migrations Inc.
>  -||-

| Cliff Larsen                |   Systems Administrator     |
|            |   Time Inc., New Media      |
"I hate it when my foot falls asleep during the day cause that means
it's going to be up all night."
		-- Steven Wright