+ Reply to Thread
Results 1 to 9 of 9

Thread: Tridium N4 History Database

  1. #1
    Join Date
    Mar 2018
    Location
    South East US
    Posts
    261
    Post Likes

    Tridium N4 History Database

    Hey everyone,

    Is there a way to re-import a history database back into the supervisor running N4.7? Someone cleared out a years worth of trends and its been a while since we have noticed, there have been lots of changes so we dont wanna go back to an old backup and loose what we have.

    Is it even possible?

    Thank you.

  2. #2
    Join Date
    Jan 2015
    Location
    North Carolina
    Posts
    300
    Post Likes
    If you have a backup .dist you can make a duplicate, change the extension to zip and extract it and then delete the station out, copy the latest in its place, zip it up and change the extension back to .dist and restore that.

    I've never done it and cannot say it would work, but if I were desperate, I'd give it a shot as there is a possibility it may work.

  3. #3
    Join Date
    May 2004
    Location
    SE Pennsylvania
    Posts
    2,617
    Post Likes
    With the station stopped you can use the file transfer to copy the history db back. It will not merge with the existing db so you will lose all histories from last recorded in the backup to the time you restart the station and it pulls whatever the jaces have. You stated there has been a lot of changes. If histories were renamed, added or removed you may have faulted histories afterwards. I am not aware of a way to merge databases

  4. #4
    Join Date
    May 2016
    Location
    Upstate NY
    Posts
    910
    Post Likes
    Tomorrow when I get to work I will look at the SQLDriver documentation. I know it can export histories to a SQL table, not sure if it can import though. If it can do both then the answer would be yes if you were good at SQL. I'll let you know what I find tomorrow.

  5. #5
    Join Date
    Jan 2003
    Location
    USA
    Posts
    9,437
    Post Likes
    ...and if it can do this...do it all on an engineering copy with backups, then transfer the resulting Tbox db file to the super.

    That driver isn't free, not even sure it can work with histories like this.
    Propagating the formula. http://www.noagendashow.com/

  6. #6
    Join Date
    May 2016
    Location
    Upstate NY
    Posts
    910
    Post Likes
    So here is the description in the help file for rdbms driver, and yes it is not free, and in fact my understanding is it's very expensive, like a couple thousand dollars the last time I asked my vendor.

    rdbSqlServer

    Enables the Relational Database Driver using the Microsoft SQL database format. This driver allows importing and exporting of histories to and from the NiagaraStation, and to and from a Microsoft SQL database. The driver does not include the Microsoft SQL software, which must be purchased separately from a third party source. The driver does work with the MSDE version which is free from Microsoft; however, the normal Microsoft imposed limitations on the MSDE version still apply.

    <feature name="rdbSqlServer" expiration="never" history.limit="10" historyImport="true" parts="ENG-WORKSTATION"/>
    And yeah, it sure would be wise to spin up another station and do all the work there, that part I would be unsure even how to do as I've never done it. I would also have to ask if the the license for the rdbms driver is per station or is it licensed to workbench??? Lot's of unknowns, but it appears there is a path if you really really wanted to do it.

  7. #7
    Join Date
    Jan 2003
    Location
    USA
    Posts
    9,437
    Post Likes
    Quote Originally Posted by VAEngineer View Post
    it sure would be wise to spin up another station and do all the work there, that part I would be unsure even how to do as I've never done it. I would also have to ask if the the license for the rdbms driver is per station or is it licensed to workbench???
    License would be per station. If you have an engineering license for WB however, almost all drivers (including this one) are licensed. So you could simply fire up a "test" station, setup this driver and an SQL DB, import / export away, then take the resulting tridium DB and stuff it back in the super. All this without having to purchase a real copy of that driver. One of the perks you get with engineering licenses.
    Propagating the formula. http://www.noagendashow.com/

  8. #8
    Join Date
    Dec 2006
    Location
    Boston area
    Posts
    405
    Post Likes
    So if I had an engineer that wanted a months worth of data I could set up a Rdbms network to export the history to a spare WB licensed laptop that I could leave on-site? Is there a way to make all that information usable to them off-line?

  9. #9
    Join Date
    May 2016
    Location
    Upstate NY
    Posts
    910
    Post Likes
    Quote Originally Posted by mechmike2 View Post
    So if I had an engineer that wanted a months worth of data I could set up a Rdbms network to export the history to a spare WB licensed laptop that I could leave on-site? Is there a way to make all that information usable to them off-line?
    If you had the license for the rdbms driver, you could set it up to automatically back up the data to a SQL database. The database could be on a cloud server if you wish and would be available with all kinds of standard SQL tool for queries and visualization.

    You original question was technically what is called a "table merge" in SQL. You have two DB's, both of which contain the some of the data. So the idea would be:

    Current N4 History ---> RDBMS Driver ----> SQL database table "all histories"
    Old N4 History --? RDMS Driver ---> Append these row to SQL database table "all histories"

    At this point "all histories has all the records you want, so now you would import all the records into a fresh a copy of the station with no history records

    SQL Database table "all Histories ---> RDBMS Driver ---> N4 history

    Of course you would also want to make sure you got duplicates deleted as you go along.

    If you wanted something simpler and you just wanted to pull the data and analyze it you could just open up whichever station copy you wanted the data from and export it to a SQL table.

    This of course assumes you get the engineering copy of WB as stated in the posts above, make copies of each station, otherwise you would have to buy a copy of the driver for each station (old copy and current production station)

+ Reply to Thread

Quick Reply Quick Reply

Register Now

Please enter the name by which you would like to log-in and be known on this site.

Please enter a password for your user account. Note that passwords are case-sensitive.

Please enter a valid email address for yourself.

Log-in

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •