Manage Learn to apply best practices and optimize your operations.

Get Admin Server Of Database

Here is a way to get the Administration Server out of the ACL using the API. No
warranty express or implied, is given as to the use of this code. Use at your
own risk.
Declare Function OSPathNetConstruct Lib "nnotes.dll" (Byval portName As String,
Byval ServerName As String, Byval FileName As String, Byval retPathName As
String)As Integer
Declare Function NSFDbOpen Lib "nnotes.dll" (Byval PathName As String, dbHandle
As Long) As Integer
Declare Function NSFDbClose Lib "nnotes.dll" (Byval dbHandle&) As Integer
Declare Function NSFDbReadACL Lib "nnotes.dll" (Byval DBHANDLE As Long,rethACL
As Long) As Integer
Declare Function ACLGetAdminServer Lib "nnotes.dll" (Byval hList As Long,Byval
ServerName As String) As Integer

Function GetAdminServer() As String

Dim hDB&,hACL&
Dim SvrName$,retPathName$
Dim Status%

Call NSFDbOpen(retPathName$,hDB&)

If hDB& > 0 Then
Print "FOUND DB"
Status% = NSFDbReadACL(hDB&, hACL&)
If Status% = 0 Then
Status% = ACLGetAdminServer(hACL&,SvrName$)
End If
Call NSFDbClose(Ret&)
End If
End Function

Dig Deeper on Domino Resources - Part 7

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...