Step 1: Pre-Execution Environment Setup
Step 1 includes the process for the pre-execution environment setup.
- Identify the Datasource ID:
Ensure you know the exact ID of the datasource you wish to delete from the BigFix Inventory UI. There must be more than one datasource configured before deleting one.
- Stop the BFI Service:
You must manually stop the BigFix Inventory service before running this procedure to prevent database locks. For more information, refer to Stopping the server.
- Database Backup:Take a full, restorable backup of your BigFix Inventory database.Note: This step cannot be undone.For more information, refer to Backing up the DB2 database.
- User Permissions:
You must execute these steps as the DB2 instance owner (typically db2inst1).
- Revalidate the Datasource Deletion Procedure
Following database migration or system upgrade routines, verify that DBO.DELETE_DATASOURCE_DATA is in a valid state before initiating removal actions:
Check Procedure Status: Query the system catalog to evaluate routine status:db2 "SELECT ROUTINESCHEMA, ROUTINENAME, SPECIFICNAME, VALID, CREATE_TIME FROM SYSCAT.ROUTINES WHERE ROUTINESCHEMA='DBO' AND ROUTINENAME='DELETE_DATASOURCE_DATA'"Verify Validity: The VALID field should return a value of Y.
Recompile If Needed: If the query returns N, manually recompile the target object using the CLI command below:
db2 "CALL SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS('PROCEDURE','DBO','DELETE_DATAS OURCE_DATA')" - Switch User & Set Environment:Log in as the DB2 instance owner (db2inst1) and terminate any stale CLI connections:
- Log in as the DB2 instance owner, which by default is db2inst1.
- Run the following command to check the details of the existing
database:
su - db2inst1 db2 list db directory db2 terminate db2 connect to TEMADB db2 "SELECT CURRENT SERVER, CURRENT USER, CURRENT TIMESTAMP FROM SYSIBM.SYSDUMMY1"