Regular operations
|
If you run any Nexeed IAS installation on Tenant ID The Tenant ID is conceptually the uniqe identifier for all data contained in Nexeed IAS in relation to other installations. This will lead to problems if dataflows meet on shared infrastructure (like e.g. RabbitMQ or Solace) or existing systems are to be merged on a shared installation with multiple tenants. Therefore, the Tenant ID has to be unique - for systems that have been erroneously installed with either Tenant ID The Migration instructions and scripts available from BCI are specific to that version and cannot be executed on prior or later versions. |
Tenant data removal
Since Packaging Control currently does not support multitenancy, removing tenant data means to clear the database completely. This can be achieved in one of the following ways:
-
Removal of the database pod in the Kubernetes cluster and its attached presetting volume claim (pvc). Removing the pod without deleting the pvc leaves the data as orphan on the cluster.
-
Clearing all Packaging Control tables inside the container manually (if the database pod also contains data for other IAS modules)
For the second option, use the following Oracle command (replace <user> with your database user, SYS privileges are required):
DROP USER <user> CASCADE;
See Oracle documentation here.
Rebuild indices
Fragmented indices can cause performance issues on the database. We suggest to perform this action in the maintenance hours. To detect and rebuild indeces, use the following Oracle command (Replace database_owner parameter to query the indices):
DECLARE
--This metric of the index should not be more than 30%
max_del_lf_rows NUMBER := 30;
database_owner sys.all_indexes.owner%TYPE :='PACK';
CURSOR get_index IS
SELECT
ind.index_name,
ind.owner
from sys.all_indexes ind
WHERE ind.owner = database_owner;
index_name sys.all_indexes.index_name%TYPE;
index_owner sys.all_indexes.owner%TYPE;
del_lf_rows INDEX_STATS.del_lf_rows%TYPE;
BEGIN
OPEN get_index;
LOOP
FETCH get_index INTO index_name, index_owner;
EXIT WHEN get_index%NOTFOUND;
EXECUTE IMMEDIATE 'ANALYZE INDEX "'||index_owner||'"."'||index_name||'" VALIDATE STRUCTURE';
BEGIN
SELECT del_lf_rows
INTO del_lf_rows
FROM INDEX_STATS ix
WHERE ix.name = index_name;
EXCEPTION
WHEN NO_DATA_FOUND THEN
del_lf_rows := NULL;
END;
DBMS_OUTPUT.PUT_LINE('Check index: ' ||index_owner|| '.' ||index_name|| ': '||' del_lf_rows: '||del_lf_rows);
IF del_lf_rows > max_del_lf_rows THEN
DBMS_OUTPUT.PUT_LINE('Start reindex: ' ||index_owner|| '.' ||index_name|| ': '||' del_lf_rows: '||del_lf_rows);
EXECUTE IMMEDIATE 'ALTER INDEX "'||index_owner||'"."'||index_name||'" REBUILD ONLINE';
END IF;
END LOOP;
CLOSE get_index;
END;