Help with TV Server SQL problem (1 Viewer)

robbo100

Retired Team Member
  • Premium Supporter
  • May 5, 2009
    1,291
    308
    UK
    Home Country
    United Kingdom United Kingdom
    Hi there.

    My father is getting an error which indicates that the TV serivce database is currupt after he had a blue screen of death caused by another bit of software (PDVD I think).

    No TV channels can be tuned and the EPG is not working - although all channels are correctly listed in the TV Server Configuration.

    He is running MP 1.1.0.0 with SVN 24669 on XP SP3, but since the problem was caused by a crash, I have reported it here, as I do not believe it to be a dev issue to bug report.

    The error is showing an SQL problem, but I know nothing about fixing this sort of thing, so can anyone give me any pointers as to the best approach to fix this. (he has tried recovering to a previously backed up Mediaportal directory and a re-install of the SVN with no sucess).

    An extract from the error log is as below:

    2010-01-26 21:38:25.281250 [4]: Exception :Error: StatementErrorUnclassified
    Gentle.Common.GentleException: show columns from `program` ---> MySql.Data.MySqlClient.MySqlException: Table '.\mptvdb\program' is marked as crashed and should be repaired
    at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
    at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
    at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
    at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
    at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
    at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Gentle.Framework.SqlStatement.Execute(IDbConnection conn, IDbTransaction tr)
    --- End of inner exception stack trace ---
    at Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
    at Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
    at Gentle.Provider.MySQL.MySQLAnalyzer.Analyze(String tableName)
    at Gentle.Framework.GentleAnalyzer.UpdateObjectMap(ObjectMap map)
    at Gentle.Framework.ObjectFactory.ConstructMap(PersistenceBroker broker, Type type)
    at Gentle.Framework.ObjectFactory.GetMap(PersistenceBroker broker, Type type)
    at Gentle.Framework.SqlBuilder..ctor(IGentleProvider provider, StatementType stmtType, Type type, LogicalOperator logicalOperator)
    at Gentle.Framework.SqlBuilder..ctor(StatementType stmtType, Type type)
    at TvDatabase.Channel.UpdateNowAndNext()
    at TvDatabase.Channel.get_CurrentProgram()
    at TvService.TvCardContext.OnZap(User user)
    at TvService.TimeShifter.Start(User& user, String& fileName)MySql.Data.MySqlClient.MySqlException: Table '.\mptvdb\program' is marked as crashed and should be repaired
    at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
    at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
    at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
    at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
    at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
    at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Gentle.Framework.SqlStatement.Execute(IDbConnection conn, IDbTransaction tr)

    2010-01-26 21:39:23.875000 [15]: Exception :Error: DeveloperErrorUnclassified
    Gentle.Common.GentleException: The columns idProgram, idChannel, startTime, endTime, title, description, genre, state, originalAirDate, seriesNum, episodeNum, episodePart, episodeName, starRating, classification, parentalRating in table Program do not exist.
    at Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
    at Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
    at Gentle.Common.Check.Fail(Error error, Object[] args)
    at Gentle.Framework.GentleAnalyzer.UpdateObjectMap(ObjectMap map)
    at Gentle.Framework.ObjectFactory.ConstructMap(PersistenceBroker broker, Type type)
    at Gentle.Framework.ObjectFactory.GetMap(PersistenceBroker broker, Type type)
    at Gentle.Framework.SqlBuilder..ctor(IGentleProvider provider, StatementType stmtType, Type type, LogicalOperator logicalOperator)
    at Gentle.Framework.SqlBuilder..ctor(StatementType stmtType, Type type)
    at TvDatabase.Channel.UpdateNowAndNext()
    at TvDatabase.Channel.get_CurrentProgram()
    at TvService.TvCardContext.OnZap(User user)
    at TvService.TimeShifter.Start(User& user, String& fileName)

    2010-01-26 21:48:32.375000 [EPG Update thread]: Exception :Error: DeveloperErrorUnclassified
    Gentle.Common.GentleException: The columns idProgram, idChannel, startTime, endTime, title, description, genre, state, originalAirDate, seriesNum, episodeNum, episodePart, episodeName, starRating, classification, parentalRating in table Program do not exist.
    at Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
    at Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
    at Gentle.Common.Check.Fail(Error error, Object[] args)
    at Gentle.Framework.GentleAnalyzer.UpdateObjectMap(ObjectMap map)
    at Gentle.Framework.ObjectFactory.ConstructMap(PersistenceBroker broker, Type type)
    at Gentle.Framework.ObjectFactory.GetMap(PersistenceBroker broker, Type type)
    at Gentle.Framework.SqlBuilder..ctor(IGentleProvider provider, StatementType stmtType, Type type, LogicalOperator logicalOperator)
    at Gentle.Framework.SqlBuilder..ctor(StatementType stmtType, Type type)
    at TvDatabase.TvBusinessLayer.RemoveOldPrograms(Int32 idChannel)
    at TvDatabase.EpgDBUpdater.ImportPrograms(Channel dbChannel, IList`1 epgPrograms)
    at TvDatabase.EpgDBUpdater.UpdateEpgForChannel(EpgChannel epgChannel)
    at TvService.EpgCard.UpdateDatabaseThread()
     

    Cybertex

    Portal Pro
    August 9, 2007
    200
    14
    Milano
    Home Country
    Italy Italy
    Hi, I don't know mySQL, but logs are clearly saying that db is corrupted. There are some procedures to attempt to repair/fix the database (the success depends on the entity of the corruption); just do a google search for "mysql crash repair".

    More simple, stop tvserver service, drop the database, start tv server configuration. It should recreate an empty db (a rescan and reconfigure is needed).

    Bye
     

    robbo100

    Retired Team Member
  • Premium Supporter
  • May 5, 2009
    1,291
    308
    UK
    Home Country
    United Kingdom United Kingdom
    Thanks Cybertex

    The feedback I am getting back from my father (after deleting the database) is that things seem to be improving.

    Thanks for your help

    Robbo100
     

    Users who are viewing this thread

    Top Bottom