Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert in to DB2 Z/vse via SQL 2005 linked server

Status
Not open for further replies.

okcorral

IS-IT--Management
Mar 25, 2011
2
US
Good day,
Hopefully I'm posting in the right forum. My question is regarding record inserts from MS SQL 2005 via IBM OLE DB linked server. I'm able to select, delete and update records but for some strange reason i cannot insert records via linked server. I can insert them via ODBC just fine.. using same credentials. Of course only thing that I need to do at the moment is insert records :).Here is my query:
INSERT INTO OPENQUERY (TSTESA5, 'SELECT ENTRY_KEY FROM DON1.ETAX_ENTRY') VALUES (7)
very simple.. just add another records and make the Entry_Key 7. Entry_Key is the index..
i get the error that object has no columns or the current user doesn't have permission on that object.
I have tried different approach;
insert OPENQUERY(TSTESA5,'select Entry_Key from DON1.ETAX_ENTRY') values(8)
and get Provide could not support an interface required for the insert statment. error #7320.
Again I can update and delete just fine, and insert via ODBC so this leads me to beleive that there is something going on with linked server so i have added certain values
[TSTESA5]
DISABLEKEYSETCURSOR=1
DISABLEUNICODE=1
PATCH2=6
QUERYTIMEOUTINTERVAL=0
USESERVERKEYSETCURSOR=0
DBALIAS=TSTESA5 to the db2cli.ini file and deleted and re-created the linked server after server restart. And error persists.
Anyone have any other ideas? I'm fresh out.

Thanks

Amir


 
We have been able to narrow it down to the IDB DB2 9.5 driver and switched to Microsoft D2 OLD DB driver and its now performing inserts just fine but seems to be performing slower the IBM driver. We are still looking for solution involving IBM driver and any help would be appriciated.

Thanks


Amir
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top