Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

How database views get deleted from AS/400 libraries

Audit journals on the AS/400 can help track down file deletions from Libraries on the system, including view files for databases.

In my company we are using V5R4, AS400 machine, DB400 database. I am using the iSeries Navigator (Run SQL Script window) to interact with the database.

I have created views on the database (create a library of mine, separate of the production library) and once every two weeks my views (not all of them, about 50% out of all) get deleted. I was thinking of a trigger (before delete on LIBRARY) but i have found DB400 does triggers only on tables/views (DB2ROW or DB2SQL).

Bottom line, i want to see who is deleting my views. How can i get this accomplished?

I would suggest using the Audit Journal capabilities built into the IBM i operating system. The Audit journal can track the deletions of objects.

If your views reference IBM-provided views in QSYS2 or SYSIBM, then sometimes those IBM-provided views get rebuilt during the installation of a Database Group PTF or new release.

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.