10 Replies Latest reply on Oct 10, 2016 6:26 AM by David Miller

    Copying ArcFM Stored Displays

    Dean Howell

      How do we copy all the stored displays from one database to another?

       

      We have ArcFM installed on our production server and I want to copy the stored displays from there to our Test server but can't figure out how to replicate the data across?

       

      Thanks

       

      Dean

        • Re: Copying ArcFM Stored Displays
          Cory Williams

          Hi Dean,

          are you migrating your database from Test to Prod? Or do you just have a separate instance?

          If you've migrated the SDE Geodatabase to another server, you can use the Data Source Wizard in ArcCatalog.

           

          Alternatively, without going into the DB Backend (which I would recommend against anyway), the easiest way is to;

          • Open ArcFM pointing to the Test instance
          • Open the Stored Display and Save as an MXD then Close ArcMap
          • Open ArcCatalog and Set Data Source on the MXD (How To: Use the 'Set Data Source' tool for map documents in ArcCatalog)
          • Open ArcFM pointing to the Production instance
          • Open the MXD and Save As Stored Display
          • Double check that all of your data sources are set correctly.

           

          It's a bit of fussing around, but probably the easiest (plus, any datasources outside of ArcFM, don't get lost, as sometimes they do when using the Data Source Wizard).

           

          Cheers,

           

          Cory

          • Re: Copying ArcFM Stored Displays
            Neil Etheridge

            Hi Dean,

             

            You can also copy the MM_SYSTEM_STORED_DISPLAYS or MM_STORED_DISPLAYS tables between databases in ArcCatalog then use the Data Source Wizard as Cory has suggested to repoint the layers.  If you are working with an SDE database don't forget to grant privileges after pasting.

             

            Cheers,

            Neil

            • Re: Copying ArcFM Stored Displays
              Dean Howell

              Thanks Cory and Neil,

               

              What we are trying to do is refresh our test SDE environment with the information in the production environment so we can test with current settings, stored displays etc.

               

              We are not having much luck getting the above to work, so I wonder if there is a way to replicate the entire ArcGIS / ArcFM SDE database from one environment to another?

                • Re: Copying ArcFM Stored Displays
                  Neil Etheridge

                  I assume it is an Entrerprise geodatabase on SQL server or Oracle?  I would usually just take a full database export from production and restore it to test.  If it SQL server you will need to repair the connection between logins and database users (I can supply a script).  You will still need to use the data source wizard to repoint the stored displays to the test server as the stored display on the test server will still be pointing at production.

                   

                  -N

                    • Re: Copying ArcFM Stored Displays
                      Dean Howell

                      Thanks Neil, Yes it is an Enterprise Geodatabase on SQL Server. The thing we have found is that we can't change the name of SDE table. Our production one is called APA_GIS_PROD and our UAT is APA_GIS_UAT so the full export and restore doesn't work. If you know a way around that, please let me know

                        • Re: Copying ArcFM Stored Displays
                          Neil Etheridge

                          Yes I would alway recommend keeping the same database name between environments for this very reason.  The xml definitions in the GDB tables reference the database name unfortunately.  There is a script around that attempts to fix this in cases where you restore the database as a different name.  Last time I tried it it seemed to work on the surface.  I will try to find it and send you a link.

                            • Re: Copying ArcFM Stored Displays
                              Neil Etheridge

                              Let me start by saying renaming a database is totally unsupported and the documentation says not to do it.  See ArcGIS Help (10.2, 10.2.1, and 10.2.2) - "No matter which of the methods you use to move your SQL Server database, you cannot rename the database. When you are restoring a database, for example, you are given the opportunity to restore it with a different name. Don't do this with a geodatabase; you won't be able to connect to it."

                               

                              That said I have had some success using the scripts provided by Trevor Hart on his blog https://gdbgeek.wordpress.com/2011/11/01/renaming-a-geodatabase/#more-139 (note the link in this post no longer works but there is another link at the bottom of his about page https://gdbgeek.wordpress.com/about/ that does).

                               

                              I say some success as it all seemed to work ok on the surface but some issues that occurred during testing may have been because something was missed.

                               

                              Your other option is to copy and paste everything via ArcCatalog but this is quite time consuming and easy to miss something if you want an exact replica of production.

                               

                              Cheers,

                              Neil

                      • Re: Copying ArcFM Stored Displays
                        Aaron Sapsford

                        Hi Dean.

                         

                        Cory and Neil's solutions are all valid ones, but unfortunately you are still going to be faced with a bit of manual work.

                         

                        Copying the MM_SYSTEM_STORED_DISPLAYS or MM_STORED_DISPLAYS tables between databases and re-pointing the layers using the datasource wizard is probably the easiest if you have a large number that need to be preserved.  Otherwise you should use Cory's suggestion and do it the old-fashioned way.  That's actually pretty cumbersome but bullet-proof.

                         

                        I would probably avoid trying to restore/rename the Prod DB using any of Trevor's scripts just yet as they don't update SQL functions "yet" (Trevor sits across the partition from where I sit).

                         

                        Good hunting...

                         

                         

                          • Re: Copying ArcFM Stored Displays
                            Dean Howell

                            Thanks everyone. We are going to do a backup from the production instance and restore that into UAT with the production database name just to see if that will get us over the line with our testing. It is strange that Esri do not have function to rename an SDE geodatabase as I would have thought that would be a fairly common need, especially in testing and development.

                              • Re: Copying ArcFM Stored Displays
                                David Miller

                                That's how we typically build our test environments: pull a back up of the production system and load it into our dev and sandbox environments.  Those dev and sandboxes are pre-built with different names and we just load data whenever we need it.

                                 

                                For the Stored Displays, after the data is loaded, I will login as the admin into the dev box and load a stored display.  I will get pinged for the username/password to the production system.  I cancel that request and let the stored display load as broken (i.e., red exclamation points on everything).  I will then right-click on one of the layers, go to "Data > Repair Data Source..." and point the layer at the correct feature class/table in the dev box.  At this point, ArcMap is smart enough to attempt to repair all the layers in the stored display to the dev box.  I then save the repaired stored display.  Rinse and repeat for the other stored displays.

                                 

                                The only gotcha on this is the fact that the you have to repair the feature class layers separately from any XY event layers (if you're a Responder user).  If there are XY event layers, I will repair one of those first.  ArcMap will only repair that one event layer and not the rest.  Then I repair a feature class layer.  At that point, ArcMap will repair all the feature class AND the XY event layers.  I have no idea why that works, but it does.

                                 

                                I've never had good luck with the Datasource Wizard, for whatever reason.  It just never has worked correctly for me.