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

Win 2k8 Server 64bit - Named (System Wide) Semaphores - SQL Server 2k8 Expand / Collapse
Author
Message
Posted Tuesday, December 22, 2009 11:40 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 4, 2010 7:04 AM
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?
Post #838119
Posted Tuesday, December 22, 2009 2:23 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 21, 2014 1:54 PM
Points: 1,430, Visits: 3,229
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.
Post #838263
Posted Tuesday, December 22, 2009 3:22 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:17 PM
Points: 2,035, Visits: 3,465
You posted this same question on both the General and the T-SQL forms.

Please DO NOT cross-post.

Thanks . . .
Post #838295
Posted Tuesday, December 22, 2009 4:12 PM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 4, 2010 7:04 AM
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.
Post #838316
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse