5 Replies Latest reply on Jun 1, 2009 12:48 AM by aparker

    Moving Assets from one BO to another

    Jamie Cannon ITSMMVPGroup

      Is there an easy way to move assets from one Business Object to another?  We have a Business Object within Assets called Desktops and Laptop Computers.  I need to move the machines with an OS containing the word "Server" into a new BO called Servers.  Is there an easy script for this?

       

      Thanks,

      Jamie

        • 1. Re: Moving Assets from one BO to another
          Rookie

          Jamie,

          I'm a newbie so take this for what it's worth...

          I don't think moving it would be a good idea if it's been used you'll have to find every instance in the database and change the pointers. From what I've been told it's better to just flag those as "is deleted"

          I would suggest 1) create a data import with the source as the desktop/laptop and the target as Server with a query defined to only select your servers or 2) creating a sql connection to the SD database looking at the desktop/laptop object and doing a data import into the server BO with a query defined to only select your servers.

           

          Regards,

          Neville

          1 of 1 people found this helpful
          • 2. Re: Moving Assets from one BO to another
            aparker Employee

            Hi Jamie,

             

            For saying that he's a newbie, Neville has probably got it spot on. My initial thoughts would be to use the data import to copy the selected assets to the type. Remember you can create filters on data import and more importantly, data import is actually the copying of data from one domain/object to another, it's just that we most commonly use external sources created through the connections and connection types to be the source domain and object.

             

            There may be some script we can use to delete at the back end, but depending on how many you have, it might just be quicker to to a delete, HOWEVER, there is one major word of warning here and you'll need to get around this. All CI's are stored in the Config Item object at the lowest level and as such you may well get issues with duplicate names.

             

            Andy

            • 3. Re: Moving Assets from one BO to another
              Jamie Cannon ITSMMVPGroup

              So once I copy those over, using a filter that will pull in only those machines where the OS contains "Server", I will need to mark the ones in the Desktop/Laptops as "is Deleted" or will I need to manually delete them from the database?

               

              Thanks,

              Jamie

              • 4. Re: Moving Assets from one BO to another
                Jamie Cannon ITSMMVPGroup

                Does the isDeleted attribute get triggered in the DB once an object has been deleted or should you be able to select the "isDeleted" attribute?

                • 5. Re: Moving Assets from one BO to another
                  aparker Employee

                  I think the quickest way will be a manual delete and that will set the IS Deleted flag in the database. What that doesn't do is alter the name of the machine even though it is deleted, so as I mentioned before beware of duplicate names.

                   

                  Andy