Question
UBS
US
Last activity: 26 Jul 2017 15:32 EDT
Import Wizard Warning
Hello,
We installed Pega 7.2 on tomcat application server (Oracle DB). When tried to Import rules zip file from Pega UI, we see a warning that SchemaImport privilege must be provided and Data-Admin-System-Settings database/AutoDBSchemaChanges must be set to true to apply schema changes automatically. We provided DATA schemaID while defining JDBC resource in context.xml.
Can someone please advise what setting needs to be done. Attached the warning for reference.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
The DSS database/AutoDBSchemaChanges is already set to true by default. You either have to set your data user all the priviledges as admin user (see the installation guide for details) or define a separate admin user and configure it in context.xml. Here is a working sample - replace <host>, <sid>, username, password as your own - I believe this is also defined in the installation guide.
<Context>
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<Resource name="jdbc/PegaRULES"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@<host>:1521:<sid>"
username="v72stdata"
password="****"
maxActive="100"
maxIdle="30"
maxWait="10000"
/>
The DSS database/AutoDBSchemaChanges is already set to true by default. You either have to set your data user all the priviledges as admin user (see the installation guide for details) or define a separate admin user and configure it in context.xml. Here is a working sample - replace <host>, <sid>, username, password as your own - I believe this is also defined in the installation guide.
<Context>
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<Resource name="jdbc/PegaRULES"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@<host>:1521:<sid>"
username="v72stdata"
password="****"
maxActive="100"
maxIdle="30"
maxWait="10000"
/>
<Resource name="jdbc/AdminPegaRULES"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@<host>:1521:<sid>"
username="v72stadmin"
password="***"
maxActive="50"
maxIdle="30"
maxWait="10000"
/>
<Environment name="prconfig/database/databases/PegaRULES/defaultSchema"
value="v72strules"
type="java.lang.String" />
<Environment name="prconfig/database/databases/PegaDATA/defaultSchema"
value="v72stdata"
type="java.lang.String" />
<Environment name="prconfig/database/databases/PegaRULES/dataSourceAdmin" value="java:comp/env/jdbc/AdminPegaRULES" type="java.lang.String"/>
<Environment name="prconfig/database/databases/PegaDATA/dataSourceAdmin" value="java:comp/env/jdbc/AdminPegaRULES" type="java.lang.String"/>
<Environment name="url/initialization/explicittempdir" value="L:/PRPCTemp/tomcat808v72stsplit"
type="java.lang.String" />
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
</Context>
UBS
US
Hi kevin,
Our context file is same as urs with one change for
<Environment name="prconfig/database/databases/PegaDATA/dataSourceAdmin" value="java:comp/env/jdbc/AdminPegaRULES" type="java.lang.String"/>
Here you have mentioned value ="java:comp/env/jdbc/AdminPegaRULES" but we have only "AdminPegaRULES"
What is the reason for adding "java:comp/env/jdbc"
UBS
US
Hi kevin,
Above changes did help . But UI still not able to run schema DDL. Its still complaining saying Table does not exist while doing import Rules zip file.
Also please let usk now where Data-Admin-System-Settings database/AutoDBSchemaChanges setting is located .
See attached pic.
Pegasystems Inc.
US
Goto Records>>Sysadmin>>Dynamic System Settings to look up or create the DSS if not already there. Your new error seems to be a different issue, please attach log for further review.
UBS
US
Hi Kevin,
Pelase find attached log file for Import failure.
Pegasystems Inc.
US
The error is this - looks like your own table
The error is this - looks like your own table
PEGADATA.pr_UBS_App2_Data_ReferenceCode does not exist in the PEGADATA schema, please double check on that. You either have to include the schema change in your own application jar (with the correct setup you have gone through) or manually create the table through DDLs and reimport again.
016-08-05 23:44:54,830 [ PegaRULES-Batch-1] [ STANDARD] [ ] [ PegaRULES:07.10] ( internal.loaders.SaverLoader) WARN [email protected] - A Problem occurred during import: Table PEGADATA.pr_UBS_App2_Data_ReferenceCode does not exist in database PegaDATA com.pega.pegarules.pub.PRException: Table PEGADATA.pr_UBS_App2_Data_ReferenceCode does not exist in database PegaDATA From: (BDAADD8199AD22E168FB8424EBDB13AE0) at com.pega.pegarules.deploy.internal.loaders.SaverLoader.importContents(SaverLoader.java:488)
016-08-05 23:44:54,830 [ PegaRULES-Batch-1] [ STANDARD] [ ] [ PegaRULES:07.10] ( internal.loaders.SaverLoader) WARN [email protected] - A Problem occurred during import: Table PEGADATA.pr_UBS_App2_Data_ReferenceCode does not exist in database PegaDATA com.pega.pegarules.pub.PRException: Table PEGADATA.pr_UBS_App2_Data_ReferenceCode does not exist in database PegaDATA From: (BDAADD8199AD22E168FB8424EBDB13AE0) at com.pega.pegarules.deploy.internal.loaders.SaverLoader.importContents(SaverLoader.java:488)
016-08-05 23:44:54,830 [ PegaRULES-Batch-1] [ STANDARD] [ ] [ PegaRULES:07.10] ( internal.loaders.SaverLoader) WARN [email protected] - A Problem occurred during import: Table PEGADATA.pr_UBS_App2_Data_ReferenceCode does not exist in database PegaDATA com.pega.pegarules.pub.PRException: Table PEGADATA.pr_UBS_App2_Data_ReferenceCode does not exist in database PegaDATA From: (BDAADD8199AD22E168FB8424EBDB13AE0) at com.pega.pegarules.deploy.internal.loaders.SaverLoader.importContents(SaverLoader.java:488)
UBS
US
Hi Kevin,
We were able to get DDL from the zip file that we used to import into QA env(Import Wizard allows to do manula deployment).
So zip contains the DDL.
Are we misisng anything?
Pegasystems Inc.
US
Does your DDL include creation the missing table in the error stack? If not, the zip file needs to be reviewed. If yes, have you applied the DDL manually. Go to database schema to check if the table is actually there under PEGADATA schema?
UBS
US
Yes, DDL has those tables listed and via Import wizard Pega is not able to run those. An dit gave warning as i mentione dearlier in screen shot. So we went through Manual route and Genearted DDL from wizard and Ran it manually . Once done, we ran import again and it was a success.
Issue: What UI is not able to RUN Create Table script. ? WHich account is used in creating table here.
UBS
US
Just to add more !!
We are using 1 user pega as an admin (dual user) with Permission on Schema Pegadata and Pegarules.
And user Pegadata which has permisson(Insert update, delete) on Pegadata and pegarules.
UBS
US
Can some one please provide an update.
Pegasystems Inc.
US
When tried to Import rules zip file from Pega UI, we see a warning that SchemaImport privilege must be provided and Data-Admin-System-Settings database/AutoDBSchemaChanges must be set to true to apply schema changes automatically.
What operator are you logged in with trying to do the import? If you have confirmed that the DSS is set then have you confirmed that the operator you are trying to run the import with has the SchemaImport privilege? Try with [email protected] as it will have the privilege. You haven't even gotten to the point where the privileges of the database user is important. This error is about the privileges of the pega operator.
UBS
US
I am logged in with [email protected] .DSS has 2 users, Admin and Base user. Admin user has all the Privileges listed in the Document. Which user from DSS is used while doing import?
Pegasystems Inc.
US
What is the production level of this system?
UBS
US
This is our QA env.
Pegasystems Inc.
US
If you select Designer Studio -> System -> Operations -> System Information you will see a field which specifies your system level as a number. What number does it say?
UBS
US
Its 3
Pegasystems Inc.
US
If you look at the privileges in the PegaRULES:SysAdm4 role that [email protected] has the SchemaImport privilege is only available for production level 2 or lower. If you want to be able to automatically import into a production level 3 environment then you will need to modify the role of the operator who is doing the import to have this privilege at level 3.
UBS
US
How can modfiy that privileges to level 3? Can you please list down steps.
Pegasystems Inc.
US
See this article.
UBS
US
Does it have to be at application level?
Is it possible to use [email protected] to do import for all the subsequent Imports. ?
UBS
US
Hi Celeste,
While trying to modify administrative privileges and creating new role, no ruleset versions are available to select in Context field as per attachment. Followed below article:
Pegasystems Inc.
US
You need to be doing this as an operator that actually has access to an open ruleset in your application to create the new access role.
UBS
US
Hi Celeste,
We are Connfused here.
what is the need for Admin then? We login to Pega with admin user and that user should be able to import any rules.
Does tha mean we have to do same for multiple application , cerate multiple Roles,?
Cannot we have one user (admin) who can do import ?
Pegasystems Inc.
US
The admin user can import any rules. It is the automatic changes to the database schema which cannot be done in higher production levels by default. By design the privileges setup for [email protected] do not allow for automatic schema changes being applied in environments where the production level is higher than development. If you want to use this operator as is for your imports in production levels 3 to 5 then you would need to download the DDL to apply it and then continue on with importing the rest of the RAP.
If you want to be able to automatically apply schema changes at any production level then you need to create an application-specific role that contains the updated privileges and then assign that role to administrator access groups. If you define the role in an ruleset that all of you applications can see then you could use the same role/admin user for all of your imports.
Societe Generale SA
FR
I am looking for the best practice for Importing to production.
Starting point : First deployment to prod.
Approach 1:
1) In Dev Env. with prod level >= 2, create an app specific admin with level 5 for SchemaImport and ViewAndOptimizeSchema privelage.
2) Setup server with Pega rules in production.
3) Login with [email protected].
4) Import the app RAP.
5) Submit the import with errors (Due to schema changes DDLs)
6) Login with app specific admin.
7) Re-import the RAP.
Use the app specific admin for further releases.
Approach 2:
1) Disable database/AutoDBSchemaChanges in all enviroments.
2) For each prod release, manually run all queries.
Approach 3:
1) Setup server with Pega rules in production.
2) Login with [email protected].
3) Import the app RAP.
4) Take the failed queries and run them on DB seperately.
Approach 4:
1) Setup server with Pega rules in production with Prod level=2.
3) Login with [email protected].
4) Import the app RAP.
5) Change DSS fieldtypechange/productionlevel= 5.
Let me know your thoughs!
I am looking for the best practice for Importing to production.
Starting point : First deployment to prod.
Approach 1:
1) In Dev Env. with prod level >= 2, create an app specific admin with level 5 for SchemaImport and ViewAndOptimizeSchema privelage.
2) Setup server with Pega rules in production.
3) Login with [email protected].
4) Import the app RAP.
5) Submit the import with errors (Due to schema changes DDLs)
6) Login with app specific admin.
7) Re-import the RAP.
Use the app specific admin for further releases.
Approach 2:
1) Disable database/AutoDBSchemaChanges in all enviroments.
2) For each prod release, manually run all queries.
Approach 3:
1) Setup server with Pega rules in production.
2) Login with [email protected].
3) Import the app RAP.
4) Take the failed queries and run them on DB seperately.
Approach 4:
1) Setup server with Pega rules in production with Prod level=2.
3) Login with [email protected].
4) Import the app RAP.
5) Change DSS fieldtypechange/productionlevel= 5.
Let me know your thoughs!
This comment has been branched out as a new node and the new thread can be followed here
Pegasystems Inc.
IN
Hello!
In order to get more visibility for your question, we have created a new post for you. Please update that post and continue the discussion!
Looking for best practices for Importing to production
Regards,
Lochan | Community Moderator | Pegasystems Inc.