Hi Everyone. i've installed SQL Server 2008 R2 On my machine (my machine runs windows server 2003) some of the tables inside my db are fireing triggers (when insert,delete,update occurs) the trigger result supposed to reach some process (triggersReceiver.exe via shared memory) that waits for the triggers. the problem is that the SQL Server 2008 r2 does not recognize this process the error i get when trigger fires: triggersReceiver.exe is not running . but he is runing !!!!! is any one faced a similiar problem before ??
This is the code that of the "connector dll" the part that executes when ever a trigger is fired (this code executes via extended stored procedure): all the functionality is found in winbase.h (windows dll)
////////Defenitions///////////////////////////////////////////////////////
#define 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 returns FALSE (i dont know why...)
BOOL CTriggerGatewayConnector::Init()
{
::InitializeCriticalSection(&m_CS);
m_hMap = ::OpenFileMappingW(FILE_MAP_WRITE, FALSE, XP_TRIGGER_SHARED_MEMEORY);
if (m_hMap == NULL)
{
return FALSE;
}
m_pSqlTrigInfo = (SqlTriggerInfo*)::MapViewOfFile(
m_hMap, FILE_MAP_WRITE, 0, 0,sizeof (SqlTriggerInfo));
if (m_pSqlTrigInfo == NULL)
{
return FALSE;
}
m_hProcess = ::CreateEventW(NULL, FALSE, FALSE, XP_TRIGGER_PROCESS_EVENT);
if (m_hProcess == NULL)
{
return FALSE;
}
m_hDone = ::CreateEventW(NULL, FALSE, FALSE, XP_TRIGGER_DONE_EVENT);
if (m_hDone == NULL)
{
return FALSE;
}
return TRUE;
}
Thnanks, Liran.