Get Application Name In SQL Server 2008
In this article I tell you about how to get application name for the current session in SQL Server.
In this article I tell you about how to get application name for the current session in SQL Server. One of the easiest way is to use the App_Name() function.
App_Name() function returns the application name from which data come. Its return type is nvarchar(128). Consider the following example.
Use APP_NAME() function in select clause.
Now consider this stored procedure to check the application name returned by the connection and return the name of application.
This example specifies that data are inserted from Query Analyser. It decides where data come from.