Home > Domino Tips > Spam and Security > A tool for moving databases: Part II
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SPAM AND SECURITY

A tool for moving databases: Part II


Chuck Connell
03.27.2003
Rating: -4.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Last month I posted a tool for automatically moving databases from one server to another.

The tool, which I call DB Mover, automates many of the tasks associated with a database move, which is more complicated that it might sound.

The tool performs all of the following steps for each database being moved: replicate the database to the new server; change the Help-About document of the old database so it points to the new database; change the launch property of the old database to always show Help-About; make the old database read-only; disable replication of the old database; change the admin server in the new replica; change the "run on" server for the agents. DB Mover also allows you to turn on/off each of these steps, so you can use the tool to do any of the above operations to any database. And, you can move many databases at once, with one press of a button.

Last month's tip did not give any details about how the tool worked. So that's my topic this month. Most of the tool is written with standard Lotuscript, which you are free to read in the agent named Move Databases and all of its subroutines. There are two areas of the code, however, which use little-known features, so I will focus on those aspects.

The agent subroutine named SetLaunch changes the launch property of each old database so that the database always shows the Help-About document when it is opened. The launch properties of a database are stored in the icon note, which has a NoteID of FFFF0010. Within this note, the launch properties are a set of flags stored in the field named $Flags. The flag p means "always show the About document to Notes users", and the flag P means "always show the About document to Web users." Also, be sure to set the SUMMARY flag for the $Flags field after changing its value.

By far, the hardest part of the coding was modifying the Help-About document so it points to the new database. It is very difficult (nearly impossible) to create a button from any programming language. The solution is to pre-create a link button with variable fields for the server and filename of the new database, then to fill in those fields programmatically. Unfortunately, Help-About documents are not normal documents, with normal Notes front-end properties. So you must read the fields by opening the document with back-end classes.

The pre-written button is found in the view named Setup Controls within the control named New About Doc 1. This control contains a rich-text field that contains the button we want, Open New Database. The agent subroutine named ModifyAbout extracts the rich-text field (including the button) and writes it to the Help-About document of the old database. The subroutine uses the fact that Help-About documents always have a NoteID of FFFF0002. The subroutine copies the pre-written button into the Help-About document of the old databases, and sets two other special fields within Help-About. The first of these fields holds the name of the new server, and the second holds the filename of the new database within the new server.

When a user opens the old database, they automatically see the Help-About document (since we changed the launch properties) and the button Open New Database. When the user presses the button, the LotusScript code behind the button extracts the name of the new server and filename (from their special fields) and then opens the new database. Note that the button must be coded in LotusScript and use the back-end classes to read the additional fields within Help-About. Simple @-functions will not work within Help-About because extra fields are not visible in the normal way.

As I said last month, you may use DB Mover in any way that you like, including modifying or improving its code. The only restriction is that you must continue to give me credit for creating the tool, by including my name and web link in the Help-About and Help-Using documents. Here it is on my download page: http://www.chc-3.com/downloads/dbmover103.zip

Chuck Connell is president of CHC-3 Consulting , which helps organizations with all aspects of Domino and Notes. CHC-3 allows companies to outsource their Domino administration needs via DominoAdministration.com and runs the popular security site DominoSecurity.org .


Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Spam and Security
Securely connect Lotus Domino servers on different domains
Protect Lotus Notes from malicious code with the Domino ECL
How to correct Lotus Notes public key mismatches in four easy steps
A recipe for secure IM success
Telecommuter security kit
Spear phishing: Don't be a target
FAQ: Lotus Notes Domino password issues
Security awareness training: How to educate employees about spyware
Seven tips to strengthen your Domino e-mail security
Admin2005 preview: Tips, techniques, and a look at Notes/Domino Rel. 7

Lotus Notes Domino Database Management
LotusScript code rebuilds corrupted busytime.nsf file
LotusScript agent automates selective mail file replication
Configuring Domino Domain Monitoring (DDM)
How to move Notes databases off Domino 8 servers and save disk space
What is Notes 8.5's DAOS (Domino Attachment and Object Storage) feature?
LotusScript agent indexes Lotus Notes/Domino databases
An introduction to Domino Domain Monitoring (DDM)
'Customize this view' options are disabled in Lotus Notes databases
LotusScript button saves time searching large Lotus Notes databases
Batch file runs scheduled Lotus Notes database maintenance tasks

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts