If you need to remove a region, area, snapshot, etc, from the SCORE schema, please use these steps:

a) Find the relevant DEV and prod script

(Thanks to Judy for creating the sql and bash scripts)

to suit your needs, as softegr@lcls-builder, here:
/usr/local/lcls/physics/apps/score/script

b) Call Elie to backup the SCORE schema on MCCO (SLAC PROD). This script only takes about 5 min to complete. He'll call you back when it is done.

c) Issue the appropriate *DEV script first, for ex, "./?deleteSCOREAreaGroupDEV.bash" issued as softegr@lcls-builder is the counterpart for above prod version. Relaunch score as softegr@lcls-builder to ensure your script worked for the dev version

e) Go for it on production!

f) Make an entry in the operations elog stating what you modified in the RDB; cc controls-software and Rick Iversion.

EXAMPLE

Take the following request as an example -

> Debbie,

>

> Can you remove the SOMS devices from the FEE SCORE region?

> Their readback is not reliable yet and we don't want ops to

> load in bad values and put the beam into the wall. At some

> point the SOMS devices need to have their own region but that

> can come later.

>

> Thanks again,

> -Rick

1) This is what I did (Region aka Group):?[softegr@lcls-builder script]$ pwd/usr/local/lcls/physics/apps/score/script?[softegr@lcls-builder script]$ ./deleteSCOREAreaGroup.bash FEE SOMSPRODUCTION: Delete ALL SIGNALS in SCORE Group FEE Area SOMS!!?? Enter y to confirm

y

Deleting Group FEE Area SOMS...

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Aug 20 09:10:41 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning and Real Application Testing options

old 1: DELETE FROM SCORE_SNAPSHOT_GRP_SGNL WHERE EQUIP_CAT_ID = '&1' and

new 1: DELETE FROM SCORE_SNAPSHOT_GRP_SGNL WHERE EQUIP_CAT_ID = 'FEE' and

old 2: SYS_ID = '&2'

new 2: SYS_ID = 'SOMS'

24 rows deleted.

Commit complete.

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning and Real Application Testing options

DONE

2) If Debbie or Partha are gone -

a) Call Elie to backup the SCORE schema on MCCO (SLAC PROD). This script only takes about 5 min to complete. He'll call you back when it is done.

b) Issue the appropriate *DEV script first, for ex, "./?deleteSCOREAreaGroupDEV.bash" issued as softegr@lcls-builder is the counterpart for above prod version. Relaunch score as softegr@lcls-builder to ensure your script worked for the dev version
c) Go for it on production!

d) Make an entry in the operations elog stating what you modified in the RDB; cc controls-software and Rick Iversion.

Thanks,

Debbie

  • No labels