I am trying to create a testing. Database1 instance of a database with SQL Authentication which was previously set on Windows Authentication and dbo.
I have a Audit trial set on the StoredProcedures .
The Audit Trial table (Table_Debug) has credential susername.
Query used in the Stored Procedure is
Insert into Table_Debug(sql)
After execution of the above query the entry in the table is like:
"Select * from table1" "Network\Username"
Now after setting as the new database instance as testing. Database1
The above query gives result as
"Select * from table1" "testing.Database1"
Any suggestion on how to get the user name who is connected to the Database.
Any change I can do on the credentials of the table.