Greetings Gurus!
I'm having difficulties inserting data into a DB2 database from a SQL Server
linked server.
I can run the following query from SQL Server's query analyzer correctly:
select col1, col2, col3, col4 from OPENQUERY(MyDB2, 'SELECT col1, col2,
col3, col4 FROM Finlib.KRNLABOUR')
but this fails:
INSERT OPENQUERY(MyDB2,
'SELECT col1, col2, col3, col4 FROM Finlib.KRNLABOUR') VALUES(451,
'99','96','97')
with the error message:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [IBM][iSeries Access ODBC Driver][DB2
UDB]SQL7008 - KRNLABOUR in FINLIB not valid for operation.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
returned 0x80004005: ].
I have set the Immediate commit = *NONE on the ODBC side of things.
Journaling is not turmed on.
At this point I am unsure if my problem lies on the SQL Server or DB2 side
of things?
Any and all pointers would be greatly appreciated!
cheers,
Norm
Larry - 21 Dec 2005 23:20 GMT
> Greetings Gurus!
>
[quoted text clipped - 31 lines]
> cheers,
> Norm
Sounds like a question for Microsoft or someone on a SQL Server
newsgroup ... since the msg is coming from SQL Server/OLE DB.
Larry Edelstein
Cold Canuck - 22 Dec 2005 15:24 GMT
> Sounds like a question for Microsoft or someone on a SQL Server newsgroup
> ... since the msg is coming from SQL Server/OLE DB.
Thanks Larry!
Yeah, I wasn't sure on which system to concentrate on.
Thanks!
Have a Jolly Holly!
Norm
email.sathish@gmail.com - 28 Dec 2005 16:01 GMT
was the ms-sql linked server created as read data only ?
Does the user have the insert privilege on the iSeries ?
hth...