P
Pascal
hi,
i wanted to install the Portfolio Server (there is no Forum for that,
right?) i am using a SQL SErver 2005, Project sErver 2007, Sharepoint 2007,
each System is running on a Seperated maschine (Hyper V)
During the Installation i got the follwoing error:
Product: Microsoft Office Project Portfolio Server 2007 -- Error 26204.
Error -2147217913: failed to execute SQL string, error detail: Die Anweisung
wurde beendet., SQL key: DB_PPSAccountData_Upgrade_12_Integrated SQL string:
begin transaction
set nocount on
declare @accountid int
declare @internalClassid int
declare @linkid1 int
declare @linkid2 int
declare @startID int
declare @endID int
declare @forecastStartID int
declare @forecastEndID int
declare @actualStartID int
declare @actualEndID int
declare AccountsCursor cursor for select distinct AccountID from sfStructures
open AccountsCursor
fetch next from AccountsCursor into @AccountID
while @@fetch_status = 0
begin
--Add the new attribute only if missing
print 'AccountID ' + convert( char(20), @AccountID)
set @forecastStartID=NULL
select @forecastStartID=ID from sfATTRIBUTES where
InternalName='FORECAST_START_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
if @forecastStartID IS NULL
begin
update sfID_GENERATOR set @forecastStartID=IDValue=IDValue+1 where
TableName='sfATTRIBUTES'
insert into sfATTRIBUTES(ID, AccountID, EntityType,
Name, InternalName, DataType, ApplicationUsage,
IsCalculated,MinDateValue, MaxDateValue,Mandatory)
VALUES(@forecastStartID, @AccountID, 'PROJECT' ,
'Forecast Start Date', 'FORECAST_START_DATE', 3, 15, 0,
'1950-01-01','2049-12-31', 0)
print 'new Attribute ID ' + convert( char(20),@forecastStartID) + '
name: Forecast Start Date'
end
set @forecastEndID=NULL
select @forecastEndID=ID from sfATTRIBUTES where
InternalName='FORECAST_END_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
if @forecastEndID IS NULL
begin
update sfID_GENERATOR set @forecastEndID=IDValue=IDValue+1 where
TableName='sfATTRIBUTES'
insert into sfATTRIBUTES(ID, AccountID, EntityType,
Name, InternalName, DataType, ApplicationUsage,
IsCalculated,MinDateValue, MaxDateValue,Mandatory)
VALUES(@forecastEndID, @AccountID, 'PROJECT' ,
'Forecast End Date', 'FORECAST_END_DATE', 3, 15, 0,
'1950-01-01','2049-12-31', 0)
print 'new Attribute ID ' + convert( char(20),@forecastEndID) + ' name:
Forecast End Date'
end
--Associate the attribute with all the internal classes which is not
already associated
declare IC cursor for
select sfINTERNAL_CLASSES.ID from
sfINTERNAL_CLASSES JOIN hrGROUPS ON sfINTERNAL_CLASSES.ID =
hrGROUPS.InternalClassID
where AccountID=@AccountID and hrGROUPS.InternalType=0
open IC
fetch next from IC into @InternalClassId
while @@fetch_status = 0
begin
if not exists (select ID from sfLINKS where Entity1Type='ATTRIBUTE' and
Entity1ID=@forecastStartID and Entity2Type='INTERNAL_CLASS' and
Entity2ID=@InternalClassId)
begin
print 'updating link to InternalClassID ' + convert( char(20),
@InternalClassId)
update sfID_GENERATOR set @LinkID1=IDValue=IDValue+1 where
TableName='sfLINKS'
insert into sfLINKS(ID, Entity1Type, Entity1ID, Entity2Type, Entity2ID)
VALUES(@LinkID1, 'ATTRIBUTE', @forecastStartID,
'INTERNAL_CLASS', @InternalClassId)
end
if not exists (select ID from sfLINKS where Entity1Type='ATTRIBUTE' and
Entity1ID=@forecastEndID and Entity2Type='INTERNAL_CLASS' and
Entity2ID=@InternalClassId)
begin
print 'updating link to InternalClassID ' + convert( char(20),
@InternalClassId)
update sfID_GENERATOR set @LinkID2=IDValue=IDValue+1 where
TableName='sfLINKS'
insert into sfLINKS(ID, Entity1Type, Entity1ID, Entity2Type, Entity2ID)
VALUES(@LinkID2, 'ATTRIBUTE', @forecastEndID,
'INTERNAL_CLASS', @InternalClassId)
end
fetch next from IC into @InternalClassId
end
close IC
deallocate IC
fetch next from AccountsCursor into @AccountID
end
close AccountsCursor
deallocate AccountsCursor
declare AccountsCursor cursor for select distinct AccountID from sfStructures
open AccountsCursor
fetch next from AccountsCursor into @AccountID
while @@fetch_status = 0
begin
print 'AccountID ' + convert( char(20), @AccountID)
set @startID=NULL
set @endID=NULL
set @forecastStartID=NULL
set @forecastEndID=NULL
set @actualStartID=NULL
set @actualEndID=NULL
select @startID=ID from sfATTRIBUTES where
InternalName='START_DATE' and AccountID=@AccountID and EntityType='PROJECT'
select @forecastStartID=ID from sfATTRIBUTES where
InternalName='FORECAST_START_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
select @actualStartID=ID from sfATTRIBUTES where
InternalName='ACTUAL_START_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
select @endID=ID from sfATTRIBUTES where
InternalName='END_DATE' and AccountID=@AccountID and EntityType='PROJECT'
select @forecastEndID=ID from sfATTRIBUTES where
InternalName='FORECAST_END_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
select @actualEndID=ID from sfATTRIBUTES where
InternalName='ACTUAL_END_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
if(@startID is null OR @endID is null OR @forecastStartID is null OR
@forecastEndID is null or @actualStartID is null or @actualEndID is null)
begin
fetch next from AccountsCursor into @AccountID
continue
end
delete from sfAttribute_Values where attributeid
in(@forecastStartID,@forecastEndID)
update sfAttribute_Values set attributeid=@forecastStartID where
attributeID=@actualStartID
print 'update forecast start date from actual start date'
update sfAttribute_Values set attributeid=@forecastEndID where
attributeID=@actualEndID
print 'update forecast end date from actual end date'
insert into sfattribute_values SELECT EntityID, @forecastStartID,
SolutionID, NumericValue, CharValue, DateTimeValue, DefinitionID,
Structure1EntryID, Structure2EntryID
FROM sfATTRIBUTE_VALUES
WHERE (Structure1EntryID NOT IN
(SELECT sfATTRIBUTE_VALUES.Structure1EntryID
FROM sfattribute_values
WHERE (sfATTRIBUTE_VALUES.AttributeID =
@forecastStartID))) AND (AttributeID = @startID)and solutionid is null
print 'update forecast start date from start date'
insert into sfattribute_values SELECT EntityID, @forecastEndID,
SolutionID, NumericValue, CharValue, DateTimeValue, DefinitionID,
Structure1EntryID, Structure2EntryID
FROM sfATTRIBUTE_VALUES
WHERE (Structure1EntryID NOT IN
(SELECT sfATTRIBUTE_VALUES.Structure1EntryID
FROM sfattribute_values
WHERE (sfATTRIBUTE_VALUES.AttributeID =
@forecastEndID))) AND (AttributeID = @endID)and solutionid is null
print 'update forecast end date from actual end date'
fetch next from AccountsCursor into @AccountID
end
close AccountsCursor
deallocate AccountsCursor
commit transaction
exec spUpdateVersion 1112004
Any Ideas what to do?
Thanks
Pascal
i wanted to install the Portfolio Server (there is no Forum for that,
right?) i am using a SQL SErver 2005, Project sErver 2007, Sharepoint 2007,
each System is running on a Seperated maschine (Hyper V)
During the Installation i got the follwoing error:
Product: Microsoft Office Project Portfolio Server 2007 -- Error 26204.
Error -2147217913: failed to execute SQL string, error detail: Die Anweisung
wurde beendet., SQL key: DB_PPSAccountData_Upgrade_12_Integrated SQL string:
begin transaction
set nocount on
declare @accountid int
declare @internalClassid int
declare @linkid1 int
declare @linkid2 int
declare @startID int
declare @endID int
declare @forecastStartID int
declare @forecastEndID int
declare @actualStartID int
declare @actualEndID int
declare AccountsCursor cursor for select distinct AccountID from sfStructures
open AccountsCursor
fetch next from AccountsCursor into @AccountID
while @@fetch_status = 0
begin
--Add the new attribute only if missing
print 'AccountID ' + convert( char(20), @AccountID)
set @forecastStartID=NULL
select @forecastStartID=ID from sfATTRIBUTES where
InternalName='FORECAST_START_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
if @forecastStartID IS NULL
begin
update sfID_GENERATOR set @forecastStartID=IDValue=IDValue+1 where
TableName='sfATTRIBUTES'
insert into sfATTRIBUTES(ID, AccountID, EntityType,
Name, InternalName, DataType, ApplicationUsage,
IsCalculated,MinDateValue, MaxDateValue,Mandatory)
VALUES(@forecastStartID, @AccountID, 'PROJECT' ,
'Forecast Start Date', 'FORECAST_START_DATE', 3, 15, 0,
'1950-01-01','2049-12-31', 0)
print 'new Attribute ID ' + convert( char(20),@forecastStartID) + '
name: Forecast Start Date'
end
set @forecastEndID=NULL
select @forecastEndID=ID from sfATTRIBUTES where
InternalName='FORECAST_END_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
if @forecastEndID IS NULL
begin
update sfID_GENERATOR set @forecastEndID=IDValue=IDValue+1 where
TableName='sfATTRIBUTES'
insert into sfATTRIBUTES(ID, AccountID, EntityType,
Name, InternalName, DataType, ApplicationUsage,
IsCalculated,MinDateValue, MaxDateValue,Mandatory)
VALUES(@forecastEndID, @AccountID, 'PROJECT' ,
'Forecast End Date', 'FORECAST_END_DATE', 3, 15, 0,
'1950-01-01','2049-12-31', 0)
print 'new Attribute ID ' + convert( char(20),@forecastEndID) + ' name:
Forecast End Date'
end
--Associate the attribute with all the internal classes which is not
already associated
declare IC cursor for
select sfINTERNAL_CLASSES.ID from
sfINTERNAL_CLASSES JOIN hrGROUPS ON sfINTERNAL_CLASSES.ID =
hrGROUPS.InternalClassID
where AccountID=@AccountID and hrGROUPS.InternalType=0
open IC
fetch next from IC into @InternalClassId
while @@fetch_status = 0
begin
if not exists (select ID from sfLINKS where Entity1Type='ATTRIBUTE' and
Entity1ID=@forecastStartID and Entity2Type='INTERNAL_CLASS' and
Entity2ID=@InternalClassId)
begin
print 'updating link to InternalClassID ' + convert( char(20),
@InternalClassId)
update sfID_GENERATOR set @LinkID1=IDValue=IDValue+1 where
TableName='sfLINKS'
insert into sfLINKS(ID, Entity1Type, Entity1ID, Entity2Type, Entity2ID)
VALUES(@LinkID1, 'ATTRIBUTE', @forecastStartID,
'INTERNAL_CLASS', @InternalClassId)
end
if not exists (select ID from sfLINKS where Entity1Type='ATTRIBUTE' and
Entity1ID=@forecastEndID and Entity2Type='INTERNAL_CLASS' and
Entity2ID=@InternalClassId)
begin
print 'updating link to InternalClassID ' + convert( char(20),
@InternalClassId)
update sfID_GENERATOR set @LinkID2=IDValue=IDValue+1 where
TableName='sfLINKS'
insert into sfLINKS(ID, Entity1Type, Entity1ID, Entity2Type, Entity2ID)
VALUES(@LinkID2, 'ATTRIBUTE', @forecastEndID,
'INTERNAL_CLASS', @InternalClassId)
end
fetch next from IC into @InternalClassId
end
close IC
deallocate IC
fetch next from AccountsCursor into @AccountID
end
close AccountsCursor
deallocate AccountsCursor
declare AccountsCursor cursor for select distinct AccountID from sfStructures
open AccountsCursor
fetch next from AccountsCursor into @AccountID
while @@fetch_status = 0
begin
print 'AccountID ' + convert( char(20), @AccountID)
set @startID=NULL
set @endID=NULL
set @forecastStartID=NULL
set @forecastEndID=NULL
set @actualStartID=NULL
set @actualEndID=NULL
select @startID=ID from sfATTRIBUTES where
InternalName='START_DATE' and AccountID=@AccountID and EntityType='PROJECT'
select @forecastStartID=ID from sfATTRIBUTES where
InternalName='FORECAST_START_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
select @actualStartID=ID from sfATTRIBUTES where
InternalName='ACTUAL_START_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
select @endID=ID from sfATTRIBUTES where
InternalName='END_DATE' and AccountID=@AccountID and EntityType='PROJECT'
select @forecastEndID=ID from sfATTRIBUTES where
InternalName='FORECAST_END_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
select @actualEndID=ID from sfATTRIBUTES where
InternalName='ACTUAL_END_DATE' and AccountID=@AccountID and
EntityType='PROJECT'
if(@startID is null OR @endID is null OR @forecastStartID is null OR
@forecastEndID is null or @actualStartID is null or @actualEndID is null)
begin
fetch next from AccountsCursor into @AccountID
continue
end
delete from sfAttribute_Values where attributeid
in(@forecastStartID,@forecastEndID)
update sfAttribute_Values set attributeid=@forecastStartID where
attributeID=@actualStartID
print 'update forecast start date from actual start date'
update sfAttribute_Values set attributeid=@forecastEndID where
attributeID=@actualEndID
print 'update forecast end date from actual end date'
insert into sfattribute_values SELECT EntityID, @forecastStartID,
SolutionID, NumericValue, CharValue, DateTimeValue, DefinitionID,
Structure1EntryID, Structure2EntryID
FROM sfATTRIBUTE_VALUES
WHERE (Structure1EntryID NOT IN
(SELECT sfATTRIBUTE_VALUES.Structure1EntryID
FROM sfattribute_values
WHERE (sfATTRIBUTE_VALUES.AttributeID =
@forecastStartID))) AND (AttributeID = @startID)and solutionid is null
print 'update forecast start date from start date'
insert into sfattribute_values SELECT EntityID, @forecastEndID,
SolutionID, NumericValue, CharValue, DateTimeValue, DefinitionID,
Structure1EntryID, Structure2EntryID
FROM sfATTRIBUTE_VALUES
WHERE (Structure1EntryID NOT IN
(SELECT sfATTRIBUTE_VALUES.Structure1EntryID
FROM sfattribute_values
WHERE (sfATTRIBUTE_VALUES.AttributeID =
@forecastEndID))) AND (AttributeID = @endID)and solutionid is null
print 'update forecast end date from actual end date'
fetch next from AccountsCursor into @AccountID
end
close AccountsCursor
deallocate AccountsCursor
commit transaction
exec spUpdateVersion 1112004
Any Ideas what to do?
Thanks
Pascal