Sql Server 2008 r2 does not recognize process when triggered -


I installed SQL Server 2008 R2 on my machine (my machine runs Windows Server 2003) on some table tables inside my DB When the wait is triggered to trigger the trigger (when insert, delete, update), the trigger result is reaching the triggers (Share triggersReceiver.exe) through some process (shared memory). The problem is that SQL Server 2008 R2 does not recognize this process when I trigger the trigger: triggersReceiver.exe is not running. But he is running !!!!! Have any problems encountered before any one ??

This is the code that is part of the "Connector DLL" that executes whenever a trigger is removed (this code is executed via extended stored procedure): All functionality is available in winbase.h (Windows DLL)

  //////// Definitions //////////////////////// ////////////////////////// # XP_TRIGGER_SHARED_MEMEORY L "global \\ xp_trigger_shared_memory" #define XP_TRIGGER_PROCESS_EVENT L "global \\ xp_trigger_process_event" #define XP_TRIGGER_DONE_EVENT L "Global \\ xp_trigger_done_event" ///////////////////////////////////////// /////////// ////////////////////  

This function is incorrect (I do not know why ...)

  BOOL CTriggerGatewayConnector :: init () {:: Initial article (& amp; m_CS); M_hMap = :: OpenFile MappingW (FILE_MAP_WRITE, FALSE, XP_TRIGGER_SHARED_MEMEORY); If (m_hMap == faucet) {return incorrect; } M_pSqlTrigInfo = (SqlTriggerInfo *) :: MapViewOfFile (m_h Map, FILE_MAP_WRITE, 0, 0, sizeof (SqlTriggerInfo)); If (m_pSqlTrigInfo == faucet) {return false; } M_hProcess = :: CreateEventW (FAL, False, False, XP_TRIGGER_PROCESS_EVENT); If (m_hProcess == faucet) {return false; } M_hDone = :: CreateEventW (NULL, FALSE, FALSE, XP_TRIGGER_DONE_EVENT); If (m_hDone == NULL) {return false; } Return TRUE; }  

Thankx, Liran.

The problem is resolved !! ! It was actually a permission problem. When the trigger is removed, this file tries to write to XP_TRIGGER_SHARED_MEMEORY and it fails here: m_hMap = :: OpenFileMappingW (FILE_MAP_WRITE, FALSE, XP_TRIGGER_SHARED_MEMEORY); If (m_hMap == faucet) {return incorrect; } The trigger actually activates the DLL loaded in the SLL server, and there is no permission to write the SLL server in the echo shawr file (within it Twee via DLL).

To resolve this, you must give permmisions to SQL Server: Right click on MyComputer -> Manage -> Services and Applications -> Services: ForEach SQL Service: ( On the right side list) 1. Right-click -> Properties -> Logon tab -> Change to Local System Account.

Hope this will help in some time ..


Comments