Table of Contents
This describes the installation of the 64 bit version of SQL Server 2008 R2 Express, for use as a DB for MediaPortal's TV Server. The file names mentioned below apply to Windows installations using English as the preferred language. If you have a different language selected as the preferred langauge, you may receive files with slightly different names.
2017 is the last member of the MS SQL Server familysupported by Windows 8.1. The methodology described here enables its semi-automatic installation.
The basic principles of this methodology are:
This methodology can be employed from any account, as long as you have access to an account having administrative privileges to authorize the actions requiring User Account Control (UAC). However, there will be many such occasions, so it will be much easier if you perform the installation while logged into an account with administrative privileges.
This step is optional but highly recommended, in case you should need to examine the contents of the DB. In SQL 2008, the Management Studio was included in the SQL Server installation package, but this is no longer the case. The current version of SSMS (18.8 as of this writing) is compatible with SQL versions from 2008 - 2019.
You can verify a successful installation by starting the Management Studio and logging in as "sa" with the password "MediaPortal" (or whatever you chose in the configuration file) To do so, you will have to select "SQL Server Authentication" instead of "Windows Authentication".
This method evades the restrictions on passwords generally enforced by SQL Server in order to setup the default login parameters used by MediaPortal. These restrictions would normally prevent the use of a weak password, such as "MediaPortal". This is unlikely to be problematic as long as the database is only accessible within your local (home) network. If you plan to allow access from outside, please follow the recommendations for installation using a strong password in the command line as shown in the earlier wiki article, "SQL Server 2008".
During TV Serve installation, you will be prompted to configure and test the DB connection. As of MP 1.27 you must choose Microsoft SQL Server 2005 (even though MP no longer supports SQL Server 2005). You can also provide various other parameters used to create and access the TV Server database. Unless you have changed the supplied configuration file, MPSQL.ini, it shouldn't be necessary to change any of these in order to create a database and connect to it. The dependency of the TV Server service is set by default to SQLBrowser (SQL Server Browser). Ideally this should be MSSQL$SQLEXPRESS (SQL Server (SQLEXPRESS)). However, if you change this here (as of MP 1.27), it is only effective until the next invocation of the TV Server Configuration program (SetupTV.exe). In order to ensure that the database is accessible when the TV Service starts, it may help to change the startup of the TV Service from Automatic to Automatic (Delayed Start). To do so, enter services.msc into the Windows run utility (Win+R) and press enter. In the list of services, double-click on TVservice (or right-click on it and pick Properties from the pop-up context menu). You can then select Automatic (Delayed Start) from the dropdown list labelled Startup type.
If the MP client still has difficulty accessing the TV Server, it may help to delay the MP client's startup (see Delay startup under Startup/Resume Settings).
A more sophisticated workaround is to create a scheduled task to reset the TV Service dependencies on every startup.
To do so, create a command file TVS-SQL-dependencies.cmd with the content shown under Resources below. Then execute the following code from an administrative command window to create the corresponding scheduled task:
schtasks.exe /create /TN SetTvServiceDependencies /tr "<path to command file>\TVS-SQL-dependencies.cmd" /sc ONSTART /ru "System"
sc config TVService depend= MSSQL$SQLEXPRESS/SQLBrowser/Netman