SQL Server Development Bookmark and Share   
 index > SQL Server Database Engine > suser_sname causes big delay
 

suser_sname causes big delay

Hi I have 2 sql server 2005 clustered server with 2nd one restored from first one and both in the same domain

however, I found suser_sname behavior is different on 2 servers: 1st one returns immediately but 2nd one has 25 second delay as least:

Scripts as below:

select getdate()

select suser_sname(0x01050000000000051500000001198F7FAF1F9C7BC964C71A1B620000)

select getdate()

select suser_sname(0x01050000000000051500000001198F7FAF1F9C7BC964C71AA66B0000)

select getdate()

go

result is:

2008-11-06 09:07:34.483

--------------------------------------------------------------------------------------------------------------------------------

NULL

2008-11-06 09:07:59.500

--------------------------------------------------------------------------------------------------------------------------------

NULL

2008-11-06 09:07:59.500

any idea? does it relate to domain authentication?pls help.

thanks

George

George the dba  Thursday, November 06, 2008 3:30 PM

George did you restore the system databases along with the user databases or just the user databases? If you didn't restore the master database, and you just created the needed logins manually, you have SID mismatches between the two clusters which would be why you get null returns back, but I am not sure if that has something to do with the 25 second delay in the first execution. The second request runs very fast though.

Jonathan Kehayias  Thursday, November 06, 2008 5:38 PM

thanks Jon. Actually the null is expected; the only issue is that long delay: 25s; I suspect this function checks login info (for domain accounts) to domain server where in my case it is not reachable; but I am not sure here. just want to see if my thought is correct or not.

thanks

George

George the dba  Thursday, November 06, 2008 9:35 PM

You can use google to search for other answers

Custom Search

More Threads

• sys.dm_exec_sessions memory_usage values only 0, 2, or 3
• Drop database
• Remote Connections on Windows 7 and SQL 2008
• Remote Blob Store API problems
• Error in VS2008 when creating database
• Help understanding adhoc plans and procedure cache
• Application Role Permissions Error
• General performance questions - need queries to run faster
• Database-with High and efficient performance
• Viewing SQL Server ERROR Log from OS level