SQL Tools
A number of SQL scripts are provided for Aida directory service management. These are in the CD_SOFT SQl script release directory "/afs/slac/g/cd/soft/dev/ora/". That directory is in ORACLE_PATH, which is set by sourcing /afs/slac/g/cd/soft/dev/script/oracle_env.csh.
Setup
To set yourself up to execute these tools, log into a SLAC Public AFS Solaris machine (Tersk, Flora etc) and then, first, set your environment:
[tersk02]:u/cd/greg> source /afs/slac/g/cd/soft/dev/script/ENVS.csh [tersk02]:u/cd/greg> source !:1:h/oracle_env.csh
Management SQL scripts
This subsection describes the use of some of the many SQL scripts that you can find in /afs/slac/g/cd/soft/package/aida/common/script/.
Show Aida Services
To show names and ID numbers of all Aida services in the Aida directory service:
@show_services
Add a name to Aida.
To add a name to Aida, run add_IA.sql, giving the number of the Aida service to which you want to add the name, plus the instance and attribute of the name:
@add_IA 63 'BPMS:PR02:8032' 'TWISS'
You can find all the existing Aida service names with show_services.sql.
To add a name with a transform to Aida
A "transform" is a pattern that is sent to the data provider in place of the given name. It's used for instance to provide the SQL query that the RDB data provider should run to get the data for a name. To add a name and transform, use add_IAT.sql:
@add_IAT 5 "BPMS:IN20" "BSA.X1H.NAMES" "select unique instance from aida_names where instance like ''BPMS:IN20:%:X1H''"
Note the use of quotes - you must quote the transform so it's a single argument to add_IAT.sql.
Remove a name from Aida.
To remove an name from Aida, run remove_IA.sql, giving the name's instance and attribute:
SQL> @remove_IA 'LCLS' 'BSA.rootnames.byZ'