@@REMSERVER() Function in SQL Server 2008

In this article I explain abou one of the system function i.e. @@REMSERVER() in SQL Server.
  • 2277

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

@@REMSERVER

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

@@REMSERVER()_in_sql.jpg

It returns NULL.

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.