Changing the Accept String in a Transaction

  1. Get the serviceid of the transaction

  2. Log in to the database server using SecureCRT
  3. At the command prompt type psql -d gnw and press enter

  4. This brings you to the database command prompt which is represented as dbname=#

    [bcamp@dbcoma01aprd ~]$ psql -d gnw  
    psql (9.0.4)
    Type "help" for help.
    
    gnw=#  
     
  5. At the SQL command prompt enter the following query using the serviceid of the service in question:

    select step, accept_string from tservicelist where serviceid = 32351; 
     
    • Remember to replace 32351 with the correct serviceid number.

    • Note: the query must have a semicolon at the end.
    An example of running the above query:
    gnw=# select step, accept_string from tservicelist where serviceid = 32351; 
    
     step | accept_string 
    ------+---------------
        0 | Apple Inc
        1 | 301
        2 | Welcome
        3 | Shop iPod
    (4 rows) 
     
  6. This shows the accept string for each step of the transaction.

    Note: It is important to note in the output of the transaction steps that the steps are numbered starting with zero. This means that the step number in the database will be one less than the step number shown in the GNW web interface.

  7. To change an accept string you need the serviceid of the transaction and the database step number. Enter the following command to update the accept string.
    update tservicelist set accept_string='new accept string' where serviceid = 32351 and step = 2; 
     
    • Be sure to replace 32351 with the correct serviceid

    • Be sure to replace 2 with the correct database step number

    • Be sure to replace new accept string with the correct accept string

    • Note: the accept string must be enclosed in single quotes: 'new accept string'

    • Note: the command must end in a semicolon

    Below is an example of running the above command to change the accept string:
    gnw=# update tservicelist set accept_string='new accept string' where serviceid = 32351 and step = 2; 
    
    1 row updated.
    
    gnw=# 
     
  8. To verify the change we just re-run the select query in step 5 again.
  9. Next we have to update the change flag so that the updates will be sent out to the nodes. At the SQL prompt type the following command using the correct serviceid

    gnw=# update servicelist set change=1 where serviceid=32351; 
    
    1 row updated.
    
    gnw=# 
     
  10. After committing the change, type quit at the SQL prompt to leave the database and return to the iprev3 command prompt.
    gnw=# quit  
     

Change Accept String in a Transaction (last edited 2011-08-11 19:16:54 by Bryce Camp)