Thursday, 10 March 2011

Application to refresh databases

This is an article to discuss a new application that I am working on with some colleagues.  We are all developers and we all know the perils of releasing templates into Production and the pitfalls that can occur.

I am aware of the TeamStudio product called Build Manager, which is a great product, but not all companies are free to spend much money at the moment and so I was tasked to provide another solution.  I am sure there are other tools, and I would be glad to hear from you, if you know such as tool. 
Having brain stormed the idea, it seems as if this is a straight forward LotusScript agent, with some API.  
 We will have a single document with a series of fields for Source db server/path, Target db server/path and then the various options to trigger events below.

1. Get the source database from the uidoc
2. Source - $build fields tweaked
3. Source - List In db catalogue And Set category
4. Source - Remove Any prohibit design flags
5. Source - Remove inherit From
6. Source - Recompile ls
7. Source - Change the database properties - update the template name and tick "I am a template"
8. Source  - Backup the database - with or without documents
9. Backup database - Stop all scheduled agents
10. Target  - Get the target database
11. Target - Backup the database - with or without documents
12. Target - Remove all prohibit design flags
13. Target - Remove inherit
14. Target - Set the design template to inherit from the value set in step 7
15. Target - refresh design
16. Target - Set all agents to run on the correct server
17. Source - disable all scheduled agents
18. Target - Set all agents "Run On behalf of", if required
19. Target - Sign the database design
20. Source and Target - Copy missing documents From Source To Target using a list of views.  This will find missing documents and copy them across.
21. Target -  Set the design template to inherit from the value set in step 7 and then append "-done" to avoid accidental overwrites

I think that is everything.  Please let me know if you think I have forgotten anything.

We will build it, test it and then hope to post on OpenNTF for all to view and use.

No comments:

Post a Comment