@@REMSERVER() Function in SQL Server 2008
In this article I explain abou one of the system function i.e. @@REMSERVER() in SQL Server.
Introduction
In this article I explain abou one of the system function i.e. @@REMSERVER() in SQL Server. These are like configuration function.
@@REMSERVER() Function
The @@REMSERVER() Function returns the value of the remote SQL Server database server that called the stored procedure. It appears in the login record. This function will not support the future version of SQL Server.
Syntax
Its return type is nvarchar(128).
Example:
CREATE PROCEDURE sp_CheckServer
AS
SELECT @@REMSERVER
Now execute preceding code and see output.
Output:
exec sp_CheckServer
_in_sql.jpg)
It returns NULL.