-
Notifications
You must be signed in to change notification settings - Fork 62
/
awr_change_dbid.sql
126 lines (125 loc) · 6.5 KB
/
awr_change_dbid.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
def dbid=&DBID;
alter table awr_stage.WRM$_SNAPSHOT disable constraint WRM$_SNAPSHOT_FK;
-- update AWR_STAGE.WRM$_DATABASE_INSTANCE set dbid=&dbid;
update awr_stage.WRM$_DATABASE_INSTANCE set dbid=&dbid;
-- update AWR_STAGE.WRM$_SNAPSHOT set dbid=&dbid;
update awr_stage.wrm$_snapshot set dbid=&dbid;
alter table awr_stage.WRM$_SNAPSHOT enable constraint WRM$_SNAPSHOT_FK;
update AWR_STAGE.WRH$_FILESTATXS set dbid=&dbid;
update AWR_STAGE.WRH$_SQLSTAT set dbid=&dbid;
update AWR_STAGE.WRH$_SYSTEM_EVENT set dbid=&dbid;
update AWR_STAGE.WRH$_WAITSTAT set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH_CHILDREN set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH_PARENT set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH_MISSES_SUMMARY set dbid=&dbid;
update AWR_STAGE.WRH$_EVENT_HISTOGRAM set dbid=&dbid;
update AWR_STAGE.WRH$_DB_CACHE_ADVICE set dbid=&dbid;
update AWR_STAGE.WRH$_ROWCACHE_SUMMARY set dbid=&dbid;
update AWR_STAGE.WRH$_SGASTAT set dbid=&dbid;
update AWR_STAGE.WRH$_SYSSTAT set dbid=&dbid;
update AWR_STAGE.WRH$_SYS_TIME_MODEL set dbid=&dbid;
update AWR_STAGE.WRH$_OSSTAT set dbid=&dbid;
update AWR_STAGE.WRH$_PARAMETER set dbid=&dbid;
update AWR_STAGE.WRH$_SEG_STAT set dbid=&dbid;
update AWR_STAGE.WRH$_DLM_MISC set dbid=&dbid;
update AWR_STAGE.WRH$_INST_CACHE_TRANSFER set dbid=&dbid;
update AWR_STAGE.WRH$_ACTIVE_SESSION_HISTORY set dbid=&dbid;
update AWR_STAGE.WRH$_TABLESPACE_STAT set dbid=&dbid;
update AWR_STAGE.WRH$_SERVICE_STAT set dbid=&dbid;
update AWR_STAGE.WRH$_SERVICE_WAIT_CLASS set dbid=&dbid;
update AWR_STAGE.WRH$_INTERCONNECT_PINGS set dbid=&dbid;
update AWR_STAGE.WRH$_FILESTATXS_BL set dbid=&dbid;
update AWR_STAGE.WRH$_TEMPSTATXS set dbid=&dbid;
update AWR_STAGE.WRH$_DATAFILE set dbid=&dbid;
update AWR_STAGE.WRH$_TEMPFILE set dbid=&dbid;
update AWR_STAGE.WRH$_COMP_IOSTAT set dbid=&dbid;
update AWR_STAGE.WRH$_IOSTAT_FUNCTION set dbid=&dbid;
update AWR_STAGE.WRH$_IOSTAT_FUNCTION_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_IOSTAT_FILETYPE set dbid=&dbid;
update AWR_STAGE.WRH$_IOSTAT_FILETYPE_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_SQLSTAT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_SQL_SUMMARY set dbid=&dbid;
update AWR_STAGE.WRH$_SQL_BIND_METADATA set dbid=&dbid;
update AWR_STAGE.WRH$_OPTIMIZER_ENV set dbid=&dbid;
update AWR_STAGE.WRH$_SYSTEM_EVENT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_EVENT_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_BG_EVENT_SUMMARY set dbid=&dbid;
update AWR_STAGE.WRH$_WAITSTAT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_ENQUEUE_STAT set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH_BL set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH_CHILDREN_BL set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH_PARENT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_LATCH_MISSES_SUMMARY_BL set dbid=&dbid;
update AWR_STAGE.WRH$_EVENT_HISTOGRAM_BL set dbid=&dbid;
update AWR_STAGE.WRH$_MUTEX_SLEEP set dbid=&dbid;
update AWR_STAGE.WRH$_LIBRARYCACHE set dbid=&dbid;
update AWR_STAGE.WRH$_DB_CACHE_ADVICE_BL set dbid=&dbid;
update AWR_STAGE.WRH$_BUFFER_POOL_STATISTICS set dbid=&dbid;
update AWR_STAGE.WRH$_ROWCACHE_SUMMARY_BL set dbid=&dbid;
update AWR_STAGE.WRH$_SGA set dbid=&dbid;
update AWR_STAGE.WRH$_SGASTAT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_PGASTAT set dbid=&dbid;
update AWR_STAGE.WRH$_PROCESS_MEMORY_SUMMARY set dbid=&dbid;
update AWR_STAGE.WRH$_RESOURCE_LIMIT set dbid=&dbid;
update AWR_STAGE.WRH$_SHARED_POOL_ADVICE set dbid=&dbid;
update AWR_STAGE.WRH$_STREAMS_POOL_ADVICE set dbid=&dbid;
update AWR_STAGE.WRH$_SQL_WORKAREA_HISTOGRAM set dbid=&dbid;
update AWR_STAGE.WRH$_PGA_TARGET_ADVICE set dbid=&dbid;
update AWR_STAGE.WRH$_SGA_TARGET_ADVICE set dbid=&dbid;
update AWR_STAGE.WRH$_MEMORY_TARGET_ADVICE set dbid=&dbid;
update AWR_STAGE.WRH$_MEMORY_RESIZE_OPS set dbid=&dbid;
update AWR_STAGE.WRH$_INSTANCE_RECOVERY set dbid=&dbid;
update AWR_STAGE.WRH$_JAVA_POOL_ADVICE set dbid=&dbid;
update AWR_STAGE.WRH$_THREAD set dbid=&dbid;
update AWR_STAGE.WRH$_SYSSTAT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_SYS_TIME_MODEL_BL set dbid=&dbid;
update AWR_STAGE.WRH$_OSSTAT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_PARAMETER_BL set dbid=&dbid;
update AWR_STAGE.WRH$_STAT_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_OSSTAT_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_PARAMETER_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_UNDOSTAT set dbid=&dbid;
update AWR_STAGE.WRH$_SEG_STAT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_SEG_STAT_OBJ set dbid=&dbid;
update AWR_STAGE.WRH$_METRIC_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_SYSMETRIC_HISTORY set dbid=&dbid;
update AWR_STAGE.WRH$_SYSMETRIC_SUMMARY set dbid=&dbid;
update AWR_STAGE.WRH$_SESSMETRIC_HISTORY set dbid=&dbid;
update AWR_STAGE.WRH$_FILEMETRIC_HISTORY set dbid=&dbid;
update AWR_STAGE.WRH$_WAITCLASSMETRIC_HISTORY set dbid=&dbid;
update AWR_STAGE.WRH$_DLM_MISC_BL set dbid=&dbid;
update AWR_STAGE.WRH$_CR_BLOCK_SERVER set dbid=&dbid;
update AWR_STAGE.WRH$_CURRENT_BLOCK_SERVER set dbid=&dbid;
update AWR_STAGE.WRH$_INST_CACHE_TRANSFER_BL set dbid=&dbid;
update AWR_STAGE.WRH$_ACTIVE_SESSION_HISTORY_BL set dbid=&dbid;
update AWR_STAGE.WRH$_TABLESPACE_STAT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_LOG set dbid=&dbid;
update AWR_STAGE.WRH$_MTTR_TARGET_ADVICE set dbid=&dbid;
update AWR_STAGE.WRH$_TABLESPACE_SPACE_USAGE set dbid=&dbid;
update AWR_STAGE.WRH$_SERVICE_NAME set dbid=&dbid;
update AWR_STAGE.WRH$_SERVICE_STAT_BL set dbid=&dbid;
update AWR_STAGE.WRH$_SERVICE_WAIT_CLASS_BL set dbid=&dbid;
update AWR_STAGE.WRH$_SESS_TIME_STATS set dbid=&dbid;
update AWR_STAGE.WRH$_STREAMS_CAPTURE set dbid=&dbid;
update AWR_STAGE.WRH$_STREAMS_APPLY_SUM set dbid=&dbid;
update AWR_STAGE.WRH$_BUFFERED_QUEUES set dbid=&dbid;
update AWR_STAGE.WRH$_BUFFERED_SUBSCRIBERS set dbid=&dbid;
update AWR_STAGE.WRH$_PERSISTENT_QUEUES set dbid=&dbid;
update AWR_STAGE.WRH$_PERSISTENT_SUBSCRIBERS set dbid=&dbid;
update AWR_STAGE.WRH$_RULE_SET set dbid=&dbid;
update AWR_STAGE.WRH$_RSRC_CONSUMER_GROUP set dbid=&dbid;
update AWR_STAGE.WRH$_RSRC_PLAN set dbid=&dbid;
update AWR_STAGE.WRH$_CLUSTER_INTERCON set dbid=&dbid;
update AWR_STAGE.WRH$_IC_DEVICE_STATS set dbid=&dbid;
update AWR_STAGE.WRH$_IC_CLIENT_STATS set dbid=&dbid;
update AWR_STAGE.WRH$_MEM_DYNAMIC_COMP set dbid=&dbid;
update AWR_STAGE.WRH$_INTERCONNECT_PINGS_BL set dbid=&dbid;
update AWR_STAGE.WRM$_SNAP_ERROR set dbid=&dbid;
update AWR_STAGE.WRM$_COLORED_SQL set dbid=&dbid;
update AWR_STAGE.WRM$_BASELINE_DETAILS set dbid=&dbid;
update AWR_STAGE.WRM$_BASELINE_TEMPLATE set dbid=&dbid;
update AWR_STAGE.WRM$_WR_CONTROL set dbid=&dbid;
update AWR_STAGE.WRH$_SQLTEXT set dbid=&dbid;
update AWR_STAGE.WRH$_SQL_PLAN set dbid=&dbid;