Rename the DataCenter.

All questions about Control-M jobs definitions
Post Reply
User avatar
futre25
Nouveau
Nouveau
Posts: 166
Joined: 11 Aug 2009 12:00

Rename the DataCenter.

Post by futre25 » 05 Jun 2012 1:19

Hi to all.

There a command to change the data center of the tables?.

Thanks very much.

User avatar
futre25
Nouveau
Nouveau
Posts: 166
Joined: 11 Aug 2009 12:00

Post by futre25 » 05 Jun 2012 5:26

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.

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 05 Jun 2012 5:37

Use exportdeftable and deftable utilities, using XML format.
It will simple te replace DATACENTER using an editor.

User avatar
futre25
Nouveau
Nouveau
Posts: 166
Joined: 11 Aug 2009 12:00

Post by futre25 » 06 Jun 2012 12:12

Thanks very much for your reply.

Apparently, not exit the command to change the Datacenter. Should be done by hand.

Regarding the backup, you could give me an example of xml file needed. I'm with the documentation and I have many doubts.

Thanks very much.

User avatar
Allison
Nouveau
Nouveau
Posts: 14
Joined: 22 Sep 2012 12:00

Post by Allison » 24 Sep 2012 3:04

ALTER TABLE <table_name>
ADD <column_name1> <datatype1> <constraint1>


ALTER TABLE <table_name>
ALTER COLUMN <column_name1> <datatype1> <constraint1>


ALTER TABLE <table_name>
DROP COLUMN <column_name1> <datatype1>
check it out

User avatar
brownbag
Nouveau
Nouveau
Posts: 161
Joined: 11 Oct 2007 12:00
Location: Melbourne

RENAME DATACENTER NAME

Post by brownbag » 16 Oct 2012 1:47

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>';

Post Reply