Creating project from ALC fails
search cancel

Creating project from ALC fails

book

Article ID: 135423

calendar_today

Updated On:

Products

Application Lifecycle Conductor

Issue/Introduction

When you create an ALC project, you could have the following error:


purescm.vegas.client.exceptions.VegasViewFatalException: purescm.vegas.client.exceptions.VegasViewFatalException: purescm.vegas.engine.exceptions.RuleException: Error executing rule ID 3190 - Create Application Valid Value List: StatementCallback; bad SQL grammar [select environmentname from harenvironment where envisactive = 'Y' and envobjid <> 0 order by environmentname]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist


The name of the table is related to the product that you have the integration, in this case is a harvest integration.

Environment

Release : 3.0

Component : CA APPLICATION LIFECYCLE CONDUCTOR

Cause

The read-only user does not have access to the harvest database, the read-only user needs synonyms to access the database.


Resolution

You can create synonyms using this script 


declare

  usrnm varchar2(100) := 'harvest';                                           ----->Database Owner

  repnm varchar2(100) := 'vegasread';                                      ------> ALC Read-Only User

  cursor tbls is

    select * from all_tables where owner = upper(usrnm);

  cursor vws is

    select * from all_views where owner = upper(usrnm);

begin

  for tbl in tbls loop

    execute immediate 'grant select on ' || usrnm || '.' || tbl.table_name || ' to ' || repnm;

    execute immediate 'create or replace synonym ' || repnm || '.' || tbl.table_name || ' for ' || usrnm || '.' || tbl.table_name;

  end loop;

  for vw in vws loop

    execute immediate 'grant select on ' || usrnm || '.' || vw.view_name || ' to ' || repnm;

    execute immediate 'create or replace synonym ' || repnm || '.' || vw.view_name || ' for ' || usrnm || '.' || vw.view_name;

  end loop;

end;