Reputation: 321
I have a sequence in my SQL Server database. I am using ODBC Driver 17 installed on my Oracle server to connect to the SQL Server instance. When I run
select "ADDRESS_SEQ".nextval@SQLLINK from dual
I get the error:
ORA-02070: database SQLLINK does not support sequence references in this context.
Creating a synonym and selecting nextval from that synonym results in the same error message.
How can I access a SQL Server sequence from an Oracle database?
Upvotes: 0
Views: 1043
Reputation: 89361
Wrap the call to
select next value for ADDRESS_SEQ
in a custom SQL Server stored procedure, use Passthrough SQL, or call the sp_sequence_get_range system stored procedure.
Upvotes: 1