home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
General Support
Solution: (TV)Service cannot be started db errors
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MPKeith" data-source="post: 650395" data-attributes="member: 82758"><p>Just a like to share a tip that might help someone with a problem that is not a TVService bug per se, but does affect many services including TVService 1.1.0 final and earlier that try to access MS SQL server at system startup. </p><p></p><p>Symtoms (may vary slightly):</p><p>Event Log (System-Application) has two "Failure Audit - MSSQLSERVER - Logon" events:</p><p>"Login failed for user 'sa'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]"</p><p></p><p>Followed shortly after by a TVService error in the eventlog:</p><p></p><p>"Service cannot be started. Error: DatabaseUnavailableUnclassified</p><p>Gentle.Common.GentleException: The database backend (provider SQLServer) could not be reached.</p><p>Check the connection string:...</p><p>System.Data.SqlClient.SqlException: Cannot open database "MpTvDb" requested by the login. The login failed.</p><p>Login failed for user 'sa'."</p><p></p><p>Attempting to startup TVService manually after startup works perfectly without connection problems.</p><p></p><p>Cause:</p><p>This problem is very rare only if you use mssqlserver 2005 or express, but is a <a href="http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server/51674/Delay-in-starting-the-databases-with-SQL-Server-2008" target="_blank">common problem</a> if are using MS sql server <a href="http://www.go4answers.com/Example/unable-access-database-startup-machine-63175.aspx" target="_blank">2008 and higher</a>.</p><p></p><p>The problem is caused by MS Sql server 2008 performing new recovery startup checks after startup, but before individual databases like MpTvDb are online. The <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;193888" target="_blank">service dependency</a> on sql server is not enough as it only allows TVService to know when SQL service is started, but each individual database may come online many minutes later, especially if you have other databases to bring online <a href="http://www.google.com/search?q=SQL+Server+2008+startup+recovery+VLFs" target="_blank">with large logs</a> - by which time TVService has already tried and failed to logon.</p><p></p><p>Dirty Quick Fix Solution:</p><p>Add a delay to your TVService startup long enough for MSSQL Server to bring MpTvDb online. There is no option in TVService settings, but you can use a bat file to launch TVservice after a delay.</p><p></p><p>Longer term elegant solution: Use RequestAdditionalTime in TVService start to wait much longer than the current timeout:</p><p><a href="http://stackoverflow.com/questions/216401/windows-service-startup-timeout" target="_blank">windows service startup timeout - Stack Overflow</a></p><p></p><p>Hope this helps someone.</p></blockquote><p></p>
[QUOTE="MPKeith, post: 650395, member: 82758"] Just a like to share a tip that might help someone with a problem that is not a TVService bug per se, but does affect many services including TVService 1.1.0 final and earlier that try to access MS SQL server at system startup. Symtoms (may vary slightly): Event Log (System-Application) has two "Failure Audit - MSSQLSERVER - Logon" events: "Login failed for user 'sa'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]" Followed shortly after by a TVService error in the eventlog: "Service cannot be started. Error: DatabaseUnavailableUnclassified Gentle.Common.GentleException: The database backend (provider SQLServer) could not be reached. Check the connection string:... System.Data.SqlClient.SqlException: Cannot open database "MpTvDb" requested by the login. The login failed. Login failed for user 'sa'." Attempting to startup TVService manually after startup works perfectly without connection problems. Cause: This problem is very rare only if you use mssqlserver 2005 or express, but is a [URL="http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server/51674/Delay-in-starting-the-databases-with-SQL-Server-2008"]common problem[/URL] if are using MS sql server [URL="http://www.go4answers.com/Example/unable-access-database-startup-machine-63175.aspx"]2008 and higher[/URL]. The problem is caused by MS Sql server 2008 performing new recovery startup checks after startup, but before individual databases like MpTvDb are online. The [URL="http://support.microsoft.com/default.aspx?scid=kb;EN-US;193888"]service dependency[/URL] on sql server is not enough as it only allows TVService to know when SQL service is started, but each individual database may come online many minutes later, especially if you have other databases to bring online [URL="http://www.google.com/search?q=SQL+Server+2008+startup+recovery+VLFs"]with large logs[/URL] - by which time TVService has already tried and failed to logon. Dirty Quick Fix Solution: Add a delay to your TVService startup long enough for MSSQL Server to bring MpTvDb online. There is no option in TVService settings, but you can use a bat file to launch TVservice after a delay. Longer term elegant solution: Use RequestAdditionalTime in TVService start to wait much longer than the current timeout: [url=http://stackoverflow.com/questions/216401/windows-service-startup-timeout]windows service startup timeout - Stack Overflow[/url] Hope this helps someone. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Solution: (TV)Service cannot be started db errors
Contact us
RSS
Top
Bottom