How to Correct Error 'Asset with Key [Xxxxx-C-2] Does Not Exist
How to Correct an Asset Which Is Not Marked as Checked out in the censhare Client but in the Oracle Database
Short description of the following content
Sometimes it could happen that an asset is marked as checked out in the Oracle database but this is not visible at the censhare Client.
This will lead into a error message during checkout.
In this article you will find a way to solve that situation and correct the state.
Important hints
We know two possible situations:
1. The information in the cache-db is not up to date
2. The state in the Oracle database is wrong
Important Note:
Please try to use the server action "Repair Inconsistent asset" before using the "Checkout Abort" action. There are scenarios in which a checkout abort action will disable the icon and the server action do not executes thereafter.
1. The information in the cache-db is not up to date
The most possible case is a wrong information in the cache-db. To update this information,
simply create a new client- or parent relation to the asset.
After that, the asset should be marked checked out.
If not, the second known case may be the problem.
2. The state in the Oracle database is wrong
If the server action module named Repair inconsistent assets does not solve the problem, we have to check and correct the state in the database, have to update the information in the cdb and after that, we can make a checkout abort.
case 1
Login to the database with sql plus and have a look to the current state:
SQL> select id, currversion, version, state from asset where id = 334811;
ID CURRVERSION VERSION STATE
---------- ----------- ---------- ----------
334811 1 1 0
334811 2 2 0
334811 3 3 0
334811 4 4 0
334811 5 5 0
334811 6 6 0
334811 7 7 0
334811 8 8 0
334811 9 9 0
334811 10 10 0
334811 11 11 0
ID CURRVERSION VERSION STATE
---------- ----------- ---------- ----------
334811 12 12 0
334811 13 13 0
334811 14 14 0
334811 15 15 0
334811 16 16 0
334811 17 17 0
334811 0 18 0
334811 -2 19 3
19 rows selected.
The asset version 18 with currversion = 0 has the wrong state '0'. It should have state '1' which means the asset is checked out.
To correct the asset, we have to set the state for this version to 1 (= checked out).
SQL> update asset set state = 1, tcn =tcn+1 where id = 334811 and version = 18;
SQL> commit;
At least, we have to create a new client- or parent relation with the censhare Client to update the information in the cdb.
After that, the asset is marked as checked out in the censhare Client and you can perform a checkout abort.
case 2
Login to the database with sql plus and have a look to the current state:
select id, currversion, version, state from asset where id = 1231969;
ID CURRVERSION VERSION STATE
---------- ----------- ---------- ----------
1231969 1 1 0
1231969 2 2 0
1231969 3 3 0
1231969 4 4 0
1231969 5 5 0
1231969 0 6 1
6 rows selected.
The asset version 6 with currversion = 0 has the wrong state '1'. It should have state '0' which means the asset is checked in.
To correct the asset, we have to set the state for this version to 0 (= checked in).
SQL> update asset set state = 0, tcn =tcn+1 where id = 1231969 and version = 6;
SQL> commit;
At least, we have to create a new client- or parent relation with the censhare Client to update the information in the cdb.