Please run the below queries in the database and then later try deleting the Site.
First you need to identify the siteid which could be got from the URL
on the browser when you click on the Site which you want to delete.These queries will not delete any Requests but just set the deptid and the siteid to null for all those requests associated.
If you need to delete many Sites you may need to find the Siteid for all of them and insert it at the end of the query in brackets with comma separated.
If the database is MYSQL:
You can connect to the database through the following command on the server machine:
cmd> cd C:\AdventNet\ME\Servicedesk\mysql\bin
cmd> mysql.exe -u root -P 33366 servicedesk
If you are using MSSQL,execute the query in the New query analyzer:
update Workorder set slaid=null where slaid in (select slaid from sladefinition where siteid in ('
siteid'));
update Workorder set siteid =null where siteid in ('siteid');
update workorder set deptid= null where deptid in (Select deptid from departmentdefinition where siteid in('siteid'));
update userdepartment set deptid= null where deptid in (Select deptid from departmentdefinition where siteid in ('siteid'));
update resourceowner set deptid= null where deptid in (Select deptid from departmentdefinition where siteid in ('siteid'));
update resourceownerhistory set deptid= null where deptid in (Select deptid from departmentdefinition where siteid in ('siteid'));
update PurchaseCCDepartment set deptid= null where deptid in (Select deptid from departmentdefinition where siteid in ('siteid'));
Once the above queries are executed you may try deleting the Site.
Maljeev.