Duplicate Custom Fields - PS 2007 SP2

A

AmWall

After running the following SQL scripts in our production db, have found a
few projects that contain duplicate custom fields, also found that the
project file corrupted and would not open and received the following error
message when attempted to open the file:
An unexpected error occurred during command execution.
Try the following:
Verify that all argument names and values are correct and are of the correct
type.
You may have run out of memory. To free up available memory, close programs,
projects. or windows that you aren't using.

The Gateway will not run when there are duplicates as well and receive the
following error:
The project 'Project name' cannot be exported to Microsoft Office Project
Server 2007 due to the following reason(s): Cannot update project. The custom
field value already exists. To update an existing custom field value you must
set the corresponding dataset row to Modified.

After the values were removed from the duplicated fields, the project was
able to complete the Gateway, and then open the plan normally.

My question is has anyone had similar problems as this, and is this really a
Microsoft bug?

USE ProjectServer_DRAFT

SELECT CFV.PROJ_UID, MP.PROJ_NAME, CFV.MD_PROP_UID, CFPV.MD_PROP_NAME, COUNT
(*)

TOTALCOUNT FROM MSP_PROJ_CUSTOM_FIELD_VALUES AS CFV

INNER JOIN MSP_PROJECTS AS MP ON CFV.PROJ_UID=MP.PROJ_UID

INNER JOIN MSP_CUSTOM_FIELDS_PUBLISHED_VIEW AS CFPV

ON CFV.MD_PROP_UID=CFPV.MD_PROP_UID

GROUP BY CFV.PROJ_UID,MP.PROJ_NAME, CFV.MD_PROP_UID, CFPV.MD_PROP_NAME
HAVING COUNT

(*) >1

ORDER BY TOTALCOUNT DESC

USE ProjectServer_PUBLISHED

SELECT CFV.PROJ_UID, MP.PROJ_NAME, CFV.MD_PROP_UID, CFPV.MD_PROP_NAME, COUNT
(*)

TOTALCOUNT FROM MSP_PROJ_CUSTOM_FIELD_VALUES AS CFV

INNER JOIN MSP_PROJECTS AS MP ON CFV.PROJ_UID=MP.PROJ_UID

INNER JOIN MSP_CUSTOM_FIELDS_PUBLISHED_VIEW AS CFPV

ON CFV.MD_PROP_UID=CFPV.MD_PROP_UID

GROUP BY CFV.PROJ_UID,MP.PROJ_NAME, CFV.MD_PROP_UID, CFPV.MD_PROP_NAME
HAVING COUNT

(*) >1

ORDER BY TOTALCOUNT DESC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top