Project

General

Profile

Actions

Bug #3093

closed

Problème de démarrage du serveur après installation d'une plateforme sur MS SQL

Added by Anonymous over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Plan de classement
Start date:
03/26/2012
Due date:
% Done:

100%

Estimated time:
Navigateur:
Tous
Votre version de Silverpeas:
5.9-SNAPSHOT
Système d'exploitation:
Votre base de données:
MS SQL Server
Livraison en TEST:
Livraison en PROD:

Description

Scénario de l'anomalie:
1) Installer une plateforme Silverpeas en V5.9-SNAPSHOT avec accès à une base de données MS SQL Server
2) Démarrer le serveur JBoss

Résultat obtenu:
Le serveur ne démarre pas correctement.
Résultat souhaité:
Le serveur démarre.


Related issues

Related to Service Installation - Bug #4927: Démarrage SP impossible: type de colonne incorrect dans la table PdcAxisValueClosed09/26/2013

Actions
Related to Service Installation - Support #5216: Conversion de BDD de MS SQL vers PostgresClosed01/22/2014

Actions
Actions #1

Updated by Anonymous over 9 years ago

  • % Done changed from 0 to 20

Remplacer les numeric(19,0) en bigint et tinyint en bit.
Correction temporaire lors de la création from scratch:


create table PdcAxisValue (
  valueId bigint not null,
  axisId bigint not null,
  primary key (valueId, axisId)
);

create table PdcClassification (
  id bigint identity not null,
  contentId varchar(255) null,
  instanceId varchar(255) not null,
  modifiable bit not null,
  nodeId varchar(255) null,
  primary key (id)
);

create table PdcClassification_PdcPosition (
  PdcClassification_id bigint not null,
  positions_id bigint not null,
  primary key (PdcClassification_id, positions_id),
  unique (positions_id)
);

create table PdcPosition (
  id bigint identity not null,
  primary key (id)
);

create table PdcPosition_PdcAxisValue (
  PdcPosition_id bigint not null,
  axisValues_valueId bigint not null,
  axisValues_axisId bigint not null,
  primary key (PdcPosition_id, axisValues_valueId, axisValues_axisId)
);

RAF: partie de migration des tables existantes. Problème avec la présence d'une clé primaire que l'on ne peut pas modifier ou supprimer sans le faire manuellement.

Actions #2

Updated by Anonymous over 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Anonymous
Actions #3

Updated by Anonymous over 9 years ago

Script à adapter en remplaçant les identifiants (contenant GET_AUTO_GENERATED_NAME) par les valeurs correspondantes dans MS SQL Server.

alter table PdcPosition_PdcAxisValue drop FK_PdcPosition_PdcAxisValue_AxisValuesId;
alter table PdcPosition_PdcAxisValue drop FK_PdcPosition_PdcAxisValue_PdcPositionId;
alter table PdcClassification_PdcPosition drop constraint FK_PdcClassification_PdcPosition_PositionId;
alter table PdcClassification_PdcPosition drop constraint FK_PdcClassification_PdcPosition_PositionId_PdcClassificationId;
ALTER TABLE PdcAxisValue DROP CONSTRAINT PK__PdcAxisV__GET_AUTO_GENERATED_NAME;
alter table PdcAxisValue alter column valueId bigint NOT NULL;
alter table PdcAxisValue alter column axisId bigint NOT NULL;
alter table PdcClassification drop constraint PK__PdcClass__GET_AUTO_GENERATED_NAME;
alter table PdcClassification alter column id bigint not null;
alter table PdcClassification alter column modifiable bit not null;
alter table PdcClassification_PdcPosition drop constraint PK__PdcClass__GET_AUTO_GENERATED_NAME;
alter table PdcClassification_PdcPosition alter column PdcClassification_id bigint not null;
alter table PdcClassification_PdcPosition drop constraint UQ__PdcClass__GET_AUTO_GENERATED_NAME;
alter table PdcClassification_PdcPosition alter column positions_id bigint not null;
alter table PdcPosition drop constraint PK__PdcPosit__GET_AUTO_GENERATED_NAME;
alter table PdcPosition alter column id bigint not null;
alter table PdcPosition_PdcAxisValue drop constraint PK__PdcPosit__GET_AUTO_GENERATED_NAME;
alter table PdcPosition_PdcAxisValue alter column PdcPosition_id bigint not null;
alter table PdcPosition_PdcAxisValue alter column axisValues_valueId bigint not null;
alter table PdcPosition_PdcAxisValue alter column axisValues_axisId bigint not null;

ALTER TABLE PdcAxisValue ADD CONSTRAINT PK_PdcAxisValue PRIMARY KEY  CLUSTERED (valueId, axisId);
ALTER TABLE PdcClassification ADD CONSTRAINT PK_PdcClassification PRIMARY KEY  CLUSTERED (id);

ALTER TABLE PdcClassification_PdcPosition ADD CONSTRAINT PK_PdcClassification_PdcPosition PRIMARY KEY CLUSTERED (PdcClassification_id, positions_id);
ALTER TABLE PdcClassification_PdcPosition ADD CONSTRAINT UQ_PdcClassification_PdcPosition UNIQUE (positions_id);

ALTER TABLE PdcPosition ADD CONSTRAINT PK_PdcPosition PRIMARY KEY CLUSTERED (id);

ALTER TABLE PdcPosition_PdcAxisValue ADD CONSTRAINT PK_PdcPosition_PdcAxisValue PRIMARY KEY CLUSTERED (PdcPosition_id, axisValues_valueId, axisValues_axisId);

alter table PdcClassification_PdcPosition 
  add constraint FK_PdcClassification_PdcPosition_PositionId
  foreign key (positions_id) 
  references PdcPosition;

alter table PdcClassification_PdcPosition 
  add constraint FK_PdcClassification_PdcPosition_PositionId_PdcClassificationId
  foreign key (PdcClassification_id) 
  references PdcClassification;

alter table PdcPosition_PdcAxisValue 
  add constraint FK_PdcPosition_PdcAxisValue_AxisValuesId
  foreign key (axisValues_valueId, axisValues_axisId) 
  references PdcAxisValue;

alter table PdcPosition_PdcAxisValue 
  add constraint FK_PdcPosition_PdcAxisValue_PdcPositionId
  foreign key (PdcPosition_id) 
  references PdcPosition;

Actions #4

Updated by Anonymous over 9 years ago

  • Status changed from Assigned to Resolved
Actions #5

Updated by Nicolas Eysseric over 9 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 20 to 100
Actions

Also available in: Atom PDF