home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / db / rdbms71 / catsnap.sql < prev    next >
Encoding:
Text File  |  1994-08-07  |  19.1 KB  |  604 lines

  1. rem 
  2. rem $Header: catsnap.sql 7010300.1 94/02/24 18:24:45 snataraj Generic<base> $ 
  3. rem 
  4. Rem  Copyright (c) 1991 by Oracle Corporation 
  5. Rem    NAME
  6. Rem      snapvew.sql
  7. Rem    DESCRIPTION
  8. Rem      Creates data dictionary views for snapshots
  9. Rem    NOTES
  10. Rem      Must be run while connected to SYS or INTERNAL.
  11. Rem    MODIFIED   (MM/DD/YY)
  12. Rem     rjenkins   12/17/93 -  creating job queue
  13. Rem     jbellemo   11/09/93 -  #170173: change uid to userenv schemaid
  14. Rem     rjenkins   07/06/93 -  adding updatable snapshots
  15. Rem     wbridge    12/03/92 -  fix error handling for refresh all 
  16. Rem     tpystyne   11/08/92 -  use create or replace view 
  17. Rem     glumpkin   10/25/92 -  Renamed from SNAPVEW.SQL 
  18. Rem     mmoore     06/02/92 - #(96526) remove v$enabledroles 
  19. Rem     rjenkins   01/14/92 -  copying changes from catalog.sql 
  20. Rem     rjenkins   05/20/91 -         Creation 
  21.  
  22. remark
  23. remark    FAMILY "SNAPSHOTS"
  24. remark    Table replication definitions.
  25. remark
  26.  
  27. create or replace view DBA_SNAPSHOTS
  28. ( OWNER, NAME, TABLE_NAME, MASTER_VIEW, MASTER_OWNER, MASTER, MASTER_LINK,
  29.   CAN_USE_LOG, UPDATABLE, LAST_REFRESH, ERROR, TYPE, NEXT, START_WITH, 
  30.   REFRESH_GROUP, UPDATE_TRIG, UPDATE_LOG, QUERY)
  31. as
  32. select sowner, vname, tname, mview, mowner, master, mlink,
  33.        decode(mod(flag,2), 0, 'NO', 'YES'), 
  34.        decode(mod(trunc(flag/2),2), 0, 'NO', 'YES'), 
  35.        snaptime, error#, 
  36.        decode(auto_fast, 
  37.               'C', 'COMPLETE', 
  38.               'F', 'FAST', 
  39.               '?', 'FORCE', 
  40.               null, 'FORCE', 'ERROR'), 
  41.        auto_fun, auto_date, refgroup, ustrg, uslog, query_txt
  42. from sys.snap$
  43. /
  44. comment on table DBA_SNAPSHOTS is
  45. 'All snapshots in the database'
  46. /
  47. comment on column DBA_SNAPSHOTS.OWNER is
  48. 'Owner of the snapshot'
  49. /
  50. comment on column DBA_SNAPSHOTS.NAME is
  51. 'The view used by users and applications for viewing the snapshot'
  52. /
  53. comment on column DBA_SNAPSHOTS.TABLE_NAME is
  54. 'Table the snapshot is stored in -- has an extra column for the master rowid'
  55. /
  56. comment on column DBA_SNAPSHOTS.MASTER_VIEW is
  57. 'View of the master table, owned by the snapshot owner, used for refreshes'
  58. /
  59. comment on column DBA_SNAPSHOTS.MASTER_OWNER is
  60. 'Owner of the master table'
  61. /
  62. comment on column DBA_SNAPSHOTS.MASTER is
  63. 'Name of the master table that this snapshot is a copy of'
  64. /
  65. comment on column DBA_SNAPSHOTS.MASTER_LINK is
  66. 'Database link name to the master site'
  67. /
  68. comment on column DBA_SNAPSHOTS.CAN_USE_LOG is
  69. 'If NO, this snapshot is complex and will never use a log'
  70. /
  71. comment on column DBA_SNAPSHOTS.UPDATABLE is
  72. 'If NO, the snapshot is read only.  Look up REPLICATION'
  73. /
  74. comment on column DBA_SNAPSHOTS.LAST_REFRESH is
  75. 'SYSDATE from the master site at the time of the last refresh'
  76. /
  77. comment on column DBA_SNAPSHOTS.ERROR is
  78. 'The number of failed automatic refreshes since last successful refresh'
  79. /
  80. comment on column DBA_SNAPSHOTS.TYPE is
  81. 'The type of refresh (complete,fast,force) for all automatic refreshes'
  82. /
  83. comment on column DBA_SNAPSHOTS.NEXT is
  84. 'The date function used to compute next refresh dates'
  85. /
  86. comment on column DBA_SNAPSHOTS.START_WITH is
  87. 'The date function used to compute next refresh dates'
  88. /
  89. comment on column DBA_SNAPSHOTS.REFRESH_GROUP is
  90. 'All snapshots in a given refresh group get refreshed in the same transaction'
  91. /
  92. comment on column DBA_SNAPSHOTS.UPDATE_TRIG is
  93. 'The name of the trigger which fills the UPDATE_LOG'
  94. /
  95. comment on column DBA_SNAPSHOTS.UPDATE_LOG is
  96. 'The table which logs changes made to an updatable snapshots'
  97. /
  98. comment on column DBA_SNAPSHOTS.QUERY is
  99. 'The original query that this snapshot is an instantiation of'
  100. /
  101. create or replace view ALL_SNAPSHOTS
  102. as select s.* from dba_snapshots s, sys.obj$ o, sys.user$ u
  103. where o.owner# = u.user#
  104.   and s.name   = o.name
  105.   and u.name   = s.owner
  106.   and ( u.user# in (userenv('SCHEMAID'), 1)
  107.         or
  108.         o.obj# in ( select obj#
  109.                     from sys.objauth$
  110.                     where grantee# in ( select kzsrorol
  111.                                         from x$kzsro
  112.                                       )
  113.                   )
  114.       )
  115. /
  116. comment on table ALL_SNAPSHOTS is
  117. 'Snapshots the user can look at'
  118. /
  119. comment on column ALL_SNAPSHOTS.OWNER is
  120. 'Owner of the snapshot'
  121. /
  122. comment on column ALL_SNAPSHOTS.NAME is
  123. 'The view used by users and applications for viewing the snapshot'
  124. /
  125. comment on column ALL_SNAPSHOTS.TABLE_NAME is
  126. 'Table the snapshot is stored in -- has an extra column for the master rowid'
  127. /
  128. comment on column ALL_SNAPSHOTS.MASTER_VIEW is
  129. 'View of the master table, owned by the snapshot owner, used for refreshes'
  130. /
  131. comment on column ALL_SNAPSHOTS.MASTER_OWNER is
  132. 'Owner of the master table'
  133. /
  134. comment on column ALL_SNAPSHOTS.MASTER is
  135. 'Name of the master table that this snapshot is a copy of'
  136. /
  137. comment on column ALL_SNAPSHOTS.MASTER_LINK is
  138. 'Database link name to the master site'
  139. /
  140. comment on column ALL_SNAPSHOTS.CAN_USE_LOG is
  141. 'If NO, this snapshot is complex and will never use a log'
  142. /
  143. comment on column ALL_SNAPSHOTS.LAST_REFRESH is
  144. 'SYSDATE from the master site at the time of the last refresh'
  145. /
  146. comment on column ALL_SNAPSHOTS.ERROR is
  147. 'The error returned last time an automatic refresh was attempted'
  148. /
  149. comment on column ALL_SNAPSHOTS.TYPE is
  150. 'The type of refresh (complete,fast,force) for all automatic refreshes'
  151. /
  152. comment on column ALL_SNAPSHOTS.NEXT is
  153. 'The date function used to compute next refresh dates'
  154. /
  155. comment on column ALL_SNAPSHOTS.START_WITH is
  156. 'The date function used to compute next refresh dates'
  157. /
  158. comment on column ALL_SNAPSHOTS.REFRESH_GROUP is
  159. 'All snapshots in a given refresh group get refreshed in the same transaction'
  160. /
  161. comment on column ALL_SNAPSHOTS.UPDATE_TRIG is
  162. 'The name of the trigger which fills the UPDATE_LOG'
  163. /
  164. comment on column ALL_SNAPSHOTS.UPDATE_LOG is
  165. 'The table which logs changes made to an updatable snapshots'
  166. /
  167. comment on column ALL_SNAPSHOTS.QUERY is
  168. 'The original query that this snapshot is an instantiation of'
  169. /
  170. drop public synonym ALL_SNAPSHOTS
  171. /
  172. create public synonym ALL_SNAPSHOTS for ALL_SNAPSHOTS
  173. /
  174. grant select on ALL_SNAPSHOTS to public with grant option
  175. /
  176. create or replace view USER_SNAPSHOTS
  177. as select s.* from dba_snapshots s, sys.user$ u
  178. where u.user# = userenv('SCHEMAID')
  179.   and s.owner = u.name
  180. /
  181. comment on table USER_SNAPSHOTS is
  182. 'Snapshots the user can look at'
  183. /
  184. comment on column USER_SNAPSHOTS.OWNER is
  185. 'Owner of the snapshot'
  186. /
  187. comment on column USER_SNAPSHOTS.NAME is
  188. 'The view used by users and applications for viewing the snapshot'
  189. /
  190. comment on column USER_SNAPSHOTS.TABLE_NAME is
  191. 'Table the snapshot is stored in -- has an extra column for the master rowid'
  192. /
  193. comment on column USER_SNAPSHOTS.MASTER_VIEW is
  194. 'View of the master table, owned by the snapshot owner, used for refreshes'
  195. /
  196. comment on column USER_SNAPSHOTS.MASTER_OWNER is
  197. 'Owner of the master table'
  198. /
  199. comment on column USER_SNAPSHOTS.MASTER is
  200. 'Name of the master table that this snapshot is a copy of'
  201. /
  202. comment on column USER_SNAPSHOTS.MASTER_LINK is
  203. 'Database link name to the master site'
  204. /
  205. comment on column USER_SNAPSHOTS.CAN_USE_LOG is
  206. 'If NO, this snapshot is complex and will never use a log'
  207. /
  208. comment on column USER_SNAPSHOTS.LAST_REFRESH is
  209. 'SYSDATE from the master site at the time of the last refresh'
  210. /
  211. comment on column USER_SNAPSHOTS.ERROR is
  212. 'The error returned last time an automatic refresh was attempted'
  213. /
  214. comment on column USER_SNAPSHOTS.TYPE is
  215. 'The type of refresh (complete,fast,force) for all automatic refreshes'
  216. /
  217. comment on column USER_SNAPSHOTS.NEXT is
  218. 'The date function used to compute next refresh dates'
  219. /
  220. comment on column USER_SNAPSHOTS.START_WITH is
  221. 'The date function used to compute next refresh dates'
  222. /
  223. comment on column USER_SNAPSHOTS.REFRESH_GROUP is
  224. 'All snapshots in a given refresh group get refreshed in the same transaction'
  225. /
  226. comment on column USER_SNAPSHOTS.UPDATE_TRIG is
  227. 'The name of the trigger which fills the UPDATE_LOG'
  228. /
  229. comment on column USER_SNAPSHOTS.UPDATE_LOG is
  230. 'The table which logs changes made to an updatable snapshots'
  231. /
  232. comment on column USER_SNAPSHOTS.QUERY is
  233. 'The original query that this snapshot is an instantiation of'
  234. /
  235. drop public synonym USER_SNAPSHOTS
  236. /
  237. create public synonym USER_SNAPSHOTS for USER_SNAPSHOTS
  238. /
  239. grant select on USER_SNAPSHOTS to public with grant option
  240. /
  241.  
  242. create or replace view DBA_SNAPSHOT_LOGS
  243. ( LOG_OWNER, MASTER, LOG_TABLE, LOG_TRIGGER, CURRENT_SNAPSHOTS)
  244. as
  245. select m.mowner, m.master, m.log, m.trig, s.snaptime
  246. from sys.mlog$ m, sys.slog$ s
  247. where s.mowner (+) = m.mowner
  248.   and s.master (+) = m.master
  249. /
  250. comment on table DBA_SNAPSHOT_LOGS is
  251. 'All snapshot logs in the database'
  252. /
  253. comment on column DBA_SNAPSHOT_LOGS.LOG_OWNER is
  254. 'Owner of the snapshot log'
  255. /
  256. comment on column DBA_SNAPSHOT_LOGS.MASTER is
  257. 'Name of the master table which the log logs changes of'
  258. /
  259. comment on column DBA_SNAPSHOT_LOGS.LOG_TABLE is
  260. 'Log table; holds rowids and timestamps of rows which changed in the master'
  261. /
  262. comment on column DBA_SNAPSHOT_LOGS.LOG_TRIGGER is
  263. 'An after-row trigger on the master which inserts rows into the log'
  264. /
  265. comment on column DBA_SNAPSHOT_LOGS.CURRENT_SNAPSHOTS is
  266. 'One date per snapshot -- the date the snapshot of the master last refreshed'
  267. /
  268.  
  269. create or replace view USER_SNAPSHOT_LOGS
  270. ( LOG_OWNER, MASTER, LOG_TABLE, LOG_TRIGGER, CURRENT_SNAPSHOTS)
  271. as
  272. select log_owner, master, log_table, log_trigger, current_snapshots
  273. from dba_snapshot_logs s, sys.user$ u
  274. where s.log_owner = u.name
  275.   and u.user# = userenv('SCHEMAID')
  276. /
  277. comment on table USER_SNAPSHOT_LOGS is
  278. 'All snapshot logs owned by the user'
  279. /
  280. comment on column USER_SNAPSHOT_LOGS.LOG_OWNER is
  281. 'Owner of the snapshot log'
  282. /
  283. comment on column USER_SNAPSHOT_LOGS.MASTER is
  284. 'Name of the master table which the log logs changes of'
  285. /
  286. comment on column USER_SNAPSHOT_LOGS.LOG_TABLE is
  287. 'Log table; holds rowids and timestamps of rows which changed in the
  288. master'
  289. /
  290. comment on column USER_SNAPSHOT_LOGS.LOG_TRIGGER is
  291. 'Trigger on master table; fills the snapshot log'
  292. /
  293. comment on column USER_SNAPSHOT_LOGS.CURRENT_SNAPSHOTS is
  294. 'Dates that all known simple snapshots last refreshed'
  295. /
  296. drop public synonym USER_SNAPSHOT_LOGS
  297. /
  298. create public synonym USER_SNAPSHOT_LOGS for USER_SNAPSHOT_LOGS
  299. /
  300. grant select on USER_SNAPSHOT_LOGS to public with grant option
  301. /
  302.  
  303.  
  304. create or replace view DBA_RCHILD 
  305. as select REFGROUP, OWNER, NAME, TYPE from rgchild$
  306. /
  307. comment on table DBA_RCHILD is
  308. 'All the children in any refresh group.  This view is not a join.'
  309. /
  310. drop public synonym DBA_RCHILD
  311. /
  312. create public synonym DBA_RCHILD for DBA_RCHILD
  313. /
  314.  
  315.  
  316. create or replace view DBA_RGROUP
  317. as select REFGROUP, OWNER, NAME,
  318.           decode(mod(flag,2),1,'Y',0,'N','?') IMPLICIT_DESTROY, JOB
  319.   from rgroup$
  320. /
  321. comment on table DBA_RGROUP is
  322. 'All refresh groups.  This view is not a join.'
  323. /
  324. drop public synonym DBA_RGROUP
  325. /
  326. create public synonym DBA_RGROUP for DBA_RGROUP
  327. /
  328.  
  329.  
  330. create or replace view DBA_REFRESH
  331. as select r.owner ROWNER, r.name RNAME, r.REFGROUP,
  332.           decode(mod(r.flag,2),1,'Y',0,'N','?') IMPLICIT_DESTROY,
  333.           j.JOB, j.NEXT_DATE, j.INTERVAL, 
  334.           decode(mod(j.flag,2),1,'Y',0,'N','?') BROKEN
  335.   from rgroup$ r, job$ j
  336.   where r.job = j.job(+)
  337. /
  338. comment on table DBA_REFRESH is
  339. 'All the refresh groups'
  340. /
  341. comment on column DBA_REFRESH.ROWNER is
  342. 'Name of the owner of the refresh group'
  343. /
  344. comment on column DBA_REFRESH.RNAME is
  345. 'Name of the refresh group'
  346. /
  347. comment on column DBA_REFRESH.REFGROUP is
  348. 'Internal identifier of refresh group'
  349. /
  350. comment on column DBA_REFRESH.IMPLICIT_DESTROY is
  351. 'Y or N, if Y then destroy the refresh group when its last item is subtracted'
  352. /
  353. comment on column DBA_REFRESH.JOB is
  354. 'Identifier of job used to automatically refresh the group'
  355. /
  356. comment on column DBA_REFRESH.NEXT_DATE is
  357. 'Date that this job will next be automatically refreshed, if not broken'
  358. /
  359. comment on column DBA_REFRESH.INTERVAL is
  360. 'A date function used to compute the next NEXT_DATE'
  361. /
  362. comment on column DBA_REFRESH.BROKEN is
  363. 'Y or N, Y is the job is broken and will never be run'
  364. /
  365. drop public synonym DBA_REFRESH
  366. /
  367. create public synonym DBA_REFRESH for DBA_REFRESH
  368. /
  369.  
  370.  
  371. create or replace view ALL_REFRESH
  372. as select * from dba_refresh where user = rowner 
  373.   or userenv('SCHEMAID') = 0 or exists
  374.   (select kzsrorol
  375.      from x$kzsro x, sys.system_privilege_map m, sys.sysauth$ s    
  376.      where x.kzsrorol = s.grantee# and
  377.            s.privilege# = m.privilege and
  378.            m.name = 'ALTER ANY SNAPSHOT')
  379. /
  380. comment on table ALL_REFRESH is
  381. 'All the refresh groups that the user can touch'
  382. /
  383. comment on column ALL_REFRESH.ROWNER is
  384. 'Name of the owner of the refresh group'
  385. /
  386. comment on column ALL_REFRESH.RNAME is
  387. 'Name of the refresh group'
  388. /
  389. comment on column ALL_REFRESH.REFGROUP is
  390. 'Internal identifier of refresh group'
  391. /
  392. comment on column ALL_REFRESH.IMPLICIT_DESTROY is
  393. 'Y or N, if Y then destroy the refresh group when its last item is subtracted'
  394. /
  395. comment on column ALL_REFRESH.JOB is
  396. 'Identifier of job used to automatically refresh the group'
  397. /
  398. comment on column ALL_REFRESH.NEXT_DATE is
  399. 'Date that this job will next be automatically refreshed, if not broken'
  400. /
  401. comment on column ALL_REFRESH.INTERVAL is
  402. 'A date function used to compute the next NEXT_DATE'
  403. /
  404. comment on column ALL_REFRESH.BROKEN is
  405. 'Y or N, Y is the job is broken and will never be run'
  406. /
  407. drop public synonym ALL_REFRESH
  408. /
  409. create public synonym ALL_REFRESH for ALL_REFRESH
  410. /
  411. grant select on ALL_REFRESH to public with grant option
  412. /
  413.  
  414.  
  415. create or replace view USER_REFRESH 
  416. as select * from dba_refresh where rowner = user
  417. /
  418. comment on table USER_REFRESH is
  419. 'All the refresh groups'
  420. /
  421. comment on column USER_REFRESH.ROWNER is
  422. 'Name of the owner of the refresh group'
  423. /
  424. comment on column USER_REFRESH.RNAME is
  425. 'Name of the refresh group'
  426. /
  427. comment on column USER_REFRESH.REFGROUP is
  428. 'Internal identifier of refresh group'
  429. /
  430. comment on column USER_REFRESH.IMPLICIT_DESTROY is
  431. 'Y or N, if Y then destroy the refresh group when its last item is subtracted'
  432. /
  433. comment on column USER_REFRESH.JOB is
  434. 'Identifier of job used to automatically refresh the group'
  435. /
  436. comment on column USER_REFRESH.NEXT_DATE is
  437. 'Date that this job will next be automatically refreshed, if not broken'
  438. /
  439. comment on column USER_REFRESH.INTERVAL is
  440. 'A date function used to compute the next NEXT_DATE'
  441. /
  442. comment on column USER_REFRESH.BROKEN is
  443. 'Y or N, Y is the job is broken and will never be run'
  444. /
  445. drop public synonym USER_REFRESH
  446. /
  447. create public synonym USER_REFRESH for USER_REFRESH
  448. /
  449. grant select on USER_REFRESH to public with grant option
  450. /
  451.  
  452.  
  453.  
  454. create or replace view DBA_REFRESH_CHILDREN
  455. as select rc.owner OWNER, rc.name NAME, rc.TYPE, 
  456.           r.owner ROWNER, r.name RNAME, r.REFGROUP,
  457.           decode(mod(r.flag,2),1,'Y',0,'N','?') IMPLICIT_DESTROY,
  458.           j.job, j.NEXT_DATE, j.INTERVAL,
  459.           decode(mod(j.flag,2),1,'Y',0,'N','?') BROKEN
  460.   from rgroup$ r, rgchild$ rc, job$ j
  461.   where r.refgroup = rc.refgroup
  462.     and r.job = j.job (+)
  463. /
  464. comment on table DBA_REFRESH_CHILDREN is
  465. 'All the objects in refresh groups'
  466. /
  467. comment on column DBA_REFRESH_CHILDREN.OWNER is
  468. 'Owner of the object in the refresh group'
  469. /
  470. comment on column DBA_REFRESH_CHILDREN.NAME is
  471. 'Name of the object in the refresh group'
  472. /
  473. comment on column DBA_REFRESH_CHILDREN.TYPE is
  474. 'Type of the object in the refresh group'
  475. /
  476. comment on column DBA_REFRESH_CHILDREN.ROWNER is
  477. 'Name of the owner of the refresh group'
  478. /
  479. comment on column DBA_REFRESH_CHILDREN.RNAME is
  480. 'Name of the refresh group'
  481. /
  482. comment on column DBA_REFRESH_CHILDREN.REFGROUP is
  483. 'Internal identifier of refresh group'
  484. /
  485. comment on column DBA_REFRESH_CHILDREN.IMPLICIT_DESTROY is
  486. 'Y or N, if Y then destroy the refresh group when its last item is subtracted'
  487. /
  488. comment on column DBA_REFRESH_CHILDREN.JOB is
  489. 'Identifier of job used to automatically refresh the group'
  490. /
  491. comment on column DBA_REFRESH_CHILDREN.NEXT_DATE is
  492. 'Date that this job will next be automatically refreshed, if not broken'
  493. /
  494. comment on column DBA_REFRESH_CHILDREN.INTERVAL is
  495. 'A date function used to compute the next NEXT_DATE'
  496. /
  497. comment on column DBA_REFRESH_CHILDREN.BROKEN is
  498. 'Y or N, Y is the job is broken and will never be run'
  499. /
  500. drop public synonym DBA_REFRESH_CHILDREN
  501. /
  502. create public synonym DBA_REFRESH_CHILDREN for USER_REFRESH_CHILDREN
  503. /
  504.  
  505.  
  506. create or replace view ALL_REFRESH_CHILDREN
  507. as select * from dba_refresh_children where user = rowner 
  508.   or userenv('SCHEMAID') = 0 or exists
  509.   (select kzsrorol
  510.      from x$kzsro x, sys.system_privilege_map m, sys.sysauth$ s    
  511.      where x.kzsrorol = s.grantee# and
  512.            s.privilege# = m.privilege and
  513.            m.name = 'ALTER ANY SNAPSHOT')
  514. /
  515. comment on table ALL_REFRESH_CHILDREN is
  516. 'All the objects in refresh groups, where the user can touch the group'
  517. /
  518. comment on column ALL_REFRESH_CHILDREN.OWNER is
  519. 'Owner of the object in the refresh group'
  520. /
  521. comment on column ALL_REFRESH_CHILDREN.NAME is
  522. 'Name of the object in the refresh group'
  523. /
  524. comment on column ALL_REFRESH_CHILDREN.TYPE is
  525. 'Type of the object in the refresh group'
  526. /
  527. comment on column ALL_REFRESH_CHILDREN.ROWNER is
  528. 'Name of the owner of the refresh group'
  529. /
  530. comment on column ALL_REFRESH_CHILDREN.RNAME is
  531. 'Name of the refresh group'
  532. /
  533. comment on column ALL_REFRESH_CHILDREN.REFGROUP is
  534. 'Internal identifier of refresh group'
  535. /
  536. comment on column ALL_REFRESH_CHILDREN.IMPLICIT_DESTROY is
  537. 'Y or N, if Y then destroy the refresh group when its last item is subtracted'
  538. /
  539. comment on column ALL_REFRESH_CHILDREN.JOB is
  540. 'Identifier of job used to automatically refresh the group'
  541. /
  542. comment on column ALL_REFRESH_CHILDREN.NEXT_DATE is
  543. 'Date that this job will next be automatically refreshed, if not broken'
  544. /
  545. comment on column ALL_REFRESH_CHILDREN.INTERVAL is
  546. 'A date function used to compute the next NEXT_DATE'
  547. /
  548. comment on column ALL_REFRESH_CHILDREN.BROKEN is
  549. 'Y or N, Y is the job is broken and will never be run'
  550. /
  551. drop public synonym ALL_REFRESH_CHILDREN
  552. /
  553. create public synonym ALL_REFRESH_CHILDREN for ALL_REFRESH_CHILDREN
  554. /
  555. grant select on ALL_REFRESH_CHILDREN to public with grant option
  556. /
  557.  
  558.  
  559. create or replace view USER_REFRESH_CHILDREN
  560. as select * from dba_refresh_children where rowner = user
  561. /
  562. comment on table USER_REFRESH_CHILDREN is
  563. 'All the objects in refresh groups, where the user owns the refresh group'
  564. /
  565. comment on column USER_REFRESH_CHILDREN.OWNER is
  566. 'Owner of the object in the refresh group'
  567. /
  568. comment on column USER_REFRESH_CHILDREN.NAME is
  569. 'Name of the object in the refresh group'
  570. /
  571. comment on column USER_REFRESH_CHILDREN.TYPE is
  572. 'Type of the object in the refresh group'
  573. /
  574. comment on column USER_REFRESH_CHILDREN.ROWNER is
  575. 'Name of the owner of the refresh group'
  576. /
  577. comment on column USER_REFRESH_CHILDREN.RNAME is
  578. 'Name of the refresh group'
  579. /
  580. comment on column USER_REFRESH_CHILDREN.REFGROUP is
  581. 'Internal identifier of refresh group'
  582. /
  583. comment on column USER_REFRESH_CHILDREN.IMPLICIT_DESTROY is
  584. 'Y or N, if Y then destroy the refresh group when its last item is subtracted'
  585. /
  586. comment on column USER_REFRESH_CHILDREN.JOB is
  587. 'Identifier of job used to automatically refresh the group'
  588. /
  589. comment on column USER_REFRESH_CHILDREN.NEXT_DATE is
  590. 'Date that this job will next be automatically refreshed, if not broken'
  591. /
  592. comment on column USER_REFRESH_CHILDREN.INTERVAL is
  593. 'A date function used to compute the next NEXT_DATE'
  594. /
  595. comment on column USER_REFRESH_CHILDREN.BROKEN is
  596. 'Y or N, Y is the job is broken and will never be run'
  597. /
  598. drop public synonym USER_REFRESH_CHILDREN
  599. /
  600. create public synonym USER_REFRESH_CHILDREN for USER_REFRESH_CHILDREN
  601. /
  602. grant select on USER_REFRESH_CHILDREN to public with grant option
  603. /
  604.