Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
amirs
Constraint Violating Yak Guru
260 Posts |
Posted - 2013-05-22 : 03:31:22
|
Dear MemberAny one know How To retrieve local system login name with domain name in sql2005 ? |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-05-22 : 03:36:26
|
--This?SELECT HOST_NAME() AS HostName, SUSER_NAME() LoggedInUser--Chandu |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-05-22 : 03:46:54
|
you can use SYSTEM_USER also which is synonym for SUSER_NAME as per SQL-92 standards------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
amirs
Constraint Violating Yak Guru
260 Posts |
Posted - 2013-05-22 : 03:57:57
|
thanks to replybut this returns loggedinUser is sai want system login name when user is login his system |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-05-22 : 04:12:11
|
quote: Originally posted by amirs thanks to replybut this returns loggedinUser is sai want system login name when user is login his system
You wont get that if user is using sql server authentication to connect to sql server.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
amirs
Constraint Violating Yak Guru
260 Posts |
Posted - 2013-05-22 : 04:16:49
|
i want to local system login name |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2013-05-22 : 04:24:12
|
if you are using sql server authentication then sql server doesn't know who you are -- just which sql server account you logged in as.Can you switch to windows authentication?http://www.petri.co.il/how-to-choose-sql-server-authentication-mode.htmTransact CharlieMsg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. http://nosqlsolution.blogspot.co.uk/ |
|
|
|
|
|