How do i update a database after modifying the connection? RRS feed

  • Question

  • Based on add-a-data-source-to-tabular-model-analysis-services-amo-tom

    i am trying to update the Database connectionstring changes:

    Import-Module SqlServer
    $newConnectionString = "Connection Timeout=60;User Id=SOME_NEW_ID;Data Source=;Persist Security Info=True;Session Character Set=UTF8"
     $svr = new-Object Microsoft.AnalysisServices.Tabular.Server
    $svr.databases[1].model.datasources[0].ConnectionString = $newConnectionString

    But i am getting errors:

    Unexpected token 'UpdateOptions.ExpandFull' in expression or statement.

    if i do regular Update():


    i get this:

    Method invocation failed because [Microsoft.AnalysisServices.Tabular.ProviderDataSource] does not contain a method named 'Update'

    and if i try SaveChanges():

    I get this error:

    The following exception occurred while retrieving member "SaveChanges": "Encountered an invalid type for a default value."

    • Moved by jrv Sunday, November 11, 2018 3:09 AM Best forum
    Sunday, November 11, 2018 2:54 AM


  • Have you updated the SQLServer module?


    i figured it out!


    Sunday, November 11, 2018 6:37 PM

All replies