I need to save my client's name in related database on SQL Server
, and i don't want received it by parameter even i want to insert from stored-procedure.
my problem was solved by using below code in stored-procedure.
SELECT HOST_NAME()
Another good approach would be using sp_who2
system procedure like below. Checkout for the login
, hostname
, dbname
and command
column.
exec sp_who2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With