1

We have database with over 40,000 documents. There is a view which saves a document every month and it sometimes shows wrong figure. This view is not rebuild automatically by the updall function which runs in the mid night. Hence we perform the Shift+F9 manually everymonth after which it displays the correct figure. Our user's requested for a permanent solution for this. Can you please suggest the best way to perform this function?

I have prepared a scheduled agent to pass the updall command in the server console and have no idea if it is going to rebuild the view as I am not able to test it now. Will it really work?kindly help me.

Priya
  • 95
  • 3
  • 12
  • 4
    My guess is that you're using a date in the view selection formula and someone has set the view options so that it only refreshes manually. See this IBM Technote: http://www-01.ibm.com/support/docview.wss?uid=swg27002624 My suggestion would be to get rid of this view entirely, and replace it with a folder, using a scheduled agent to move the docuemnt into the folder on the first day of the month. – Richard Schwartz Feb 25 '13 at 02:39

3 Answers3

3

You need to rebuild the view. Use this in your program document or console command:

load updall yourdb.nsf -T yourview -R

According to help -R means "Rebuilds all used views." so -T option may not work. But if you run this only once a month it's OK (and even a good thing) to rebuild all views.

Panu Haaramo
  • 2,932
  • 19
  • 41
2

You can refresh a single view in script:

  ...
  dim vw as notesView
  Set vw = db.GetView("All")
  Call vw.Refresh
  ...

This will refresh the back-end view index and not update any views displayed in UI, but should work as expected in a scheduled agent.

Ed Schembor
  • 8,090
  • 8
  • 31
  • 37
  • 1
    The views are also indexed automatically by indexer task. This won't rebuild the index which is needed here. The case here is probably just as Richard describes it in his comment. – Panu Haaramo Feb 25 '13 at 19:04
-1

Actually before updall event,you usually should:

load fixup yourdb.nsf

The program documents is a good way.

Alex Yin
  • 93
  • 1
  • 1
  • 7
  • 1
    Running fixup can take a lot of time and should only be run on exception or when you suspect a really serious fault. If a rebuild or updall gets the view back then fixup is not required. – andora Aug 20 '15 at 13:13