Hi to all.
There a command to change the data center of the tables?.
Thanks very much.
Rename the DataCenter.
Hi to all
I have requested the following:
We have 3 data centers (PRODUCCION, PRUEBAS and CONTINGENCIA) connected to the same EM.
I have to do a script that runs every day, so that the datacenter CONTINGENCIA contains the same jobs the datacenter PRODUCCION.
Could you help me with any ideas or scripts to backup or export of data?
Thanks to all.
I have requested the following:
We have 3 data centers (PRODUCCION, PRUEBAS and CONTINGENCIA) connected to the same EM.
I have to do a script that runs every day, so that the datacenter CONTINGENCIA contains the same jobs the datacenter PRODUCCION.
Could you help me with any ideas or scripts to backup or export of data?
Thanks to all.
RENAME DATACENTER NAME
1. Shut down all components of Enterprise Manager, including gateways to other datacenters.
2. Delete the gateway for the datacenter we are going to change.
3. Perform SQL Commands (below) to facilitate these changes
4. Restart EM
5. From the CCM, define a new gateway, you will now see the new datacenter name in the drop down box. Set this gateways desired state to up.
6. Check the following areas in EM for the Datacenter name and modify:
Collections
Filters
Authorisations
Self Service Definitions (and rule definitions)
Dynamic Filters (on all clients)
Find and Update Presets (on all clients)
Templates
SQL below is for PostgreSQL - adapt if using another database:
update def_ver_tables set data_center = '<new>' where data_center='<old>';
insert into df_calendar ( select '<new>', calendar, used_by, used_by_code, modified, last_upload, type, checksum from df_calendar where data_center='<old>');
update df_years set data_center='<new>' where data_center='<old>';
delete from df_calendar where data_center='<old>';
update comm set data_center = '<new>' where data_center='<old>';
update download set data_center = '<new>' where data_center='<old>';
# Update the Global Condition prefix
# However, if the datacenter prefix is used with other datacenter prefixes in the From or To DC
# fields, then the Global condition prefixes will have to be manually updated using the EM GUI.
update global_cond set from_dc='<new>' where from_dc='<old>';
update global_cond set to_dc='<new>' where to_dc='<old>';
# Update the statistics
update avg_run_info set data_center = '<new>' where data_center='<old>';
# Update the statistics for reporting facility
update runinfo_history set data_center = '<new>' where data_center='<old>';
# Update the auditing table
update audit_activities set data_center_name = '<new>' where data_center_name='<old>';
# Update the alerts
update alarm set data_center = '<new>' where data_center='<old>';
# Update the forecast definitions
update sim_sysstate_ud set data_center = '<new>' where data_center='<old>';
update sim_sysstate_udtbl set data_center = '<new>' where data_center='<old>';
# Update the BIM services log and reports
update bim_log set data_center = '<new>' where data_center='<old>';
update bim_prob_jobs set data_center = '<new>' where data_center='<old>';
update NET_REPORT set DATA_CENTER = '<new>' where DATA_CENTER ='<old>';
# Update GCS
update GCS_GTW_RECOV set DATA_CENTER = '<new>' where DATA_CENTER ='<old>';
2. Delete the gateway for the datacenter we are going to change.
3. Perform SQL Commands (below) to facilitate these changes
4. Restart EM
5. From the CCM, define a new gateway, you will now see the new datacenter name in the drop down box. Set this gateways desired state to up.
6. Check the following areas in EM for the Datacenter name and modify:
Collections
Filters
Authorisations
Self Service Definitions (and rule definitions)
Dynamic Filters (on all clients)
Find and Update Presets (on all clients)
Templates
SQL below is for PostgreSQL - adapt if using another database:
update def_ver_tables set data_center = '<new>' where data_center='<old>';
insert into df_calendar ( select '<new>', calendar, used_by, used_by_code, modified, last_upload, type, checksum from df_calendar where data_center='<old>');
update df_years set data_center='<new>' where data_center='<old>';
delete from df_calendar where data_center='<old>';
update comm set data_center = '<new>' where data_center='<old>';
update download set data_center = '<new>' where data_center='<old>';
# Update the Global Condition prefix
# However, if the datacenter prefix is used with other datacenter prefixes in the From or To DC
# fields, then the Global condition prefixes will have to be manually updated using the EM GUI.
update global_cond set from_dc='<new>' where from_dc='<old>';
update global_cond set to_dc='<new>' where to_dc='<old>';
# Update the statistics
update avg_run_info set data_center = '<new>' where data_center='<old>';
# Update the statistics for reporting facility
update runinfo_history set data_center = '<new>' where data_center='<old>';
# Update the auditing table
update audit_activities set data_center_name = '<new>' where data_center_name='<old>';
# Update the alerts
update alarm set data_center = '<new>' where data_center='<old>';
# Update the forecast definitions
update sim_sysstate_ud set data_center = '<new>' where data_center='<old>';
update sim_sysstate_udtbl set data_center = '<new>' where data_center='<old>';
# Update the BIM services log and reports
update bim_log set data_center = '<new>' where data_center='<old>';
update bim_prob_jobs set data_center = '<new>' where data_center='<old>';
update NET_REPORT set DATA_CENTER = '<new>' where DATA_CENTER ='<old>';
# Update GCS
update GCS_GTW_RECOV set DATA_CENTER = '<new>' where DATA_CENTER ='<old>';