How can I get the SQL Server server and instance name of the current connection, using a T-SQL script?
another method to find Instance name- Right clck on Database name and select Properties, in this part you can see view connection properties in left down corner, click that then you can see the Instance name.