Creating the Staging Database

IT Asset Management (Cloud)
The FlexNet adapter for HP DDMI requires a staging database, which is used as follows:
  • The agent installed on your HP DDMI server reads the DDMI inventory files directly, performs minimal data rationalization, and saves the results to the staging database
  • The connection from IT Asset Management reads the data from the staging database, shapes it appropriately, and uploads it to the compliance database.
The staging database can be created on any convenient instance of Microsoft SQL Server that meets the following criteria:
  • Provides high-speed network access from the HP DDMI server (or other location of the installed agent), and from an appropriate inventory beacon that can upload to the application server for IT Asset Management
  • Allows read/write access to the account running the FlexNet agent on the HP DDMI server, and read access by the service account running the BeaconEngine service on the inventory beacon (or you may choose to implement either a special Windows account and an SQL account to collect the DDMI staged data)
  • Is running an instance of Microsoft SQL Server 2012 or later.
The staging database size will be roughly equivalent to the sum of the inventory (.xsf) files uploaded to your HP DDMI server. The agent overwrites any previous record from the same device with the latest inventory upload, to that the net database size does not grow appreciably larger than the sum of the source inventory files.

Your download of the Tier 1 adapters archive (see Download Adapter Tools Archive) included two SQL scripts that can assist with creating the staging database. You can achieve this through SQL Server Management Studio, or from the command line as described in the following procedure. Use whichever approach best suits your enterprise practices.

To create the staging database from the command line:

  1. Navigate through the unzipped tools archive to Tier 1 Adapter Tools > HP Discovery and Dependency Mapping Inventory Tools > SQL.
  2. If necessary, copy the script DDMIStagingSchema.sql from the this folder of your unzipped adapter archive to a temporary folder on your staging database server.
  3. Logged in on the database server as an account with read/write access to the database, open a command prompt.
  4. In the command prompt window, execute the following command, as amended:
    sqlcmd -S ServerName\InstanceName -i TemporaryPath\DDMIStagingSchema.sql
    where:
    • ServerName is the name of the server hosting Microsoft SQL Server 2012 or later. Use a “.” (dot) if you are running the staging script on the same server as the database instance; or if you are adapting these instructions to a different environment, insert the server name or its IP address.
    • InstanceName is the name of the database instance to use for the database staging tables. You can omit this parameter (and the backslash separator) if the default instance name is being used.
    • TemporaryPath is the location where you saved the SQL procedure.
    Example:
    sqlcmd -S .\Development -i C:\temp\DDMIStagingSchema.sql
    The database DDMIStaging is created with all necessary tables, indices, and so on.
  5. Similarly, execute the second script (with the same parameter substitution) to create the stored procedures necessary in the staging database.
    sqlcmd -S ServerName\InstanceName -i TemporaryPath\DDMIStagingProcedures.sql
    Example:
    sqlcmd -S .\Development -i C:\temp\DDMIStagingProcedures.sql

The staging database is now ready for operation.

Tip: If you wish to do so, you may now rename this database. Keep the name handy for the configuration processes that follow.
The schema for the staging database (below) is, in the main, self-explanatory, reflecting the content of the .xsf files found on your HP DDMI server. The one unique table is InventoryImportDate. This table lists the names of inventory files that have already been loaded into the staging database, and saves the last modified date of each file as its most recent inventory date. When the FlexNet agent scans through the inventories for possible import into the staging database, it uses this table to manage differential imports, only importing an inventory file if it is newer than the last recorded inventory file of that name that was imported.
Staging database schema

IT Asset Management (Cloud)

Current