sql - Cannot insert data over Linked Server into Redshift -


we've setup new linked server using amazon redshift odbc driver (x64) in sql server 2014 express. select statements work expected using openquery, eg:

select * openquery(redshift_linked_server, 'select * tablea') 

however cannot use insert functionality of openquery, eg:

insert openquery(     redshift_linked_server,      'select singlevalue tablea') values ( '2' ) 

when run following error message back:

ole db provider "msdasql" linked server "redshift_linked_server" returned message "unspecified error".

ole db provider "msdasql" linked server "redshift_linked_server" returned message "transaction cannot have multiple recordsets cursor type. change cursor type, commit transaction, or close 1 of recordsets.".

msg 7343, level 16, state 2, line 9 ole db provider "msdasql" linked server "redshift_linked_server" not insert table "[msdasql]".

this happens when inserting single row using values or when inserting data set using select.

is driver issue or can linked server configured prevent this?

i solved issue using execute ('insert tablename1(col1,col2) select col1,col2 tabblename2 ') @

hope useful out there.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -