Got Error 4060 - using RunOnServer

Hi all,

I am using an Agent as RunOnServer, to open relevant databases to create documents inside.

I have returned the values required for GetDatabase, but an access error occurs.

Got Error 4060 User CN=User Name/O=Org cannot open database Server!!mail\dname.nsf in line: 57

The part where it gets stuck is as follows.

Dim homeserver As New NotesName ( doc1.GetItemValue(“mailserver”)(0))

servername = homeserver.Common

mailfile = doc1.GetItemValue(“mailfile”)

Set destdb = session.GetDatabase( servername , mailfile(0))

The servername returns the CommonName only, from the Hierarchical name.

The mailfile returns mail\dname

Any Ideas?? Please help !!

Subject: Got Error 4060 - using RunOnServer

all you need to do is pass trings, so why not just use:

Set destdb = session.GetDatabase(

doc1.mailserver(0) , doc1.mailfile(0))

Also, what ID is being used to run the agent? Does that ID have rights in the ACL?

Subject: RE: Got Error 4060 - using RunOnServer

Hi,

This changes the error to:

Got Error 4060 User CN=User Name/O=Org cannot open database CN=Server/OU=servers/O=Org!!mail\pthomas.nsf in line: 57

The Signer has Manager Access to all databases + checked on one that is attempting to access now. Also checked Server Security + Agent Security, all is set to allow full mangler access.

Is it anything to do with presenting the values as a string? I have not set Dimensions for servername or mailfile in original code

Subject: RE: Got Error 4060 - using RunOnServer

Are you trying to open file on a remote server or the same one where the agent is running?If the same one, do not use server name, it is local to the agent use “” (empty string). If it is a different user, you need to set up security to allow it. Please refer to Agent FAQ “Decoding agents in ND6” article for how to do it and security ramifications of “trusted server”.