Oracle database lifecycle: Update and deletion procedures
This article provides an overview of how Oracle databases are updated and deleted within Snow License Manager and Snow Oracle Management Option. By understanding the outlined procedures and configurations, you can effectively manage database updates and deletions, preventing potential issues related to outdated or redundant database entries.
The lifecycle of Oracle databases is managed by the Data Update Job (DUJ) stored procedure inv.UpdateOracleDatabase. This procedure handles insert/update/delete operations on Oracle databases, using the table inv.tblOracleDatabase as the source of data.
The column Identifier is checked to detect the uniqueness of the Oracle Database. The identifier is a composite field, created as OracleDBID_UniqueDatabaseName. OracleDBID is the DBID property that Oracle software sets upon database creation.
If a row in the table inv.tblOracleDatabase has the same value in the column Identifier as a row in the table dbo.tblOracleDatabase, the procedure inv.UpdateOracleDatabase will update the row in dbo.tblOracleDatabase. If a row with the same Identifier is not found in dbo.tblOracleDatabase, a new row will be inserted, creating a new Oracle database.
For existing Oracle databases that have no row in inv.UpdateOracleDatabase, the column ScanDate will be compared to the parameter ORACLE_DELETE_THRESHOLD in the Snow License Manager configuration. If the ScanDate is older than the current date minus the ORACLE_DELETE_THRESHOLD, the database will be considered as deleted and rows in dbo.tblOracleDatabase and all related tables will be removed.
Configuration
The appsettings.json configuration file controls the setting on when this process will take place. The two services responsible for the transfer are:
- The Snow Software Manager Oracle Management Option Service
- The Snow Software Virtualization Service
The next process cycle involves running the Data Update Job and the schedule defined from the appsettings.json configuration file of the Oracle Management Option Service and Virtualization Service.
Note the following:
- If the computer is deleted, the database is deleted immediately.
- If a computer stops reporting, the database will be deleted after the
ORACLE_DELETE_THRESHOLDperiod expires. The computer will be put in quarantine after the quarantine period expires (the computer can also be deleted manually). - If the computer reports as active but the database is removed, the database will be deleted on the next process cycle.
Examples
Scenario #1: You have removed the Oracle instances, however, you are still seeing the old Oracle instances within the Snow License Manager Web Portal but not within the Snow Management and Configuration Center (SMACC) Inventory. These numbers are affecting your Snow Oracle license because they are hitting your Snow Oracle license agreed count. Is this working correctly?
Answer: It is working as expected. The deletion of the removed Oracle instances will depend on the number of days defined in the setting ORACLE_DELETE_THRESHOLD. After the ORACLE_DELETE_THRESHOLD expires, during the next process cycle, the Oracle instances will be removed from the Snow License Manager Web Portal.
Scenario #2: You have added more Oracle instances from the Oracle Database. You are expecting this to show within your Snow License Manager. Will this be immediately reflected, or do you have to wait for any settings from the SMACC?
Answer: The updated Oracle instances will be immediately reflected in Snow License Manager during the next process cycle.