comparison backend/doc/schema/oracle-drop-spatial.sql @ 6652:765944ca6df0 double-precision

Purge tables when droping in Oracle to free space and avoid duplicates in views such as dba_constraints
author Tom Gottfried <tom@intevation.de>
date Wed, 24 Jul 2013 18:41:22 +0200
parents 97145ec4e33c
children cc53aae06303
comparison
equal deleted inserted replaced
6651:8782ba5cb222 6652:765944ca6df0
1 DROP TRIGGER river_axes_trigger; 1 DROP TRIGGER river_axes_trigger;
2 DROP TABLE river_axes; 2 DROP TABLE river_axes PURGE;
3 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'RIVER_AXES'; 3 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'RIVER_AXES';
4 DROP SEQUENCE RIVER_AXES_ID_SEQ; 4 DROP SEQUENCE RIVER_AXES_ID_SEQ;
5 5
6 DROP TRIGGER river_axes_km_trigger; 6 DROP TRIGGER river_axes_km_trigger;
7 DROP TABLE river_axes_km; 7 DROP TABLE river_axes_km PURGE;
8 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'RIVER_AXES_KM'; 8 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'RIVER_AXES_KM';
9 DROP SEQUENCE RIVER_AXES_KM_ID_SEQ; 9 DROP SEQUENCE RIVER_AXES_KM_ID_SEQ;
10 10
11 DROP TRIGGER cross_section_tracks_trigger; 11 DROP TRIGGER cross_section_tracks_trigger;
12 DROP TABLE cross_section_tracks; 12 DROP TABLE cross_section_tracks PURGE;
13 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'CROSS_SECTION_TRACKS'; 13 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'CROSS_SECTION_TRACKS';
14 DROP SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ; 14 DROP SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ;
15 15
16 DROP TRIGGER buildings_trigger; 16 DROP TRIGGER buildings_trigger;
17 DROP TABLE buildings; 17 DROP TABLE buildings PURGE;
18 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'BUILDINGS'; 18 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'BUILDINGS';
19 DROP SEQUENCE BUILDINGS_ID_SEQ; 19 DROP SEQUENCE BUILDINGS_ID_SEQ;
20 20
21 DROP TRIGGER fixpoints_trigger; 21 DROP TRIGGER fixpoints_trigger;
22 DROP TABLE fixpoints; 22 DROP TABLE fixpoints PURGE;
23 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FIXPOINTS'; 23 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FIXPOINTS';
24 DROP SEQUENCE FIXPOINTS_ID_SEQ; 24 DROP SEQUENCE FIXPOINTS_ID_SEQ;
25 25
26 DROP TRIGGER floodplain_trigger; 26 DROP TRIGGER floodplain_trigger;
27 DROP TABLE floodplain; 27 DROP TABLE floodplain PURGE;
28 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOODPLAIN'; 28 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOODPLAIN';
29 DROP SEQUENCE FLOODPLAIN_ID_SEQ; 29 DROP SEQUENCE FLOODPLAIN_ID_SEQ;
30 30
31 DROP TRIGGER dem_trigger; 31 DROP TRIGGER dem_trigger;
32 DROP TABLE dem; 32 DROP TABLE dem PURGE;
33 DROP SEQUENCE DEM_ID_SEQ; 33 DROP SEQUENCE DEM_ID_SEQ;
34 34
35 DROP TRIGGER hws_lines_trigger; 35 DROP TRIGGER hws_lines_trigger;
36 DROP TABLE hws_lines; 36 DROP TABLE hws_lines PURGE;
37 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HWS_LINES'; 37 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HWS_LINES';
38 DROP SEQUENCE HWS_LINES_ID_SEQ; 38 DROP SEQUENCE HWS_LINES_ID_SEQ;
39 39
40 DROP TRIGGER hws_points_trigger; 40 DROP TRIGGER hws_points_trigger;
41 DROP TABLE hws_points; 41 DROP TABLE hws_points PURGE;
42 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HWS_POINTS'; 42 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HWS_POINTS';
43 DROP SEQUENCE HWS_POINTS_ID_SEQ; 43 DROP SEQUENCE HWS_POINTS_ID_SEQ;
44 44
45 DROP TRIGGER floodmaps_trigger; 45 DROP TRIGGER floodmaps_trigger;
46 DROP TABLE floodmaps; 46 DROP TABLE floodmaps PURGE;
47 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOODMAPS'; 47 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOODMAPS';
48 DROP SEQUENCE FLOODMAPS_ID_SEQ; 48 DROP SEQUENCE FLOODMAPS_ID_SEQ;
49 49
50 DROP TRIGGER hydr_boundaries_trigger; 50 DROP TRIGGER hydr_boundaries_trigger;
51 DROP TABLE hydr_boundaries; 51 DROP TABLE hydr_boundaries PURGE;
52 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HYDR_BOUNDARIES'; 52 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HYDR_BOUNDARIES';
53 DROP SEQUENCE HYDR_BOUNDARIES_ID_SEQ; 53 DROP SEQUENCE HYDR_BOUNDARIES_ID_SEQ;
54 54
55 DROP TRIGGER hydr_boundaries_poly_trigger; 55 DROP TRIGGER hydr_boundaries_poly_trigger;
56 DROP TABLE hydr_boundaries_poly; 56 DROP TABLE hydr_boundaries_poly PURGE;
57 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HYDR_BOUNDARIES_POLY'; 57 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'HYDR_BOUNDARIES_POLY';
58 DROP SEQUENCE HYDR_BOUNDARIES_POLY_ID_SEQ; 58 DROP SEQUENCE HYDR_BOUNDARIES_POLY_ID_SEQ;
59 59
60 DROP TRIGGER gauge_location_trigger; 60 DROP TRIGGER gauge_location_trigger;
61 DROP TABLE gauge_location; 61 DROP TABLE gauge_location PURGE;
62 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'GAUGE_LOCATION'; 62 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'GAUGE_LOCATION';
63 DROP SEQUENCE GAUGE_LOCATION_ID_SEQ; 63 DROP SEQUENCE GAUGE_LOCATION_ID_SEQ;
64 64
65 DROP TRIGGER jetties_trigger; 65 DROP TRIGGER jetties_trigger;
66 DROP TABLE jetties; 66 DROP TABLE jetties PURGE;
67 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'JETTIES'; 67 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'JETTIES';
68 DROP SEQUENCE JETTIES_ID_SEQ; 68 DROP SEQUENCE JETTIES_ID_SEQ;
69 69
70 DROP TRIGGER flood_marks_trigger; 70 DROP TRIGGER flood_marks_trigger;
71 DROP TABLE flood_marks; 71 DROP TABLE flood_marks PURGE;
72 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOOD_MARKS'; 72 DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'FLOOD_MARKS';
73 DROP SEQUENCE FLOOD_MARKS_ID_SEQ; 73 DROP SEQUENCE FLOOD_MARKS_ID_SEQ;
74 74
75 DROP TABLE hws_kinds; 75 DROP TABLE hws_kinds PURGE;
76 DROP TABLE sectie_kinds; 76 DROP TABLE sectie_kinds PURGE;
77 DROP TABLE sobek_kinds; 77 DROP TABLE sobek_kinds PURGE;
78 DROP TABLE fed_states; 78 DROP TABLE fed_states PURGE;
79 DROP TABLE axis_kinds; 79 DROP TABLE axis_kinds PURGE;
80 DROP TABLE boundary_kinds; 80 DROP TABLE boundary_kinds PURGE;
81 DROP TABLE cross_section_track_kinds; 81 DROP TABLE cross_section_track_kinds PURGE;
82 DROP TABLE floodplain_kinds; 82 DROP TABLE floodplain_kinds PURGE;
83 DROP TABLE floodmap_kinds; 83 DROP TABLE floodmap_kinds PURGE;
84 DROP TABLE building_kinds; 84 DROP TABLE building_kinds PURGE;
85 DROP TABLE jetty_kinds; 85 DROP TABLE jetty_kinds PURGE;

http://dive4elements.wald.intevation.org