Retrieving Database Creation date remotely using formula language ???

Hello all ,

I have a doubt regarding database modification date retrival remotely .

Suppose i have two databases on the same server.

currentdb
remotedb

now i want to show the modification/creation date of remotedb into a form/view of currentdb . But the restiction is that i can use only formula language .

Is there any solution you guys have ??

One more thing which i want to tell u that i got another solution of this , which uses "Catalog.nsf" in which we get all those databases information. But @dblookup command works only for first sorted column . While in second column (which is not sorted) is occupied by database name , which is useful for me in this case . but because of limitation of first sorted column i am not able to process that . Can u guide me in this direction also ??

Thanks in advance.
codeguru14Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SysExpertCommented:
All you would need to do is to create a new view sorted the way you want and add the proper columns.

You should do this on the Catalog template ( not the nsf ) so that the update in design are done automaticaly each night.

I hope this helps !

Sjef BosmanGroupware ConsultantCommented:
Use the ($ReplicaID) view, it is sorted on the replica ID of the database. I assume you can get any value from a document using
    @DbLookup(""; "server":"Catalog.nsf"; "($ReplicaID)"; ReplicaID; fieldname)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
codeguru14Author Commented:
@SysExpert;

I am using such a server which has restricted access and i don't have permissions to create new views / documents .. So if there is any other solution excpet creating views , please share with me.

@sjef_bosman;

I found it interesting , but the problem is that i don't have "ReplicaID" value with me . The value which i only know is the "database Name" and nothing else .
Here is the view Selection formula for "$replicaId" view :

SELECT @IsAvailable(ReplicaID)& @IsUnavailable(RepositoryType)

So it means that ReplicaID must be available . But i don't know the ReplicaID of remote database except knowing its name .
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Sjef BosmanGroupware ConsultantCommented:
Sorry, but no, that's not what it means. It means that only documents in that database are shown in the ($ReplicaID) view that match that condition: in the document there has to be a field ReplicaID and there must not be a field RepositoryType.

From your point of view, this seems irrelevant. You need to get a ReplicaID for a database. How are you planning to program this? What remotedb are you talking about? You seem to have a Domino Designer available, what are you allowed to do with it?
SysExpertCommented:
I would make a local replica of the Catalog DB, and create a view locally for the creation date.

Other options are to use soe existing agents that gather info for you.

see

http://www-10.lotus.com/ldd/sandbox.nsf/DownloadPage?OpenForm

and

http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/9290c5e7654f34ea85256a1e0050bc55?OpenDocument&Highlight=0,ACL
The ACL scanner can easily be modified to get the data you need and will work locally.


I hope this helps !
marilyngCommented:
Basically, create the two fields that you want to use to store the information in the currentdb.

I used computed fields, one for modifiedDate and another for CreatedDate.

Then I selected the remotedb, and did: File>>Database>>Properties, and copied the database name EXACTLY, and used that value in the LookupDB variable.  I used @Subset(@MaildbName;1) to get the server name, but you can also use @Subset(@DbName;1) provided that the current database is sitting on a server, else you will have to use:

LookupDB:=@if(@Subset(@dbName;1)="";"Your Server Name";@Subset(@dbName;1))


OK, this one will lookup the created date:
----------------------------------------------------
Server:=@Subset(@MailDbName;1);
Catalogdb:="catalog.nsf";
LookupDB:="Test Web";
CreatedField:="DbCreationDate";
ModifiedDate:="DbModifiedDate";
LookupView:="ByTitle";
CreatedDate:=@DbLookup("Notes":"NoCache";Server:Catalogdb;LookupView;LookupDB;CreatedField);
@If(@IsError(CreatedDate)|CreatedDate="";"Not Found";@Text(CreatedDate;"D0S0"))

-----------------------------
This one will get the modified date:

Server:=@Subset(@MailDbName;1);
Catalogdb:="catalog.nsf";
LookupDB:="Test Web";
CreatedField:="DbCreationDate";
ModifiedField:="DbModifiedDate";
LookupView:="ByTitle";
ModifiedDate:=@DbLookup("Notes":"NoCache";Server:Catalogdb;LookupView;LookupDB;ModifiedField);
@If(@IsError(ModifiedDate)|ModifiedDate="";"Not Found";@Text(ModifiedDate;"D0S0"))


------------
Also, there is a chance that there is more than one database replica stored for the database, and in that case you will get two or more answers.  

In this case, you modify the last line:
@If(@IsError(ModifiedDate)|ModifiedDate="";"Not Found";@Text(ModifiedDate;"D0S0"))

To do this:
Result:=@If(@IsError(ModifiedDate)|ModifiedDate="";"Not Found";@Text(ModifiedDate;"D0S0"))
@if(@Elements(Result)>1;@Subset(Result);Result)

As long as you get the Database Title correct, this should work.

BTW, you can also get the replica ID of the database, by looking it up in the By Title view of Catalog.nsf, or, if it's available, selecting File>>Database>>Synopsis, then clicking on "Check DB Info", and then checking "General Information" and "Replication" check boxes.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.