Difference between revisions of "Switching Between Live and Test"

From Vital Soft Wiki
Jump to: navigation, search
>Johno
(Using -b and -uprofile)
 
(4 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
=== Using -b Only ===
 
=== Using -b Only ===
 
Generally speaking, there are no special considerations when the job does not use '''-aprofile''' or '''-uvmgrfile'''.  Provided the login user has access to the specified files and directories everything should work as expected. When opening Eloquence databases, AskPlus will use the default setting for EQ_DBSERVER which is typically set in the user's .profile file.
 
Generally speaking, there are no special considerations when the job does not use '''-aprofile''' or '''-uvmgrfile'''.  Provided the login user has access to the specified files and directories everything should work as expected. When opening Eloquence databases, AskPlus will use the default setting for EQ_DBSERVER which is typically set in the user's .profile file.
=== Using -b and -uprofile ===
+
=== Using -b and -aprofile ===
 
Jobs using '''-aprofile''' will typically need to have the profile name changed when the job login is changed from bolive to botest. Most profiles contain a '''directory=''' statement and an '''EQ_DBSERVER''' statement.  It is important that the settings for these and other options accurately reflect the login user.  Jobs that login as botest should open a test instance of the database and create files in a directory configured for testing. Thus a production job will look like this:
 
Jobs using '''-aprofile''' will typically need to have the profile name changed when the job login is changed from bolive to botest. Most profiles contain a '''directory=''' statement and an '''EQ_DBSERVER''' statement.  It is important that the settings for these and other options accurately reflect the login user.  Jobs that login as botest should open a test instance of the database and create files in a directory configured for testing. Thus a production job will look like this:
 
<pre>
 
<pre>
Line 20: Line 20:
 
EOD
 
EOD
 
</pre>
 
</pre>
==== Using $LOGNAME as the Profile ====
+
==== Using $SPXLOGIN as the Profile ====
A good solution to this problem is to create VsrvTcp profiles for bolive, botest and any other logins your job might use like botrain.  Once you have created the appropriate VsrvTcp profiles, the following syntax will work and no changes are needed to the profile name.
+
A good solution to this problem is to create VsrvTcp profiles for bolive, botest and any other logins your job might use like botrn.  Once you have created the appropriate VsrvTcp profiles, the following syntax will work and no changes are needed to the profile name.
 
<pre>
 
<pre>
 
# Job logging in as bolive or botest
 
# Job logging in as bolive or botest
 
...
 
...
/ASKPLUS/askplus -b -a${LOGNAME} << EOD
+
/ASKPLUS/askplus -b -a${SPXLOGIN} << EOD
 
...
 
...
 
EOD
 
EOD
 
</pre>
 
</pre>
==== Switching to the EOM Databases using $LOGNAME ====
+
 
 +
==== Switching to the EOM Databases using $SPXLOGIN ====
 
To access the EOM databases, create profiles called bolive_eom and botest_eom. Then use the following syntax:
 
To access the EOM databases, create profiles called bolive_eom and botest_eom. Then use the following syntax:
 
<pre>
 
<pre>
 
# Job logging in as bolive or botest
 
# Job logging in as bolive or botest
 
...
 
...
/ASKPLUS/askplus -b -a${LOGNAME}_eom << EOD
+
/ASKPLUS/askplus -b -a${SPXLOGIN}_eom << EOD
 
...
 
...
 
EOD
 
EOD
 
</pre>
 
</pre>
 
*Adding '''_eom''' to the profile name will access either bolive_eom or botest_eom.
 
*Adding '''_eom''' to the profile name will access either bolive_eom or botest_eom.
 +
 
=== Using -b and -uvmgrfile ===
 
=== Using -b and -uvmgrfile ===
 
When using '''-uvmgrfile''' make sure that the vmgrfile name is valid for the current login. This can be done by using an environment variable as follows:
 
When using '''-uvmgrfile''' make sure that the vmgrfile name is valid for the current login. This can be done by using an environment variable as follows:
Line 49: Line 51:
 
</pre>
 
</pre>
 
*Remember when the job uses '-uvmgefile''' and not '''-aprofile''' none of the settings from your VsrvTcp profiles will be used.  
 
*Remember when the job uses '-uvmgefile''' and not '''-aprofile''' none of the settings from your VsrvTcp profiles will be used.  
*If your VsrvTcp profiles contain settings required by your jobs, it is best to use the '''-a$LOGNAME''' approach as described above.
+
*If your VsrvTcp profiles contain settings required by your jobs, it is best to use the '''-a$SPXLOGIN''' approach as described above.

Latest revision as of 17:23, 20 January 2023

Spectrum Clients

Switching the login of a job from bolive to botest may not be sufficient to have the job execute as expected. The exact behavior depends on the run line options that are specified:

Using -b Only

Generally speaking, there are no special considerations when the job does not use -aprofile or -uvmgrfile. Provided the login user has access to the specified files and directories everything should work as expected. When opening Eloquence databases, AskPlus will use the default setting for EQ_DBSERVER which is typically set in the user's .profile file.

Using -b and -aprofile

Jobs using -aprofile will typically need to have the profile name changed when the job login is changed from bolive to botest. Most profiles contain a directory= statement and an EQ_DBSERVER statement. It is important that the settings for these and other options accurately reflect the login user. Jobs that login as botest should open a test instance of the database and create files in a directory configured for testing. Thus a production job will look like this:

# Job logging in as bolive
...
/ASKPLUS/askplus -b -asummit_live << EOD
...
EOD

And a test job will look like this:

# Job logging in as botest
...
/ASKPLUS/askplus -b -asummit_test << EOD
...
EOD

Using $SPXLOGIN as the Profile

A good solution to this problem is to create VsrvTcp profiles for bolive, botest and any other logins your job might use like botrn. Once you have created the appropriate VsrvTcp profiles, the following syntax will work and no changes are needed to the profile name.

# Job logging in as bolive or botest
...
/ASKPLUS/askplus -b -a${SPXLOGIN} << EOD
...
EOD

Switching to the EOM Databases using $SPXLOGIN

To access the EOM databases, create profiles called bolive_eom and botest_eom. Then use the following syntax:

# Job logging in as bolive or botest
...
/ASKPLUS/askplus -b -a${SPXLOGIN}_eom << EOD
...
EOD
  • Adding _eom to the profile name will access either bolive_eom or botest_eom.

Using -b and -uvmgrfile

When using -uvmgrfile make sure that the vmgrfile name is valid for the current login. This can be done by using an environment variable as follows:

# Job logging in as bolive or botest
...
/ASKPLUS/askplus -b -u$SPXHOME/visimage/vmgr_live << EOD
...
EOD
  • Remember when the job uses '-uvmgefile and not -aprofile none of the settings from your VsrvTcp profiles will be used.
  • If your VsrvTcp profiles contain settings required by your jobs, it is best to use the -a$SPXLOGIN approach as described above.