teradata - How can "bad" views be identified? -


at workplace, have separate teradata databases manage tables versus views. "tables" database has tables data while "views" database has views. access 2 databases managed roles: "developers" have permission create tables in "tables" , create views in "views"; "consumers" have "read" access "views" databases.

over time, views have become "bad" in base tables refer no longer exist. caused when developer dropped table @ end of analysis , forgot drop corresponding view.

question: there "easy" way identify views no longer associated valid tables?

i considering writing test script execute select count(*) on each view in "views" database; if test fails i'd know wrong view. know how (and work), thought i'd ask if there better way.

i have written approach can used find broken views here. using stored procedure, couple of cursors, , prepare statement can test validity of views across entire data warehouse.

the biggest trick getting error handler nailed down log errors. while didn't go details on website error handler, if stuck can send pseudo-code down right path.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -