Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-19338

Database Check Failed after upgrading from Ez Publish 4.6 > 4.7 rc1 with Oracle

    Details

      Description

      After making a clean installation of eZ Publish 4.6, with Oracle, and upgrading to eZ Publish 4.7 rc1 I get the following in the Database Consistency Check:

      The database is not consistent with the distribution database.

      To synchronize your database with the distribution setup, run the following SQL commands:

      ALTER TABLE ezcontentclass_attribute MODIFY (data_float1 DOUBLE PRECISION);
      ALTER TABLE ezcontentclass_attribute MODIFY (data_float2 DOUBLE PRECISION);
      ALTER TABLE ezcontentclass_attribute MODIFY (data_float3 DOUBLE PRECISION);
      ALTER TABLE ezcontentclass_attribute MODIFY (data_float4 DOUBLE PRECISION);
      ALTER TABLE ezcontentobject_attribute MODIFY (data_float DOUBLE PRECISION);
      ALTER TABLE ezpending_actions ADD id INTEGER NOT NULL;
      ALTER TABLE ezpending_actions ADD PRIMARY KEY ( id );
      ALTER TABLE ezx_ezpnet_module_branch ADD branch_id INTEGER DEFAULT 0 NOT NULL;

      CREATE TABLE ezstarrating (
      contentobject_attribute_id INTEGER DEFAULT 0 NOT NULL,
      contentobject_id INTEGER DEFAULT 0 NOT NULL,
      rating_average FLOAT DEFAULT 0 NOT NULL,
      rating_count INTEGER DEFAULT 0 NOT NULL,
      PRIMARY KEY ( contentobject_id, contentobject_attribute_id )
      );

      CREATE SEQUENCE s_starrating_data;

      CREATE TABLE ezstarrating_data (
      contentobject_attribute_id INTEGER DEFAULT 0 NOT NULL,
      contentobject_id INTEGER DEFAULT 0 NOT NULL,
      created_at INTEGER DEFAULT 0 NOT NULL,
      id INTEGER NOT NULL,
      rating FLOAT DEFAULT 0 NOT NULL,
      session_key VARCHAR2(32) NOT NULL,
      user_id INTEGER DEFAULT 0 NOT NULL,
      PRIMARY KEY ( id )
      );

      CREATE OR REPLACE TRIGGER ezstarrating_data_id_tr
      BEFORE INSERT ON ezstarrating_data FOR EACH ROW WHEN (new.id IS NULL)
      BEGIN
      SELECT s_starrating_data.nextval INTO :new.id FROM dual;
      END;
      /

      CREATE INDEX contentobject_id_co_attr_id ON ezstarrating_data ( contentobject_id, contentobject_attribute_id );

      CREATE INDEX user_id_session_key ON ezstarrating_data ( user_id, session_key );

      CREATE TABLE ezgmaplocation (
      address VARCHAR2(150),
      contentobject_attribute_id INTEGER DEFAULT 0 NOT NULL,
      contentobject_version INTEGER DEFAULT 0 NOT NULL,
      latitude FLOAT DEFAULT 0 NOT NULL,
      longitude FLOAT DEFAULT 0 NOT NULL,
      PRIMARY KEY ( contentobject_attribute_id, contentobject_version )
      );

      CREATE INDEX latitude_longitude_key ON ezgmaplocation ( latitude, longitude );

      CREATE TABLE ezm_block (
      block_type VARCHAR2(255),
      fetch_params CLOB,
      id CHAR(32) NOT NULL,
      is_removed INTEGER DEFAULT 0,
      last_update INTEGER DEFAULT 0,
      name VARCHAR2(255),
      node_id INTEGER DEFAULT 0 NOT NULL,
      overflow_id CHAR(32),
      rotation_interval INTEGER,
      rotation_type INTEGER,
      zone_id CHAR(32) NOT NULL,
      PRIMARY KEY ( id )
      );

      CREATE INDEX ezm_block__is_removed ON ezm_block ( is_removed );

      CREATE INDEX ezm_block__node_id ON ezm_block ( node_id );

      CREATE TABLE ezm_pool (
      block_id CHAR(32) NOT NULL,
      moved_to CHAR(32),
      node_id INTEGER DEFAULT 0 NOT NULL,
      object_id INTEGER DEFAULT 0 NOT NULL,
      priority INTEGER DEFAULT 0,
      rotation_until INTEGER DEFAULT 0,
      ts_hidden INTEGER DEFAULT 0,
      ts_publication INTEGER DEFAULT 0,
      ts_visible INTEGER DEFAULT 0,
      PRIMARY KEY ( block_id, object_id )
      );

      CREATE INDEX ezm_pool_block_id_ts_hidden ON ezm_pool ( block_id, ts_hidden );

      CREATE INDEX ezm_pool_block_id_ts_visible ON ezm_pool ( block_id, ts_visible );

      CREATE INDEX ezm_pool_block_id_ts_publ_prio ON ezm_pool ( block_id, ts_publication, priority );

      Steps to reproduce

       
      1. Make a clean installation of Ez Publish 4.6
      2. Activate the EzOracle extension, by adding ActiveExtensions[]=ezoracle in site.ini.append.php
      3. Run ./extension/ezoracle/bin/shell/ora-initialize.sh
      4. Add to site.ini.append.php
       
      ##################################
      [DatabaseSettings]
      DatabaseImplementation=ezoracle
      User=<user>
      Password=<password>
      Database=<instance>
      ##################################
       
       
      5. Register in Service Portal
      6. Run Sync_Network cronjob
      7. Run Monitor cronjob
      8. Upgrade to eZ Publish 4.7 rc1
      9. Run Sync_Network cronjob 
      10. Run Monitor cronjob
      11. Make a Database Consistency Check
      
      

        Issue Links

          Activity

          Hide
          Vidar Langseid added a comment -

          Instead of using ora-initialize.sh, can you try running manuall install and follow the chapter "2. Migrate from existing database" in ezoracle/INSTALL?

          Show
          Vidar Langseid added a comment - Instead of using ora-initialize.sh, can you try running manuall install and follow the chapter "2. Migrate from existing database" in ezoracle/INSTALL?
          Hide
          Pedro Resende added a comment -

          In reply to comment #027027
          I've done it as described in http://issues.ez.no/19340.

          However, after running the sync_network and monitor I got the following errors.

          phpbin runcronjobs.php sync_network
          Running cronjob part 'sync_network'
          Running extension/ez_network/cronjobs/syncnetwork.php at: 16/04/2012 1:05 pm
          Starting eZ Network syncronization.
          Use the --clear-all to reset client side data.
          Fatal error: A database transaction in eZ Publish failed.

          The current execution was stopped to prevent further problems.
          You should contact the System Administrator (ez@ez.no) of this site.
          The current transaction ID is TRANSID-1863c2d9196ae3c437888c4609f57017 and has been logged.
          Please include the transaction ID and the name of the current script when contacting the system administrator.

          [vl@oracle1:/var/www/apache2php53/ezp/.run ] $ phpbin runcronjobs.php sync_network --clear-all
          Running cronjob part 'sync_network'
          Running extension/ez_network/cronjobs/syncnetwork.php at: 16/04/2012 1:06 pm
          Starting eZ Network syncronization.
          Use the --clear-all to reset client side data.
          eZNetwork version check did not validate. Usually happens if db upgrade fails, exiting!
          Completing extension/ez_network/cronjobs/syncnetwork.php at: 16/04/2012 1:06 pm
          Elapsed time: 00:00:00

          When I did the database check, I got this

          The database is not consistent with the distribution database.

          To synchronize your database with the distribution setup, run the following SQL commands:

          ALTER TABLE ezcontentclass_attribute MODIFY (data_float1 DOUBLE PRECISION);
          ALTER TABLE ezcontentclass_attribute MODIFY (data_float2 DOUBLE PRECISION);
          ALTER TABLE ezcontentclass_attribute MODIFY (data_float3 DOUBLE PRECISION);
          ALTER TABLE ezcontentclass_attribute MODIFY (data_float4 DOUBLE PRECISION);
          ALTER TABLE ezcontentobject_attribute MODIFY (data_float DOUBLE PRECISION);

          DECLARE
          maxval INTEGER;
          obj_exists EXCEPTION;
          PRAGMA EXCEPTION_INIT(obj_exists, -955);
          BEGIN
          SELECT NVL(MAX(id), 0) INTO maxval FROM ezpending_actions;
          maxval := maxval + 1;
          EXECUTE IMMEDIATE 'CREATE SEQUENCE s_pending_actions MINVALUE ' || maxval;
          EXCEPTION WHEN obj_exists THEN
          NULL;
          END;
          /
          CREATE OR REPLACE TRIGGER ezpending_actions_id_tr
          BEFORE INSERT ON ezpending_actions FOR EACH ROW WHEN (new.id IS NULL)
          BEGIN
          SELECT s_pending_actions.nextval INTO :new.id FROM dual;
          END;
          /
          ALTER TABLE ezpending_actions MODIFY (id INTEGER NOT NULL);
          ALTER TABLE ezpending_actions ADD PRIMARY KEY ( id );
          ALTER TABLE ezx_ezpnet_module_branch ADD branch_id INTEGER DEFAULT 0 NOT NULL;
          DROP TABLE ez_ct_change_entry;
          DROP TABLE ez_ct_change_log;

          Show
          Pedro Resende added a comment - In reply to comment #027027 I've done it as described in http://issues.ez.no/19340 . However, after running the sync_network and monitor I got the following errors. phpbin runcronjobs.php sync_network Running cronjob part 'sync_network' Running extension/ez_network/cronjobs/syncnetwork.php at: 16/04/2012 1:05 pm Starting eZ Network syncronization. Use the --clear-all to reset client side data. Fatal error: A database transaction in eZ Publish failed. The current execution was stopped to prevent further problems. You should contact the System Administrator (ez@ez.no) of this site. The current transaction ID is TRANSID-1863c2d9196ae3c437888c4609f57017 and has been logged. Please include the transaction ID and the name of the current script when contacting the system administrator. [vl@oracle1:/var/www/apache2php53/ezp/.run ] $ phpbin runcronjobs.php sync_network --clear-all Running cronjob part 'sync_network' Running extension/ez_network/cronjobs/syncnetwork.php at: 16/04/2012 1:06 pm Starting eZ Network syncronization. Use the --clear-all to reset client side data. eZNetwork version check did not validate. Usually happens if db upgrade fails, exiting! Completing extension/ez_network/cronjobs/syncnetwork.php at: 16/04/2012 1:06 pm Elapsed time: 00:00:00 When I did the database check, I got this The database is not consistent with the distribution database. To synchronize your database with the distribution setup, run the following SQL commands: ALTER TABLE ezcontentclass_attribute MODIFY (data_float1 DOUBLE PRECISION); ALTER TABLE ezcontentclass_attribute MODIFY (data_float2 DOUBLE PRECISION); ALTER TABLE ezcontentclass_attribute MODIFY (data_float3 DOUBLE PRECISION); ALTER TABLE ezcontentclass_attribute MODIFY (data_float4 DOUBLE PRECISION); ALTER TABLE ezcontentobject_attribute MODIFY (data_float DOUBLE PRECISION); DECLARE maxval INTEGER; obj_exists EXCEPTION; PRAGMA EXCEPTION_INIT(obj_exists, -955); BEGIN SELECT NVL(MAX(id), 0) INTO maxval FROM ezpending_actions; maxval := maxval + 1; EXECUTE IMMEDIATE 'CREATE SEQUENCE s_pending_actions MINVALUE ' || maxval; EXCEPTION WHEN obj_exists THEN NULL; END; / CREATE OR REPLACE TRIGGER ezpending_actions_id_tr BEFORE INSERT ON ezpending_actions FOR EACH ROW WHEN (new.id IS NULL) BEGIN SELECT s_pending_actions.nextval INTO :new.id FROM dual; END; / ALTER TABLE ezpending_actions MODIFY (id INTEGER NOT NULL); ALTER TABLE ezpending_actions ADD PRIMARY KEY ( id ); ALTER TABLE ezx_ezpnet_module_branch ADD branch_id INTEGER DEFAULT 0 NOT NULL; DROP TABLE ez_ct_change_entry; DROP TABLE ez_ct_change_log;
          Hide
          Jérôme Vieilledent added a comment -

          Fixed in master https://github.com/ezsystems/ezoracle/commit/ac881ee143a4ecf4326ee6d82cf6b6c7080c96f8

          You'll need to replay the upgrade scripts from a 4.6 + the new one (to rc1)

          Show
          Jérôme Vieilledent added a comment - Fixed in master https://github.com/ezsystems/ezoracle/commit/ac881ee143a4ecf4326ee6d82cf6b6c7080c96f8 You'll need to replay the upgrade scripts from a 4.6 + the new one (to rc1)
          Hide
          Jérôme Vieilledent added a comment - - edited
          Show
          Jérôme Vieilledent added a comment - - edited Fixed in eZGmapLocation master : https://github.com/ezsystems/ezgmaplocation/commit/3369bc108617a411ae53a71b72ebb5749ff4db33 (update script inside)
          Hide
          Pedro Resende added a comment -

          Service Portal is still not working properly on Oracle

          Show
          Pedro Resende added a comment - Service Portal is still not working properly on Oracle
          Hide
          João Pingo added a comment - - edited

          Restest in Oracle final build (206) the following issues are present in upgrade check

          DROP INDEX ezx_ezpnet_installation00001_i;
          CREATE INDEX ezx_eznet_install_cust_id ON ezx_ezpnet_installation ( customer_id );
          ALTER TABLE ezx_ezpnet_module_branch ADD branch_id INTEGER DEFAULT 0 NOT NULL;
          DROP INDEX ezx_ezpnet_mon_result_f00002_i;
          CREATE INDEX ezx_eznet_mon_result_finished ON ezx_ezpnet_mon_result ( finnished );

          Show
          João Pingo added a comment - - edited Restest in Oracle final build (206) the following issues are present in upgrade check DROP INDEX ezx_ezpnet_installation00001_i; CREATE INDEX ezx_eznet_install_cust_id ON ezx_ezpnet_installation ( customer_id ); ALTER TABLE ezx_ezpnet_module_branch ADD branch_id INTEGER DEFAULT 0 NOT NULL; DROP INDEX ezx_ezpnet_mon_result_f00002_i; CREATE INDEX ezx_eznet_mon_result_finished ON ezx_ezpnet_mon_result ( finnished );
          Hide
          Pedro Resende added a comment -

          Re-teste with Oracle DFS final build (206) and the following issues are present after doing a database consistency check:

          The database is not consistent with the distribution database.

          To synchronize your database with the distribution setup, run the following SQL commands:

          DROP INDEX ezx_ezpnet_installation00001_i;
          CREATE INDEX ezx_eznet_install_cust_id ON ezx_ezpnet_installation ( customer_id );
          DROP INDEX ezx_ezpnet_mon_result_f00002_i;
          CREATE INDEX ezx_eznet_mon_result_finished ON ezx_ezpnet_mon_result ( finnished );
          DROP TABLE ezdfsfile;

          Show
          Pedro Resende added a comment - Re-teste with Oracle DFS final build (206) and the following issues are present after doing a database consistency check: The database is not consistent with the distribution database. To synchronize your database with the distribution setup, run the following SQL commands: DROP INDEX ezx_ezpnet_installation00001_i; CREATE INDEX ezx_eznet_install_cust_id ON ezx_ezpnet_installation ( customer_id ); DROP INDEX ezx_ezpnet_mon_result_f00002_i; CREATE INDEX ezx_eznet_mon_result_finished ON ezx_ezpnet_mon_result ( finnished ); DROP TABLE ezdfsfile;

            People

            • Assignee:
              Unassigned
              Reporter:
              Pedro Resende
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: