Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / December 2005

Tip: Looking for answers? Try searching our database.

insert into DB2 from SQL Server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cold Canuck - 21 Dec 2005 22:21 GMT
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...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.