Custom DW Class Creation Internals

When you create custom Datawarehouse classes, Commerce Server OleDb provider works on your DW database, and it creates atable, a SP, and inserts records to ClsDef, and MemDef tables.

Below script is provided just to inform you ‘internal events’ when you create a new custom DW class in Commerce Server 2007.
———————————————————————————–
— DROP SCRIPT: If you want to drop your newly created custom class

declare @CustomDwClassName nvarchar(256)
SET @CustomDwClassName = ‘CustomerChurnInfo’
select * from sys.procedures where [name] like ‘%’+@CustomDwClassName +’%’
select * from sys.tables where [name] like ‘%’+@CustomDwClassName +’%’
select * from dbo.ClsDef where ClassDefName=@CustomDwClassName
select * from dbo.memdef where ClassDefName=@CustomDwClassName
EXEC(‘select * from ‘+@CustomDwClassName)

———————————————————————————–
— Inspection Script

select * from sys.procedures where [name] like ‘%Corporate%’
select * from sys.tables where [name] like ‘%Corporate%’
select * from CustomerChurnInfo
select * from dbo.ClsDef where ClassDefID=5442 — displayName=’CustomerChurnInfo’
select * from dbo.memdef where ClassDefID=5442
———————————————————————————–