Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access rights for SELECT INTO query

Status
Not open for further replies.

Zukkster

Technical User
Mar 18, 2002
61
GB
I'm trying to run a SELECT INTO query and I get the following error:

"Cannot run SELECT INTO in this database. The database owner must run sp_dboption to enable this option."

I've tried going to query analyzer and running

Grant select, update, insert on reporter to dbo

but this doesn't fix the problem. Can anyone help please.

Thanks in advance
 
You need to do what the error message tells you to do....run sp_dboption. Your database is not set to allow SELECT INTO/BULKCOPY.


Refer to the BOL, use the Index Tab and enter sp_dboption then choose the Transact-SQL entry.

Basically you need to run this...

USE MASTER
GO
EXEC SP_DBOPTION 'yourdbname', 'SELECT INTO/BULKCOPY', 'TRUE'

-SQLBill
 
Thanks Bill.

I just couldn't find any reference to the sp_dboption in the help. I eventually found the command on the microsoft site about 10 minutes before you posted and 15 minutes before I started banging my head against the desk.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top