The database upgrade procedure in the TIBCO iProcess Conductor Installation Guide was inadequate and has been improved.

The database upgrade procedure in the TIBCO iProcess Conductor Installation Guide was inadequate and has been improved.

book

Article ID: KB0087327

calendar_today

Updated On:

Products Versions
TIBCO iProcess Conductor -
Not Applicable -

Description

Resolution:
TIBCO iProcess™ Conductor Installation for Windows

Database Upgrade Clarification

The description of upgrading the iProcess Conductor database has been expanded and
clarified. The next section details the enhanced " Upgrading the Database" information.

=============================================================

Upgrading the Database

Some XML schemas have been updated in this version of iProcess Conductor: a new
element jeopardyDetection has been added to both OrderHeaderTypes.xsd and
ExecutionPlanTypes.xsd. This means that if you want to use your existing database when
upgrading iProcess Conductor to version 11.0 you should update your existing database as
described in this section.

1. Log in to the database using the database username and execute the following script to
get the iProcess Conductor directory path, which is actually the iProcess Conductor
installation destination on the database server.

select DIRECTORY_PATH from ALL_DIRECTORIES where DIRECTORY_NAME='IPCUSER_CATDIR'

The default iProcess Conductor database username is IPCUSER. If you have changed
that username, substitute the changed name in the example above.

2. Download the iProcess Conductor version 11.0 database schemas from
support-ftp.tibco.com.
You will be able to download by clicking on the link below after you provide your TIBCO Support Web username and password in the url:

                     ftp://username:password@support-ftp.tibco.com

Directory path:
available_downloads/StaffwareProcessSuite/iProcess/conductor/11.0.0/hotfix-01

Extract all the schema files to
$DIRECTORY_PATH/iProcessConductor/oracle/iProcessConductor/xsd/.

Where:
— DIRECTORY_PATH is the directory on the database server. Do not confuse this
with the path on the application server.

3. Perform XML Schema Evolution as described in the following sections.


For an Oracle 10g Database

1. Log in to the database using the database username to evolve the Order schema and
dependent schemas.
declare
  newOrderHeaderType       XMLType;
  orderHeader                     XMLType;
  headerTypes                    XMLType;
  headers                           XMLType;
  orderTypes                      XMLType;
  orderMEType                   XMLType;
  thisoder                           XMLType;

begin
  newOrderHeaderType :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/OrderHead
erTypes.xsd'));
  orderHeader :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/OrderHead
er.xsd'));
  headerTypes :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/HeaderTyp
es.xsd'));
  headers :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/Header.xsd
'));
  orderTypes :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/OrderType
s.xsd'));
  orderMEType :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/OrderMET
ype.xsd'));
  thisoder :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/Order.xsd')
);

dbms_xmlschema.CopyEvolve(xdb$string_list_t('http://www.staffware.com/framewo
rks/schema/OrderHeaderTypes.xsd','http://www.staffware.com/frameworks/schema/O
rderHeader.xsd','http://www.staffware.com/frameworks/schema/HeaderTypes.xsd','htt
p://www.staffware.com/frameworks/schema/Header.xsd','http://www.staffware.com/f
rameworks/schema/OrderTypes.xsd','http://www.staffware.com/frameworks/schema/
OrderMEType.xsd','http://www.staffware.com/frameworks/schema/Order.xsd'),XML
SequenceType(newOrderHeaderType,orderHeader,headerTypes,headers,orderTypes,o
rderMEType,thisoder),NULL,FALSE,NULL,TRUE,TRUE,NULL);
  commit;

end;

2. Log in as IPCUSER and execute the following script to evolve the ExecutionPlan
schema and dependent schemas.

declare
  newexecutionPlanTypes         XMLType;
  executionPlan                        XMLType;

begin
   newexecutionPlanTypes :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/Execution
PlanTypes.xsd'));
  executionPlan :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/Execution
Plan.xsd'));
dbms_xmlschema.CopyEvolve(xdb$string_list_t('http://www.staffware.com/framewo
rks/schema/ExecutionPlanTypes.xsd','http://www.staffware.com/frameworks/schema/
ExecutionPlan.xsd'),
XMLSequenceType(newexecutionPlanTypes,executionPlan),NULL,FALSE,NULL,
TRUE,TRUE,NULL);
  commit;

end;

3. Verify that the schemas have updated successfully. Log in as the system user, and
execute the following script to check whether there is an element called
jeopardyDetection inside each result schema:

select SCHEMA from DBA_XML_SCHEMAS
where OWNER='IPCUSER'
AND SCHEMA_URL in
('http://www.staffware.com/frameworks/schema/OrderHeaderTypes.xsd','http://www.staffware
.com/frameworks/schema/ExecutionPlanTypes.xsd')


For an Oracle 9i Database

In Oracle9iR2, there is no way to automatically perform XML Schema Evolution. In order
to accomplish the equivalent of this evolution, you must unload your data, drop the old
XML Schema, load the new XML Schema, and reload your data.

We suggest that you install the iProcess Conductor version 11.0 database and migrate your
data into the new database.

It is possible to manually evolve the existing database as set out in the following steps.
Note that this is not a detailed set of instructions and the procedure is only recommended
to Oracle experts.

1. Copy the data from the tables (EXECUTIONPLAN and ORDERS) containing an SB
XMLType into a table containing a non-SB XMLType.

2. Drop those two tables, and delete the schemas bound to those tables. (Schema names
are listed in the SQL procedure given in For an Oracle 10g Database above.)

3. Register the new schemas and re-create the tables and the corresponding indexes.
(Refer to iProcessConductorDir\oracle\iProcessConductor\sql.)

4. Copy the data back in.


=============================================================

TIBCO iProcess™ Conductor Installation for UNIX

Database Upgrade Clarification

The description of upgrading the iProcess Conductor database has been expanded and
clarified. The next section details the enhanced " Upgrading the Database" information.
  
=============================================================

Upgrading the Database

Some XML schemas have been updated in this version of iProcess Conductor: a new
element jeopardyDetection has been added to both OrderHeaderTypes.xsd and
ExecutionPlanTypes.xsd. This means that if you want to use your existing database when
upgrading iProcess Conductor to version 11.0 you should update your existing database as
described in this section.

1. Log in to the database using the database username and execute the following script to
get the iProcess Conductor directory path, which is actually the iProcess Conductor
installation destination on the database server.

select DIRECTORY_PATH from ALL_DIRECTORIES where DIRECTORY_NAME='IPCUSER_CATDIR'

The default iProcess Conductor database username is IPCUSER. If you have changed
that username, substitute the changed name in the example above.

2. Download the iProcess Conductor version 11.0 database schemas from
support-ftp.tibco.com.
You will be able to download by clicking on the link below after you provide your TIBCO Support Web username and password in the url:

                     ftp://username:password@support-ftp.tibco.com

Directory path:
available_downloads/StaffwareProcessSuite/iProcess/conductor/11.0.0/hotfix-01

Extract all the schema files to
$DIRECTORY_PATH/iProcessConductor/oracle/iProcessConductor/xsd/.

Where:
— DIRECTORY_PATH is the directory on the database server. Do not confuse this
with the path on the application server.

3. Perform XML Schema Evolution as described in the following sections.

For an Oracle 10g Database

1. Log in to the database using the database username to evolve the Order schema and
dependent schemas.

declare
  newOrderHeaderType       XMLType;
  orderHeader                     XMLType;
  headerTypes                    XMLType;
  headers                           XMLType;
  orderTypes                      XMLType;
  orderMEType                   XMLType;
  thisoder                           XMLType;

begin
  newOrderHeaderType :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/OrderHead
erTypes.xsd'));
  orderHeader :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/OrderHead
er.xsd'));
  headerTypes :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/HeaderTyp
es.xsd'));
  headers :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/Header.xsd
'));
  orderTypes :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/OrderType
s.xsd'));
  orderMEType :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/OrderMET
ype.xsd'));
  thisoder :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/Order.xsd')
);

dbms_xmlschema.CopyEvolve(xdb$string_list_t('http://www.staffware.com/framewo
rks/schema/OrderHeaderTypes.xsd','http://www.staffware.com/frameworks/schema/O
rderHeader.xsd','http://www.staffware.com/frameworks/schema/HeaderTypes.xsd','htt
p://www.staffware.com/frameworks/schema/Header.xsd','http://www.staffware.com/f
rameworks/schema/OrderTypes.xsd','http://www.staffware.com/frameworks/schema/
OrderMEType.xsd','http://www.staffware.com/frameworks/schema/Order.xsd'),XML
SequenceType(newOrderHeaderType,orderHeader,headerTypes,headers,orderTypes,o
rderMEType,thisoder),NULL,FALSE,NULL,TRUE,TRUE,NULL);
  commit;

end;

2. Log in as IPCUSER and execute the following script to evolve the ExecutionPlan
schema and dependent schemas.

declare
  newexecutionPlanTypes          XMLType;
  executionPlan                         XMLType;

begin
   newexecutionPlanTypes :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/Execution
PlanTypes.xsd'));
  executionPlan :=
xmltype(getDocument('/iProcessConductor/oracle/iProcessConductor/xsd/Execution
Plan.xsd'));
dbms_xmlschema.CopyEvolve(xdb$string_list_t('http://www.staffware.com/framewo
rks/schema/ExecutionPlanTypes.xsd','http://www.staffware.com/frameworks/schema/
ExecutionPlan.xsd'),
XMLSequenceType(newexecutionPlanTypes,executionPlan),NULL,FALSE,NULL,
TRUE,TRUE,NULL);
  commit;

end;

3. Verify that the schemas have updated successfully. Log in as the system user, and
execute the following script to check whether there is an element called
jeopardyDetection inside each result schema:

select SCHEMA from DBA_XML_SCHEMAS
where OWNER='IPCUSER'
AND SCHEMA_URL in
('http://www.staffware.com/frameworks/schema/OrderHeaderTypes.xsd','http://www.staffware
.com/frameworks/schema/ExecutionPlanTypes.xsd')


For an Oracle 9i Database

In Oracle9iR2, there is no way to automatically perform XML Schema Evolution. In order
to accomplish the equivalent of this evolution, you must unload your data, drop the old
XML Schema, load the new XML Schema, and reload your data.

We suggest that you install the iProcess Conductor version 11.0 database and migrate your
data into the new database.

It is possible to manually evolve the existing database as set out in the following steps.
Note that this is not a detailed set of instructions and the procedure is only recommended
to Oracle experts.

1. Copy the data from the tables (EXECUTIONPLAN and ORDERS) containing an SB
XMLType into a table containing a non-SB XMLType.

2. Drop those two tables, and delete the schemas bound to those tables. (Schema names
are listed in the SQL procedure given in For an Oracle 10g Database above.)

3. Register the new schemas and re-create the tables and the corresponding indexes.
(Refer to iProcessConductorDir\oracle\iProcessConductor\sql.)

4. Copy the data back in.

=============================================================

Issue/Introduction

The database upgrade procedure in the TIBCO iProcess Conductor Installation Guide was inadequate and has been improved.