4 Replies Latest reply on Apr 11, 2016 9:35 AM by gregor

    How to find tags having duplicate record

    Bibhuti-PI

      Hi All,

      How to find tags having duplicate record in the database

       

      Regards

      Bibhuti Swain

        • Re: How to find tags having duplicate record
          lorjales

          Hi Bibhuti,

          When you mentioned duplicate records, you are talking about duplicate record numbers, right?

          Identifying points with duplicate record numbers is not very easy, but I'd try first checking the Point Database and filtering by recno attribute

          If not possible, the following known issue describes a procedure that could help with your question:

          16543OSI8 - -10722 error during point delete can lead to duplicate recno

          Furthermore, the snapfix command could help you with duplicate record numbers:

          KB00055 - How to repair the snapshot table piarcmem.dat (pibasess -snapfix)

          Anyway, I'd suggest you to contact TechSupport in case you find duplicate record numbers on your PI Data Archive so they can help you over a remote session.

          Thanks

          Luis

          • Re: How to find tags having duplicate record
            Asle Frantzen

            Hi

             

            Can you elaborate on what you mean by duplicate record?

            Are you talking about multiple events with the exact same time, or is it exact time AND exactly the same value?

             

            A quick way to find multiple events with the same timestamp would be to use the PI OLEDB Classic provider (PI SQL Commander). If you query the piarchive..picomp2 table there is a column called "_index", which is > 0 if there are multiple events stored at that point in time.

             

            SELECT * FROM piarchive..picomp2 WHERE time > 't' and _index > 0
            

             

            would return all events for all tags in the archive, stored at the same time today. Then you should be able to continue building more logic into the query to return what you want in more detail.

            4 of 4 people found this helpful
            • Re: How to find tags having duplicate record
              Bibhuti-PI

              Hi Luis/Asle,

               

              Thanks lot for your reply

               

              My question is :-

              During a random check I found few tags having duplicate values in the database.

              I want to identify those tags having duplicate records in the database.

               

              Regards

              Bibhuti Swain

                • Re: How to find tags having duplicate record
                  gregor

                  Hello Bibhuti,

                   

                  Please accept my apologies but I still have a very blurry picture of what you understand as duplicate values. On the other hand Asle and / or Luis, may have answered your question already.

                  If you consider your question unanswered, please identify the pattern that you have in mind when talking about duplicate values. Otherwise, please be so kind and mark the Correct Answer.