1.27.0 Supported SQL Server version(s) / TV Service dependency on SQL Server / Wait for TV Server startup (12 Viewers)

rsbrux

Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,202
    156
    Home Country
    Switzerland Switzerland
    1. When installing MP1, the TV DB configuration dialog specifies SQL Server 2005 (see attached file "Setup database connection - v1.27.png"). Since MP1 TV Server has been successfully tested with versions up to and including SQL Server 2017 Express, the text "2005" should be removed from this dialog (see attached file "Setup database connection - proposed.png").
    2. The dependency created for the TV Service on installation appears to be incorrect. Instead of:
      sc config TVService depend= SQLBrowser/Netman
      it should be :
      sc config TVService depend= MSSQL$SQLEXPRESS/Netman
      for SQL Server Express. I'm not sure of the syntax for SQL Server; perhaps the use of "SQL Browser" was an attempt to be independent of whether the Express version was used. Unfortunately, this doesn't work because SQLBrowser has no dependencies, i.e., it does not wait for the DB server to be ready. Post-installation changes using "sc" do nort survive reboot. As a workaround I have changed the TVservice startup from "Automatic" to "Automatic (Delayed Start)" (see this thread), but this doesn't appear to be adequate (see 3 below). I am now trying to edit the value "DependOnService" in the registry key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TVService" directly (see attached .reg file, renamed to "TVService.txt") and will report back.
    3. Despite the setting "Wait until TV Server has started" (autodetected and greyed out in my installation) under "General" - "Startup/Resume Settings" in MP Configuration, it appears that MP will still start before TV Server is available (see attached MediaPortal.log around 5 AM this morning).
     

    Attachments

    • Setup database connection - proposed.png
      Setup database connection - proposed.png
      24.8 KB
    • Setup database connection - v1.27.png
      Setup database connection - v1.27.png
      24.9 KB
    • MPlogs.zip
      220.5 KB
    • TVlogs.zip
      1 MB
    • TVService.txt
      2.1 KB

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,202
    156
    Home Country
    Switzerland Switzerland
    It looks as though TV Server itself is responsible for resetting the service dependencies. Procmon found no attempts to set the key value during boot, but the value had already been reset to the installation values when it was read to start the service. Procmon shows that SetupTV resets the service dependencies each time it is started. The dependency values do not change when I start or stop the TVService from services.msc. Reviewing the screenshots I posted above, I see that I could have changed the database dependency during installation. It would be nice if there were a way to change it without requiring a fresh install.
     
    Last edited:

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,202
    156
    Home Country
    Switzerland Switzerland
    Meanwhile I have found that I can change the dependency from "SQLBrowser" to " MSSQL$SQLEXPRESS" by running:
    "%ProgramFiles(x86)%\Team MediaPortal\MediaPortal TV Server\SetupTV" /configure-db
    as described in this wiki article.
    This change survives reboot and start and stop of the TV Service, as long as the TV Service is not started by SetupTV.
    However, it does not appear adequate to solve the problems reported:
    1. MediaPortal still starts before the TV Service is ready.
    2. SetupTV still resets the dependency to SQLBrowser when run normally (even when exiting with "Cancel", not "OK")
    Logs attached.
     

    Attachments

    • TVlogs.zip
      2.8 MB
    • MPlogs.zip
      205.7 KB

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,202
    156
    Home Country
    Switzerland Switzerland
    Meanwhile I have performed a "Fresh install" of MP 1.27, in which I changed the DB service dependency from "SQLBrowser" to "MSSQL$SQLEXPRESS" (see screenshot). The TV service was then installed with the correct dependency. However, when I ran the TV configuration (TVsetup.exe), the TV service dependency was again set to "SQLBrowser". It looks to me like a bug in TVsetup.exe.
     

    Attachments

    • Setup database connection - v1.27.png
      Setup database connection - v1.27.png
      25 KB
    • MPlogs.zip
      620.5 KB
    • TVlogs.zip
      1 MB

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,202
    156
    Home Country
    Switzerland Switzerland
    FWIW, please see SQL Server 2017 Express for a workaround.
    Adding the scheduled task on startup seems to resolve the problem, at least in my installation.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,202
    156
    Home Country
    Switzerland Switzerland
    This problem still exists with MP 1.29.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,865
    3,502
    Nuenen
    Home Country
    Netherlands Netherlands
    fwiw: if I freshly install 1.38 and run setuptv I don't get that popup about the db connection, and I do see that the dependency is correctly set to mysql5 in the services
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,202
    156
    Home Country
    Switzerland Switzerland
    The problem is not with MySql. I am using MS SQL Express. This is supported and can be selected at installation, but the dependency is then set incorrectly in the TV Service properties. I doubt that this was a mistake made in MP. More likely is that Microsoft changed something in SQL Express and no one ever bothered to update MP accordingly. All that is needed is to change the dependency for MS SQL as described in the first post above. I have been doing this manually for years, but it is a PITA to have to repeat it after every update.

    P.S. I have summarized the details in the wiki under
    in the "Known Issues" section.
     
    Last edited:

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,610
    11,816
    Kyiv
    Home Country
    Ukraine Ukraine
    More likely is that Microsoft changed something in SQL Express and no one ever bothered to update MP accordingly.
    We don't know what version is installed and what dependency for MS SQL Express is needed in this case. If we change it to MSSQL$SQLEXPRESS then the problem will arise for users of MS SQL Express 2005 who need the dependency SQLBrowser
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom