Home > Domino Tips > Administrator > Database > List Dbs On A Server That Are Templates
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE

List Dbs On A Server That Are Templates


Jeff Blackadar
06.14.2000
Rating: -4.00- (out of 5)


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


This is an agent that creates a text list of databases which are also design
templates with their template names. This is to help resolve template name
conflicts and clean up old design templates from a server.

Code

'DB is a template (list)|DbIsTempNames:

Option Public
Option Declare

Sub Initialize
' Creates a textfile list of databases that are templates for a server
Dim counter%
Dim filenum As Integer
filenum = Freefile()
Dim DbDir As NotesDBDirectory
Dim session As New notessession
Dim servername As String
servername = Inputbox("Server name","Input the server
name.","NATS7/CMHC-SCHL/CA")
Set DbDir = session.GetDbDirectory( servername )
Open "DbProps.txt" For Output As #filenum
Print #filenum, "Only databases that are templates on this server are
listed"
Print #filenum,servername
Print #filenum, pad("filename", 20) & pad("title", 30) & pad("Design
Template Name (Is Template)", 40

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


RELATED CONTENT
Database
LotusScript code rebuilds corrupted busytime.nsf file
How to move Notes databases off Domino 8 servers and save disk space
Top 10 Lotus Notes/Domino administration tips of 2008
Batch file runs scheduled Lotus Notes database maintenance tasks
Fix and update Lotus Notes documents with limited access
Programmatically replace the design of Lotus Notes databases
Add a program doc to compact Lotus Notes databases automatically
More efficient local Lotus Notes database replication
Remove orphaned Lotus Notes documents on Domino databases with a 'virtual delete'
Detect and fix 'Manager' access control list settings in Lotus Notes Domino

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


) & pad("filepath", 60)
Dim db As notesdatabase
Set db = DbDir.getfirstdatabase(TEMPLATE_CANDIDATE)
Do Until db Is Nothing
Print db.filename
If Not Cstr(db.TemplateName)="" Then
Print #filenum, pad(db.filename, 20) & pad(db.title, 30) &
pad(Cstr(db.TemplateName), 40) & pad(Cstr(db.filepath), 60)
End If
Set db = DbDir.getnextdatabase
Loop
Close #filenum
'open Notepad with the textfile - only works on Windows
Dim taskid%
taskid% = Shell("notepad.exe DbProps.TXT",1)
End Sub

Function pad(word As String, width1 As Integer)
' this function is just to format text on the report
Dim prepad As String
Dim padcount As Integer
prepad = Left(word + String(width1, " "),width1)
For padcount = 1 To Len(prepad)
If Mid(prepad,padcount,1)={"}Then
Mid(prepad,padcount,1)={ }
End If
Next
pad = prepad
End Function

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.




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