The easiest thing is to just call Sybase's bcp utility from your perl code. It's pretty simple to build the bcp command line based on the table names and then run it... It will also be the fastest solution.
Alternatively, as a bcp OUT operation is really just a select you could just do a simple select in any Sybase perl module (DBI/DBD::Sybase, Sybase::CTlib, etc) and write the results to a text file with the appropriate column separators (by default a TAB character).
Michael
| [reply] |
Hi Michael,
Calling the Sybase's bcp utility is definitely an option I am inclined to take currently. Thanks for the suggestion; I will go by it :)
From what I have seen select queries are way slower than bcp and I have quite a few large tables to take dumps from. So this might not be a good idea.
Regards,
Ranjan
| [reply] |
superdoc,
I'm constantly using the 'FreeTDS Sybase' drivers to get stuff done. I don't know if you're on a linux box, if you are, and you're trying to connect to MSSQL boxes or native Sybase stuff, check this article out:
Getting Sybase/MSSQL Databases working with Perl DBI
In essence you get the FreeTDS stuff rocking, setup some aliases for your DB servers in a config file, and then use normal DBI to get stuff done.
Hope this helps.
Kurt
| [reply] |
| [reply] |