
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 06:25 PM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 04:33 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 03:14 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 03:20 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 03:39 AM
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');
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 03:20 AM
Hi Darren,
You have to raise a request with HI Support to clean the demo data.