Clean the demo and test data prior to Go Live

darreneverett
Mega Expert

Hi everybody

I am hoping to find a clear procedure to remove any transnational data (so Incidents, Problems, Requests, Changes, Tasks...and I'm sure a number of others) from the instance.

For example, when we are about to Go Live, how do I efficiently remove all the demo data AND also any data created in Pre Production Build & UAT,

I thought this would have been a rather fundamental part of the process, but I can't seem to find anything on Communities, wiki or Support.

Thanks in advance.

1 ACCEPTED SOLUTION

Hi Darren,



I would suggest to delete the data manually from listed module(im,pm,cm,etc). or you can reach out to servicenow for data cleanup they would assist you in that. Because express edition has very limited scope of such system functionality.



Regards,


Atul kumar


View solution in original post

14 REPLIES 14

James_Neale
Mega Guru

Hey Darren,



You can request 'Remove Demo Data' on Hi to do this.


Any additional data you've created you can remove using Delete All Records from the table configuration.


You'll also probably want to reset the Number records (Number Maintenance).



Cheers,


James


Thanks James.




By the sounds of this, it removes "demo" data. Which I read as the demo data that comes with a new instance.  I am also needing to remove data created by testing etc.  




So my question I guess is "Will a purge of demo data remove demo data and test data made during configuration?"




Thanks again James.






Darren


It just removes the demo data that comes packaged.



Unfortunately there is no quick way to remove your testing data (as far as I know). You wouldn't want to accidentally use this in Production!



It shouldn't take too long though to go through all the tables and delete the records using Configure > Tables > Delete All Records (button). You should find that cascade delete takes care of a lot of things as well.



If you really wanted to automate it, you could create a Fix Script and just provide an array of tables.


Definitely test this in a separate environment first that you are happy to accidentally hose. I accept no responsibility for misuse of this script.



var tables = [


  'incident',


  'problem',


  'change_request'


  ];



for (var i = 0; i < tables.length; i++) {


  var gr = new GlideRecord(tables[i]);


  if (gr.isValid()) {


      //gr.deleteMultiple(); // be very careful!


      gs.print('Cleared table ' + tables[i]);


  } else {


      gs.print('Table ' + tables[i] + ' is not valid');


  }


}


vinothkumar
Tera Guru

Hi Darren,



You have to raise a request with HI Support to clean the demo data.