Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Thursday, May 22, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
5/22/2025 7:26:32 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!
Data & Imports Forums - T-SQL & Queries
Forum to discuss general T-SQL questions and help with queries related to SalesLogix data. View the
code of conduct
for posting guidelines.
Forums RSS Feed
Back to Forum List
|
Back to T-SQL & Queries
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: SQL Script to Purge SLX Data
Phil Parkin
Posts: 819
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
[
Reply
][
Quote
]
Snow Monkey
Posts: 214
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
[
Reply
][
Quote
]
Phil Parkin
Posts: 819
Re: SQL Script to Purge SLX Data
Posted: 27 Sep 07 6:58 PM
Thanks for that - I will adapt this to my needs.
[
Reply
][
Quote
]
Page 1 of 1
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!
slxdeveloper.com is brought to you courtesy of
Ryan Farley
&
Customer FX Corporation
.
This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 5/22/2025 8:04:48 PM