SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Win 2k8 Server 64bit - Named (System Wide) Semaphores - SQL Server 2k8


Win 2k8 Server 64bit - Named (System Wide) Semaphores - SQL Server 2k8

Author
Message
ray.jacksonsr
ray.jacksonsr
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 18
Hello,

We have, for years, been running software in which a standalone Windows executable ('management program') creates a system semaphore and waits. In SQL Server, we use xp_cmdshell to execute another Windows executable ('work program') that will open this semaphore, do some work, and release it. However, once we upgraded to Windows 2008 Server 64bit, this functionality was broken. When a named system semaphore is created OUTSIDE of SQL Server's xp_cmdshell by the 'MANAGEMENT' program, we cannot access this semaphore when we invoke an instance of our 'WORK' program via xp_cmdshell. The documentation at http://msdn.microsoft.com/en-us/library/z6zx288a.aspx clearly states that "once the named semaphore is created, it is visible to all threads in all processes" and it has worked perfectly up until our Windows 2008 Server 64bit upgrade from 2003 Server 32bit.

A named system semaphore, which is SUPPOSED to be available to the entire system, is not. I cannot access these semaphores from xp_cmdshell from SQL Server 2008 unless they are created in SQL Server 2008. The purpose of them is to be accessible from ANYWHERE in the system, by name, as clearly stated at http://msdn.microsoft.com/en-us/library/z6zx288a.aspx.

Does anyone know any reasons/fixes/workarounds/etc for this problem?
sturner
sturner
SSCarpal Tunnel
SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)

Group: General Forum Members
Points: 4802 Visits: 3259
How do you have the execution context of the xp_cmdshell set up? Are you using a proxy or is it running in the context of the SQLServer service user (generally a domain user but could be a local user) The default is system or network and that may not have permissions to see semaphores.

The probability of survival is inversely proportional to the angle of arrival.
Ray K
Ray K
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6484 Visits: 4676
You posted this same question on both the General and the T-SQL forms.

Please DO NOT cross-post.

Thanks . . .

+--------------------------------------------------------------------------------------+
‌Check out my blog at https://pianorayk.wordpress.com/
ray.jacksonsr
ray.jacksonsr
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 18
Ray K (12/22/2009)
You posted this same question on both the General and the T-SQL forms.

I know.

Please DO NOT cross-post.

SORRY. I wasn't sure where it belonged, whether it was a general sql issue or a t-sql issue.

Thanks . . .

You're welcome.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search