我有一個需要連接到POSTGRESQL 9.0服務器的SQL Server 2008。從SQL Server到postgresql的DBLink:get sequence nextval
一個我需要的任務是在PostgreSQL的
例1獲得一個序列的下一個值:
execute ('select nextval(''cadastro.pessoa_seq'')') at POSTGRESQL ;
錯誤:
Msg 7215, Level 17, State 1, Line 1 Could not execute statement on remote server 'POSTGRESQL'.*
例2:
select * from openquery(POSTGRESQL ,'select nextval(''cadastro.pessoa_seq'')')
錯誤:
Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "MSDASQL" for linked server "POSTGRESQL" reported an error. The provider reported an unexpected catastrophic failure. Msg 7350, Level 16, State 2, Line 1 Cannot get the column information from OLE DB provider "MSDASQL" for linked server "POSTGRESQL".*
任何選項都沒有工作!
有沒有什麼好的選擇?
預先感謝您
究竟做 「無工程」 呢?你有錯誤嗎?如果是,從哪個DBMS? –
我對帖子進行了更新。我在SQLSERVER中出現錯誤。 TIA – galacha
您是否可以使用該連接進行其他查詢?這只是你遇到問題的序列嗎? – Gary