Solutions
ID: | S142262 | |
Published: | 07 September 2017 | |
Updated: | 07 December 2017 |
Operating System(s)
- All Unix
- All Windows
Product(s)
- Deployment Automation
Description
If you want to use a SQL Client client to run reports for Deployment Automation, you can execute the provided DDL scripts to create the database views.
Before attempting to create the views, ensure you have the ddl file that has the SQL statements to create the views as follows:
- Navigate to the da\WEB-INF\install\database\view folder. The default path is:
C:\Program Files\Micro Focus\common\tomcat\8.5\webapps\da\WEB-INF\install\database\view
- In the folder for your DBMS, such as sqlserver or oracle, you will see file named view-schema.ddl. This file contains the SQL commands to create the following views:
view_app_proc_requests
view_comp_proc_requests
Resolution
To create the SQL Views, execute the ddl to create the views in your database according to the steps required for your DBMS.
For Oracle and SQL Server view the Serena Central Blog Post.
For example, for Derby, use the following steps:
- Open a command line window (cmd) and ensure that Java is in the path. For example:
set PATH=c:\Program Files\Micro Focus\common\jre\8.0\bin;%PATH%
- Set the class path to include the Derby jar files, so that you can later run the ddl script. For example:
Set CLASSPATH="c:\Program Files\Micro Focus\common\tomcat\8.5\webapps\da\WEB-INF\lib\derby-10.8.2.2.jar;c:\Program Files\Micro Focus\common\tomcat\8.5\webapps\da\WEB-INF\lib\derbyclient-10.8.2.2.jar;c:\Program Files\Micro Focus\common\tomcat\8.5\webapps\da\WEB-INF\lib\derbytools-10.8.2.2.jar"
- Invoke the Derby client:
java org.apache.derby.tools.ij
The command prompt will change to "ij>".
- Connect to the database using the JDBC connector. For example:
ij> connect 'jdbc:derby://hostname:11377/data';
Make sure to change hostname to your hostname.
- We need to use the Deployment Automation schema. For example:
ij> set current schema da_user;
Make sure to replace da_user the user name for your schema.
- Execute the DDL script that creates the views. For example:
ij> run 'c:\Program Files\Micro Focus\common\tomcat\8.5\webapps\da\WEB-INF\install\database\view\derby\view-schema.ddl';
- The client will respond with the following for each view:
0 rows inserted/updated/deleted
The views should now be in the database and you can query them using SQL commands.
To verify the views are there, use the following statements:
select * from view_app_proc_requests;
select * from view_comp_proc_requests;
For more information, view the Serena Central Blog Post.