I have an insert statement basically something like this:
insert into openquery(Test_LinkedServer, 'select a,b,c from my_ora_table')
select a, b, c from my_dbo_table;
When I execute it, it runs and console returns “xx rows affected” message.
When I try to execute it for the second time, without changing anything, it gives an OLE DB provider error that says
“supplied inconsistent metadata. an extra column was supplied during execution that was not found at compile time”
If I add an extra space to the sql statement in the openquery,
insert into openquery(Test_LinkedServer, 'select a,b(extra_space),c from my_ora_table')
it works for 1 time again.
Does it have some sort of security measure which blocks executing same parsed sql more than once?
source db: MS SQL Server
sql client: Microsoft SQL Server Management Studio
target db: Oracle
my Linked Server provider:
- OraOLEDB.Oracle
my Linked Server properties:
- allow inprocess
- nested queries