11 Replies Latest reply on Mar 6, 2009 2:50 PM by pguenther

    Importing Subnets

    pguenther

      I currently have three different IP Address .IPDB files I use to manage our various subnets. One file has 50+ subnets. Is there a way to import the entire DB instead of having to export each subnet to a csv file?

        • Re: Importing Subnets
          bshopp

          Yes, on page 2 of the readme I sent with the beta notification announcement, there is a command line method to import:

          Importing Subnets from toolset IP Address Manager:

          1. Copy the toolset IP Address Manager IPDB to the IPAM Beta evaluation server

          2. Open the command prompt

          3. cd to "c:\program files\solarwinds\orion\ipam"

          4. Execute - solarwinds.ipam.init.exe -import overwrite -file "PATH-TO-DB-FILE.IPDB"

            • Re: Importing Subnets
              pguenther

              Thanks. I ran the import on one of my smaller files and go the following error:

              C:\Program Files\Solarwinds\Orion\IPAM>solarwinds.ipam.init.exe -import overwrit
              e -file C:\Temp\All-Companies.IPDB

              Unhandled Exception: System.Data.SqlClient.SqlException: Incorrect syntax near '
              s'.
              Incorrect syntax near 's'.
                 at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
              n breakConnection)
                 at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
              , Boolean breakConnection)
                 at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
              ect stateObj)
                 at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
              dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
              ParserStateObject stateObj)
                 at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
              Behavior runBehavior, String resetOptionsString)
                 at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
              havior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
                 at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
              ior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
               result)
                 at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult res
              ult, String methodName, Boolean sendToPipe)
                 at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
                 at SolarWinds.Orion.Common.SqlHelper.ExecuteNonQuery(SqlCommand command, SqlC
              onnection connection, SqlTransaction transaction)
                 at SolarWinds.Orion.Common.SqlHelper.ExecuteNonQuery(SqlCommand command)
                 at SolarWinds.IPAM.Import.IPAM_NodeDAL.InsertSubnetNodes(List`1 nodes, Int32
              subnetID)
                 at SolarWinds.IPAM.Import.ImportHelper.PushSubnetNodes(List`1 nodes, ImportMo
              de mode, Int32 subnetId)
                 at SolarWinds.IPAM.Import.ImportHelper.ImportToolsetSubnetsDatabase(String fi
              lepath, ImportMode mode, List`1 results)
                 at IPAM.Init.Program.Import()
                 at IPAM.Init.Program.Main(String[] args)

              It imported three subnets before throwing the above error.

                • Re: Importing Subnets
                  bshopp

                  What was the name of the 4th subnet?  What DB version are you on?

                    • Re: Importing Subnets
                      pguenther

                      Assuming it is counting subnets from top down the name of the 4t subnet was 10.211.10.0 - GRA VLAN 10 (Data). I though maybe the () were the problem so I removed those and tried again. Same problem. Is the - character the problem? We are running IP-Address-Management version 9.2.0.47. I am using SQL Express on the Eval software (whatever version that the eval installs for you).

                       

                      I had a similar error on another one of my files:

                      C:\Program Files\Solarwinds\Orion\IPAM>solarwinds.ipam.init.exe -import overwrit
                      e -file C:\Temp\IP-Address-Management.IPDB

                      Unhandled Exception: System.Data.SqlClient.SqlException: Incorrect syntax near '
                      s'.
                      Unclosed quotation mark after the character string ',NULL,1)'.
                         at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
                      n breakConnection)
                         at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
                      , Boolean breakConnection)
                         at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
                      ect stateObj)
                         at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
                      dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
                      ParserStateObject stateObj)
                         at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
                      Behavior runBehavior, String resetOptionsString)
                         at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
                      havior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
                         at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
                      ior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
                       result)
                         at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult res
                      ult, String methodName, Boolean sendToPipe)
                         at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
                         at SolarWinds.Orion.Common.SqlHelper.ExecuteNonQuery(SqlCommand command, SqlC
                      onnection connection, SqlTransaction transaction)
                         at SolarWinds.Orion.Common.SqlHelper.ExecuteNonQuery(SqlCommand command)
                         at SolarWinds.IPAM.Import.IPAM_NodeDAL.InsertSubnetNodes(List`1 nodes, Int32
                      subnetID)
                         at SolarWinds.IPAM.Import.ImportHelper.PushSubnetNodes(List`1 nodes, ImportMo
                      de mode, Int32 subnetId)
                         at SolarWinds.IPAM.Import.ImportHelper.ImportToolsetSubnetsDatabase(String fi
                      lepath, ImportMode mode, List`1 results)
                         at IPAM.Init.Program.Import()
                         at IPAM.Init.Program.Main(String[] args)

                        • Re: Importing Subnets
                          bshopp

                          Looks like a defect, I will get that filed.  Can you check and see if on that subnet name or comments field if you have a ' in it and if so, take it out and try again

                            • Re: Importing Subnets
                              pguenther

                              Did a bit more research. I exported this particular subnet to a CSV file and tried to manually import it through the GUI. I got an Import Validation Error. The row it shows say the error is "LastSync is invalid". I went ahead and imported the file. I then deleted the problem subnet from the original database and tried to reimport the modified file. It looks like I got the same (or very similar) error. Don't know if this helps or not.

                               

                              Oh and there are no ' that I can find although I cannot for sure say that all of the comment fields are free of this character.

                    • Re: Importing Subnets
                      Peter.Cooper

                      Hi pguenther.

                      I used your IPDB file as the source for our bug, codefix, and verification steps. I've included the patch in a "buddy drop" located here. Can you please give it a shot and report back? Thanks!

                      ftp://ftp.solarwinds.net/IPAM/v1/Beta2/SolarWinds-Orion-IPAM-v1-bd1.zip

                      This particular build didn't go through the entire process we normally go through for a publicly published set of bits, but I think it will do you nicely.

                      One thing to note: the command line tool is overwriting the subnet's contents. So, if you've managed to get any data in, it's about to be destroyed. Considering where you are with your experience, I didn't think you'd mind.

                      ---

                      Install: Just run the exe inside the zip
                      Revert (just in case): Uninstall IPAM, run through config wizard (DB + Website + Services), Install original IPAM Beta 2 build.