Friday, March 20, 2009

Setting select into/bulkcopy option in Sybase

Oh, how often Sybase makes me like mad. Why should I turn options on or off just to make an ordinal action like adding column which can not be NULL? Here is a snippet that helps to deal with those 'select into/bulkcopy option is disabled' errors. Not sure somebody does not know it yet, Rather I want to be sure I will not forget it before we migrate to Oracle.
USE master;
EXEC sp_dboption mydb,'select into/bulkcopy/pllsort',true;
USE mydb;
-- ALTER TABLE goes here
USE master;
EXEC sp_dboption mydb,'select into/bulkcopy/pllsort',false;

mydb is a database name, should be properly selected.

No comments:

Post a Comment