Question
Mphasis
IN
Last activity: 5 May 2017 5:53 EDT
Upgrading from single schema to Split schema - Single Data base Approach
We have few questions related to this process
We have Single Schema which contains Rules and Data
During upgrade we will migrate all the Rules to New Rules Schema - In this process whether Rule Data will be removed from Original Schema or do we need to remove manually after upgrade using Optimize Schema wizard as mentioned in Pega722_Upgrade Guide?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
As a post upgrade task you should use the optimize schema wizard to identify the old rules tables from the data schema and dummy data tables from the new rules schema that should be removed.
Mphasis
IN
Thanks for the reply. As per requirement, we want to change the existing schema name , So we have two approaches.
Approach 1: Migrate only Data related tables to New Dataschema using DDLs and then do the upgrade
Approach 2: Migrate All the Objects(Rule and Data) to New DataSchema and do the upgrade considering New DataSchema as Original Schema. After upgrade delete the unused rule tables.
Any suggestions please on what will be the better approach?
Pegasystems Inc.
US
Is this a dev environment that you can take down while the upgrade is happening? I am just wondering if you need to get the existing environment running again after the schema name change as there will be some manual changes that need to be done if so.
Identifying and moving just the data tables to a new schema in approach one seems like more work than is necessary. I would go with approach 2 of just using a database tool to export the existing schema and then restore to new DataSchema name. Then precede with the upgrade of migrating rules tables, upgrading rules, migrating/generating rules schema objects and links between rules and data schemas, and upgrading the data schema. Then do the cleanup of rules and data schemas afterwards.
Mphasis
IN
Yes, Its a Dev Environment
HP
IN
Hi
We are referring Pega722_UpgradeGuide.pdf (Standard Pega upgrade document) for one of our upgrade Pega 7.2.2 from Pega 6x.
In this document we are using "Appendix C - Generating and Applying DDL" concept. In approach under "Apply DDL File" section Page no. 130 (Step 2a) as follows
2.a --> Register the DDL file with Database
For Oracle, PostgreSQL, and IBM DB2 for Linux, and Windows, register the .jar file with the database (We are using Oracle Database)
2.b --> Apply the create function DDL.
Can you please explain about 2.a. When we generate DDL we got only one file ORACLE.sql. We did not get any jar file. Please help me to understand following points.
1. What is that Jar file ?
2. When this file will be created?
3. How to register to the database ?
Please feel free to leave msg here for any inputs.
Thanks
Mark
HP
IN
Hi
As mentioned above we are changing the schema first and then proceeding with upgrade. As part of changing schema first we are generating DDL's from source schema and applying those DDL's on target schema.
In this process we are having issue with while copying Java Classes. Here is the syntax we used to generate DDL for Java Class
SELECT REPLACE (DBMS_METADATA.GET_DDL(OBJECT_TYPE, DBMS_JAVA.LONGNAME(OBJECT_NAME), OWNER),'PRPC_ADM','PRPC_DATA_ADM') jtxt
FROM
(
SELECT
OWNER,
OBJECT_NAME,
DECODE(OBJECT_TYPE,
'JAVA CLASS', 'JAVA_CLASS',
OBJECT_TYPE
) OBJECT_TYPE
FROM DBA_OBJECTS
WHERE OWNER IN ('PRPC_ADM')
AND OBJECT_TYPE = 'JAVA CLASS'
)
ORDER BY OBJECT_NAME;
Above script generated DDL for Java Class. But when we apply same script on new schema we are encountering following issue.
Hi
As mentioned above we are changing the schema first and then proceeding with upgrade. As part of changing schema first we are generating DDL's from source schema and applying those DDL's on target schema.
In this process we are having issue with while copying Java Classes. Here is the syntax we used to generate DDL for Java Class
SELECT REPLACE (DBMS_METADATA.GET_DDL(OBJECT_TYPE, DBMS_JAVA.LONGNAME(OBJECT_NAME), OWNER),'PRPC_ADM','PRPC_DATA_ADM') jtxt
FROM
(
SELECT
OWNER,
OBJECT_NAME,
DECODE(OBJECT_TYPE,
'JAVA CLASS', 'JAVA_CLASS',
OBJECT_TYPE
) OBJECT_TYPE
FROM DBA_OBJECTS
WHERE OWNER IN ('PRPC_ADM')
AND OBJECT_TYPE = 'JAVA CLASS'
)
ORDER BY OBJECT_NAME;
Above script generated DDL for Java Class. But when we apply same script on new schema we are encountering following issue.
DECLARE
*
ERROR at line 12:
ORA-06550: line 12, column 1:
PLS-00103: Encountered the symbol "DECLARE"
ORA-06550: line 81, column 4:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
following:
( begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted
Any inputs please ?
Thanks
Mark
Pegasystems Inc.
US
https://docs-previous.pega.com/pega-722-platform-upgrade-guide
I am looking at this guide and in appendix C step 2 I do not see the lines you are referring to about a jar file. It seems like you are trying to move the UDF functions from generatedddl script output. The generatedddl script is for the schema changes only. You can add the UDFs to the new schema as part of the upgrade or by using the generateudf script after the upgrade has been completed.
HP
IN
HI
Thanks for your update.
Please find attached screen shot. I am talking about the step which i have marked in red in the attached jpeg file.
Under Step2 Apply DDL file there is one sub step "a. for Oracle, PostgreSQL, and IBM DB2 for Linux, UNIX, and Windows, register the .jar file with the database.".
Please review and advise.
Thanks
Mark
Pegasystems Inc.
US
OK, so I guess the guide is giving you some general guidelines for manually installing the UDF functions. You do not need to have the UDF functions installed in order to proceed with the upgrade. There is a separate generateudf script that you can use to generate/apply the UDF functions. If you need to have DBA install them instead of using the script then the jar file to go along with the function signatures is in the archives/udf directory of the media.
Labb Consulting
NL
Hello Celeste,
I have checked the archives/udf directory of the media and it contains two jars prddl.jar and prreadstream.jar. Do we need to register both the jars or we have to only register prreadstream.jar?
Thanks,
Sudhanshu Kumar Yadav