I have an issue for which I have already posted a question “ODBC SQLDriverConnect crashes when running as a service” in Stack Overflow. I am generating this post to provide additional information and will add a link to it in Stack Overflow.
The software in question was written in C. It is a 32-bit application. When it starts it performs some checks and opens SQL Server database. The software support most (never say all) versions of SQL Server.
The base software has been running on different versions of Windows. The original software was designed about 20 years ago.
I am using a Windows 10 machine. The problem seems to happen in other versions of Windows (e.g., Windows Server 2016 Standard).
Now we will start the software as an application on a command prompt.
C:\>sdm -debug CmdDebugService <<< starting SDM interactively ... SDM <<< starting line: 313 ... SDM <<< _WIN32 defined line: 397 SDM <<< _WIN64 NOT defined line: 405 SDM <<< bitFileTrailers: 1 (bool) controlled by NoBitFileTrailers line: 594 SDM <<< deDup: 0 (bool) controlled by DeDup line: 633 SDM <<< sdmServerIP ==><== controlled by SDMServerIP (blank to DISABLE failover) line: 672 SDM <<< sdmServerPort: 4444 controlled by SDMServerPort line: 718 SDM <<< sdmMyIP ==><== controlled by SDMMyIP line: 757 SDM <<< sdmStandByIP ==><== controlled by SDMStandByIP (blank to DISABLE failover) line: 796 SDM <<< iCAS NOT configured for failover line: 809 SDM <<< debugFlag: 1 (bool) line: 812 SDM <<< extendFlag: 0 line: 813 SDM <<< recoverFlag: 0 (bool) line: 814 SDM <<< reloadFlag: 0 (bool) line: 815 SDM <<< BEFORE CompareSoftwareVersions line: 820 ... LicDongleVersionAndBuild <<< LicReadDongle WAR_NO_DONGLE line: 8749 CompareSoftwareVersions <<< LicDongleVersionAndBuild WAR_NO_DONGLE line: 37525 SDM <<< AFTER CompareSoftwareVersions line: 828 SDM <<< CompareSoftwareVersions WAR_NO_DONGLE line: 842 SDM <<< BEFORE GetSDMPath line: 868 ... SDM <<< AFTER GetSDMPath status: 0 sdmInstallationPath ==>c:\sdm\bin<== line: 876 SDM <<< BEFORE SetCurrentDirectory sdmInstallationPath ==>c:\sdm\bin<== line: 916 ... SDM <<< AFTER SetCurrentDirectory status: 1 sdmInstallationPath ==>c:\sdm\bin<== line: 924 SDM <<< BEFORE SDMDatabaseAvailable customerString ==><== line: 941 ... ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 SDBOpen <<< sizeof(SQLLEN): 4 line: 264 SDBOpen <<< sizeof(SQLULEN): 4 line: 265 SDBOpen <<< sizeof(long): 4 line: 266 SDBOpen <<< sizeof(unsigned long): 4 line: 267 <=== a call to SQLDriverConnect is made !!! SDMDatabaseAvailable <<< LicCheckLicenseFile exists: 0 (bool) licenseString ==>ACFD-BCE2-0B63-D92E-0A19-4F93-56FC-EB70<== line: 10473 SDM <<< AFTER SDMDatabaseAvailable status: 0 customerString ==>D8DB-0B46-87B1-24FC<== line: 952 SDM <<< BEFORE startUpDelay: 0 seconds controlled by SDMStartupDelay line: 1054 ... SDM <<< AFTER startUpDelay: 0 seconds line: 1085 SDM <<< enableKeepAlive: 1 (bool) controlled by DisableKeepAlive line: 1131 SDM <<< BEFORE SockGetMyIP serverIP ==><== line: 1213 SDM <<< AFTER SockGetMyIP serverIP ==>192.168.1.110<== line: 1221 SDM <<< BEFORE InitSockMyIPPort line: 1245 ... ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 InitSockMyIPPort <<< ipPortMACList count: 0 line: 52946 SDM <<< AFTER InitSockMyIPPort line: 1253 SDM <<< BEFORE ServerReadConfig serverConfig.customerString ==><== serverConfig.sqlServer ==><== line: 1369 ... ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 SDM <<< AFTER ServerReadConfig serverConfig.customerString ==><== serverConfig.sqlServer ==>localhost<== line: 1379 SDM <<< BEFORE InitSDMServer serverConfig.customerString ==><== line: 1397 ... InitSDMServer <<< *requestMutex: 0x000003c0 line: 6029 InitSDMServer <<< *eventQMutex: 0x000005ec line: 6043 InitSDMServer <<< cleanCacheOnStartup: 0 (bool) controlled by CleanCacheOnStartup line: 6090 InitSDMServer <<< rebuildBitFileTable: 0 (bool) controlled by RebuildBitFileTable line: 6129 InitSDMServer <<< disableRegKeyDump: 1 (bool) controlled by DisableRegKeyDump line: 6179 InitSDMServer <<< sdmServerIP ==><== controlled by SDMServerIP (blank to DISABLE failover) line: 6255 InitSDMServer <<< sdmStandByIP ==><== controlled by SDMStandByIP (blank to DISABLE failover) line: 6294 InitSDMServer <<< BEFORE SDBWidenMigIPFields line: 6374 ... InitSDMServer <<< AFTER SDBWidenMigIPFields line: 6382 InitSDMServer <<< BEFORE SDBAddCacheIDField line: 6406 ... InitSDMServer <<< AFTER SDBAddCacheIDField line: 6414 InitSDMServer <<< BEFORE SDBGroupInconsistencies line: 6438 ... InitSDMServer <<< AFTER SDBGroupInconsistencies line: 6446 InitSDMServer <<< refreshRedundantTable: 1 (bool) controlled by DoNotRefreshRedundantTbl line: 6563 InitSDMServer <<< migrate: 0 (bool) line: 6564 InitSDMServer <<< BEFORE CheckAndCreateCache line: 6627 ... CheckAndCreateCache <<< cacheID: 1 cachePath ==>c:\Cache<== cwm: 47 line: 8132 InitSDMServer <<< AFTER CheckAndCreateCache line: 6635 InitSDMServer <<< BEFORE SDBSetBitFileStateIdle line: 6720 ... InitSDMServer <<< AFTER SDBSetBitFileStateIdle line: 6730 InitSDMServer <<< BEFORE SDBMoveBitFilesFrom0To1 (may take a while) line: 6748 ... InitSDMServer <<< AFTER SDBMoveBitFilesFrom0To1 line: 6757 InitSDMServer <<< BEFORE SDBReadConfig serverConfig->customerString ==><== line: 6912 ... InitSDMServer <<< AFTER SDBReadConfig serverConfig->customerString ==>D8DB-0B46-87B1-24FC<== line: 6921 InitSDMServer <<< BEFORE CleanDiskCaches line: 7130 ... InitSDMServer <<< AFTER CleanDiskCaches line: 7141 CleanDiskCachesThread <<< fullSweep: 0 (bool) controlled by CleanCacheOnStartup line: 9931 CleanDiskCachesThread <<< CleanCacheOnStartup does NOT remove orphan records from the BITFILE_TBL line: 9936 InitSDMServer <<< BEFORE DataBaseConsistency line: 7217 ... CleanDiskCachesThread <<< To remove orphan records from the BITFILE_TBL set DeleteFromDBNotInCache line: 9941 DataBaseConsistency <<< BEFORE SDBGetSQLVersion line: 8780 ... sdbGetSQLVersion <<< SQL Server ==>MICROSOFT SQL SERVER 2012 (SP2-GDR) (KB3194719) - 11.0.5388.0 (X64) * SEP 23 2016 16:56:29 * COPYRIGHT (C) MICROSOFT CORPORATIONDEVELOPER EDITION (64-BIT)<== line: 20504 DataBaseConsistency <<< AFTER SDBGetSQLVersion sqlVersion: 7 line: 8791 InitSDMServer <<< AFTER DataBaseConsistency line: 7230 InitSDMServer <<< BEFORE LicMonitorDongle line: 7282 ... LicMonitorDongle <<< environment ==>SDM<== line: 14118 LicReadLicenseFile <<< disableMonitorDongle: 1 (bool) line: 14137 InitSDMServer <<< AFTER LicMonitorDongle status: 0 line: 7301 InitSDMServer <<< enableMirrorCaches: 0 (bool) controlled by EnableSDMMirrorCaches line: 7367 InitSDMServer <<< BEFORE StartShutDownThread line: 7403 ... StartShutDownThread <<< BEFORE beginthread(ShutDownThread) line: 137 ... StartShutDownThread <<< AFTER beginthread(ShutDownThread) line: 147 StartShutDownThread <<< BEFORE SemaphoreWait ShutDownThreadline: 163 ... StartShutDownThread <<< AFTER SemaphoreWait ShutDownThread line: 172 InitSDMServer <<< AFTER StartShutDownThread line: 7422 SDM <<< AFTER InitSDMServer serverConfig.customerString ==>D8DB-0B46-87B1-24FC<== line: 1425 SDM <<< authenticationTimeOut: 180 seconds controlled by AuthenticationTimeOut line: 1661 SDM <<< BEFORE SDBIPPortMACCount line: 1749 ... SDM <<< AFTER SDBIPPortMACCount ipCount: 0 line: 1758 SDM <<< serverConfig.serverIP ==>192.168.1.110<== line: 1827 SDM <<< serverConfig.serverPort: 4444 line: 1828 SDM <<< BEFORE ConfigGetCustomerString customerString ==>D8DB-0B46-87B1-24FC<== line: 1839 ... SDM <<< AFTER ConfigGetCustomerString customerString ==>D8DB-0B46-87B1-24FC<== line: 1848 SDM <<< initializing the System Disk Manager (SDM) using a RELEASE build; please wait line: 1935 ... SDM <<< licenseString ==>ACFD-BCE2-0B63-D92E-0A19-4F93-56FC-EB70<== line: 2000 SDM <<< BEFORE MonitorCapacityLicense line: 2065 ... SDM <<< AFTER MonitorCapacityLicense line: 2081 LicenseThread <<< licensedCapacity: 512 GBs line: 11483 LicenseThread <<< delay: 4622 line: 11552 SDM <<< BEFORE SockToListen serverConfig.serverIP ==>192.168.1.110<== serverPort: 4444 serverConfig.socketTimeOut: 10000 line: 2102 ... SDM <<< AFTER SockToListen serverConfig.serverIP ==>192.168.1.110<== serverPort: 4444 line: 2116 SDM <<< listening on serverIP ==>192.168.1.110<== line: 2164 SDM <<< listening on serverPort: 4444 line: 2165 SDM <<< listening on serverSocket: 0x00000698 line: 2166 SDM <<< requestIDMutex: 0x000006a0 line: 2177 SDM <<< enableHWMThread: 1 (bool) controlled by DisableSDMHWM line: 2223 SDM <<< STARTING DiskUtilizationThread line: 2254 ... SDM <<< STARTED DiskUtilizationThread line: 2269 SDM <<< enableRedundancyThread: 1 (bool) controlled by DisableSDMRedundancy line: 2339 SDM <<< STARTING DiskRedundancyThread line: 2371 ... SDM <<< STARTED DiskRedundancyThread line: 2386 SDM <<< enableRetentionThread: 1 (bool) controlled by DisableSDMRetention line: 2458 SDM <<< STARTING MainRetThread line: 2486 ... SDM <<< STARTED MainRetThread line: 2502 SDM <<< STARTING RequestThread line: 2617 ... RequestThread <<< localThreadsMutex: 0x000005ac line: 489 RequestThread <<< ourMachineName ==>CONDOR<== line: 1226 SDM <<< STARTED RequestThread line: 2632 SDM <<< enableCWMThread: 1 (bool) controlled by DisableSDMCWM line: 2700 SDM <<< STARTING UpdateCWMThread line: 2722 ... SDM <<< STARTED UpdateCWMThread line: 2737 SDM <<< enableEncryptionThread: 0 (bool) controlled by EnableEncryptionThread line: 2800 SDM <<< STARTING ReloadGUIDListThread line: 2880 ... ReloadGUIDListThread <<< reloadMutex: 0x000006f8 line: 1255 SDM <<< STARTED ReloadGUIDListThread line: 2895 SDM <<< enableClearLocksThread: 1 (bool) controlled by DisableSDMClearLocks line: 2962 SDM <<< STARTING ClearLocksThread line: 2988 ... SDM <<< STARTED ClearLocksThread line: 3003 SDM <<< enableReportDongleThread: 1 (bool) controlled by DisableSDMReportDongle line: 3071 SDM <<< STARTING ReportDongleThread line: 3089 ... ReportDongleThread <<< enableReportDongleThread: 1 (bool) controlled by DisableSDMReportDongle line: 149 SDM <<< STARTED ReportDongleThread line: 3104 SDM <<< serviceNames ==><== controlled by SDMServersToStart line: 3170 SDM <<< processDelay: 0 controlled by SDMServerDelay line: 3215 SDM <<< reloadGUIDList ==><== controlled by SDMReloadGUIDsList line: 3378 SDM <<< sdmRecoverFolder ==>c:\temp\Recover Folder<== (HOT folder) controlled by SDMRecoverFolder line: 3497 SDM <<< STARTING RecoverBitFileThread (monitors the HOT folder) line: 3516 ... SDM <<< STARTED RecoverBitFileThread line: 3531 SDM <<< STARTING IAmAliveThread line: 3574 ... SDM <<< STARTED IAmAliveThread line: 3590
A second or so after the software starts an ODBC call is made. I added a comment to the screen capture. In this case all is well and after a few more seconds, the software is up and running. Different threads were able to open multiple connections to the SQL Server database instance running in the same computer. Life is good.
C:\>sdm -debug CmdDebugService <<< starting SDM interactively ... SDM <<< starting line: 313 ... SDM <<< _WIN32 defined line: 397 SDM <<< _WIN64 NOT defined line: 405 SDM <<< bitFileTrailers: 1 (bool) controlled by NoBitFileTrailers line: 594 SDM <<< deDup: 0 (bool) controlled by DeDup line: 633 SDM <<< sdmServerIP ==><== controlled by SDMServerIP (blank to DISABLE failover) line: 672 SDM <<< sdmServerPort: 4444 controlled by SDMServerPort line: 718 SDM <<< sdmMyIP ==><== controlled by SDMMyIP line: 757 SDM <<< sdmStandByIP ==><== controlled by SDMStandByIP (blank to DISABLE failover) line: 796 SDM <<< iCAS NOT configured for failover line: 809 SDM <<< debugFlag: 1 (bool) line: 812 SDM <<< extendFlag: 0 line: 813 SDM <<< recoverFlag: 0 (bool) line: 814 SDM <<< reloadFlag: 0 (bool) line: 815 SDM <<< BEFORE CompareSoftwareVersions line: 820 ... LicDongleVersionAndBuild <<< LicReadDongle WAR_NO_DONGLE line: 8749 CompareSoftwareVersions <<< LicDongleVersionAndBuild WAR_NO_DONGLE line: 37525 SDM <<< AFTER CompareSoftwareVersions line: 828 SDM <<< CompareSoftwareVersions WAR_NO_DONGLE line: 842 SDM <<< BEFORE GetSDMPath line: 868 ... SDM <<< AFTER GetSDMPath status: 0 sdmInstallationPath ==>c:\sdm\bin<== line: 876 SDM <<< BEFORE SetCurrentDirectory sdmInstallationPath ==>c:\sdm\bin<== line: 916 ... SDM <<< AFTER SetCurrentDirectory status: 1 sdmInstallationPath ==>c:\sdm\bin<== line: 924 SDM <<< BEFORE SDMDatabaseAvailable customerString ==><== line: 941 ... ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 SDBOpen <<< sizeof(SQLLEN): 4 line: 264 SDBOpen <<< sizeof(SQLULEN): 4 line: 265 SDBOpen <<< sizeof(long): 4 line: 266 SDBOpen <<< sizeof(unsigned long): 4 line: 267 <=== a call to SQLDriverConnect is made !!! SDMDatabaseAvailable <<< LicCheckLicenseFile exists: 0 (bool) licenseString ==>ACFD-BCE2-0B63-D92E-0A19-4F93-56FC-EB70<== line: 10473 SDM <<< AFTER SDMDatabaseAvailable status: 0 customerString ==>D8DB-0B46-87B1-24FC<== line: 952 SDM <<< BEFORE startUpDelay: 0 seconds controlled by SDMStartupDelay line: 1054 ... SDM <<< AFTER startUpDelay: 0 seconds line: 1085 SDM <<< enableKeepAlive: 1 (bool) controlled by DisableKeepAlive line: 1131 SDM <<< BEFORE SockGetMyIP serverIP ==><== line: 1213 SDM <<< AFTER SockGetMyIP serverIP ==>192.168.1.110<== line: 1221 SDM <<< BEFORE InitSockMyIPPort line: 1245 ... ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 InitSockMyIPPort <<< ipPortMACList count: 0 line: 52946 SDM <<< AFTER InitSockMyIPPort line: 1253 SDM <<< BEFORE ServerReadConfig serverConfig.customerString ==><== serverConfig.sqlServer ==><== line: 1369 ... ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 SDM <<< AFTER ServerReadConfig serverConfig.customerString ==><== serverConfig.sqlServer ==>localhost<== line: 1379 SDM <<< BEFORE InitSDMServer serverConfig.customerString ==><== line: 1397 ... InitSDMServer <<< *requestMutex: 0x000005bc line: 6029 InitSDMServer <<< *eventQMutex: 0x000005c0 line: 6043 InitSDMServer <<< cleanCacheOnStartup: 0 (bool) controlled by CleanCacheOnStartup line: 6090 InitSDMServer <<< rebuildBitFileTable: 0 (bool) controlled by RebuildBitFileTable line: 6129 InitSDMServer <<< disableRegKeyDump: 1 (bool) controlled by DisableRegKeyDump line: 6179 InitSDMServer <<< sdmServerIP ==><== controlled by SDMServerIP (blank to DISABLE failover) line: 6255 InitSDMServer <<< sdmStandByIP ==><== controlled by SDMStandByIP (blank to DISABLE failover) line: 6294 InitSDMServer <<< BEFORE SDBWidenMigIPFields line: 6374 ... InitSDMServer <<< AFTER SDBWidenMigIPFields line: 6382 InitSDMServer <<< BEFORE SDBAddCacheIDField line: 6406 ... InitSDMServer <<< AFTER SDBAddCacheIDField line: 6414 InitSDMServer <<< BEFORE SDBGroupInconsistencies line: 6438 ... InitSDMServer <<< AFTER SDBGroupInconsistencies line: 6446 InitSDMServer <<< refreshRedundantTable: 1 (bool) controlled by DoNotRefreshRedundantTbl line: 6563 InitSDMServer <<< migrate: 0 (bool) line: 6564 InitSDMServer <<< BEFORE CheckAndCreateCache line: 6627 ... CheckAndCreateCache <<< cacheID: 1 cachePath ==>c:\Cache<== cwm: 47 line: 8132 InitSDMServer <<< AFTER CheckAndCreateCache line: 6635 InitSDMServer <<< BEFORE SDBSetBitFileStateIdle line: 6720 ... InitSDMServer <<< AFTER SDBSetBitFileStateIdle line: 6730 InitSDMServer <<< BEFORE SDBMoveBitFilesFrom0To1 (may take a while) line: 6748 ... InitSDMServer <<< AFTER SDBMoveBitFilesFrom0To1 line: 6757 InitSDMServer <<< BEFORE SDBReadConfig serverConfig->customerString ==><== line: 6912 ... InitSDMServer <<< AFTER SDBReadConfig serverConfig->customerString ==>D8DB-0B46-87B1-24FC<== line: 6921 InitSDMServer <<< BEFORE CleanDiskCaches line: 7130 ... InitSDMServer <<< AFTER CleanDiskCaches line: 7141 CleanDiskCachesThread <<< fullSweep: 0 (bool) controlled by CleanCacheOnStartup line: 9931 CleanDiskCachesThread <<< CleanCacheOnStartup does NOT remove orphan records from the BITFILE_TBL line: 9936 InitSDMServer <<< BEFORE DataBaseConsistency line: 7217 ... DataBaseConsistency <<< BEFORE SDBGetSQLVersion line: 8780 ... CleanDiskCachesThread <<< To remove orphan records from the BITFILE_TBL set DeleteFromDBNotInCache line: 9941 sdbGetSQLVersion <<< SQL Server ==>MICROSOFT SQL SERVER 2012 (SP2-GDR) (KB3194719) - 11.0.5388.0 (X64) * SEP 23 2016 16:56:29 * COPYRIGHT (C) MICROSOFT CORPORATIONDEVELOPER EDITION (64-BIT)<== line: 20504 DataBaseConsistency <<< AFTER SDBGetSQLVersion sqlVersion: 7 line: 8791 InitSDMServer <<< AFTER DataBaseConsistency line: 7230 InitSDMServer <<< BEFORE LicMonitorDongle line: 7282 ... LicMonitorDongle <<< environment ==>SDM<== line: 14118 LicReadLicenseFile <<< disableMonitorDongle: 1 (bool) line: 14137 InitSDMServer <<< AFTER LicMonitorDongle status: 0 line: 7301 InitSDMServer <<< enableMirrorCaches: 0 (bool) controlled by EnableSDMMirrorCaches line: 7367 InitSDMServer <<< BEFORE StartShutDownThread line: 7403 ... StartShutDownThread <<< BEFORE beginthread(ShutDownThread) line: 137 ... StartShutDownThread <<< AFTER beginthread(ShutDownThread) line: 147 StartShutDownThread <<< BEFORE SemaphoreWait ShutDownThreadline: 163 ... StartShutDownThread <<< AFTER SemaphoreWait ShutDownThread line: 172 InitSDMServer <<< AFTER StartShutDownThread line: 7422 SDM <<< AFTER InitSDMServer serverConfig.customerString ==>D8DB-0B46-87B1-24FC<== line: 1425 SDM <<< authenticationTimeOut: 180 seconds controlled by AuthenticationTimeOut line: 1661 SDM <<< BEFORE SDBIPPortMACCount line: 1749 ... SDM <<< AFTER SDBIPPortMACCount ipCount: 0 line: 1758 SDM <<< serverConfig.serverIP ==>192.168.1.110<== line: 1827 SDM <<< serverConfig.serverPort: 4444 line: 1828 SDM <<< BEFORE ConfigGetCustomerString customerString ==>D8DB-0B46-87B1-24FC<== line: 1839 ... SDM <<< AFTER ConfigGetCustomerString customerString ==>D8DB-0B46-87B1-24FC<== line: 1848 SDM <<< initializing the System Disk Manager (SDM) using a RELEASE build; please wait line: 1935 ... SDM <<< licenseString ==>ACFD-BCE2-0B63-D92E-0A19-4F93-56FC-EB70<== line: 2000 SDM <<< BEFORE MonitorCapacityLicense line: 2065 ... LicenseThread <<< licensedCapacity: 512 GBs line: 11483 SDM <<< AFTER MonitorCapacityLicense line: 2081 SDM <<< BEFORE SockToListen serverConfig.serverIP ==>192.168.1.110<== serverPort: 4444 serverConfig.socketTimeOut: 10000 line: 2102 ... LicenseThread <<< delay: 6268 line: 11552 SDM <<< AFTER SockToListen serverConfig.serverIP ==>192.168.1.110<== serverPort: 4444 line: 2116 SDM <<< listening on serverIP ==>192.168.1.110<== line: 2164 SDM <<< listening on serverPort: 4444 line: 2165 SDM <<< listening on serverSocket: 0x000006dc line: 2166 SDM <<< requestIDMutex: 0x000006e0 line: 2177 SDM <<< enableHWMThread: 1 (bool) controlled by DisableSDMHWM line: 2223 SDM <<< STARTING DiskUtilizationThread line: 2254 ... SDM <<< STARTED DiskUtilizationThread line: 2269 SDM <<< enableRedundancyThread: 1 (bool) controlled by DisableSDMRedundancy line: 2339 SDM <<< STARTING DiskRedundancyThread line: 2371 ... SDM <<< STARTED DiskRedundancyThread line: 2386 SDM <<< enableRetentionThread: 1 (bool) controlled by DisableSDMRetention line: 2458 SDM <<< STARTING MainRetThread line: 2486 ... SDM <<< STARTED MainRetThread line: 2502 SDM <<< STARTING RequestThread line: 2617 ... RequestThread <<< localThreadsMutex: 0x000006e4 line: 489 RequestThread <<< ourMachineName ==>CONDOR<== line: 1226 SDM <<< STARTED RequestThread line: 2632 SDM <<< enableCWMThread: 1 (bool) controlled by DisableSDMCWM line: 2700 SDM <<< STARTING UpdateCWMThread line: 2722 ... SDM <<< STARTED UpdateCWMThread line: 2737 SDM <<< enableEncryptionThread: 0 (bool) controlled by EnableEncryptionThread line: 2800 SDM <<< STARTING ReloadGUIDListThread line: 2880 ... ReloadGUIDListThread <<< reloadMutex: 0x00000728 line: 1255 SDM <<< STARTED ReloadGUIDListThread line: 2895 SDM <<< enableClearLocksThread: 1 (bool) controlled by DisableSDMClearLocks line: 2962 SDM <<< STARTING ClearLocksThread line: 2988 ... SDM <<< STARTED ClearLocksThread line: 3003 SDM <<< enableReportDongleThread: 1 (bool) controlled by DisableSDMReportDongle line: 3071 SDM <<< STARTING ReportDongleThread line: 3089 ... ReportDongleThread <<< enableReportDongleThread: 1 (bool) controlled by DisableSDMReportDongle line: 149 SDM <<< STARTED ReportDongleThread line: 3104 SDM <<< serviceNames ==><== controlled by SDMServersToStart line: 3170 SDM <<< processDelay: 0 controlled by SDMServerDelay line: 3215 SDM <<< reloadGUIDList ==><== controlled by SDMReloadGUIDsList line: 3378 SDM <<< sdmRecoverFolder ==>c:\temp\Recover Folder<== (HOT folder) controlled by SDMRecoverFolder line: 3497 SDM <<< STARTING RecoverBitFileThread (monitors the HOT folder) line: 3516 ... SDM <<< STARTED RecoverBitFileThread line: 3531 SDM <<< STARTING IAmAliveThread line: 3574 ... SDM <<< STARTED IAmAliveThread line: 3590 ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 SDM <<< archiveFolder ==><== controlled by SiemensArchive line: 3658 SDM <<< casMaster: 0 (bool) line: 3675 SDM <<< DISABLED SiemensThread archiveFolder ==><== line: 3738 SDM <<< enableXMLParsing: 0 (bool) controlled by EnableXMLParsing line: 3793 SDM <<< enableDigestThread: 1 (bool) controlled by DisableDigestThread line: 3987 SDM <<< STARTING DigestThread line: 4014 ... SDM <<< STARTED DigestThread line: 4032 SDM <<< repairDamagedBitfiles: 1 (bool) controlled by RepairDamagedBitfiles line: 4098 SDM <<< STARTING FixBitFilesThread line: 4122 ... SDM <<< STARTED FixBitFilesThread line: 4137 FixBitFilesThread <<< migrate: 0 (bool) line: 14054 SDM <<< forwardNotEvents: 0 (bool) controlled by ForwardNotEvents line: 4200 SDM <<< enableCheckGroupTable: 0 (bool) controlled by EnableSDMCheckGroupTbl line: 4311 SDM <<< pollForRemoteGUIDs: 0 (bool) controlled by PollForRemoteGUIDs line: 4428 SDM <<< casXferEncrypted: 0 (bool) controlled by CASXferEncrypted line: 4541 SDM <<< !!!! The SDM service; part of the iCAS; is READY to process requests !!!! line: 4556 SDM <<< LISTENING for requests line: 4668 ... ShutDownThread <<< BEFORE ServerReadConfig line: 301 ... ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 ShutDownThread <<< AFTER ServerReadConfig line: 310 ShutDownThread <<< BEFORE SDBReadConfig line: 334 ... ShutDownThread <<< AFTER SDBReadConfig status: 0 line: 343
A second or so after the software starts an ODBC call is made. I added a comment to the screen capture. In this case all is well and after a few more seconds, the software is up and running. Different threads were able to open multiple connections to the SQL Server database instance running in the same computer. Life is good.
I am able to enable trace messages which will be written to a log file managed by the application. I will enable the ones in the module than handles low level database calls.
Now from an administrator command prompt I will attempt to start the software as a service.
C:\>net start sdm The SDM service is starting. The SDM service could not be started. A system error has occurred. System error 1067 has occurred. The process terminated unexpectedly.
Let’s take a look at the log file:
02/25/20 11:31:13 0x00002fd4 - SDM <<< starting line: 313 ... 02/25/20 11:31:13 0x00002fd4 - SDM <<< _WIN32 defined line: 397 02/25/20 11:31:13 0x00002fd4 - SDM <<< _WIN64 NOT defined line: 405 02/25/20 11:31:13 0x00002fd4 - SDM <<< bitFileTrailers: 1 (bool) controlled by NoBitFileTrailers line: 594 02/25/20 11:31:13 0x00002fd4 - SDM <<< deDup: 0 (bool) controlled by DeDup line: 633 02/25/20 11:31:13 0x00002fd4 - SDM <<< sdmServerIP ==><== controlled by SDMServerIP (blank to DISABLE failover) line: 672 02/25/20 11:31:13 0x00002fd4 - SDM <<< sdmServerPort: 4444 controlled by SDMServerPort line: 718 02/25/20 11:31:13 0x00002fd4 - SDM <<< sdmMyIP ==><== controlled by SDMMyIP line: 757 02/25/20 11:31:13 0x00002fd4 - SDM <<< sdmStandByIP ==><== controlled by SDMStandByIP (blank to DISABLE failover) line: 796 02/25/20 11:31:13 0x00002fd4 - SDM <<< iCAS NOT configured for failover line: 809 02/25/20 11:31:13 0x00002fd4 - SDM <<< debugFlag: 0 (bool) line: 812 02/25/20 11:31:13 0x00002fd4 - SDM <<< extendFlag: 0 line: 813 02/25/20 11:31:13 0x00002fd4 - SDM <<< recoverFlag: 0 (bool) line: 814 02/25/20 11:31:13 0x00002fd4 - SDM <<< reloadFlag: 0 (bool) line: 815 02/25/20 11:31:13 0x00002fd4 - SDM <<< BEFORE CompareSoftwareVersions line: 820 ... 02/25/20 11:31:13 0x00002fd4 - LicDongleVersionAndBuild <<< LicReadDongle WAR_NO_DONGLE line: 8749 02/25/20 11:31:13 0x00002fd4 - CompareSoftwareVersions <<< LicDongleVersionAndBuild WAR_NO_DONGLE line: 37525 02/25/20 11:31:13 0x00002fd4 - SDM <<< AFTER CompareSoftwareVersions line: 828 02/25/20 11:31:13 0x00002fd4 - SDM <<< CompareSoftwareVersions WAR_NO_DONGLE line: 842 02/25/20 11:31:13 0x00002fd4 - SDM <<< BEFORE GetSDMPath line: 868 ... 02/25/20 11:31:13 0x00002fd4 - SDM <<< AFTER GetSDMPath status: 0 sdmInstallationPath ==>c:\sdm\bin<== line: 876 02/25/20 11:31:13 0x00002fd4 - SDM <<< BEFORE SetCurrentDirectory sdmInstallationPath ==>c:\sdm\bin<== line: 916 ... 02/25/20 11:31:13 0x00002fd4 - SDM <<< AFTER SetCurrentDirectory status: 1 sdmInstallationPath ==>c:\sdm\bin<== line: 924 02/25/20 11:31:13 0x00002fd4 - SDM <<< BEFORE SDMDatabaseAvailable customerString ==><== line: 941 ... 02/25/20 11:31:13 0x00002fd4 - ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789 02/25/20 11:31:13 0x00002fd4 - SDBOpen <<< sizeof(SQLLEN): 4 line: 264 02/25/20 11:31:13 0x00002fd4 - SDBOpen <<< sizeof(SQLULEN): 4 line: 265 02/25/20 11:31:13 0x00002fd4 - SDBOpen <<< sizeof(long): 4 line: 266 02/25/20 11:31:13 0x00002fd4 - SDBOpen <<< sizeof(unsigned long): 4 line: 267 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< fileCountToMigrate: 1000 controlled by MigrationFileCount line: 260 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< useSideAOnly: 0 (bool) controlled by UseSideAOnly line: 299 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< creationTimeWindow: 0 minutes controlled by CreationTimeWindow line: 345 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< markAsDamaged: 1 (bool) controlled by DoNotMarkAsDamaged line: 390 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< tapeFullAccessCount: 0 controlled by TapeFullAccessCount line: 429 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< odbcDriver ==>ODBC Driver 17 for SQL Server<== controlled by ODBCDriverName line: 471 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< migrateAccessDelay: 120 seconds controlled by MigrateAccessDelay line: 527 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< licensedFeatures: 0x00000000 line: 570 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< sdmMyIP ==>192.168.1.110<== controlled by SockGetMyIP() line: 580 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< sdmServerIP ==><== controlled by SDMServerIP line: 622 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< sdmStandbyIP ==><== controlled by SDMStandByIP line: 665 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< casMaster: 0 (bool) line: 679 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< deDup: 0 (bool) controlled by DeDup line: 717 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< sqlLogin ==>sdmsql<== line: 776 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< sqlPassword ==>sdmsql<== line: 777 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< sqlServer ==>localhost<== line: 778 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< odbcDriver ==>ODBC Driver 17 for SQL Server<== line: 894 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< driverFound: 1 (bool) description ==>ODBC Driver 17 for SQL Server<== odbcDriver ==>ODBC Driver 17 for SQL Server<== line: 934 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< driverAttributes ==>UsageCount=1<== line: 987 02/25/20 11:31:13 0x00002fd4 - sdbOpen <<< BEFORE SQLDriverConnect inConnStr ==>Driver=ODBC Driver 17 for SQL Server;server=localhost;database=sdmsql;uid=sdmsql;pwd=xxxxxx;<== line: 1096 ...
Towards the top of the log file you can see the SDBOpen messages that we saw in the console when we ran the application. SDBOpen is a high level call which invokes the low level sdbOpen call. I have used different drivers with the same results. I have called SQLDriverConnect with and without authentication.
The log ends during the SQLDriverConnect call. I have not edited the log file.
If I go to the windows application log we see that the issue was with the MSVCR80.dll which is found in a set of folders which I cannot edit. I was attempting to make changes to get different results but that was not possible.
If you have any ideas please leave me a message below, send me a message to my email account: john.canessa@gmail.com or leave your thoughts in Stack Overflow. That way others would benefit from your suggestion.
One last thing, thanks to all 322 subscribers to my blog!!!
John
Twitter: @john_canessa