If you are used to the pre-Agile 9.3.2 scripts to import and export a database then you probably noticed that things have changed. Now you must include passwords to import and export dump files but you may not have realized there is more! You must also reset your keystore and system critical passwords if loading a dump from another system. At first this was pretty annoying, but after creating a script to reset them during the import, the inconvenience is a distant memory. This blog will show you how to do the same.
Critical PropertyTable and AgileUser Entries
In order for Agile 9.3.2 to work properly, there are some critical accounts such as superadmin, admin, ifsuser, and a couple of others. In addition, a keystore value has also been added in the database. For things to work properly, after a dump file from another environment is loaded, the original values must be restored. This means that they must be obtained from the system after installation. If you fail to save them, then you will need to reinstall Agile!
Here are the steps to save out the necessary values and create a SQL file to add to the import script(s)
- Execute the following SQL:
- select * from propertytable WHERE parentid=5004 AND propertyid=1008;
- select loginid, login_pwd from agileuser where loginid in (‘admin’,’superadmin’,’ifsuser’,’agileuser’);
- Create a file called set_agile_pwds.sql and store it in the same path as agile9imp.bat add the following lines to it using the passwords from the step above:
UPDATE propertytable SET value='' WHERE parentid=5004 AND propertyid=1008;
UPDATE agileuser SET login_pwd ='' WHERE loginid = 'admin';
UPDATE agileuser SET login_pwd ='' WHERE loginid = 'superadmin';
UPDATE agileuser SET login_pwd ='' WHERE loginid = 'ifsuser';
UPDATE agileuser SET login_pwd ='' WHERE loginid = 'agileuser';
Chances are you could use the same password for admin, superadmin, ifsuser and agileuser if you opted to use the same password for all accounts during installation but I did not test that.
Modifying the Import Scripts
Now that your password script is set up, all that is left is to add it to the import script. Add the following line to agile9imp or agile9impdp before the :end label
%ORACLE_HOME%binsqlplus agile/%PW_AGILE% @set_agile_pwds.sql
Installation Process Changes
If you have a checklist you use for installations, make sure you add the following
After the installation is complete, save out the original dump file so you can retrieve these settings if required
- Create a new SQL file to reset the password
- Modify the import script(s) to call the password reset SQL file
- TEST IT!