Change Shared Data Source Programatically?

  • We have a shared datasource which mostly will point at a report db, but occasionally will have to switch to live data, is there a way to programmatically change the db its pointed at.

     

    Maybe as a step on failure/success of sql agent job? Thanks in advance.

     

    (I know I can do this with a parameter based expression embedded I the report - but surely the sensible thing would be to switch on mass by changing the shared source?)

  • So, are you saying you want to update the the DataSource details? How are you wanting to do this? Is Powershell an acceptable solution? Why not log into the web interface and update the shared datasource? What is the reason for needing to switch? I feel like we're missing some information here.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hi Thom

     

    Yes powershell would be acceptable.

     

    I have to run updates on the reporting copy - the updates are done via agent jobs. It the job fails the live data will be a better datasource than the report db.

     

    (the schemas are the same)

     

    So if the job fails at 2.30 am - I'd like to switch the reports the db looks at automatically. Rather than relying on a manual intervention? Thanks

     

     

     

     

  • So you're actually trying to implement a failover?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hmm somewhat?

     

    But from a report copy to the live copy. Bearing in mind the report copy is on Enterprise 2017 and the live on 2008R2 standard. (Don't ask!  ;-))

     

    So I don't think a typical failover is going to work or is it?

     

    So basically - if the data isn't loaded overnight into the report db - want the reports to point at the live db.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply