.jsp File That Can Modify Datasource Parameters

Revin Yin shared this idea 6 years ago
Completed

We want a simple way (which can be achieved by a script) to modify the data source (only need to modify the database host and password) from a backup database in new environment. Ideally this should be similar to the already existing ResetAdmin.jsp.

Replies (4)

photo
1

Hi Revin,


Thanks for the feedback.

At this point in time, this is not something that we plan on supporting, as end users can build their own web pages to do this exact thing, as you already know which tables hold the data.

However, another option would be to create an XML export of the data source. Then you can modify that XML with the relevant changes and import in, replacing the existing data source.


Sorry for the bad news on this! Please let me know if you have further questions/comments on this.


Regards,

David

photo
1

Hello again Revin,


here are 2 more ideas on how your requirement might be fulfilled (the 1st one is much less effort than the 2nd one):


1) Command-Line Data Source Creation


I don't think this method would not take much work, as the forum article in the above link says, it is possible to create a new data source from the command with the simple command:

java -cp <classpath> com.hof.standalone.CreateDataSource <propertiesfile>


and of course, you could easily create a script to run this command.


2) Web Services


This method would take a bit more effort, however, it may give you more flexibility if it turns out that you need it in the future:


There are web services for exporting and importing content, therefore you could programmatically call the export web service function, then modify the host and password parameters and then call the import web service function (and you would be able to overwrite the original data source during the import process)


If you come across any questions or issues regarding either of the above 2 methods then please don't hesitate to post a new Question on our Yellowfin Community.


regards,

Big Dave

photo
1

Hi,


The example properties file is not available. Could you upload it again?

By the way, can this tool only create a new data source or also update an existing data source?


Thanks.

photo
1

Hi Revin,

It's actually included in the Yellowfin installation:


<Yellowfin home>\development\examples\standalone\datasource.properties


And it doesn't do updates, just creates.


regards,

Big Dave

Leave a Comment
 
Attach a file