February 2, 2007 at 2:38 am
Hi alll
I have created a remote linked server and I am trying to insert into remote database from query analyzer connected to my local database server.
I am getting the below error..
Server: Msg 7344, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' could not INSERT INTO table '[MUSSORI].[pubs].[dbo].[jobs]' because of column 'job_id'. The user did not have permission to write to the column.
[OLE/DB provider returned message: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' IRowsetChange::InsertRow returned 0x80040e21: Data status sent to the provider: [COLUMN_NAME=job_id STATUS=DBSTATUS_S_OK], [COLUMN_NAME=job_desc STATUS=DBSTATUS_S_OK], [COLUMN_NAME=min_lvl STATUS=DBSTATUS_S_OK], [COLUMN_NAME=max_lvl STATUS=DBSTATUS_S_OK]. Data status returned from the provider: [COLUMN_NAME=job_id STATUS=DBSTATUS_E_PERMISSIONDENI...
Can anybody help inthis regard.....
Thank you
Shekhar
February 2, 2007 at 5:21 am
the error clearly indicates that it is a permissions issue.
Check if the account that you are using to connect to the remote server has and INSERT permission on the table that you are inserting.
February 2, 2007 at 5:57 am
OLE DB provider 'SQLOLEDB' could not INSERT INTO table '[MUSSORI].[pubs].[dbo].[jobs]' because of column 'job_id'. The user did not have permission to write to the column.
Just check the permission that the user has for the column job_id and also for the table job. The error states that the user does not have proper permissions.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
February 2, 2007 at 9:54 pm
I have created a linked server with following credentials...
the following is the output from sp_helpLinkedSrvLogin
Linked server, Local Login, Is Self Mapping, Remote Login
MUS , sa , 0 , sa
i am using the user SA to connect to local server & specified SA to connect to remote server.
even then also I am getting the same error.
Thank You
Shekhar
February 5, 2007 at 8:02 am
Hello,
In my version of the [pubs] database, the job_id column has the identity property set. That may be the cause of the insert problem.
jg
February 5, 2007 at 9:09 am
Hi There Shekhar,
You need to use this syntax in order to insert into dbo.jobs
SET IDENTITY_INSERT [dbo].[jobs] ON
---Your insert sql...
SET IDENTITY_INSERT [dbo].[jobs] OFF
In most cases, [dbo].[jobs] uses [job_id] as the Primary Key and Identity Column.
Regards,
Meng
MCTS
February 5, 2007 at 9:05 pm
February 13, 2007 at 5:10 pm
INSERT MYSQL2000.PC.dbo.vwProfileUserExternalID
(
ProfileID,
ApplicationUserID,
ExternalSystemID,
ExternalSystemCode,
ExternalSystemUserID,
CreatedBy,
CreationDate
)
SELECT
P2.VALU2 as ProfileID,
NULL,
NULL,
'D2D',
P2.ACNO2,
'D2DXfer',
getdate()
FROM dbo.PRMG002 P2
WHERE
P2.NUTP2 = 'PROFILEMGR'
and ACNO2 = '68072742'
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' IRowsetChange::InsertRow returned 0x80040e21: Data status sent to the provider: [COLUMN_NAME=ProfileID STATUS=DBSTATUS_S_OK], [COLUMN_NAME=ApplicationUserID STATUS=DBSTATUS_S_ISNULL], [COLUMN_NAME=ExternalSystemID STATUS=DBSTATUS_S_ISNULL], [COLUMN_NAME=ExternalSystemCode STATUS=DBSTATUS_S_OK], [COLUMN_NAME=ExternalSystemUserID STATUS=DBSTATUS_S_...
OLE DB provider 'SQLOLEDB' could not INSERT INTO table '[MYSQL2000].[PC].[dbo].[vwProfileUserExternalID]' because of column 'ProfileID'. The user did not have permission to write to the column.
February 13, 2007 at 7:20 pm
Is the ProfileID column an IDENTITY column or not?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 14, 2007 at 8:06 am
February 14, 2007 at 9:43 am
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply