I had this problem, when I some problems with the spooler.
After watching what project server did (via SQL Profiler), when deleting a
project that I could see from the Web->Admin screen, I came up with this
script.
This script does not delete anything from the MSP_WEB_* tables, as my
project never published into those tables, thus never got a wproj_id to work
with.
To find the Project Id (@proj_id) for the project, look in the table:
msp_projects
Warning Note: Microsoft and others highly recommend not modifying the tables
directly, as it can cause problems if not done correctly.
-- Start Script
/* - This script will delete a project, that is only appearing on the
File->Open dialog of
Project Professional. Note, it may only apear in the File-Open dialog
of the person who saved
the project. This particular scenerio results when there was a
network/authentication failure
when the project was attempting to publish.
If the project appears in the WEB Access of Project Server, delete it
there first
*/
DECLARE @proj_id as int
SET @proj_id = 22
select * from msp_projects where proj_id = @proj_id
BEGIN TRAN
DELETE FROM MSP_PROJ_SECURITY WHERE PROJ_ID = @proj_id
DELETE FROM MSP_RESOURCES WHERE PROJ_ID = @proj_id
DELETE FROM MSP_AVAILABILITY WHERE PROJ_ID = @proj_id
DELETE FROM MSP_RESOURCE_RATES WHERE PROJ_ID = @proj_id
DELETE FROM MSP_TIMEPHASED_DATA WHERE PROJ_ID = @proj_id
DELETE FROM MSP_NUMBER_FIELDS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_DURATION_FIELDS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_DATE_FIELDS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_TEXT_FIELDS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_FLAG_FIELDS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_OUTLINE_CODES WHERE PROJ_ID = @proj_id
DELETE FROM MSP_CALENDARS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_CALENDAR_DATA WHERE PROJ_ID = @proj_id
DELETE FROM MSP_ASSIGNMENTS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_LINKS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_CODE_FIELDS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_TASKS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_FIELD_ATTRIBUTES WHERE PROJ_ID = @proj_id
DELETE FROM MSP_ATTRIBUTE_STRINGS WHERE PROJ_ID = @proj_id
DELETE FROM MSP_PROJECTS WHERE PROJ_ID = @proj_id
IF @@TRANCOUNT > 0 COMMIT TRAN
-- End Script