Delete Enterprise Resource

W

Wade Clairmont

Can anyone tell me how to completely remove an enterprise
resource from Project Server 2002? Thanks
 
W

Wade Clairmont

To anyone out there that wants to remove a resource, I
found this stored procedure hidden in the corner if some
Microsoft documentation. Just a reminder, backup up your
DB first!

--
-- Resources must be inactive inactive, and there can be no
-- references to that resource in any project file.
--

create procedure MSP_DROP_ENT_RES
@PROJ_ID INTEGER,
@RES_UID INTEGER
AS
--
-- Deletes the summary assignements for this resource.
-- This must occur fist, since the query will refer
-- to the base table entries not yet implmented.
--

-- Delete the data from the binary tables first. This
-- procedure refers to the calendars table, so this
-- has to be done first.

delete from msp_res_global_binary where
proj_id = @PROJ_ID and glb_category = 1 and glb_ref_uid =
@RES_UID

delete from msp_res_global_binary where
proj_id = @PROJ_ID and glb_category = 2 and glb_ref_uid in
(select cal_uid from msp_calendars where
proj_id = @PROJ_ID and res_uid = @RES_UID)

--
-- Delete the data from the base tables
--

delete from msp_resources where prod_id = @PROJ_ID and
res_uid =
@RES_UID
delete from msp_calendars where proj_id = @PROJ_ID and
res_uid =
@RES_UID
 
Top