Home > Domino Tips > Administrator > Comparing replicas on clustered Lotus Domino servers
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

CLUSTERING

Comparing replicas on clustered Lotus Domino servers


Blessan V Philip
11.14.2006
Rating: -2.90- (out of 5)


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


This following code was tested in Lotus Domino Server R6. Once you embed it in a button or agent, clicking/running this script will generate a Microsoft Excel comparison report, including actual mail file size, quota, and warning threshold for the replicas residing on the source and destination servers in a Lotus Domino server cluster.

The Microsoft Excel report that is generated can be used to study mismatches, which could be caused by lack of replication between the databases in the two Lotus Domino servers being compared in the cluster.

Clicking on the button or running the agent containing the following code will:

  1. Prompt you to enter the first server of the cluster.

  2. Prompt you to enter another server in the cluster that you wish to check.

  3. Prompt you to enter the folder (mail for mail files) of the first/source server to be checked.

  4. Generate the report in Microsoft Excel, which can then be used to study the mismatches in the replica size, etc.

 On Error Resume Next
 
Dim session As New notessession 
 
Dim Sdbdirectory As NotesDbDirectory
Dim Sdb As NotesDatabase
Dim Sfilepath As String 

Dim Ddbdirectory As NotesDbDirectory
Dim Ddb As NotesDatabase

Dim SrcServ As String
Dim DestServ As String
Dim rows As Long
Dim maxcols As Integer
 
 
SrcServ=Inputbox$("Please enter the 
Source Server","Tools","Source Server") 
DestServ=Inputbox$("Please enter the 
Destination Server","Tools","Destination server")
Sfilepath=Inputbox$("Please provide 
the folder path on source which needs 
to be checked e.g. mail or databases","Tools","mail")
 
'================================
================================
============================= 
'================================
================================
====================================== 
'excel variable initialization
Set xlApp = CreateObject("Excel.Application") 
'start Excel with OLE Automation
xlApp.StatusBar = "Creating WorkSheet. 
Please be patient..."
xlApp.Visible = True
xlApp.Workbooks.Add
xlApp.ReferenceStyle = 2
Set xlsheet = xlApp.Workbooks(1).
Worksheets(1) 'select first worksheet
'=================================
=================================
=========================== 
'worksheet title
 
xlApp.StatusBar = "Creating Column 
Heading. Please be patient..."

rows=2
xlsheet.cells(rows,4)=SrcServ
xlsheet.cells(rows,7)=DestServ
rows=3 

xlsheet.Cells(rows,1).value="Database File  "
xlsheet.Cells(rows,2).value="Title" 

xlsheet.Cells(rows,3).value="Mail Size (MB)"
xlsheet.Cells(rows,4).value="Mail Quota  (MB)"
xlsheet.Cells(rows,5).value="Warning Threshold  (MB)"
 
xlsheet.Cells(rows,6).value="Mail Size (MB)"
xlsheet.Cells(rows,7).value="Mail Quota  (MB)"
xlsheet.Cells(rows,8).value="Warning Threshold  (MB)"
maxcols=8
rows=4
'===========================================
============================================= 


Set Sdbdirectory=session.GetDbDirectory(SrcServ)
Set Ddbdirectory=session.GetDbDirectory(DestServ)

Set 
Sdb=Sdbdirectory.GetFirstDatabase(DATABASE)

While Not   Sdb Is Nothing
repid=Sdb.ReplicaID
tmpFilename= 
Strleftback(Sdb.FilePath,"")
  
If tmpFilename=Sfilepath Then
 
Set Ddb=New notesdatabase("","")
flag  = DDb.OpenByReplicaID(DestServ,repid)
   
If flag=True  Then
    
xlsheet.Cells(rows,1).Value = Sdb.FileName
xlsheet.Cells(rows,2).Value ="'"+ Sdb.Title
    
xlsheet.Cells(rows,3).Value =(Sdb.size/1000000)
xlsheet.Cells(rows,4).Value =Sdb.SizeQuota/1024
xlsheet.Cells(rows,5).Value =sdb.SizeWarning/1024
    
xlsheet.Cells(rows,6).Value =(Ddb.size/1000000)
xlsheet.Cells(rows,7).Value =Ddb.SizeQuota/1024
xlsheet.Cells(rows,8).Value =Ddb.SizeWarning/1024
    
    
    
xlApp.StatusBar = "Importing Notes Data - Document " & rows-1   
Set DDb=Nothing    
 
Else
xlsheet.Cells(rows,1).Value = Sdb.FileName
xlsheet.Cells(rows,2).Value ="'"+ Sdb.Title
    
xlsheet.Cells(rows,3).Value =(Sdb.size/1000000)
xlsheet.Cells(rows,4).Value =Sdb.SizeQuota/1024
xlsheet.Cells(rows,5).Value =sdb.SizeWarning/1024
    
xlsheet.Cells(rows,6).Value ="Missing on destination server"

xlApp.StatusBar = "Importing Notes Data - Document " & rows-1   
End If
rows=rows+1
End If 
 

Set 
Sdb=Sdbdirectory.GetNextDatabase()
  
Wend
 
xlApp.Rows("1:1").Select
xlApp.Selection.Font.Bold = True
xlApp.Selection.Font.Underline = True
xlApp.Range(xlsheet.Cells(2,1), 
xlsheet.Cells(rows,maxcols)).Select
xlApp.Selection.Font.Name = "Arial"
xlApp.Selection.Font.Size = 9
xlApp.Selection.Columns.AutoFit
With xlApp.Worksheets(1)
.PageSetup.Orientation = 2
.PageSetup.centerheader = "Report - Confidential"
.Pagesetup.RightFooter = "Page &P" & Chr$(13) & "Date: &D"
Pagesetup.CenterFooter = ""
End With
xlApp.ReferenceStyle = 1
xlApp.Range("A1").Select
xlApp.StatusBar = "Importing Data from 
Lotus Notes Application was Completed." 
 
 
Set xlapp=Nothing 'stop OLE
Set db=Nothing

Do you have comments on this tip? Let us know.

Related information from SearchDomino.com:

  • Tip: A primer on Lotus Domino clustering
  • Tip: Monitoring Lotus Domino cluster replication
  • Tip: Locate missing databases in a Lotus Domino cluster
  • Tip: Lotus Domino cluster tuning

    This tip was submitted to the SearchDomino.com tip library by member Blessan V. Philip Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

    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.




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



    RELATED CONTENT
    Lotus Notes Domino Clustering
    LotusScript code rebuilds corrupted busytime.nsf file
    Routing Domino cluster servers to the correct network
    Lotus Domino server clustering
    Locate missing databases in a Lotus Domino cluster
    Upgrade all members of the cluster?
    DB replacement function malfunctions in a clustered environment
    Can I configure Domino to use private LAN for Directory lookups?
    Preparing for consolidation -- Part 1
    Create a separate LAN for cluster replication traffic
    Domino cluster tuning

    Clustering
    Locate missing databases in a Lotus Domino cluster
    Preparing for consolidation -- Part 1
    Domino cluster tuning
    Monitoring cluster replication
    Mail delegation in cluster environment
    Domino clusters for Internet traffic
    A primer on Domino clustering

    Other
    Create a dynamic user-driven navigator for a Notes/Domino application
    How to apply XSL style sheets to XML views
    Creating a Lotus Notes view column categorized by month
    Using the XMLHTTP object for integration with Domino or any RDBMS back end
    Hiding field properties/data from DocProperties box
    Export a view to Excel without coding
    Prevent document deletion if there are response documents
    Switching between test IDs quickly
    AddParameter to a NotesXSLTransFormer
    Using DXL (Domino XML) to review/modify documents

    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