i'm trying to connect from sql server to oracle server with OPENROWSET for fetch data.
this is my query:
SELECT a.*
FROM OPENROWSET(N'OraOLEDB.Oracle', N'Data Source=Myip:Port/dbname';'User Id=user';'Password=pass;',
'select * FROM view WHERE value = ''102030'' ') AS a;
sql return below error:
OLE DB provider "OraOLEDB.Oracle" for linked server "(null)" returned message "ORA-12154: TNS:could not resolve the connect identifier specified". Msg 7303, Level 16, State 1, Line 23 Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "(null)".
how can i fix this ?
I used Linked Server for fetch data but oracle table not small and it takes a long time to execute.