Final steps for making legacy application work on SQL server express 2017

  • I have a very old legacy application (from 2001) that was bundled with SQL server express 2000 (and did install this during setup in the 2000/xp time). Off course since Vista this couldn't be used anymore but I found a workaround

    If I would install SQL server express 2005 64 bit before starting the legacy application setup, it would skip the SQL 2000 install (because it already found SQL server) and installed (and configured the needed database and user in SQL express 2005).

    The only thing I had to do in advanced settings was:

    - Install all features on hard drive (except software development kit)

    - Use default instance (instread of named instance)

    - Use build in system account local system

    - Use mixed mode (Windows Authentication and SQL server Authentication)

    - Checkmark add user to SQL administrator role

    - After install enable TCP/IP in the SQL configuration manager

    -> This would work fine up to the initial Windows 10 release and the working application kept working even with after all the major Windows 10 releases (also after the latest 1803, spring creators update).

    Last week my HDD crashed so I installed the desktop from scratch with Windows 10 1803, but unfortunately during the Windows 10 releases something seems to have changed because in the SQL express 2005 setup the service mssqlserver would hang in status "starting" and therefore couldn't finish the install.

    As SQL 2005 is also not supported anymore in Windows 10 I'd thought let's try the workaround with the latest SQL server express (2017 version) so the database system is completely up to date and will also receive security updates. Installes SQL server express 2017 with the before mentioned settings and then did the install with the legacy application. To my surprise the setup also found the new SQL server express and install went fine (I could also see in SQL management studio the database and application user were created, so so far so good).

    Only when I start the legacy application (of course running as administrator and with compatibility settings just to be sure) it shows the splash screen of te application and then hangs for a minute after which it will close itself without any error message (the splash screen will just disappear and that's it). I'm quite convinced I am very close in making it work, there is only one thing standing in the way (but don't know what). I suspect the application can't connect to the databse (properly) and therefore stops after a minute trying or something. Just to be sure I also disabled Windows Defender Firewall and the started the application, but th eresult was the same.

    I have made a dump of the application (the dmp file can be downloaded at https://ufile.io/urp42 ). I'm hoping somebody here does have the knowhow of telling me what is going wrong (or what I can do to pinpoint the issue), as I am not super technically skilled (although also not completely technical ignorant). So if someone could give me some pointers I would appreciate it very much.

  • A couple of things I would check are whether you see any activity in SQL Profiler when ran against the SQL server while the legacy application is attempting to start, or if the error log contains any failed login attempts (the error log is accessible at SQL Server Management Studio, <server name>, Management, SQL Server Logs, Current ...).

  • As far as I can see from the dump the issue was on wow64cpu.dll so going to be hard to identify the exact issue.

    You may wish to play with compatibility settings for your application and see if any of them allows it to proceed.

    Regardless I would advise you to get VirtualPc/Virtual Box, install VM with XP or Win7 on it and run the application on that VM instead of the main OS.
    On that vm you could even get sql 2000 if required - and unless the application needs internet access you could even completely block net access on that VM to avoid "security complications"

  • Good idea a VM, I thought of that also as backup plan if I really can't get it to work. But first I would like to try to make it work (not only because it makes launching the application easier but also because I like a good puzzle as these issues make you understand the underlying technology better, and learning is always good).

    In the log (thanks for pointing the location out) I found the following entry:
    05/27/2018 13:39:41,Logon,Unknown,Login failed for user 'DavSA'. Reason: Failed to open the explicitly specified database 'BusinessCatalog'. [CLIENT: 192.168.2.19]
    05/27/2018 13:39:41,Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 38.

    So at least the application is communicating with SQL server.

    I found this database didn't excist (I suspect a database BusinessCatalog should be present then under Databases -> system databases, if I understand it correctly). I gave user DavSA all possible permissions and de-installed and re-installed the application (hoping it would create the database then) but after this it is still not present. Are there maybe more things I need to think about why the legacy setup won't create the database (for example permissions for user SA or the NT users that I see or other permissions)?

    If this is not the case then I'll try setting up a VM with Win7 and install the application, after which I can maybe export the BusinessCatalog database from 2005 and import it in 2017. But first I'll wait for your reply as it would be a waste of time setting up a complete VM if there could be some simple thing I am overlooking why the database is not created (or if I misunderstand the databse BusinessCatalog should be presen under System databases).

    It could off course also be the dll that makes it incompatible (and then I'll setup a VM  to run the application) but maybe the log entry is the key and the error not that important. We'll find out

  • I assumed you had the database already on 2017 instance.

    you will need to create it first - I do not think you will be able to create it directly from backup - you may not be able to go from 2005 to 2017 - to 2016 would be possible.
    This also assumes that on the 2005 instance the db is on 2005 mode, not on 2000 mode.
    If the restore fails you will need to get it "upgraded" first on a 2008/2012 instance, and only then restore onto the 2017 instance.
    steps are always... restore then change compatibility mode the one that can be restored onto the newer version. then backup and restore on desired version.

    As for why the database failed to be created maybe it requires a particular step on the setup (of the app) that hasn't run. Or that detects the instance version is not supported and doesn't do it.

    You may be able to detect why if you try to reinstall the application, running with a user that has both local admin rights and sysadmin rights to the sql instance.
    Database should be under databases only - not system databases - just for info.

  • Unfortunately the database itself was lost when the HDD crashed, but the application makes a backup file to a network share (so it can fill the database again) everytime it is closed. This file can then fill the database again once it is in working order.

    I will then setup a Win7 VM installed with SQL 2005 and the application in working order. Upgrade 2005 to 2008r2 (check if the application still works) and then to 2017 (I saw these version jumps can be made). So I can export and import it in the same SQL server version.

    I'll let it know what happens

  • The problem was probably with the SQL server 2005 service (i think it might be blocked in Win10 versions after the support has ended). I have tried several things and the following worked:

    Install SQL Server 2008 express and then delete it (as it wouldn't work with the old application)
    Install SQL server 2005 express and  suddenly the service (which is probably the server 2008 one) will start during the setup.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply