Remove demo data on on premise instance

Victor Sj_din
Tera Contributor

Hi all, 

 

I have a customer who wants to remove the demo data in their instance. However since it is an on-prem instance, they cannot use the remove demo data option from Hi.

 

What would be the best way to identify and remove the demo data?

2 REPLIES 2

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Victor Sj_din ,

 

While digging regarding this I have found out below steps :-

 

Process to delete demo data:

High-Level Steps (test this in sub-prod first)

1. Log in to your instance as an Admin user with elevated security_admin role (once logged, click User Profile > Elevate Roles > select checkbox security_admin > OK)

2. Navigate to: System Definition > Scripts - Background

3. Copy and paste below script in the "Run script (JavaScript executed on server)"

gs.loadBatchScript(‘clean_demo_data.js’)

4. Ensure in scope "global" is selected, then click "Run script"

5. The script will run for approximately 20 to 50 mins as per the ServiceNow release, please wait for this to complete before any further activity on the instance

6. On completion of the script:

- Review script log for errors (note that you will likely see approx. 40 errors or more errors depends as per the release, for example: observed +1000 errors in Rome release with the message "not allowed because of a reference in record")

- Verify removal of demo data, and retention of data/records/configuration/users added by users

 

Reference :- how to completely delete demo data on Self Hosted instance? 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Thanks for the reply, will try this!