MediaPortal 2 MS SQL Server database connecting (1 Viewer)

chinthaka

Portal Member
September 11, 2014
5
0
36
Home Country
Sri Lanka Sri Lanka
I installed MP2 4 to my Windows 7 PC

I also downloaded the Source and trying to connect MS SQL Server database with MediaPortal 2 AE Updat1.I studied SQLCEDatabase plugin and try to create new plugin for MS SQL Server but it didn't success.How can I develop plugin for this purpose

Thanks
 
Last edited:

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    The SQLCEDatabase plugin should be a very good template already. Please check the ISqlDatabase members that you need to implement.

    Also you have to consider SQL server login credentials: unlinke the CE version that runs in process, you need to login on SQLServer. Take a look at the MySQL provider example, it comes with an own xml configuration for connect string.

    But may I ask why you want SQLServer, while the SQLite plugin provides very good performance and has no installation and configuration requirements? Just to understand, I don't want to stop interested devs from creating plugins :)
     

    chinthaka

    Portal Member
    September 11, 2014
    5
    0
    36
    Home Country
    Sri Lanka Sri Lanka
    Thank you for quick reply sir,
    I have SQLServer database previously I created for another system and i like to connect MP2 to that database.

    I studied those two MySQL provider and SQLCEDatabase plugin.
    I studied your MP 1 SqlServerUtility.cs file for connection string creation but the implementation of that DB connection is different than MP 2 Database plugins.

    I try to understand ISqlDatabase member with comparing MySQL plugin and SQLCEDatabase plugin.

    But I couldn't understand very well how those two plugins connect databases to the server and retrieve data because my c# language knowledge is not very expert. Sir, can give me few instruction to follow to understand the connectivity and create pluging
     

    chinthaka

    Portal Member
    September 11, 2014
    5
    0
    36
    Home Country
    Sri Lanka Sri Lanka
    I migrate MySQL MP 2 server DB to SQL Server using migration tool.
    Then i rewrite coding for plugin using System.Data.SqlClient.

    my coding for SQLServerDatabase
    --------------------------------------------------------------
    #region Copyright (C) 2007-2014 Team MediaPortal

    /*
    Copyright (C) 2007-2014 Team MediaPortal
    https://www.team-mediaportal.com

    This file is part of MediaPortal 2

    MediaPortal 2 is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    MediaPortal 2 is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with MediaPortal 2. If not, see <http://www.gnu.org/licenses/>.
    */

    #endregion

    using System;
    using System.Data;
    using System.Data.SqlTypes;
    using MediaPortal.Backend.Database;
    using System.Data.SqlServerCe;
    using System.IO;
    using MediaPortal.Backend.Services.Database;
    using MediaPortal.Common.PathManager;
    using MediaPortal.Common;
    using MediaPortal.Common.Logging;

    using System.Data.SqlClient;

    namespace MediaPortal.Database.SQLCE
    {
    public class SQLCEDatabase : ISQLDatabase
    {
    public const string SQLCE_DATABASE_TYPE = "SQL SERVER";
    public const string DATABASE_VERSION = "11.0.2100.60";
    public const int MAX_NUM_CHARS_CHAR_VARCHAR = 4000;
    public const int LOCK_TIMEOUT = 30000; // Time in ms the database will wait for a lock
    public const int MAX_BUFFER_SIZE = 2048;

    /// <summary>
    /// Maximum size of the shared memory region in MB which SQL CE uses for shared database connections.
    /// The maximum database size defaults to 256 MB, which might be too small for big databases.
    /// </summary>
    public const int INITIAL_MAX_DATABASE_SIZE = 1024;

    /// <summary>
    /// Buffer, the "Max Database Size" parameter must be bigger than the actual database file size, in MB.
    /// </summary>
    public const int DATABASE_SIZE_BUFFER = 256;

    public const string DEFAULT_DATABASE_FILE = "Datastore.sdf";

    protected string _connectionString;


    public SQLCEDatabase()
    {
    //--START My coding

    SqlConnection conn;
    _connectionString = @"Data Source=CHINTHAKA-PC\SQLEXPRESS;Database=mp2server;Integrated Security=True;User ID=sa;Password=;connection timeout=30";
    conn = new SqlConnection(_connectionString);
    try
    {
    conn.Open();
    conn.Close();
    }
    catch (Exception ex)
    {
    ServiceRegistration.Get<ILogger>().Critical("SQL server Error establishing database connection", ex);
    throw;
    }


    //--END


    #region ISQLDatabase implementation

    public string DatabaseType
    {
    get { return SQLCE_DATABASE_TYPE; }
    }

    public string DatabaseVersion
    {
    get { return DATABASE_VERSION; }
    }

    public uint MaxObjectNameLength
    {
    get { return 30; }
    }

    public string GetSQLType(Type dotNetType)
    {
    if (dotNetType == typeof(DateTime))
    return "DATETIME";
    if (dotNetType == typeof(Char))
    return "NCHAR(1)";
    if (dotNetType == typeof(Boolean))
    return "BIT";
    if (dotNetType == typeof(Single))
    return "REAL";
    if (dotNetType == typeof(Double))
    return "FLOAT";
    if (dotNetType == typeof(Byte) || dotNetType == typeof(SByte))
    return "TINYINT";
    if (dotNetType == typeof(UInt16) || dotNetType == typeof(Int16))
    return "SMALLINT";
    if (dotNetType == typeof(UInt32) || dotNetType == typeof(Int32))
    return "INTEGER";
    if (dotNetType == typeof(UInt64) || dotNetType == typeof(Int64))
    return "BIGINT";
    if (dotNetType == typeof(Guid))
    return "UNIQUEIDENTIFIER";
    if (dotNetType == typeof(byte[]))
    return "IMAGE";
    return null;
    }

    public string GetSQLVarLengthStringType(uint maxNumChars)
    {
    if (maxNumChars > MAX_NUM_CHARS_CHAR_VARCHAR)
    return "NTEXT";
    return "NVARCHAR(" + maxNumChars + ")";
    }

    public string GetSQLFixedLengthStringType(uint maxNumChars)
    {
    if (maxNumChars > MAX_NUM_CHARS_CHAR_VARCHAR)
    return "NTEXT";
    return "NCHAR(" + maxNumChars + ")";
    }

    public bool IsCLOB(uint maxNumChars)
    {
    return maxNumChars > MAX_NUM_CHARS_CHAR_VARCHAR;
    }

    public IDbDataParameter AddParameter(IDbCommand command, string name, object value, Type type)
    {
    if (type == typeof(byte[]))
    {
    SqlParameter result = (SqlParameter) command.CreateParameter();
    result.ParameterName = name;
    result.Value = value ?? DBNull.Value;
    result.SqlDbType = SqlDbType.Image;
    command.Parameters.Add(result);
    return result;
    }
    // We need to use NText as parameter type, if the value is of "IsCLOB" type.
    if (type == typeof(string) && value != null && IsCLOB((uint) value.ToString().Length))
    {
    SqlParameter result = (SqlParameter) command.CreateParameter();
    result.ParameterName = name;
    result.Value = value;
    result.SqlDbType = SqlDbType.NText;
    command.Parameters.Add(result);
    return result;
    }
    return DBUtils.AddSimpleParameter(command, name, value, type);
    }

    public object ReadDBValue(Type type, IDataReader reader, int colIndex)
    {
    if (reader.IsDBNull(colIndex))
    return null;
    if (type == typeof(byte[]))
    {
    SqlBinary result = ((SqlDataReader) reader).GetSqlBinary(colIndex);
    return result.Value;
    }
    return DBUtils.ReadSimpleDBValue(type, reader, colIndex);
    }

    public ITransaction BeginTransaction(IsolationLevel level)
    {
    return SQLCETransaction.BeginTransaction(this, _connectionString, level);
    }

    public ITransaction BeginTransaction()
    {
    return BeginTransaction(IsolationLevel.ReadCommitted);
    }

    public bool TableExists(string tableName)
    {
    using (SqlConnection conn = new SqlConnection(_connectionString))
    {
    conn.Open();
    using (IDbCommand cmd = conn.CreateCommand())
    {
    cmd.CommandText = @"SELECT COUNT(TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='" + tableName + "'";
    int cnt = (int) cmd.ExecuteScalar();
    return (cnt == 1);
    }
    }
    }

    public string CreateStringConcatenationExpression(string str1, string str2)
    {
    return str1 + "+" + str2;
    }

    public string CreateSubstringExpression(string str1, string posExpr)
    {
    return "SUBSTRING(" + str1 + "," + posExpr + "," + Int32.MaxValue + ")"; // Int32.MaxValue seems to be the biggest supported value
    }

    public string CreateSubstringExpression(string str1, string posExpr, string lenExpr)
    {
    return "SUBSTRING(" + str1 + "," + posExpr + "," + lenExpr + ")";
    }

    public string CreateDateToYearProjectionExpression(string selectExpression)
    {
    return "DATEPART(YEAR, " + selectExpression + ")";
    }

    #endregion
    }
    }


    ---------------------------------------------

    my coding for SQLServer Transaction
    -----------------------------------------------
    #region Copyright (C) 2007-2014 Team MediaPortal

    /*
    Copyright (C) 2007-2014 Team MediaPortal
    https://www.team-mediaportal.com

    This file is part of MediaPortal 2

    MediaPortal 2 is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    MediaPortal 2 is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with MediaPortal 2. If not, see <http://www.gnu.org/licenses/>.
    */

    #endregion

    using System.Data;
    using MediaPortal.Backend.Database;
    //using System.Data.SqlServerCe;
    using MediaPortal.Backend.Services.Database;

    using System.Data.SqlClient;

    namespace MediaPortal.Database.SQLCE
    {
    public class SQLCETransaction : ITransaction
    {
    #region Protected fields

    protected SqlTransaction _transaction;
    protected ISQLDatabase _database;
    protected IDbConnection _connection;

    #endregion

    #region ITransaction Member

    public ISQLDatabase Database
    {
    get { return _database; }
    }

    public IDbConnection Connection
    {
    get { return _connection; }
    }

    public void Commit()
    {
    _transaction.Commit();
    Dispose();
    }

    public void Rollback()
    {
    _transaction.Rollback();
    Dispose();
    }

    public IDbCommand CreateCommand()
    {
    IDbCommand result = _connection.CreateCommand();
    #if DEBUG
    // Return a LoggingDbCommandWrapper to log all CommandText to logfile in DEBUG mode.
    result = new LoggingDbCommandWrapper(result);
    #endif
    result.Transaction = _transaction;
    return result;
    }

    #endregion

    #region IDisposable Member

    public void Dispose()
    {
    if (_connection != null)
    {
    _connection.Close();
    _connection = null;
    }
    }

    #endregion

    public static ITransaction BeginTransaction(SQLCEDatabase database, string connectionString, IsolationLevel level)
    {
    SqlConnection connection = new SqlConnection(connectionString);
    connection.Open();
    return new SQLCETransaction(database, connection, connection.BeginTransaction(level));
    }

    public SQLCETransaction(ISQLDatabase database, IDbConnection connection, SqlTransaction transaction)
    {
    _database = database;
    _connection = connection;
    _transaction = transaction;
    }
    }
    }
    --------------------------------------------------------------------

    I build the pluging using VS 2013 and copy the .DLL fils to 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\SQLCEDatabase'
    folder then start the 'MediaPortal 2 server service' using services window but the service is not starting.

    Please, can you give me some ideas to solve this.

    Thanx.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I migrate MySQL MP 2 server DB to SQL Server using migration tool.
    No need to migrate an existing database. The database will be created automatically on server start. The database provider takes care for proper establishing of a connection and datatype mappings. The actual tables will be created by MP2.

    then start the 'MediaPortal 2 server service' using services window but the service is not starting.
    Please post logfiles (ProgramData\Team MediaPortal\MP2-Server\log\*)

    I guess the your "migrated" DB is not compatible with the one MP2 would create by itself.
     

    chinthaka

    Portal Member
    September 11, 2014
    5
    0
    36
    Home Country
    Sri Lanka Sri Lanka
    Thank you sir,

    Here I attach the crash log file with this.
    [collapse]
    -------------------------------------------------------------------
    [2014-09-18 17:19:39,833] [252 ] [Main ] [INFO ] - ApplicationCore: Launching in AppDomain MP2-Server.exe...
    [2014-09-18 17:19:40,507] [926 ] [Main ] [INFO ] - ApplicationCore: Comments: MediaPortal 2 Backend Server
    [2014-09-18 17:19:40,508] [927 ] [Main ] [INFO ] - ApplicationCore: Copyright: Copyright © Team MediaPortal 2007 - 2014
    [2014-09-18 17:19:40,510] [929 ] [Main ] [INFO ] - ApplicationCore: Version: 2.0.0.1409
    [2014-09-18 17:19:40,510] [929 ] [Main ] [INFO ] - ApplicationCore: Source: origin/10th_Anniversary_Edition_Update_1-645b86
    [2014-09-18 17:19:40,511] [930 ] [Main ] [INFO ] - ApplicationCore: ----------------------------------------------------------
    [2014-09-18 17:19:40,513] [932 ] [Main ] [DEBUG] - ApplicationCore: Registering ILogger service
    [2014-09-18 17:19:40,514] [933 ] [Main ] [DEBUG] - ApplicationCore: Registering ISettingsManager service
    [2014-09-18 17:19:40,616] [1035 ] [Main ] [DEBUG] - ApplicationCore: Registering IRegistry service
    [2014-09-18 17:19:40,618] [1037 ] [Main ] [DEBUG] - ApplicationCore: Registering IThreadPool service
    [2014-09-18 17:19:40,635] [1054 ] [Main ] [DEBUG] - ApplicationCore: Registering IMessageBroker service
    [2014-09-18 17:19:40,644] [1063 ] [Main ] [DEBUG] - ApplicationCore: Registering IPluginManager service
    [2014-09-18 17:19:40,660] [1079 ] [Main ] [DEBUG] - ApplicationCore: Registering ILocalization service
    [2014-09-18 17:19:40,662] [1081 ] [Main ] [DEBUG] - StringManager: Loading settings
    [2014-09-18 17:19:40,672] [1091 ] [Main ] [INFO ] - StringManager: Culture not set. Using culture: 'en-US'
    [2014-09-18 17:19:40,673] [1092 ] [Main ] [DEBUG] - ApplicationCore: Registering ITaskScheduler service
    [2014-09-18 17:19:41,049] [1468 ] [Main ] [DEBUG] - ApplicationCore: Registering IMediaAccessor service
    [2014-09-18 17:19:41,534] [1953 ] [Main ] [DEBUG] - ApplicationCore: Registering IImporterWorker NewGen service
    [2014-09-18 17:19:41,672] [2091 ] [Main ] [DEBUG] - ApplicationCore: Registering IResourceServer service
    [2014-09-18 17:19:41,676] [2095 ] [AMQ 'SettingsChangeWatcher`1'] [DEBUG] - TaskScheduler: UpdateTask: Task: b4773c3b-67ae-4832-916f-317a29519aa2, Owner: ImporterWorker, Occurrence: Repeat, Type: time-based: D:-1-H:2-M:0, LastRun: 1/1/0001 12:00:00 AM, NextRun: 9/19/2014 2:00:00 AM, Expires: 12/31/9999 11:59:59 PM, Wakeup: True, Force: True
    [2014-09-18 17:19:41,818] [2237 ] [Main ] [INFO ] - ThreadPool.Init()
    [2014-09-18 17:19:41,824] [2243 ] [Main ] [DEBUG] - ThreadPool.StartThreads(): Thread Thread10 started
    [2014-09-18 17:19:41,832] [2251 ] [Main ] [DEBUG] - ApplicationCore: Registering IResourceMountingService
    [2014-09-18 17:19:41,835] [2254 ] [Main ] [DEBUG] - ApplicationCore: Registering IRemoteResourceInformationService
    [2014-09-18 17:19:41,885] [2304 ] [Main ] [DEBUG] - ApplicationCore: Registering IThumbnailGenerator service
    [2014-09-18 17:19:41,899] [2318 ] [Main ] [DEBUG] - BackendExtension: Registering ISystemResolver service
    [2014-09-18 17:19:41,907] [2326 ] [Main ] [INFO ] - SystemResolver: Local system id is '7ecf7ef8-1e0a-43af-8d5c-1d254ece5089'
    [2014-09-18 17:19:41,908] [2327 ] [Main ] [DEBUG] - BackendExtension: Registering IDatabaseManager service
    [2014-09-18 17:19:41,908] [2327 ] [Main ] [DEBUG] - BackendExtension: Registering IMediaLibrary service
    [2014-09-18 17:19:41,913] [2332 ] [Main ] [DEBUG] - BackendExtension: Registering IMediaItemAspectTypeRegistration service
    [2014-09-18 17:19:41,913] [2332 ] [Main ] [DEBUG] - BackendExtension: Registering IBackendServer service
    [2014-09-18 17:19:42,009] [2428 ] [Main ] [DEBUG] - BackendExtension: Registering IClientManager service
    [2014-09-18 17:19:42,014] [2433 ] [Main ] [DEBUG] - BackendExtension: Registering IUserProfileDataManagement service
    [2014-09-18 17:19:42,016] [2435 ] [Main ] [DEBUG] - ApplicationLauncher: Starting core
    [2014-09-18 17:19:42,018] [2437 ] [Main ] [INFO ] - PluginManager: Initialize
    [2014-09-18 17:19:42,018] [2437 ] [Main ] [DEBUG] - PluginManager: Loading plugins
    [2014-09-18 17:19:42,280] [2699 ] [Main ] [DEBUG] - PluginManager: Initialized
    [2014-09-18 17:19:42,285] [2704 ] [Main ] [INFO ] - PluginManager: Startup
    [2014-09-18 17:19:42,287] [2706 ] [Main ] [DEBUG] - PluginManager: Checking dependencies
    [2014-09-18 17:19:42,397] [2816 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'AudioCDResourceProvider' [Version: 1.0; Authors: Albert; ID: '87316ce6-904a-48d3-90f0-bbef3e9d007c']
    [2014-09-18 17:19:42,460] [2879 ] [Main ] [INFO ] - PluginManager: Plugin 'AudioCDResourceProvider' [Version: 1.0; Authors: Albert; ID: '87316ce6-904a-48d3-90f0-bbef3e9d007c'] enabled.
    [2014-09-18 17:19:42,462] [2881 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'AudioMetadataExtractor' [Version: 1.0; Authors: Team Mediaportal; ID: '8b248d2d-c6df-4263-bbf3-b424c6c81b31']
    [2014-09-18 17:19:42,463] [2882 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'TagLib' [Version: 2.1.0.0; Authors: Team MediaPortal, Third party: Brian Nickel; ID: '9ebd5979-7bdf-4eb5-9010-ed77cc748be7']
    [2014-09-18 17:19:42,463] [2882 ] [Main ] [INFO ] - PluginManager: Plugin 'TagLib' [Version: 2.1.0.0; Authors: Team MediaPortal, Third party: Brian Nickel; ID: '9ebd5979-7bdf-4eb5-9010-ed77cc748be7'] enabled.
    [2014-09-18 17:19:42,464] [2883 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'BassLibraries' [Version: 1.0; Authors: un4seen, Team MediaPortal; ID: '2ba6f93c-b2a9-4795-a99c-ba19126b1359']
    [2014-09-18 17:19:42,465] [2884 ] [Main ] [INFO ] - PluginManager: Plugin 'BassLibraries' [Version: 1.0; Authors: un4seen, Team MediaPortal; ID: '2ba6f93c-b2a9-4795-a99c-ba19126b1359'] enabled.
    [2014-09-18 17:19:42,466] [2885 ] [Main ] [INFO ] - PluginManager: Plugin 'AudioMetadataExtractor' [Version: 1.0; Authors: Team Mediaportal; ID: '8b248d2d-c6df-4263-bbf3-b424c6c81b31'] enabled.
    [2014-09-18 17:19:42,467] [2886 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'BluRayMetadataExtractor' [Version: 1.0; Authors: Morpheus_xx; ID: 'fe6076a1-8c38-416c-8129-a80942fcfb68']
    [2014-09-18 17:19:42,468] [2887 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'OnlineLibraries' [Version: 1.0; Authors: Morpheus_xx, Valk; ID: 'b32504f3-4374-4640-94a1-16e1dee84c3c']
    [2014-09-18 17:19:42,469] [2888 ] [Main ] [INFO ] - PluginManager: Plugin 'OnlineLibraries' [Version: 1.0; Authors: Morpheus_xx, Valk; ID: 'b32504f3-4374-4640-94a1-16e1dee84c3c'] enabled.
    [2014-09-18 17:19:42,469] [2888 ] [Main ] [INFO ] - PluginManager: Plugin 'BluRayMetadataExtractor' [Version: 1.0; Authors: Morpheus_xx; ID: 'fe6076a1-8c38-416c-8129-a80942fcfb68'] enabled.
    [2014-09-18 17:19:42,471] [2890 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'ConfigurationManager' [Version: 1.0; Authors: SMa, Albert; ID: '1aff4467-64b0-4ca1-af28-9aedf3525bce']
    [2014-09-18 17:19:42,472] [2891 ] [Main ] [INFO ] - PluginManager: Plugin 'ConfigurationManager' [Version: 1.0; Authors: SMa, Albert; ID: '1aff4467-64b0-4ca1-af28-9aedf3525bce'] enabled.
    [2014-09-18 17:19:42,473] [2892 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'FanArt Service Plugin' [Version: 1.0; Authors: Morpheus_xx; ID: 'bda68c24-eea3-47d0-b43a-86e086e43ae1']
    [2014-09-18 17:19:42,473] [2892 ] [Main ] [INFO ] - PluginManager: Plugin 'FanArt Service Plugin' [Version: 1.0; Authors: Morpheus_xx; ID: 'bda68c24-eea3-47d0-b43a-86e086e43ae1'] enabled.
    [2014-09-18 17:19:42,478] [2897 ] [Main ] [DEBUG] - PluginManager: Trying to activate plugin 'FanArt Service Plugin' (id 'bda68c24-eea3-47d0-b43a-86e086e43ae1')
    [2014-09-18 17:19:42,503] [2922 ] [Main ] [DEBUG] - PluginManager: Checking activation of plugin dependency 'b32504f3-4374-4640-94a1-16e1dee84c3c' for plugin 'FanArt Service Plugin'
    [2014-09-18 17:19:42,504] [2923 ] [Main ] [DEBUG] - PluginManager: Trying to activate plugin 'OnlineLibraries' (id 'b32504f3-4374-4640-94a1-16e1dee84c3c')
    [2014-09-18 17:19:42,525] [2944 ] [Main ] [INFO ] - PluginManager: Plugin 'OnlineLibraries' (id 'b32504f3-4374-4640-94a1-16e1dee84c3c') activated.
    [2014-09-18 17:19:42,595] [3014 ] [Main ] [INFO ] - FanArt Service Plugin v1.0 [Provides access to fan art from MP2 clients] by Morpheus_xx
    [2014-09-18 17:19:42,597] [3016 ] [Main ] [INFO ] - PluginManager: Plugin 'FanArt Service Plugin' (id 'bda68c24-eea3-47d0-b43a-86e086e43ae1') activated.
    [2014-09-18 17:19:42,597] [3016 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'Local FanArt provider' [Version: 1.0; Authors: Morpheus_xx; ID: '584814be-14cb-4dfc-85f7-94b5a90f7fb3']
    [2014-09-18 17:19:42,598] [3017 ] [Main ] [INFO ] - PluginManager: Plugin 'Local FanArt provider' [Version: 1.0; Authors: Morpheus_xx; ID: '584814be-14cb-4dfc-85f7-94b5a90f7fb3'] enabled.
    [2014-09-18 17:19:42,598] [3017 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'Movies FanArt Provider' [Version: 1.0; Authors: Morpheus_xx; ID: '43b51dc0-4ca0-4e55-9c0d-d25b06638909']
    [2014-09-18 17:19:42,599] [3018 ] [Main ] [INFO ] - PluginManager: Plugin 'Movies FanArt Provider' [Version: 1.0; Authors: Morpheus_xx; ID: '43b51dc0-4ca0-4e55-9c0d-d25b06638909'] enabled.
    [2014-09-18 17:19:42,599] [3018 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'FreeImage Library' [Version: 3.15.4.1; Authors: Morpheus_xx; ID: '94b90d7c-ef2e-466c-9fde-e9f57472761a']
    [2014-09-18 17:19:42,599] [3018 ] [Main ] [INFO ] - PluginManager: Plugin 'FreeImage Library' [Version: 3.15.4.1; Authors: Morpheus_xx; ID: '94b90d7c-ef2e-466c-9fde-e9f57472761a'] enabled.
    [2014-09-18 17:19:42,600] [3019 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'ImageMetadataExtractor' [Version: 1.0; Authors: Frodo, Morpheus_xx; ID: '059f49e5-e7fb-43bd-b859-49baad497ffa']
    [2014-09-18 17:19:42,600] [3019 ] [Main ] [INFO ] - PluginManager: Plugin 'ImageMetadataExtractor' [Version: 1.0; Authors: Frodo, Morpheus_xx; ID: '059f49e5-e7fb-43bd-b859-49baad497ffa'] enabled.
    [2014-09-18 17:19:42,601] [3020 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'IsoResourceProvider' [Version: 1.0; Authors: Bavarian; ID: '112728b1-f71d-4284-9e5c-3462e8d3c74d']
    [2014-09-18 17:19:42,601] [3020 ] [Main ] [INFO ] - PluginManager: Plugin 'IsoResourceProvider' [Version: 1.0; Authors: Bavarian; ID: '112728b1-f71d-4284-9e5c-3462e8d3c74d'] enabled.
    [2014-09-18 17:19:42,601] [3020 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'MatroskaLib' [Version: 5.9.0; Authors: Morpheus_xx; ID: '3f5077f0-16e8-47e7-ad4b-e295812c174a']
    [2014-09-18 17:19:42,602] [3021 ] [Main ] [INFO ] - PluginManager: Plugin 'MatroskaLib' [Version: 5.9.0; Authors: Morpheus_xx; ID: '3f5077f0-16e8-47e7-ad4b-e295812c174a'] enabled.
    [2014-09-18 17:19:42,602] [3021 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'MediaInfo' [Version: 1.0; Authors: Team MediaPortal, Third party: Jerome Martinez; ID: 'd418c9c9-6d2a-44ed-adc2-16345294b019']
    [2014-09-18 17:19:42,603] [3022 ] [Main ] [INFO ] - PluginManager: Plugin 'MediaInfo' [Version: 1.0; Authors: Team MediaPortal, Third party: Jerome Martinez; ID: 'd418c9c9-6d2a-44ed-adc2-16345294b019'] enabled.
    [2014-09-18 17:19:42,603] [3022 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'MoviesMetadataExtractor' [Version: 1.0; Authors: Morpheus_xx; ID: 'c2800928-8a57-4979-a95f-3ce6f3ebab92']
    [2014-09-18 17:19:42,603] [3022 ] [Main ] [INFO ] - PluginManager: Plugin 'MoviesMetadataExtractor' [Version: 1.0; Authors: Morpheus_xx; ID: 'c2800928-8a57-4979-a95f-3ce6f3ebab92'] enabled.
    [2014-09-18 17:19:42,604] [3023 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'NetworkNeighborhoodResourceProvider' [Version: 1.0; Authors: Albert; ID: 'b1f33f5c-3e2c-4151-9dce-9f965ca5cdfc']
    [2014-09-18 17:19:42,604] [3023 ] [Main ] [INFO ] - PluginManager: Plugin 'NetworkNeighborhoodResourceProvider' [Version: 1.0; Authors: Albert; ID: 'b1f33f5c-3e2c-4151-9dce-9f965ca5cdfc'] enabled.
    [2014-09-18 17:19:42,605] [3024 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'SeriesMetadataExtractor' [Version: 1.0; Authors: Morpheus_xx; ID: 'a2d018d4-97e9-4b37-a7c3-31fd270277d0']
    [2014-09-18 17:19:42,605] [3024 ] [Main ] [INFO ] - PluginManager: Plugin 'SeriesMetadataExtractor' [Version: 1.0; Authors: Morpheus_xx; ID: 'a2d018d4-97e9-4b37-a7c3-31fd270277d0'] enabled.
    [2014-09-18 17:19:42,606] [3025 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'ServerBase' [Version: 1.0; Authors: Albert; ID: 'ac442f92-02f6-44be-8434-094b84a1892a']
    [2014-09-18 17:19:42,607] [3026 ] [Main ] [INFO ] - PluginManager: Plugin 'ServerBase' [Version: 1.0; Authors: Albert; ID: 'ac442f92-02f6-44be-8434-094b84a1892a'] enabled.
    [2014-09-18 17:19:42,607] [3026 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'Server Settings Plugin' [Version: 1.0; Authors: Morpheus_xx; ID: '4a5273f8-5c5c-42ad-aa3c-cb326246bdc1']
    [2014-09-18 17:19:42,608] [3027 ] [Main ] [INFO ] - PluginManager: Plugin 'Server Settings Plugin' [Version: 1.0; Authors: Morpheus_xx; ID: '4a5273f8-5c5c-42ad-aa3c-cb326246bdc1'] enabled.
    [2014-09-18 17:19:42,608] [3027 ] [Main ] [DEBUG] - PluginManager: Trying to activate plugin 'Server Settings Plugin' (id '4a5273f8-5c5c-42ad-aa3c-cb326246bdc1')
    [2014-09-18 17:19:42,631] [3050 ] [Main ] [INFO ] - Server Settings Plugin v1.0 [Provides services for remote configuration of server settings] by Morpheus_xx
    [2014-09-18 17:19:42,639] [3058 ] [Main ] [DEBUG] - ServerSettings: Registering ServerSettings service.
    [2014-09-18 17:19:42,640] [3059 ] [Main ] [DEBUG] - ServerSettings: Adding ServerSettings service to MP2 backend root device
    [2014-09-18 17:19:42,641] [3060 ] [Main ] [DEBUG] - ServerSettings: Adding Plugins folder to private path
    [2014-09-18 17:19:42,642] [3061 ] [Main ] [INFO ] - PluginManager: Plugin 'Server Settings Plugin' (id '4a5273f8-5c5c-42ad-aa3c-cb326246bdc1') activated.
    [2014-09-18 17:19:42,642] [3061 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'ShellThumbnailProvider' [Version: 1.0; Authors: Morpheus_xx; ID: 'a2cf09c5-d4d0-43ac-89a8-3ecf5ed2510b']
    [2014-09-18 17:19:42,643] [3062 ] [Main ] [INFO ] - PluginManager: Plugin 'ShellThumbnailProvider' [Version: 1.0; Authors: Morpheus_xx; ID: 'a2cf09c5-d4d0-43ac-89a8-3ecf5ed2510b'] enabled.
    [2014-09-18 17:19:42,643] [3062 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'SQLCEDatabase' [Version: 1.0; Authors: offbyone; ID: '2a8624ca-6e65-414f-a0db-22fb62a36dc7']
    [2014-09-18 17:19:42,644] [3063 ] [Main ] [INFO ] - PluginManager: Plugin 'SQLCEDatabase' [Version: 1.0; Authors: offbyone; ID: '2a8624ca-6e65-414f-a0db-22fb62a36dc7'] enabled.
    [2014-09-18 17:19:42,644] [3063 ] [Main ] [DEBUG] - PluginManager: Trying to activate plugin 'SQLCEDatabase' (id '2a8624ca-6e65-414f-a0db-22fb62a36dc7')
    [2014-09-18 17:19:42,660] [3079 ] [Main ] [INFO ] - PluginManager: Plugin 'SQLCEDatabase' (id '2a8624ca-6e65-414f-a0db-22fb62a36dc7') activated.
    [2014-09-18 17:19:42,661] [3080 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'Tve3RecordingMetadataExtractor' [Version: 1.0; Authors: Morpheus_xx; ID: '89f8dd04-1cd5-4f78-8105-6979157e8936']
    [2014-09-18 17:19:42,661] [3080 ] [Main ] [INFO ] - PluginManager: Plugin 'Tve3RecordingMetadataExtractor' [Version: 1.0; Authors: Morpheus_xx; ID: '89f8dd04-1cd5-4f78-8105-6979157e8936'] enabled.
    [2014-09-18 17:19:42,662] [3081 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'VideoMetadataExtractor' [Version: 1.0; Authors: Frodo, Albert; ID: '21fc7331-8e52-4ced-ad3b-8b27b050d6c5']
    [2014-09-18 17:19:42,662] [3081 ] [Main ] [INFO ] - PluginManager: Plugin 'VideoMetadataExtractor' [Version: 1.0; Authors: Frodo, Albert; ID: '21fc7331-8e52-4ced-ad3b-8b27b050d6c5'] enabled.
    [2014-09-18 17:19:42,663] [3082 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'VideoThumbnailer' [Version: 1.1; Authors: Morpheus_xx; ID: 'fb0aa0ed-97b2-4721-be74-ac67e77a17b2']
    [2014-09-18 17:19:42,663] [3082 ] [Main ] [INFO ] - PluginManager: Plugin 'VideoThumbnailer' [Version: 1.1; Authors: Morpheus_xx; ID: 'fb0aa0ed-97b2-4721-be74-ac67e77a17b2'] enabled.
    [2014-09-18 17:19:42,664] [3083 ] [Main ] [DEBUG] - PluginManager: Trying to enable plugin 'ZipResourceProvider' [Version: 1.0; Authors: Bavarian; ID: '6b042db8-69ad-4b57-b869-1bcea4e43c77']
    [2014-09-18 17:19:42,664] [3083 ] [Main ] [INFO ] - PluginManager: Plugin 'ZipResourceProvider' [Version: 1.0; Authors: Bavarian; ID: '6b042db8-69ad-4b57-b869-1bcea4e43c77'] enabled.
    [2014-09-18 17:19:42,664] [3083 ] [Main ] [DEBUG] - PluginManager: Ready
    [2014-09-18 17:19:42,665] [3084 ] [Main ] [INFO ] - ServiceRegistration: Loading services from plugin manager at location '/Services'
    [2014-09-18 17:19:42,719] [3138 ] [Main ] [DEBUG] - ThreadPool.CheckThreadIncrementRequired(): Incrementing thread count 1 with 1
    [2014-09-18 17:19:42,803] [3221 ] [Main ] [DEBUG] - ThreadPool.StartThreads(): Thread Thread15 started
    [2014-09-18 17:19:42,886] [3304 ] [Main ] [DEBUG] - PluginManager: Trying to activate plugin 'ConfigurationManager' (id '1aff4467-64b0-4ca1-af28-9aedf3525bce')
    [2014-09-18 17:19:43,018] [3436 ] [Main ] [INFO ] - PluginManager: Plugin 'ConfigurationManager' (id '1aff4467-64b0-4ca1-af28-9aedf3525bce') activated.
    [2014-09-18 17:19:43,525] [3943 ] [Main ] [WARN ] - chinthaka_new
    [2014-09-18 17:19:45,261] [5679 ] [Main ] [DEBUG] - StringManager: Adding language directory 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\AudioCDResourceProvider\Language'
    [2014-09-18 17:19:45,262] [5680 ] [Main ] [DEBUG] - StringManager: Adding language directory 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\ConfigurationManager\Language'
    [2014-09-18 17:19:45,264] [5682 ] [Main ] [DEBUG] - StringManager: Adding language directory 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\IsoResourceProvider\Language'
    [2014-09-18 17:19:45,264] [5682 ] [Main ] [DEBUG] - StringManager: Adding language directory 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\NetworkNeighborhoodResourceProvider\Language'
    [2014-09-18 17:19:45,265] [5683 ] [Main ] [DEBUG] - StringManager: Adding language directory 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\ServerBase\Language'
    [2014-09-18 17:19:45,266] [5684 ] [Main ] [DEBUG] - StringManager: Adding language directory 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\ZipResourceProvider\Language'
    [2014-09-18 17:19:45,361] [5779 ] [Main ] [WARN ] - Failed to create CultureInfo for language resource file 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\AudioCDResourceProvider\Language\strings_ku.xml'
    [2014-09-18 17:19:45,389] [5807 ] [Main ] [WARN ] - Failed to create CultureInfo for language resource file 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\ConfigurationManager\Language\strings_ku.xml'
    [2014-09-18 17:19:45,440] [5858 ] [Main ] [WARN ] - Failed to create CultureInfo for language resource file 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\IsoResourceProvider\Language\strings_ku.xml'
    [2014-09-18 17:19:45,457] [5875 ] [Main ] [WARN ] - Failed to create CultureInfo for language resource file 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\NetworkNeighborhoodResourceProvider\Language\strings_ku.xml'
    [2014-09-18 17:19:45,494] [5912 ] [Main ] [WARN ] - Failed to create CultureInfo for language resource file 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\ServerBase\Language\strings_ku.xml'
    [2014-09-18 17:19:45,515] [5933 ] [Main ] [WARN ] - Failed to create CultureInfo for language resource file 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\ZipResourceProvider\Language\strings_ku.xml'
    [2014-09-18 17:19:45,641] [6059 ] [Main ] [INFO ] - ImporterWorker: Startup requested...
    [2014-09-18 17:19:45,795] [6213 ] [Main ] [INFO ] - ResourceServer: Started HTTP server (IPv4) on address 0.0.0.0 at port 29307
    [2014-09-18 17:19:45,796] [6214 ] [17 ] [DEBUG] - TaskScheduler: UpdateTask: Task: b4773c3b-67ae-4832-916f-317a29519aa2, Owner: ImporterWorker, Occurrence: Repeat, Type: time-based: D:-1-H:2-M:0, LastRun: 1/1/0001 12:00:00 AM, NextRun: 9/19/2014 2:00:00 AM, Expires: 12/31/9999 11:59:59 PM, Wakeup: True, Force: True
    [2014-09-18 17:19:45,858] [6276 ] [Main ] [INFO ] - ResourceServer: Started HTTP server (IPv6) on address :: at port 29308
    [2014-09-18 17:19:45,879] [6297 ] [17 ] [INFO ] - ImporterWorker: Started
    [2014-09-18 17:19:45,924] [6342 ] [Main ] [DEBUG] - Will listen on IPs filtered by []
    [2014-09-18 17:19:45,953] [6371 ] [Main ] [DEBUG] - UPnPControlPoint: HTTP listener for IPv4 protocol started at address '0.0.0.0' on port '29309'
    [2014-09-18 17:19:45,955] [6373 ] [Main ] [DEBUG] - UPnPControlPoint: HTTP listener for IPv6 protocol started at address '::' on port '29310'
    [2014-09-18 17:19:46,839] [7257 ] [Main ] [INFO ] - DatabaseManager: Subschema 'MediaPortal-Basis' present in version 1.0
    [2014-09-18 17:19:46,882] [7300 ] [Main ] [INFO ] - DatabaseSubSchemaManager: Subschema 'MediaLibrary' present in version 1.1
    [2014-09-18 17:19:46,992] [7410 ] [Main ] [FATAL] - Error starting application
    System.InvalidCastException: Specified cast is not valid.
    at System.Data.SqlClient.SqlBuffer.get_SqlGuid()
    at System.Data.SqlClient.SqlDataReader.GetGuid(Int32 i)
    at MediaPortal.Backend.Services.Database.DBUtils.ReadSimpleDBValue(Type type, IDataReader reader, Int32 colIndex)
    at MediaPortal.Database.SQLCE.SQLCEDatabase.ReadDBValue(Type type, IDataReader reader, Int32 colIndex)
    at MediaPortal.Backend.Services.Database.SQLDatabaseExtension.ReadDBValue[T](ISQLDatabase database, IDataReader reader, Int32 colIndex)
    at MediaPortal.Backend.Services.MediaLibrary.MIA_Management.SelectAllMediaItemAspectMetadataSerializations()
    at MediaPortal.Backend.Services.MediaLibrary.MIA_Management.SelectAllManagedMediaItemAspectMetadata()
    at MediaPortal.Backend.Services.MediaLibrary.MIA_Management.LoadMIATypeCache()
    at MediaPortal.Backend.Services.MediaLibrary.MIA_Management..ctor()
    at MediaPortal.Backend.Services.MediaLibrary.MediaLibrary.Startup()
    at MediaPortal.Backend.BackendExtension.StartupBackendServices()
    at MediaPortal.Server.ApplicationLauncher.Start()
    [2014-09-18 17:19:47,228] [7646 ] [Main ] [DEBUG] - BackendExtension: Removing IUserProfileDataManagement service
    [2014-09-18 17:19:47,230] [7648 ] [Main ] [DEBUG] - BackendExtension: Removing IClientManager service
    [2014-09-18 17:19:47,230] [7648 ] [Main ] [DEBUG] - BackendExtension: Removing IBackendServer service
    [2014-09-18 17:19:47,251] [7669 ] [Main ] [DEBUG] - BackendExtension: Removing IMediaItemAspectTypeRegistration service
    [2014-09-18 17:19:47,252] [7670 ] [Main ] [DEBUG] - BackendExtension: Removing IMediaLibrary service
    [2014-09-18 17:19:47,253] [7671 ] [Main ] [DEBUG] - BackendExtension: Removing IDatabaseManager service
    [2014-09-18 17:19:47,254] [7672 ] [Main ] [DEBUG] - BackendExtension: Removing ISystemResolver service
    [2014-09-18 17:19:47,257] [7675 ] [Main ] [DEBUG] - ApplicationCore: Removing IThumbnailGenerator service
    [2014-09-18 17:19:47,258] [7676 ] [Main ] [DEBUG] - ApplicationCore: Removing IRemoteResourceInformationService
    [2014-09-18 17:19:47,259] [7677 ] [Main ] [DEBUG] - ApplicationCore: Removing IResourceMountingService
    [2014-09-18 17:19:47,262] [7680 ] [Main ] [INFO ] - Dokan: Successfully unmounted drive 'S'
    [2014-09-18 17:19:47,265] [7683 ] [Main ] [DEBUG] - ApplicationCore: Removing IResourceServer service
    [2014-09-18 17:19:47,275] [7693 ] [Main ] [DEBUG] - ApplicationCore: Removing IImporterWorker service
    [2014-09-18 17:19:47,338] [7756 ] [Main ] [INFO ] - ImporterWorker: Shutdown
    [2014-09-18 17:19:47,339] [7757 ] [Main ] [DEBUG] - ApplicationCore: Removing IMediaAccessor service
    [2014-09-18 17:19:47,339] [7757 ] [Main ] [DEBUG] - ApplicationCore: Removing ITaskScheduler service
    [2014-09-18 17:19:47,339] [7757 ] [Main ] [DEBUG] - ApplicationCore: Removing ILocalization service
    [2014-09-18 17:19:47,342] [7760 ] [Main ] [DEBUG] - ApplicationCore: Removing ISettingsManager service
    [2014-09-18 17:19:47,342] [7760 ] [Main ] [DEBUG] - ApplicationCore: Removing IPluginManager service
    [2014-09-18 17:19:47,343] [7761 ] [Main ] [DEBUG] - ApplicationCore: Removing IMessageBroker service
    [2014-09-18 17:19:47,344] [7762 ] [Main ] [DEBUG] - ApplicationCore: Removing IThreadPool service
    [2014-09-18 17:19:47,344] [7762 ] [Main ] [DEBUG] - ApplicationCore: Removing IRegistry service
    [2014-09-18 17:19:47,345] [7763 ] [Main ] [DEBUG] - ApplicationCore: Removing IPathManager service
    [2014-09-18 17:19:47,345] [7763 ] [Main ] [DEBUG] - ApplicationCore: Removing ILogger service
    [2014-09-18 17:19:48,262] [8680 ] [Dokan ] [DEBUG] - Dokan: DokanMain returned successfully
    [/collapse]
     

    Attachments

    • Crash_19.09.2014_0625.rar
      31.2 KB
    Last edited by a moderator:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    The cause is an invalid cast of SQL Server Guid into a C# Guid:
    Code:
    [2014-09-18 17:19:46,992] [7410 ] [Main ] [FATAL] - Error starting application
    System.InvalidCastException: Specified cast is not valid.
    at System.Data.SqlClient.SqlBuffer.get_SqlGuid()
    at System.Data.SqlClient.SqlDataReader.GetGuid(Int32 i)
    at MediaPortal.Backend.Services.Database.DBUtils.ReadSimpleDBValue(Type type, IDataReader reader, Int32 colIndex)
    at MediaPortal.Database.SQLCE.SQLCEDatabase.ReadDBValue(Type type, IDataReader reader, Int32 colIndex)
    You have to check the type mapping and test what is working.

    Once you fixed this make sure to:
    1. Create a new PluginID (plugin.xml) to avoid conflicts
    2. Use a proper namespace for your new plugin (should be MediaPortal.Database.SQLServer) and name classes accordingly ("SQLDatabase" without CE).
     

    chinthaka

    Portal Member
    September 11, 2014
    5
    0
    36
    Home Country
    Sri Lanka Sri Lanka
    I previously change 'SQLserverCEDatabase' plugin codes to SQLServer then i created new project for 'SQLserverDatabase' and add add same code previously i mentioned. Then i add plugin.xml file with new package id and packages.config file but i can't find the version no for (package id="Microsoft.SqlServer" version="11.0.1") how can i find the package version.
    when i create new project and try to add refferences to that project for (MediaPortal.Backend,MediaPortal.Common and MediaPortal.utilities) but i cannot add references using Add references -> solution -> project -> MediaPortal.Backend. What is the correct way for add references.

    No need to migrate an existing database. The database will be created automatically on server start. The database provider takes care for proper establishing of a connection and datatype mappings.

    How can i create SQL server database in MP2 using database provider.

    when i creating this plugin i only build the plugin and copy the bin folder files copy to the 'C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\ folder, should i build complete MP2 server project and install it again?


    Thank you
     
    Last edited:

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    829
    Home Country
    Denmark Denmark
    @morpheus_xx
    I have a MS SQL Express server running, so I thought why not finish this plugin.
    Is this something that could be of interest for MediaPortal 2? It would probably require changes to the installer or maybe even its own installer because the database creation cannot by done by the MediaPortal 2 service. If still of interest, should I create a branch?

    I also found a problem in the file: MediaLibrary-1.0-1.1.sql.
    The following SQL syntax is not supported by MS SQL:
    SQL:
    ALTER TABLE MIA_TYPES ADD COLUMN CREATION_DATE %TIMESTAMP%;
    Instead it should be:
    SQL:
    ALTER TABLE MIA_TYPES ADD CREATION_DATE %TIMESTAMP%;
    which is also supported by MySQL, SQLite and SQLCE plugins (I haven't tested the other two, are they still relevant?).
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Sure, this could be an alternative. But I wouldn't integrate it directly into installer if manual setup steps are required to get it working. So it's more an "advanced users" feature...

    Also the compatibility with the SlimTv.Service3(.5) plugins need to be checked. I only tested them with SQlite recently.
     

    Users who are viewing this thread

    Top Bottom