wayne_sui
asked on
Sybase error: can't run SELECT INTO in this database. how to grant?
one of the failed sql statement:
select TIMESTAMP,M_IDENTITY = identity(9), M_GROUP, M_SINGLE1, M_SINGLE2, M_SET1, M_SET2, M_ALL1, M_ALL2, M_DEFAULT1, M_DEFAULT2, M_PASSWORD1, M_PASSWORD2, convert(char(255) not null, M_TRN_FLT) as M_TRN_FLT, convert(char(255) not null, M_MOP_FLT) as M_MOP_FLT, M_DFLT_CONF into TRN_VALC_NEW lock datarows from TRN_VALC_DBF
system error message: can't run SELECT INTO in this database. please check with database owner. (may not the exact sybase error message, as it is customized by our company system).
my question is how to grant "Select into" right in the database?
thanks in advance.
select TIMESTAMP,M_IDENTITY = identity(9), M_GROUP, M_SINGLE1, M_SINGLE2, M_SET1, M_SET2, M_ALL1, M_ALL2, M_DEFAULT1, M_DEFAULT2, M_PASSWORD1, M_PASSWORD2, convert(char(255) not null, M_TRN_FLT) as M_TRN_FLT, convert(char(255) not null, M_MOP_FLT) as M_MOP_FLT, M_DFLT_CONF into TRN_VALC_NEW lock datarows from TRN_VALC_DBF
system error message: can't run SELECT INTO in this database. please check with database owner. (may not the exact sybase error message, as it is customized by our company system).
my question is how to grant "Select into" right in the database?
thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, shealey~~ your script just solves the problem.
but I did sp_dboption before I ran the script. the 'select into/bulkcopy/pllsort' option is there. but for some reason it is not working. anyway, i ran your script and i works!
thanks to angel also~~
but I did sp_dboption before I ran the script. the 'select into/bulkcopy/pllsort' option is there. but for some reason it is not working. anyway, i ran your script and i works!
thanks to angel also~~
Possibly you didn't 'checkpoint' the database after applying the option ... ?
Sean.
Sean.
the database is probably in full recovery mode, change it to bulk-logged to enable the SELECT INTO.
alternative: create the table explicitely before doing INSERT INTO instead of SELECT INTO