This statement fails in my app:
BULK INSERT [CASOPSA_TB042_INSTELLING_WERKGEVER] FROM
'D:\Temp\Xtb042_instelling_werkgever.TXT'
WITH (CODEPAGE = 'RAW',
DATAFILETYPE = 'char',
TABLOCK,
FIELDTERMINATOR = '\t',
ROWTERMINATOR = '\0',
MAXERRORS = 0)
with
Invalid object name 'CASOPSA_TB042_INSTELLING_WERKGEVER'
The app is logged in to the database as user DTA6User. DTA6User has access
to the database with roles 'public' and 'db_owner', he also has the server
role 'Bulk insert admin'.
The table was created from the same program logged in to the database as
DTA6User.
The code fails for all tables in the DB that were created this way.
In EM this user is listed as the Owner of all the tables.
The code also fails when run from QA, and there it makes no difference if I
am logged in as 'sa' or 'DTA6User'.
If I log in to QA as 'sa' and execute
EXEC sp_changeobjectowner
'dta6user. casopsa_tb042_instelling_werkgever','dbo
'
I *can* do the bulk insert in QA when logged in as 'sa', but not when logged
in as DTA6User.
The database originally came from a backup from another database, with other
logins. The DTA6User was created and assigned to the database after the
database restore. I notice that older tables that have not been created from
my program *can* be bulk inserted into from my app. These are listed in EM
as having owner 'dbo'.
(I essentially cloned both the program and the database to develop the next
version).
This has me all pretty
What can I do to solve this?
I recently upgraded SQL Server 2000 from no SP's to SP4.
Thanks in advance for any tips
JanJan Doggen,
Did you try qualifying the object with the owner?
BULK INSERT [DTA6User].[CASOPSA_TB042_INSTELLING_WERKGEVER] FROM
...
AMB
"Jan Doggen" wrote:
> Hello,
> This statement fails in my app:
> BULK INSERT [CASOPSA_TB042_INSTELLING_WERKGEVER] FROM
> 'D:\Temp\Xtb042_instelling_werkgever.TXT'
> WITH (CODEPAGE = 'RAW',
> DATAFILETYPE = 'char',
> TABLOCK,
> FIELDTERMINATOR = '\t',
> ROWTERMINATOR = '\0',
> MAXERRORS = 0)
> with
> Invalid object name 'CASOPSA_TB042_INSTELLING_WERKGEVER'
> The app is logged in to the database as user DTA6User. DTA6User has access
> to the database with roles 'public' and 'db_owner', he also has the server
> role 'Bulk insert admin'.
> The table was created from the same program logged in to the database as
> DTA6User.
> The code fails for all tables in the DB that were created this way.
> In EM this user is listed as the Owner of all the tables.
> The code also fails when run from QA, and there it makes no difference if
I
> am logged in as 'sa' or 'DTA6User'.
> If I log in to QA as 'sa' and execute
> EXEC sp_changeobjectowner
> 'dta6user. casopsa_tb042_instelling_werkgever','dbo
'
> I *can* do the bulk insert in QA when logged in as 'sa', but not when logg
ed
> in as DTA6User.
> The database originally came from a backup from another database, with oth
er
> logins. The DTA6User was created and assigned to the database after the
> database restore. I notice that older tables that have not been created fr
om
> my program *can* be bulk inserted into from my app. These are listed in EM
> as having owner 'dbo'.
> (I essentially cloned both the program and the database to develop the nex
t
> version).
> This has me all pretty
> What can I do to solve this?
> I recently upgraded SQL Server 2000 from no SP's to SP4.
> Thanks in advance for any tips
> Jan
>
>|||Not *that* syntax ;-)
(I tried several)
In the meantime I have read up on when the owner of a table becomes the
login vs. 'dbo'.
I have decided to give DTA6User a sy
fine.
Maybe not the best solution, but I have a delivery date coming...
Thanks for your help in refreshing my meory
jan
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:42601DF8-FBF3-41F4-A8D4-D54B5CCE0DB2@.microsoft.com...
> Jan Doggen,
> Did you try qualifying the object with the owner?
> BULK INSERT [DTA6User].[CASOPSA_TB042_INSTELLING_WERKGEVER] FROM
> ...
>
> AMB
> "Jan Doggen" wrote:
>
access
server
if I
logged
other
from
EM
next
No comments:
Post a Comment