Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Trace user with sql server authentication Expand / Collapse
Author
Message
Posted Wednesday, July 30, 2014 1:40 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, November 17, 2014 8:20 AM
Points: 102, Visits: 332
Hi All,

How to trace user if database has SQL SERVER Authentication. Please help me on this..


Thanks in Advance..
Post #1597604
Posted Wednesday, July 30, 2014 2:55 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Saturday, November 1, 2014 6:54 AM
Points: 5,221, Visits: 5,118
Just like you would any other trace.

Put a filter on the logon column for the logon in question




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1597617
Posted Wednesday, July 30, 2014 7:04 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 7:11 AM
Points: 969, Visits: 3,006
EXEC sp_trace_setfilter @TraceID, 11, 0, 0, @UserName;

@TraceID - Your trace number
11 - Column 11 is Login
0 - Comparison uses =
0 - Logical AND
@UserName - Your search string





The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1597703
Posted Wednesday, July 30, 2014 8:28 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, November 17, 2014 8:20 AM
Points: 102, Visits: 332
Thanks for the reply.

if I put the filter , i will get sql authetication login suppose My project is sales and I will create sql authetication as
userid: sales
pwd: sales

so when application will be used by any user so it will show login name as "sales" not user name. For each and every user it will display same login name.

My requirement is if any particular user will be access the application instead of sales login name it should show user name, for example "PeterP" or "AroojH" .

Is there any script to find user name instead of Sql login name.

Thanks
Post #1597762
Posted Wednesday, July 30, 2014 8:36 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 7:11 AM
Points: 969, Visits: 3,006
So a Windows user logs into your application, then the application logs into the database using SQL authentication. You cannot trace for the original windows login.

Why don't you login to the database using Windows authentication?






The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1597768
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse