cancel
Showing results for 
Search instead for 
Did you mean: 

Database Errors deleting pending session via ResourcePC command

ErickBaker
Level 2
BP 6.7.2
I am working on a program to automatically detect and delete pending sessions. The steps:
  • Get list of pending session IDs
  • automatec /getauthtoken /sso
  • via HTTP or Telnet:
    internalauth (token)
    delete (sessionid)

The response:
AUTH ACCEPTED
ERROR:Could not update database following deletion - Value can not be null, or have zero length
Parameter name: TokenValue

Okay, perhaps I need to use deleteas instead...
  • automatec /getauthtoken /sso
  • via HTTP or Telnet:
    internalauth (token)
    deleteas (token) (sessionid)

The response:
AUTH ACCEPTED
ERROR:Could not update database following deletion - Authorization error: No matching token found in database

I can create and delete the pending session manually via the GUI. Any ideas?

Thanks!
2 REPLIES 2

nobu
Staff
Staff

Hi Eric,

I can create and delete the pending session manually via the GUI. Any ideas?
You can delete the pending session from Control room by right click --> Delete. This is our recommendation.

19653.png



But if there is any reason, you may run sql script to delete the pending session. 
(Please bear in mind that any modifications to the data is done by a Database Administrator. It is not normal practice to delete records from the tables, therefore it would be wise to have a DBA put the statements into a transaction in case you need to roll them back. Also, you should perform a backup of the data before performing the changes.)
There is a link between the Session and SessionLog tables via the Session Number value. To remove a specific session you will need to:

  1. Identify the "sessionnumber" number from the BPASession table based on your problem GUID. (for example, "1065").
  2. Delete the records in the BPASessionLog_NonUnicode table (or BPASessionLog_Unicode, if you are using unicode enabled logging) where the "sessionnumber" is the "sessionnumber" from BPASession (for example, all records where the session number is "1065").image
  3. Delete the record in the BPASession table where the "sessionnumber" identifies the specific record (for example, the one record with the session number "1065")/image
  4. Alternatively, you could archive the session logs to a point just after the failing session was initially run. Using this method would get the product to delete the session log record for you.

Please refer to the link below in our knowledge page.
http://portal.blueprism.com/customer-support/support-center#/path/1201067362

Cheers,

Nobu

------------------------------
Nobuhiro Tokushige
Product Specialist
Blue Prism
Australia/Sydney
------------------------------

Hi Nobuhiro, 
it is possible not to delete the pending item in the DB but send a http request to the server in order to start or stop the pending item. I don't want to use the BP solution as far we only have on resource and therefore prefer to handle it via scripts. 

Thank you!

------------------------------
S D
consultant
NoName
Europe/London
------------------------------