8/22/2025 10:27:37 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss general T-SQL questions and help with queries related to SalesLogix data. View the code of conduct for posting guidelines.
|
|
|
|
SQL Script to Purge SLX Data
Posted: 26 Sep 07 1:15 AM
|
Rather than me reinventing the wheel, has anyone got one of these? V7.2 ideally.
I want to purge all the TACO & Activities/History data while leaving behind User data, picklists etc - the 'meta' type info.
I don't much like the in-built Tools / Maintenance / Purge function - slow & I'm not convinced that it gets rid of everything either.
Thanks for any input.
Phil
|
|
|
|
Re: SQL Script to Purge SLX Data
Posted: 26 Sep 07 10:11 AM
|
exec this to get an idea of how many rows of data in your tables and then create a sql script like this for your db.
SELECT so.name as tablename, MAX(si.rows) as Count FROM sysobjects so, sysindexes si WHERE so.xtype = 'U' AND si.id = OBJECT_ID(so.name) GROUP BY so.name ORDER BY count DESC
The below script will change according your custom tables .. use slx_db --Delete from sysdba.userinfo where userid not in ('ADMIN','U6UJ9A00000P') --Delete from sysdba.useroption where userid not in ('ADMIN','U6UJ9A00000P') --Delete from sysdba.userprofile where userid not in ('ADMIN','U6UJ9A00000P') --Delete from sysdba.usersecurity where userid not in ('ADMIN','U6UJ9A00000P') --Delete from sysdba.USERSUBSCRIPTION where userid not in ('ADMIN','U6UJ9A00000P')
-- Delete from account -- Delete from accountsummary -- Delete from ACCOUNTPRODUCT -- Delete from ACCT_XREF -- Delete from ACCT_XREF5 -- Delete from ACTIVITY -- Delete from ADDRESS -- Delete from ATTACHMENT -- Delete from C_ACCOUNT -- Delete from C_ACCOUNT_STATE -- Delete from C_CONTACT -- Delete from C_OPP_COMMISSION_SPLIT -- Delete from C_OPP_SALES_CALL -- Delete from C_OPPORTUNITY -- Delete from C_OPPPROD -- Delete from C_PARTICIPATION -- Delete from C_PRODUCT -- Delete from C_SALES_CALL -- Delete from C_SALES_CALL_PRODUCT -- Delete from COMPETITOR -- Delete from CONTACT -- Delete from Contact_LeadSource -- Delete from DEFECT -- Delete from CONTRACT -- Delete from HISTORY -- Delete from LEADSOURCE -- Delete from OPPORTUNITY -- Delete from OPPORTUNITY_COMPETITOR -- Delete from OPPORTUNITY_CONTACT -- Delete from OPPORTUNITY_CAMPAIGN -- Delete from OPPORTUNITY_PRODUCT -- Delete from PRODUCT -- Delete from PRODUCTASSOCIATION -- Delete from SALESORDER -- Delete from SALESORDERDETAIL -- Delete from TICKET -- Delete from TICKETACTIVITY -- Delete from TICKETHISTORY -- Delete from TICKETPROBLEM -- Delete from TICKETPROBLEMSOLUTIONTYPE -- Delete from TICKETPROBLEMTYPE -- Delete from TICKETSOLUTION -- Delete from TICKETSOLUTIONTYPE
|
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|