December 1, 2005 at 7:09 am
Hello,
I am trying to do this and i am getting this error..
create table #temptbl (rec varchar(284))
BULK INSERT #temptbl FROM 'z:\Testline.txt'
WITH ( DATAFILETYPE = 'char',
FIELDTERMINATOR = '\r\n',
CODEPAGE = 'RAW',
MAXERRORS = 10000,
FIRSTROW = 2)
Server: Msg 8104, Level 16, State 2, Line 3
The current user is not the database or object owner of table '#timberline'. Cannot perform SET operation.
User has BulkAdmin rights and he is a dbo in the database.
Pls advise.
Thanks,
December 1, 2005 at 7:29 am
If you use a permanent table instead of temp table - do u get the same error? Did u try using the sa login to perform the same operation - does that also generate the same error?
-Gary
December 1, 2005 at 7:30 am
Please also have a look at the article: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q302621
December 1, 2005 at 7:33 am
The issue is that you are trying to insert into a temp table which resides in the tempdb database and since your account does not have the insert priv. and since it is not a database owner for tempdb, you will get this error. Since "sysadmin" privs. are unlikely to be given to your login account, you can either:
a) Use a permanent table in your user database.
b) Have a startup procedure that always assigns the login as a dbo for tempdb as well (this may not be acceptable to your DBA). That way, whenever the instance is re-started, the privs. will be in place to be able to do the insert into the temp table in tempdb database.
December 1, 2005 at 8:46 am
Rsharma,
Thanks Very Much.It worked.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply