Call SQL Server functions via Oracle database link

4.1k views Asked by At

Is there a way to execute the following statement from Oracle using a database link to a SQL Server instance without having to create a view on the target instance?

select db_name(), @@SERVERNAME

I have tried

"select db_name(), @@SERVERNAME"@DbLink 

but that did not succeed.

Any help would be greatly appreciated

1

There are 1 answers

1
Alberto Garcia E. On

Here:

select dbo.FunctionName@dblink('value') from dual;

But you need to tell the dblink which functions must be available through the dblink. See the manual at: http://docs.oracle.com/cd/E11882_01/server.112/e11050/admin.htm#i1007467