June 3rd, 2005

Sybase ASE 12.5 error message about ’select into’ option needing to be enabled

Sybase (ASE 12.5) error message I was getting when trying to modify a column’s metadata/attributes:
The ’select into’ database option is not enabled for database ‘myDbName’. ALTER TABLE with data copy cannot be done.
Set the ’select into’ database option and re-run.

Solution that worked for me (including the column-altering command in the middle):

USE master;
EXEC sp_dboption “myDbName”,”select into/bulkcopy”,true;
COMMIT;
USE myDbName;
ALTER TABLE myTableName
MODIFY myColumnName varchar(60) NOT NULL;
USE master;
EXEC sp_dboption “myDbName”,”select into/bulkcopy”,false;
COMMIT;

References:

Ed Barlow’s “fix_db.pl” script, which I happened to find the solution in when grepping my local machine.
http://www.edbarlow.com/document/utilities/readme.htm This page, where I stumbled across the solution eventually, as one of many google search results. I had result pages open in several windows, and was looking through them when I noticed the grep results.
http://www.devx.com/vb2themax/Tip/18583

One Response to “Sybase ASE 12.5 error message about ’select into’ option needing to be enabled”

  1. Anonymous Says:

    Thanks!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>