you dont need a script fot that, it is recorded in control file therefore V$ views