This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

History DB

Hello everyone,

Im installing the HistoryDB and Im having some issues...

We have followed the administration guide, we have more than 300k registers ready to export (JobHistory and DialgWatchOperation tables ).  The configuration that we have followed on Main database is set TimeTrace and lifetime parameters. The configuration that we have followed on History database tools is:

-HDB Manager : Create the connection on ‘Base data’ with the main database with 'sa' user ( just write permissions only) . After that we can see all the existing tables.

-Designer : 

  1. Create the connection with history database in Base data > DataBase
  2. Create the job server connection: It is the server where we have installed the HDB service.

The problems goes when we go to HDB Designer and launch the schedule ‘Import process information directly’ we see the event ‘VI_SourceDatabase_import’ running (only a few second) but after the process is over, we check that there is not data imported on history database, we use the following query to check it:

select * from WatchProperty dwp join WatchOperation dwo on dwp.UID_DialogWatchOperation = dwo.UID_DialogWatchOperation

 order by operationdate desc

I think that we have forgotten something related with the connection to the main database.

Have anybody idea of what is happening?

Thank you guys!

  • Hi,

    This depends on a few factors, most notably your configuration parameters under Common\ProcessState.

    For example, are any records ready to be exported to the HDD/Deleted? Has the Lifetime period passed?

    What version are you running?

    If no records in the main database are marked for export, then none will be imported into your HDB.

    Trevor
  • Hi Trevor,

    We are working under 7.1 version in both databases. Our configuration parameters are:

    Common\ProcessState\Delete=1
    Common\ProcessState\ExportPolicy=HDB
    Common\ProcessState\JobHistory=ALL
    Common\ProcessState\JobHistory\Delete=1
    Common\ProcessState\JobHistory\isToExport=1
    Common\ProcessState\JobHistory\lifetime=2
    Common\ProcessState\PackageSizeHDB=10000000
    Common\ProcessState\ProgressView=0
    Common\ProcessState\Propertylog=1
    Common\ProcessState\PropertyLog\AllDefaultPropertiesForModel=1
    Common\ProcessState\PropertyLog\IsToExport=1
    Common\ProcessState\PropertyLog\LifeTime=1

    We have ready to export 316390 records in JobHistory table and 6259 in DialogWatchOperation table.

    Thank you!!!!!
  • I would suggest to open a service request with Support so we can troubleshoot through there.

    Thanks
  • I did it ! But they did not give me a solution ... :S
  • What is the service request number?
  • Hi Leticia,

    Could you please execute the following and provide the results:

    select ReadyForDeleteOrExport, count(*) from DialogProcess
    group by ReadyForDeleteOrExport

    select ReadyForDeleteOrExport, count(*) from JobHistory
    group by ReadyForDeleteOrExport

    select ReadyForDeleteOrExport, count(*) from DialogWatchOperation
    group by ReadyForDeleteOrExport

    select ReadyForDeleteOrExport, count(*) from DialogProcessChain
    group by ReadyForDeleteOrExport

    The import from the HDB side will look at those tables and determine if any rows are ready for export from the main DB.

    You said earlier however that those values were not changing, which makes me think the "shrink" process is not marking these in the main DB, for whatever reason. So...

    Also the results of:

    select

    CONVERT(char(7), XDateInserted, 121), ReadyForDeleteOrExport, COUNT(*) from DialogProcess group by CONVERT(char(7), XDateInserted, 121), ReadyForDeleteOrExport

    Thanks
  • Hi trevor,

    I copy you the result:

    select ReadyForDeleteOrExport, count(*) from DialogProcess
    group by ReadyForDeleteOrExport ---> 0 ready

    select ReadyForDeleteOrExport, count(*) from JobHistory
    group by ReadyForDeleteOrExport--> 316390 records ready.

    select ReadyForDeleteOrExport, count(*) from DialogWatchOperation
    group by ReadyForDeleteOrExport--> 6259 records ready.

    select ReadyForDeleteOrExport, count(*) from DialogProcessChain
    group by ReadyForDeleteOrExport--> 20007 records ready.


    And the last one query:
    2018-03 0 318
    2018-02 0 1114
    2018-01 0 612
    2017-12 0 33
    2017-11 0 478
    2017-10 0 123
    2017-09 0 81
    2017-08 0 5
    2017-07 0 51
    2017-06 0 219
    2017-05 0 202
    2017-04 0 360
    2017-03 0 589
    2017-02 0 713
    2017-01 0 133
    2016-12 0 8
    2016-11 0 77
    2016-10 0 29

    I think that shrink schedule is working, because when i launch it, we can see the number of 'ready for delete of exported' records is increasing.

    Thank you
  • By the way, the tasks associated to 'shrink schedule' are :
    QBM-K-CommonShrinkJobHistory
    QBM-K-CommonShrinkProgressView
    QBM-K-CommonShrinkPropertyLog
  • I added a new task to shrink schedule' : QBM-K-CommonProcessShrink and now when I execute the following query

    select ReadyForDeleteOrExport, count(*) from DialogProcess
    group by ReadyForDeleteOrExport --> 4647 records ready.