Change database from mysql to MSsql? (1 Viewer)

jonm

Portal Pro
January 12, 2009
429
26
Wales
Home Country
Wales Wales
Is there an easy way to switch database from mysql -> MSsql without reinstalling anything?
I found a thread where someone had done this but they uninstalled/re-installed TV server and I don't really want to have to do that. Which config file(s) detail the database that's in use? Any help appreciated...

Thanks

Jon.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    Hello Jon

    Steps would be:
    1. Manually install MS SQL server.
    2. Export all channels and settings from TV Server using the import/export section in TV Server configuration.
    3. Run SetupTv.exe (in TV Server install folder) with the /configure-db command line parameter. You can do this by editing the shortcut on your desktop or by using the command line directly. This should prompt you for DB connection details like when you first install.
    4. Enter the connection details for the MS SQL DB, test connection, then connect. This will create a clean DB with the MS SQL server.
    5. Import the export from step 2.
    6. Start watching TV! :D

    So to be clear: no uninstall/reinstall required.

    mm
     

    jonm

    Portal Pro
    January 12, 2009
    429
    26
    Wales
    Home Country
    Wales Wales
    Hmm, it partially worked. I got SQL server installed OK, and I ran setuptv with the configure-db param, and that seemed to work in that I selected MS SQL Server and clicked Test and it succeeded - but it doesn't appear to have created the database. If I try and start the TV service it fails with:

    2012-12-18 09:38:18.209544 [TVService(6)]: TvService OnStart failed : Error: DatabaseUnavailableUnclassified
    Gentle.Common.GentleException: The database backend (provider SQLServer) could not be reached.
    Check the connection string: Password=MediaPortal;Persist Security Info=True;User ID=sa;Initial Catalog=MpTvDb;Data Source=pvr\SQLEXPRESS;Connection Timeout=30; ---> System.Data.SqlClient.SqlException: Cannot open database "MpTvDb" requested by the login. The login failed.
    Login failed for user 'sa'.

    Is there some step I've missed which creates the database?

    Jon.
     
    Last edited:

    Users who are viewing this thread

    Top Bottom