Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all 1640 articles
Browse latest View live

Upgrade Classic Extract to Integrated Capture in Oracle Goldengate

$
0
0
Upgrade Classic Extract to Integrated Capture

1. Upgrading Classic Capture

EXTRACT EXT1
USERID ggsuser, 'PASSWORD' ggsuser
EXTTRAIL /u01/app/gghome/dirdat/xn
TRANLOGOPTIONS EXCLUDEUSER ggsuser
TABLE user1.*;


2.Add and Register the Extract
From GGSCI add the extract process.

ADD EXTRACT EXT1, TRANLOG, BEGIN NOW
ADD EXTTRAIL /u01/app/gghome/dirdat/xn EXTRACT EXT1, megabytes 100

3.Then register the extract process in the database.

GGSCI (ggsdb01) 6> dblogin USERID ggsuser, PASSWORD ggsuser
Successfully logged into VST database.

GGSCI (ggsdb01) 7> register extract EXT1 database
2018-01-24 11:01:32 INFO OGG-02003 Extract EXT1 successfully registered with database at SCN 293836.

Note: It takes a while to register.

4. Upgrade Classic Extract to Integrated Capture
Try upgrading the registered process. An error will be returned.

GGSCI (ggsdb01) 3> info EXT1 upgrade
ERROR: Extract EXT1 is not ready to be upgraded because recovery SCN 293631 has not reached SCN 293836.

5. Reset to the process to the current SCN as it is not able to start after the upgrade with it still positioned to a point in the past.

GGSCI (ggsdb01) 5> alter extract EXT1, integrated tranlog, begin now
EXTRACT altered.

GGSCI (ggsdb01) 6> start EXT1
Sending START request to MANAGER ...
EXTRACT EXT1 starting

6. Verify the status of the Extract.

GGSCI (ggsdb01) 8> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:03 00:00:00

7. Upgrade to Integrated Capture

GGSCI (ggsdb01) 9> info EXT1 upgrade
ERROR: Extract EXT1 is not ready to be upgraded because recovery SCN values are not set.
Reset Extract SCN
So all that needs to be done is restart the process for it to update the extract to the new SCN number.

GGSCI (ggsdb01) 11> info EXT1
EXTRACT EXT1 Last Started 2018-01-24 11:20 Status RUNNING

Checkpoint Lag 00:00:39 (updated 00:00:06 ago)
Log Read Checkpoint Oracle Redo Logs
2018-01-24 11:19:39 Seqno 502, RBA 28160
SCN 0.0 (0) <

Wait a little while for the till SCN 0.0 (0) value to be updated. Then verify the status again.

GGSCI (ggsdb01) 14> info EXT1
EXTRACT EXT1 Last Started 2018-01-24 11:20 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:07 ago)
Log Read Checkpoint Oracle Redo Logs
2018-01-24 11:19:56 Seqno 503, RBA 1024
SCN 0.344145451 (344145451)

GGSCI (ggsdb01) 23> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:01:29 00:00:17


Tune TCPBUFSIZE and TCPFLUSHBYTES parameters in oracle Goldengate

$
0
0
Tune TCPBUFSIZE and TCPFLUSHBYTES parameters.

The two RMTHOST parameters, TCPBUFSIZE and TCPFLUSHBYTES, are very useful for increasing the buffer sizes and network packets sent by Data Pump over the network from the source to the target system. This is especially beneficial for high latency networks.
It is recommended that you set these parameters to an initial value of 1MB (1,048,576 bytes) or the calculated value, whichever is larger.

To determine a suitable value, perform the following steps:

a. Use the ping command to obtain the average round trip time (RTT).
For example: % ping ggsource.doyensys.com Pinging ggsource.doyensys.com [192.168.1.171] with 32 bytes of data: Reply from 192.168.1.171: bytes=32 time=31ms TTL=56 Reply from 192.168.1.117: bytes=32 time=61ms TTL=56 Reply from 192.168.1.117: bytes=32 time=32ms TTL=56 Reply from 192.168.1.117: bytes=32 time=34ms TTL=56 Ping statistics for 192.168.1.117: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 31ms, Maximum = 61ms, Average = 39ms

b. Calculate the bandwidth-delay product (BDP).
For example, if the network between the source and target databases is 155 megabits per second (Mbits) and the latency is 39ms the calculation would be as follows: BDP = (155,000,000 / 8) * 0.039 = 755,625bytes

c. Multiply the result by 3 to determine 3xBDP.
For example: 3xBDP = 755,625 x 3 = 2,266,875
In this example, because the result is more than 1MB, set the values of TCPBUFSIZE and TCPFLUSHBYTES to 2,266,875.
The parameters are set in the Data Pump parameter file. For example: RMTHOST target, MGRPORT 7809, TCPBUFSIZE 2266875, TCPFLUSHBYTES 2266875
The maximum socket buffer size for non-Windows systems is usually limited by default.

ADD CREDENTIALSTORE on Goldengate 12c

$
0
0
ADD CREDENTIALSTORE goldengate 12c


The ADD CREDENTIALSTORE is a new command in Oracle GoldenGate 12c and the default location of the credential store is “$GG_HOME/dircrd” directory of the GoldenGate software home.

Let’s add a user to credential store

GGSCI (ggsource.doyensys.com) 3> DBLOGIN USERID gguser, PASSWORD xxxxx
Successfully logged into database.

GGSCI (ggsource.doyensys.com ) 4> ADD CREDENTIALSTORE

Credential store created in ./dircrd/.

GGSCI (ggsource.doyensys.com ) 5> ALTER CREDENTIALSTORE ADD USER gguser ALIAS gguser
Password:

Credential store in ./dircrd/ altered.

Now check the login with newly created alias name……..

GGSCI (ggsource.doyensys.com ) 6> dblogin useridalias gguser
Successfully logged into database.

$ cd /u01/app/gghome/dircrd
$ ls -lrth
total 4.0K
-rw-r----- 1 oracle dba 517 Feb 22 22:55 cwallet.sso

From above we can see that Auto Login wallet has been created

To verify:

GGSCI (ggsource.doyensys.com) 1>  INFO CREDENTIALSTORE

Reading from ./dircrd/:

Default domain: OracleGoldenGate

  Alias: gguser
  Userid: gguser


GGSCI (ggsource.doyensys.com ) 1> edit params mgr
PORT 7809
USERIDALIAS gguser
PURGEOLDEXTRACTS /u01/app/gghome/dirdat, USECHECKPOINTS



UPDATE Password:

If we want to change the passwords on regular basis due to security then our Extract/pump/replicat will go ABENDED so when ever we change the password for gguser then we also need to update the credentialstore password.

if password modified then perform below steps to update:

GGSCI (ggsource.doyensys.com) 1> dblogin useridalias gguser
ERROR: Unable to connect to database using user gguser. Please check privileges.
Unable to initialize database connection because of error ORA-01017: invalid username/password; logon denied.

GGSCI (ggsource.doyensys.com) 2> alter credentialstore replace user gguser alias gguser
Password:

Credential store in ./dircrd/ altered.

GGSCI (ggsource.doyensys.com) 3> info credentialstore

Reading from ./dircrd/:

Default domain: OracleGoldenGate

  Alias: gguser
  Userid: gguser

GGSCI (ggsource.doyensys.com) 4> dblogin useridalias gguser
Successfully logged into database.

Configure the Streams pool for integrated replication on Goldengate

$
0
0
Configure the Streams pool for integrated replication in Goldengate:

When using integrated Replicat the Streams pool must be configured.
If using non-integrated Replicat the Streams pool is not necessary.

The size requirement of the Streams pool for integrated Replicat is based on a single parameter, MAX_SGA_SIZE. The MAX_SGA_SIZE parameter defaults to INFINITE which allows the Replicat process to use as much of the Streams pool as possible. Oracle does not recommend setting the MAX_SGA_SIZE parameter.


Set the STREAMS_POOL_SIZE initialization parameter for the database to the following value:
(1GB * # of integrated Replicats) + 25% head room
For example, on a system with one integrated Replicat process the calculation would be as follows:
(1GB * 1) * 1.25 = 1.25GB STREAMS_POOL_SIZE = 1280M

For example, on a system with two integrated Replicat process the calculation would be as follows:
(1GB * 2) * 1.25 = 2.25GB STREAMS_POOL_SIZE = 2560M


How to create Database File System DBFS

$
0
0
Creating a File System
Create a tablespace to hold the file system.

CONN / AS SYSDBA

CREATE TABLESPACE dbfs
  DATAFILE '/u01/app/oracle/oradata/DB11G/dbfs01.dbf'
  SIZE 1M AUTOEXTEND ON NEXT 1M;
Create a user, grant DBFS_ROLE to the user and make sure it has a quota on the tablespace. Trying to create a file system from the SYS user fails, so it must be done via another user.

CONN / AS SYSDBA

CREATE USER user1 IDENTIFIED BY user1
  DEFAULT TABLESPACE dbfs QUOTA UNLIMITED ON dbfs;

GRANT CREATE SESSION, RESOURCE, CREATE TABLE, CREATE VIEW, CREATE PROCEDURE, DBFS_ROLE TO user1;
Create the file system in tablespace by running the "dbfs_create_filesystem.sql" script as the test user. The script accepts two parameters identifying the tablespace and file system name.

cd $ORACLE_HOME/rdbms/admin
sqlplus user1/user1

SQL> @dbfs_create_filesystem.sql dbfs staging_area
The script created a partitioned file system. Although Oracle consider this the best option from a performance and scalability perspective, it can have two drawbacks:

FUSE Installation**********************
In order to mount the DBFS we need to install the "Filesystem in Userspace" (FUSE) software. If you are not planning to mount the DBFS or you are running on an Non-Linux platform, this section is unnecessary. The FUSE software can be installed manually, from the OEL media or via Oracle's public yum server. If possible, use the Yum installation.

Yum FUSE Installation
Configure the server to point to Oracle's public yum repository. The instructions for this are available at "http://public-yum.oracle.com".

Next, install the kernel development package and the FUSE software. The kernel development package may already be present, in which case you will see a "Nothing to do" message.

# yum install kernel-devel fuse fuse-libs

Mounting a File System**********************
The dbfs_client tool is used to mount file systems on Linux servers. The usage is displayed if you call it without any parameters.

[oracle@source.doyensys.com admin]$
First we need to create a mount point with the necessary privileges as the "root" user.

# mkdir /mnt/dbfs
# chown oracle:oinstall /mnt/dbfs
Add a new library path and create symbolic links to the necessary libraries in the directory pointed to by the new library path. Depending on your installation the "libfuse.so.2" library may be in an alternative location.

# 12cR2

# echo "/usr/local/lib">> /etc/ld.so.conf.d/usr_local_lib.conf
# export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1
# ln -s $ORACLE_HOME/lib/libclntsh.so.12.1 /usr/local/lib/libclntsh.so.12.1
# ln -s $ORACLE_HOME/lib/libnnz12.so /usr/local/lib/libnnz12.so
# ln -s /lib64/libfuse.so.2 /usr/local/lib/libfuse.so.2
# ln -s /lib64/libfuse.so.2 /usr/local/lib/libfuse.so
# ldconfig
Edit the "/etc/fuse.conf" file, un-commenting the "user_allow_other" option. The contents should look like this.

# mount_max = 1000
user_allow_other
Loosen the permissions on the fusermount command.

# chmod +x /usr/bin/fusermount
Edit the file "/etc/abrt/abrt-action-save-package-data.conf" setting the following parameter.

ProcessUnpackaged = yes
Reboot the server.

# reboot
Make sure the "/usr/local/lib" directory is referenced in the LD_LIBRARY_PATH environment variable. You may want to add something like this to the profile for the "oracle" user, or any environment setup scripts.

$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

*************************************************************

The file system we've just created is mounted  following commands from the "oracle" OS user.

$ # Connection prompts for password and holds session.
$ dbfs_client user1@DB11G /mnt/dbfs

Increasing Performance by Splitting Replication Loads on Goldengate

$
0
0
Steps for performing - Increasing Performance by Splitting Replication Loads 

On Source

[oracle@ggsource.doyensys.com sqlscripts]$ echo $ORACLE_SID
ggsource

[oracle@ggsource.doyensys.com sqlscripts]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Jan 17 04:25:55 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt ions

SQL> connect user1/user1
Connected.
SQL> @range_split.sql
DROP TABLE range_split
*
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.

SQL> @populate_range_split.sql
Procedure created.

GGSCI (ggsource.doyensys.com) 2> dblogin useridalias ggsource
Successfully logged into database.

GGSCI (ggsource.doyensys.com) 3> add trandata user1.range_split
Logging of supplemental redo data enabled for table user1.RANGE_SPLIT.
TRANDATA for scheduling columns has been added on table 'user1.RANGE_SPLIT '.

GGSCI (ggsource.doyensys.com) 4> info trandata user1.r*
Logging of supplemental redo log data is enabled for table user1.RANGE_SPL IT.
Columns supplementally logged for table user1.RANGE_SPLIT: ROW_ID.

GGSCI (ggsource.doyensys.com) 1> edit params defsrc
DefsFile /u01/app/source/dirdef/rangesplit.def, Purge
UserIDAlias ggsource
Table user1.RANGE_SPLIT;

[oracle@ggsource.doyensys.com source]$ ./defgen paramfile /u01/app/source/dirprm/defsrc.prm
***********************************************************************
** Running with the following parameters **
***********************************************************************
DefsFile /u01/app/source/dirdef/rangesplit.def, Purge
UserIDAlias ggsource
Table user1.RANGE_SPLIT;
Retrieving definition for user1.RANGE_SPLIT.
Definitions generated for 1 table in /u01/app/source/dirdef/rangesplit.def.

[oracle@ggsource.doyensys.com dirdef]$ cp rangesplit.def /u01/app/target/dirdef/

On Target

[oracle@ggtarget.doyensys.com sqlscripts]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Jan 17 04:46:48 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> connect user1/user1
Connected.
SQL> @range_split.sql
DROP TABLE range_split
*
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.
SQL>

On Source

GGSCI (ggsource.doyensys.com) 1> edit params pump1
Extract pump1
UserIDAlias ggsource
RmtHost 192.168.1.35, MgrPort 7810
RmtTrail /u01/app/target/dirdat/ea
Table user1.RANGE_SPLIT, Filter (@RANGE (1, 3));

GGSCI (ggsource.doyensys.com) 2> edit params pump2
Extract pump2
UserIDAlias ggsource
RmtHost 192.168.1.35, MgrPort 7810
RmtTrail /u01/app/target/dirdat/eb
Table user1.RANGE_SPLIT, Filter (@RANGE (2, 3));

GGSCI (ggsource.doyensys.com) 2> edit params pump3
Extract pump3
UserIDAlias ggsource
RmtHost 192.168.1.35, MgrPort 7810
RmtTrail /u01/app/target/dirdat/ec
Table user1.RANGE_SPLIT, Filter (@RANGE (3, 3));

GGSCI (ggsource.doyensys.com) 4> add extract pump1, tranlog, begin now
EXTRACT added.
GGSCI (ggsource.doyensys.com) 10> add extract pump2, tranlog, begin now
EXTRACT added.
GGSCI (ggsource.doyensys.com) 11> add extract pump3, tranlog, begin now
EXTRACT added.
GGSCI (ggsource.doyensys.com) 7> add rmttrail /u01/app/target/dirdat/ea,extract pump1
RMTTRAIL added.
GGSCI (ggsource.doyensys.com) 12> add rmttrail /u01/app/target/dirdat/eb,extract pump2
RMTTRAIL added.
GGSCI (ggsource.doyensys.com) 13> add rmttrail /u01/app/target/dirdat/ec,extract pump3
RMTTRAIL added.
GGSCI (ggsource.doyensys.com) 17> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED pump1 00:00:00 00:06:17
EXTRACT STOPPED pump2 00:00:00 00:03:50
EXTRACT STOPPED pump3 00:00:00 00:03:41

On Target

GGSCI (ggtarget.doyensys.com) 2> edit params rep1
Replicat rep1
UserIDAlias ggtarget
SourceDefs /u01/app/target/dirdef/rangesplit.def
DiscardFile /u01/app/target/dirrpt/rep1.dsc, Append
Map user1.RANGE_SPLIT, Target user1.RANGE_SPLIT;

GGSCI (ggtarget.doyensys.com) 3> edit params rep2
Replicat rep2
UserIDAlias ggtarget
SourceDefs /u01/app/target/dirdef/rangesplit.def
DiscardFile ./u01/app/target/dirrpt/rep2.dsc, Append
Map user1.RANGE_SPLIT, Target user1.RANGE_SPLIT;

GGSCI (ggtarget.doyensys.com) 4> edit params rep3
Replicat rep3
UserIDAlias ggtarget
SourceDefs /u01/app/target/dirdef/rangesplit.def
DiscardFile ./u01/app/target/dirrpt/rep3.dsc, Append
Map user1.RANGE_SPLIT, Target user1.RANGE_SPLIT;

GGSCI (ggsource.doyensys.com) 7> add replicat rep1,exttrail /u01/app/target/dirdat/ea, checkpointtable ggate.chkptab
REPLICAT added.
GGSCI (ggsource.doyensys.com) 9> add replicat rep2,exttrail /u01/app/target/dirdat/eb, checkpointtable ggate.chkptab
REPLICAT added.
GGSCI (ggsource.doyensys.com) 10> add replicat rep3,exttrail /u01/app/target/dirdat/ec, checkpointtable ggate.chkptab
REPLICAT added.

On Source

GGSCI (ggsource.doyensys.com) 2> start pu*
Sending START request to MANAGER ...
EXTRACT pump1 starting
Sending START request to MANAGER ...
EXTRACT pump2 starting
Sending START request to MANAGER ...
EXTRACT pump3 starting
GGSCI (ggsource.doyensys.com) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED EFUNCS 00:00:00 01:44:29
EXTRACT RUNNING pump1 00:00:00 01:01:21
EXTRACT RUNNING pump2 00:00:00 00:58:53
EXTRACT RUNNING pump3 00:00:00 00:58:44
EXTRACT STOPPED ETTOKEN 00:00:00 41:10:43
EXTRACT ABENDED EXT1 00:00:10 645:45:12
EXTRACT ABENDED EXT2 00:00:09 32:42:02
EXTRACT ABENDED OCCEXT 00:00:00 204:43:33
EXTRACT STOPPED PFUNCA 00:00:00 01:44:34
EXTRACT STOPPED PFUNCS 00:00:00 01:44:21

On Target

GGSCI (ggtarget.doyensys.com) 12> start rep*
Sending START request to MANAGER ...
REPLICAT rep1 starting
Sending START request to MANAGER ...
REPLICAT rep2 starting
Sending START request to MANAGER ...
REPLICAT rep3 starting

GGSCI (ggtarget.doyensys.com) 29> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING rep1 00:00:00 00:00:05
REPLICAT RUNNING rep2 00:00:00 00:00:04
REPLICAT RUNNING rep3 00:00:00 00:00:02

On Source

Connect to source database with user1 user schema
SQL> connect user1/user1
Connected.
SQL> exec populate_range_split(500000,1000);

GGSCI (ggsource.doyensys.com) 2> stats extract pump1
Sending STATS request to EXTRACT pump1 ...
Start of Statistics at 2018-04-17 06:15:08.
Output to /u01/app/target/dirdat/ea:
Extracting from user1.RANGE_SPLIT to user1.RANGE_SPLIT:

*** Total statistics since 2018-04-17 06:13:19 ***
Total inserts 36523.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 36523.00

GGSCI (ggsource.doyensys.com) 3> stats extract pump2
Sending STATS request to EXTRACT pump2 ...
Start of Statistics at 2018-04-17 06:15:29.
Output to /u01/app/target/dirdat/ea:
Extracting from user1.RANGE_SPLIT to user1.RANGE_SPLIT:

*** Total statistics since 2018-04-17 06:13:19 ***
Total inserts 43180.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 43180.00

GGSCI (ggsource.doyensys.com) 4> stats extract pump3
Sending STATS request to EXTRACT pump3 ...
Start of Statistics at 2018-04-17 06:15:40.
Output to /u01/app/target/dirdat/eb:
Extracting from user1.RANGE_SPLIT to user1.RANGE_SPLIT:

*** Total statistics since 2018-04-17 06:13:19 ***
Total inserts 46115.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 46115.00

On Target

Check stats of all replicat in target
GGSCI (ggsource.doyensys.com) 40> stats replicat rep1
GGSCI (ggsource.doyensys.com) 41> stats replicat rep2
GGSCI (ggsource.doyensys.com) 42> stats replicat rep3

Replicat Abending with Mapping Error and Discard File Shows Missing Key Columns

$
0
0
Replicat Abending with Mapping Error and Discard File Shows Missing Key Columns

Source table :
create table user1 (empid number not null PRIMARY KEY, empname varchar2(10), dept varchar2(10));

Target table :
create table user1 (empid number not null, empname varchar2(10), dept varchar2(10));

In this case extract will consider empid as key column. There are no primary or unique key defined on target table, so replicat will consider all the columns as key columns.

If an update operation occurs on source, Extract will log only the changed column and the primary key column provided trandata was enabled on source table.

Replicat when processing the update operation will abend with error in mapping and discard file will show like the following


key column empname (1) is missing
key column dept (2) is missing


This is because if there are no primary key or unique key or PK constraint may be disabled or not validated replicat will consider all the columns as key columns).



The best thing is to add same set of primary key or unique key on both source and target tables.

However, as a workaround we can force the extract/replicat to use same columns as key columns using KEYCOLS parameter in the TABLE or MAP statement.

MAP <schema>.<table_name>, target <schema>.<table_name>, keycols (empid);



Anisble Installation on oracle linux 7

$
0
0
Step :1 Set EPEL repository
Ansible package is not available in the default yum repositories, so we will enable epel repository for Oracle Linux 7 using below commands
Step:2 Install Anisble using yum command

Once the installation is completed, check the ansible version :


Step:3 Setup keys based SSH authentication with Nodes.
Generate keys on the Ansible server and copy public key to the nodes.

Use ssh-copy-id command to copy public key of Ansible server to its nodes.




Step:4 Define the nodes or inventory of servers for Ansible.
File /etc/ansible/hosts‘ maintains the inventory of servers for Ansible

Step:5 Now try to run the Commands from Ansible Server.
Check the connectivity of test-servers’ or ansible nodes using ping

Executing Shell commands :
Example :1 Check the uptime of Ansible nodes

Example:2 Check Kernel Version of nodes

Example:3 Adding a user to the nodes


Example:4 Redirecting the output of command to a file





Ansible: Install and Configure Ansible Tower On oracle linux 7

$
0
0
Ansible: Install and Configure Ansible Tower On oracle linux 7


Ansible has two components: Ansible Core and Ansible Tower. Core provides the Ansible runtime that executes playbooks (yaml files defining tasks and roles) against inventories (group of hosts). Ansible Tower provides management, visibility, job scheduling credentials, RBAC, auditing / compliance.

Install Ansible Tower


Download latest Ansible Tower release.


Configure Setup.

Ansible Tower uses an Ansible playbook to deploy itself. As such configuration parameters or groupvars are stored in inventory file.


Example Inventory file


Example Inventory file for an external existing database


   Run setup


   Configure Ansible Tower

Ansible Tower Provides a RESTful API, CLI and UI. To connect to the UI simply open browser using http/https and point to your Ansible Tower IP or hostname.

https://<Ansible Tower IP or Hostname>

Setting Up and Using the Integration Repository Parser

$
0
0

Setting Up and Using the Integration Repository Parser
Installing Perl Modules on all UNIX platforms

Perform the following steps to install Perl modules on all UNIX platforms mentioned above:
1.    Establish the Oracle E-Business Suite application environment.
From the Oracle E-Business Suite APPS_BASE, establish the run file system APPL_TOP environment by running the EBSapps.env script.
2.    In both the run and patch file systems, locate the Perl configuration files that need to be modified and back up these files.
For example, on OEL 6 the Config.pm is located in the following directory:
find . -name Config.pm -print
/FMW_Home/webtier/perl/lib/5.10.0/x86_64-linux-thread-multi/Config.pm
Before Backup the config.pm and then do the changes:
cp -rp ./FMW_Home/webtier/perl/lib/5.10.0/x86_64-linux-thread-multi/Config.pm /tmp/

$FMW_HOME/webtier/perl/lib/5.10.0/x86_64-linux-thread-multi/Config.pm
3. In both the run and patch file systems, modify the Perl configuration file Config.pm to point to the Perl directory in $FMW_HOME/webtier.
For example, on Oracle Solaris, these are the statements that need to be modified with the absolute path of $FMW_HOME/webtier/perl:
Note: <FMW_HOME> is the value of $FMW_HOME.
archlibexp =>relocate_inc('<FMW_HOME>/webtier/perl/lib/5.10.0/x86_64-linux-thread-multi ')
privlibexp =>relocate_inc('<FMW_HOME>/webtier/perl/lib/5.10.0')
sitearchexp =>relocate_inc('<FMW_HOME>/webtier/perl/lib/site_perl/5.10.0/x86_64-linux-thread-multi ')
sitelibexp =>relocate_inc('<FMW_HOME>/webtier/perl/lib/site_perl/5.10.0')
Ex:
# tie returns the object, so the value returned to require will be true.
tie %Config, 'Config', {
    archlibexp => relocate_inc('/u01/install/APPS/fs1/FMW_Home/webtier/perl/lib/5.10.0/x86_64-linux-thread-multi'),
    archname => 'x86_64-linux-thread-multi',
    cc => 'cc',
    d_readlink => 'define',
    d_symlink => 'define',
    dlsrc => 'dl_dlopen.xs',
    dont_use_nlink => undef,
    exe_ext => '',
    inc_version_list => '',
    intsize => '4',
    ldlibpthname => 'LD_LIBRARY_PATH',
    libpth => '/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64',
    osname => 'linux',
    osvers => '2.6.9-34.0.1.0.11.elsmp',
    path_sep => ':',
    privlibexp => relocate_inc('/u01/install/APPS/fs1/FMW_Home/webtier/perl/lib/5.10.0'),
    scriptdir => '/u01/install/APPS/fs1/FMW_Home/webtier/perl/bin',
    sitearchexp => relocate_inc('/u01/install/APPS/fs1/FMW_Home/webtier/perl/lib/site_perl/5.10.0/x86_64-linux-thread-multi'),
    sitelibexp => relocate_inc('/u01/install/APPS/fs1/FMW_Home/webtier/perl/lib/site_perl/5.10.0'),
    useithreads => 'define',
    usevendorprefix => undef,
    version => '5.10.0',
};
4. Create a directory 'perl' in $APPL_TOP_NE where the new Perl modules will be installed. For example,
mkdir $APPL_TOP_NE/perl
chmod 755 $APPL_TOP_NE/perl
In the run file system, set the following environment variables in APPL_TOP environment:
  1. Prepend PATH with the path to the C compiler installed as a requirement of the Integration Repository Parser.
  2. Prepend PERL5LIB with $FND_TOP/perl and $APPL_TOP_NE/perl in that order.
For example, export PERL5LIB=$FND_TOP/perl:$APPL_TOP_NE/perl:$PERL5LIB.
  1. Add $FMW_HOME/webtier/lib to LIBPATH if it is not present.
For example, export LIBPATH=$LIBPATH:$FMW_HOME/webtier/lib.
  1. Set $FMW_HOME/webtier as ORACLE_HOME.
For example, export ORACLE_HOME=$FMW_HOME/webtier.
  1. Prepend LD_LIBRARY_PATH with $ORACLE_HOME/lib32 and $ORACLE_HOME/lib.
For example, export LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:$LD_LIBRARY_PATH.
  1. Set JAVA_HOME to the JDK top directory.
Obtain the path returned by 'which java' and set JAVA_HOME to the current JDK top directory.
For example, on Oracle Linux:
which java
          /u01/install/APPS/fs1/EBSapps/comn/util/jdk32/jre/bin/java
export JAVA_HOME=/prod/EBS122/fs1/FMW_Home/jdk









Creating a Custom Application in Oracle E-Business Suite Release 12.2

$
0
0

Step 1: Create A Custom Application Using AD Splice
  1. Download Patch 3636980 "Support Diagnostics (IZU) patch for AD Splice" from My Oracle Support.
  2. Manually copy the three .txt files from the 3636980\izu\admin directory to your own temporary directory.
  3. Rename izuprod.txt to <CUSTOM MODULE>prod.txt. In this example, we will be using "xxmzprod.txt".
  4. Rename izterr.txt to <CUSTOM MODULE>terr.txt. In this example, we will be using "xxmzterr.txt".
Ex:
Rename izuterr.txt to xxerpterr.txt
and         izuprod.txt to xxerpprod.txt
5. Change the details in the newprods.txt so that all references of "izu" to and all references of "IZU" to (i.e. keep the case sensitivity).
Ex:
In this example case, the modified version of this file will look like the following:
product=xxerp
base_product_top= *APPL_TOP*
oracle_schema=xxerp
sizing_factor=100
main_tspace= USER_DATA
index_tspace=USER_IDX
temp_tspace=TEMP
default_tspace= USER_DATA


6. We then create a  tablespace. In our example our tablespace name will be TSXXST
Note: Custom data and index tablespaces are defaulted to APPS_TX_TX_DATA and APPS_TS_TX_IDX.

7.After we create the tablespace, we continue with the user creation. We add the required privileges so that this use can work
Ex:
CREATE USER XXERP
  IDENTIFIED BY xxerp
  DEFAULT TABLESPACE XXERP
  TEMPORARY TABLESPACE TEMP
  PROFILE DEFAULT
  ACCOUNT UNLOCK;
    -- 1 Role for XXERP 
  GRANT CONNECT TO XXERP;
  ALTER USER XXERP DEFAULT ROLE ALL;
    -- 13 System Privileges for XXERP 
  GRANT ALTER ANY OUTLINE TO XXERP;
  GRANT ALTER SESSION TO XXERP;
  GRANT ANALYZE ANY TO XXERP;
  GRANT CREATE ANY OUTLINE TO XXERP;
  GRANT CREATE CLUSTER TO XXERP;
  GRANT CREATE MATERIALIZED VIEW TO XXERP;
  GRANT CREATE SEQUENCE TO XXERP;
  GRANT CREATE SESSION TO XXERP;
  GRANT CREATE TABLE TO XXERP;
  GRANT CREATE TRIGGER TO XXERP;
  GRANT CREATE TYPE TO XXERP;
  GRANT DROP ANY OUTLINE TO XXERP;
  GRANT QUERY REWRITE TO XXERP;
  
  ALTER USER XXERP QUOTA UNLIMITED ON XXERP;
Change all references to prodid 278 to your own application ID.

If you are upgrading, and the custom application already exists in the database, you should specify the same application ID. If you are performing a new installation, choose a number above 50,000 that is not already in use.

You can run the following SQL to find out if your selected custom application ID number is available:
SQL>select decode(count ,0, 'Selected number is available', 'Selected number is already in use') Status, &&enter_custom_applID selected_number
from
(
select count(*) as count from
(
select 'x' from fnd_oracle_userid
where oracle_id= &&enter_custom_applID
union
select 'x' from fnd_application
where application_id= &&enter_custom_applID
)
);
Note: This example will use a prodid of 50001.

8.Open xxmzterr.txt in a text editor.
  1. Change all references of "izu" to <custom module> and all references of "IZU" to <CUSTOM MODULE> (keeping the case sensitivity).
  2. Note: In this example, references to "izu" will to changed to "xxerp", and references to "IZU" will be changed to "XXERP".
  3. Copy the following text files to the $APPL_TOP/admin directory:
    1. xxmzprod.txt
    2. xxmzterr.txt
    3. newprods.txt
9.Change directory to the admin directory under $APPL_TOP

10.Run AD Splice

Note: In Oracle E-Business Suite Release 12.2, AD Splice first makes the new user edition-enabled, and then enables Edition-Based Redefinition (EBR) for the custom objects.

AD Splice must be run from the admin directory under APPL_TOP, and is invoked by running the command:

$ adsplice

When prompted for the following, you can press Enter to accept the default location:
Enter the directory where your AD Splicer control file is located.
The default directory is [/oracle/VIS/apps/apps_st/appl/admin] :
When prompted for the following, you can press Enter to accept the default filename:
Please enter the name of your AD Splicer control file [newprods.txt] :
When prompted for the following, you can press Enter to accept the default value and regenerate the environment file:
Do you wish to regenerate your environment file [Yes] ?
AutoConfig will be run automatically as part of this procedure.


  1. Review the AD Splice log file to ensure the procedure completed successfully.
  2. Review the AutoConfig log file to ensure the procedure completed successfully.
Verify Creation of Custom Product in the Database

Log in to SQL*Plus as APPS, and run the following SQL to confirm that the fnd_application table has one row:
SQL>select * from fnd_application where application_short_name = 'XXERP';
This statement should return one row only.
Run the following SQL to check the product installations table has one row for your custom product:
SQL>select * from fnd_product_installations where APPLICATION_ID = 50001;
This statement should return one row only.
Run the following SQL to check the database user:
SQL>select * from dba_users where username = 'XXERP';
This statement should return one row only.
To ensure the new environment file is picked up, log out and back in again as applmgr, then run the following command to confirm the $XXERP_TOP variable is correctly set:
$ env | grep XXERP
Run the following command to check the file system has been created correctly. You should see a directory listing returned as shown:
$ ls $XXERP_TOP
admin log mesg out sql


REST your EBS data with Oracle RESTful Data Services (ORDS)

$
0
0

REST your EBS data with Oracle RESTful Data Services (ORDS)

1.Apex Installation:
Apex software version:apex_4.2.4.zip
Create a new tablespace to act as the default tablespace for APEX.
CREATE TABLESPACE apex DATAFILE '/u01/app/oracle/oradata/db11g/apex01.dbf'
  SIZE 100M AUTOEXTEND ON NEXT 1M;
cd /u01/apex
cp apex_4.2.4.zip /u01/apex
unzip apex_4.2.4.zip
cd apex
connect sqlplus
@apexins.sql APEX APEX TEMP /i/
Once complete, change the admin password by running the "apxchpwd.sql" scripts as the SYS user.

sql> @apxchpwd.sql

Create the APEX_LISTENER and APEX_REST_PUBLIC_USER users by running the "apex_rest_config.sql" script.
SQL> CONN / AS SYSDBA
SQL> @apex_rest_config.sql

2.ORDS Installation:
ords.2.0.10.289.08.09.zip
unzip ords.2.0.10.289.08.09.zip
java -jar ords.war configdir /u01/ORDS
java -jar ords.war
[oracle@dspl1225 ORDS]$ java -jar ords.war
Feb 27, 2018 5:01:31 AM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: /u01/ORDS/ords
Enter the name of the database server [localhost]:129.144.180.26
Enter the database listen port [1521]:
Enter 1 to specify the database service name, or 2 to specify the database SID [1]:2
Enter the database SID [xe]:EBSDB
Enter the database user name [APEX_PUBLIC_USER]:oracle$123
Enter the database password for oracle$123:[oracle@dspl1225 ORDS]$
[oracle@dspl1225 ORDS]$ java -jar ords.war
Feb 27, 2018 5:04:43 AM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: /u01/ORDS/ords
Enter the name of the database server [localhost]:129.144.180.26
Enter the database listen port [1521]:
Enter 1 to specify the database service name, or 2 to specify the database SID [1]:2
Enter the database SID [xe]:EBSDB
Enter the database user name [APEX_PUBLIC_USER]:
Enter the database password for APEX_PUBLIC_USER:
Confirm password:
Enter 1 to enter passwords for the RESTful Services database users (APEX_LISTENER,APEX_REST_PUBLIC_USER), 2 to use the same password as used for APEX_PUBLIC_USER or, 3 to skip this step [1]:1
Enter the database password for APEX_LISTENER:
Confirm password:
Enter the database password for APEX_REST_PUBLIC_USER:
Confirm password:
Feb 27, 2018 5:05:35 AM oracle.dbtools.common.config.file.ConfigurationFiles update
INFO: Updated configurations: defaults, apex, apex_al, apex_rt
Enter 1 if you wish to start in standalone mode or 2 to exit [1]:1

Static Image location need to give Apex images: /u01/apex/images

nohup java -jar ords.war &



Login to Apex Page:

1.Create Workspace and assign default schema as apps.
2.Login to workspace as you created .
Ex:
Workspace Name :Mobile
Username              : admin
Password               : XXXXXXXXX


3. Creating the Web Service
Navigation: SQL Workshop> RESTfulServices > Create

Source
SELECT hca.account_number,
  hp.party_name customer_name,
  hca.cust_account_id,
  hca.object_version_number cust_object_version_number,
  TO_CHAR(hca.creation_date,'mm/dd/yyyy') creation_date,
  hca.status,
  hca.customer_type,
  hca.customer_class_code,
  hca.sales_channel_code,
  hp.tax_reference,
  hp.address1,
  hp.address2,
  hp.city,
  hp.postal_code,
  hp.state,
  hp.object_version_number party_object_version_number
  FROM ar.hz_cust_accounts hca, ar.hz_parties hp
  WHERE hp.party_id = hca.party_id AND hca.account_number = :custnum

Set Bind Variables
Click TEST
 

 











ORA-27300: OS system dependent operation:semget failed with status: 28/ORA-27154: post/wait create failed

$
0
0
Issue:-

While starting the database we are facing below error

SQL> startup;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpcreates

Cause: internal error, multiple post/wait creates attempted simultaneously

Action: check errno and contact Oracle Support

The issue seems to be entirely related to kernel parameter settings. Since you are running that many instances, you should check your semaphores. My guess is you do not have enough semaphores allowed for creating more processes. You need to set the kernel parameter.

Here's what's recommended for Oracle databases:

Change the below parameter in OS level.

# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128

ADOP issue "Edit session is enabled in domain"

$
0
0
ISSUE:-

adpreclone.pl Fails on Applications Tier With Error Message "Edit session is enabled in domain"

perl adpreclone.pl appsTier

Copyright (c) 2011, 2014 Oracle Corporation
Redwood Shores, California, USA

Oracle E-Business Suite Rapid Clone

Version 12.2

adpreclone Version 120.31.12020000.18

Enter the APPS User Password:
Enter the Weblogic AdminServer password :

Checking the status of the Oracle WebLogic Administration Server....

Running perl <EBS_ROOT>/fs2/EBSapps/appl/ad/12.0.0/patch/115/bin/adProvisionEBS.pl ebs-get-serverstatus -contextfile=/u01/oracle/db/fs2/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml -servername=AdminServer -promptmsg=hide

The Oracle WebLogic Administration Server is up.

Running:
perl <EBS_ROOT>/fs2/EBSapps/appl/ad/12.0.0/bin/adclone.pl java=<EBS_ROOT>/fs2/EBSapps/comn/util/jdk64 mode=stage stage=<EBS_ROOT>/fs2/EBSapps/comn/clone component=appsTier method= appctx=/u01/oracle/db/fs2/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml showProgress

Setting the wls environment

Edit session is enabled in domain.Please activate all of your changes before proceed clone

ERROR while running perl <EBS_ROOT>/fs2/EBSapps/appl/ad/12.0.0/bin/adclone.pl java=<EBS_ROOT>/fs2/EBSapps/comn/util/jdk64 mode=stage stage=<EBS_ROOT>/fs2/EBSapps/comn/clone component=appsTier method= appctx=/u01/oracle/db/fs2/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml showProgress ...


CAUSE
In the Weblogic Console, Edit session is enabled in domain.  Hence, adpreclone.pl is unable to complete successfully.

SOLUTION
Execute the following steps to fix the issue:

a) Login to the WLS Console

b) Review the "Change Center" and click the "Release Configuration"

c) You should see the domain in "Lock & Edit" mode.

d) Re-run adpreclone on the Applications Tier.


Reference:

adpreclone.pl Fails on Applications Tier With Error Message "Edit session is enabled in domain" (Doc ID 2193759.1)

adop phase=prepare fails with: Error Message : ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

$
0
0
Issue:-

adop phase=prepare fails with: Error Message : ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Attempts to execute "adop phase=prepare" fail with the following error:

ERROR
-----------------------
  [EVENT] [END 2015/04/15 11:24:56] Generating ad_zd_logs before truncating
  [EVENT] [START 2015/04/15 11:24:56] Check and create Patch Edition (if required)
  [EVENT] [START 2015/04/15 11:24:56] Checking if Patch Edition already exists
  [EVENT] [END 2015/04/15 11:24:56] Check and create Patch Edition (if required)
  [EVENT] [START 2015/04/15 11:24:56] Performing steps to synchronise the FS
  [ERROR] Cannot connect to database
  [ERROR] Error Message : ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (DBD ERROR: OCIServerAttach)
  [ERROR] *** Error occurred while calling ad_zd_log. Please check log file for the details. ***
  [UNEXPECTED]Error while runPendingClone sub-routine is called
  [EVENT] [START 2015/04/15 11:24:58] Check and Stop patch FS Admin Server

CAUSE
The local_listener not set properly in the init.ora parameter file.

SOLUTION
To implement the solution test the following steps in a development instance and then migrate accordingly:

1. Ensure a valid backup exists before testing the solution.
2. Check if the local_listener is set incorrectly by using:

At the RDBMS HOME:
sqlplus / as sysdba
SQL>show parameter local_listener

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
local_listener                       string      VIS_LOCAL

In this scenario VIS is the SID used in this Environment
3. If the local listener value returned is incorrect, change it to the correct value in the init.ora parameter file.

4. Restart the Database tier and the listener.

5. Execute the "adop phase=prepare" again and confirm the error no longer occurs.

Reference:

adop phase=prepare fails with: Error Message : ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (Doc ID 2007225.1)

APPS.AD_ZD_ADOP Package becomes invalid and all ADOP sessions fail

$
0
0
Issue:

The APPS.AD_ZD_ADOP Package becomes invalid and all ADOP sessions fail.


Error:

Check ADOP status:


applprod@ebsapp01:~$ adop -status

Enter the APPS password:

==============================================================
ADOP (C.Delta.7)
Session Id: 55
Command: status
Output: /u01/PROD/fs_ne/EBSapps/log/status_20161115_112514/adzdshowstatus.out
===================================wo============================

File System Synchronization Type: Full
declare
*
ERROR at line 1:
ORA-04063: package body "APPS.AD_ZD_ADOP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APPS.AD_ZD_ADOP"
ORA-06512: at line 6

[STATEMENT] Please run adopscanlog utility, using the command

"adopscanlog -latest=yes"

to get the list of the log files along with snippet of the error message corresponding to each log file.

adop exiting with status = 1 (Fail)

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



Run ADOP Prepare Phase:


applprod@ebsapp01:~$ adop phase=prepare

Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:

Validating credentials.

Initializing.
Run Edition context : /u01/PROD/fs1/inst/apps/xxxx/appl/admin/xxxx.xml
Patch edition context: /u01/PROD/fs2/inst/apps/xxxx/appl/admin/xxxx.xml
Patch file system free space: 83.83 GB

Validating system setup.

[ERROR] Failed to execute SQL statement:
select AD_ZD_ADOP.GET_INVALID_NODES() from dual
[ERROR] Error Message:
[ERROR] ORA-04063: package body "APPS.AD_ZD_ADOP" has errors (DBD ERROR: OCIStmtExecute)
[UNEXPECTED]Error determining whether this is a multi-node instance

[STATEMENT] Please run adopscanlog utility, using the command

"adopscanlog -latest=yes"

to get the list of the log files along with snippet of the error message corresponding to each log file.

adop exiting with status = 2 (Fail)



Cause:
The SYS.DBMS_METADATA_UTIL object needs to be recompiled first before the APPS.AD_ZD_ADOP object can become valid.

Compile the APPS.AD_ZD_ADOP Package.



Solution:
Check the status of the object APPS.AD_ZD_ADOP

SQL> select owner,object_name,object_type from dba_objects where status='INVALID' and object_name like'%ADOP%';

OWNER OBJECT_NAME OBJECT_TYPE
------ ----------- -----------
APPS AD_ZD_ADOP PACKAGE BODY

Try to compile the package.

SQL> ALTER PACKAGE AD_ZD_ADOP COMPILE BODY;

Warning: Package Body altered with compilation errors.

SQL> show error
Errors for PACKAGE BODY AD_ZD_ADOP:

LINE/COL ERROR
-------- -----------------------------------------------------------------
2686/3 PL/SQL: Statement ignored
2686/7 PLS-00201: identifier 'SYS.DBMS_METADATA_UTIL' must be declared
==================

SQL> grant execute on DBMS_METADATA_UTIL to apps;

Grant succeeded.

SQL> alter package APPS.AD_ZD_ADOP compile body;

Package body altered.

SQL> show error
No errors.

Verify the Status of APPS.AD_ZD_ADOP package is valid.


Rerun the ADOP utility.


applprod@ebsapp01:~$ adop -status

Enter the APPS password:

==============================================================
ADOP (C.Delta.7)
Session Id: 55
Command: status
Output: /u01/PROD/fs_ne/EBSapps/log/status_20161115_121228/adzdshowstatus.out
===============================================================

File System Synchronization Type: Full

adop exiting with status = 0 (Success)
applprod@ebsapp01:~$

APP-FND-00690 Program Error 'The data that defines the flexfield on this field may be inconsistent'

$
0
0
Issue:-

APP-FND-00690 Program Error 'The data that defines the flexfield on this field may be inconsistent'

SYMPTOMS
When saving a transaction, the following error occurs:

APP-FND-00690: Program error: The data that defines the flexfield on this field may be inconsistent.

Inform your system administrator that the routine FND_FLEX_SERVER2.get_qualsegs() could not find any segments for the flexfield specified by Application ID = 140, Code = KEY# and structure number = 101


CAUSE
The Asset Key Flexfield is NOT defined correctly.


SOLUTION
Please check your setup:

Go to Setup > Financials > Flexfields > Key > Segments

Application     : Assets
Flexfield Title : Asset Key Flexfield


Reference:-

APP-FND-00690 Program Error 'The data that defines the flexfield on this field may be inconsistent'
(Doc ID 1681752.1)

APP-FND-00690: Program error: The data that defines the flexfield on this field may be inconsistent

$
0
0
On : 12.1.2 version, Other Inventory Issues
Oracle Inventory Management - Version 12.1.2 and later

When attempting to retrieve specific item category set, found following error message. 

ERROR
-----------------------
APP-FND-00690: Program error: The data that defines the flexfield on this field may be inconsistent.

Inform your system administrator that the routine FND_FLEX_SERVER2.get_qualsegs() could not find any segments for the flexfield specified by application id = 401, Code = MCAT and structure number = 2

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. When customer review the categories set, the error APP-FND-00690 occurs. 
2. Customer try to unfreeze the DFF, and then freeze and compile it. 
3. The problem still there, and customer change system option to &quot;Validation Flexfild on Server&quot; to &quot;No&quot;, but it is not working and it will close alll form when customer go to that category set record.


CAUSE
-------------------

There is no Segment setup for Product Family Flexfield structure of Item Category in Inventory application
Use following SQL statement to identify problematic flexfield structure:
select id_flex_structure_code
from fnd_id_flex_structures
where application_id = 401
and id_flex_code = 'MCAT'
and id_flex_num = 2;

SOLUTION
--------------------

=== ODM Solution /Action Plan ===
1. Go into the responsibility: System Administrator
2. Navigate to Application - Flexfield - Key - Segments
3. Query Item Category Flexfield in Title field
4. Unfreeze Flexfield Definition
5. Query Product Family structure
6. Press Segments button
7. Create dummy segment
8. Check Enabled check box - leave Displayed check box unchecked
9. Save record and close Segments form
10. Freeze Flexfield Definition
11. Compile Flexfield Definition
12. Retest the issue.
13. Migrate the solution as appropriate to other environments.

Reference:


Script to terminate Forms Runaway Processes(Automaticall kill frmweb process that doesnot have proper db sessions)

$
0
0
#Script to Kill runaway Form processes

. Source your environment file here ######################

proc_file=file_directory_location/prc_id.log; export proc_file
op_log=file_directory_location/sess_proc_id.log; export op_log
op_log2=file_directory_location/sess_proc_id_2.log; export op_log2
op_log3=file_directory_location/grep_proc_id.sh; export op_log3
op_log4=file_directory_location/kill_proc_id.sh; export op_log4
dateis=`date +"%d"/"%m"/"%Y"_"%H":"%M":"%S"`; export dateis

proc_id_list=`ps -ef|grep -i frmweb|grep -v grep|awk '{print $2}'> $proc_file`; export proc_id_list

loop_list=`cat $proc_file`;export loop_list

for i in $loop_list
do
sqlplus -s 'system/**********'<< EOF >> $op_log
set serveroutput on;
set feedback off;
declare
prcs_id varchar2(30) :='$i';
lv_n_process varchar2(30);
begin
select distinct process into lv_n_process from
v\$session
where process =prcs_id;
exception
when no_data_found then
dbms_output.put_line('No Database Sessions For Process: '||prcs_id);
end;
/
exit;
EOF
done

op_count=`cat $op_log|wc -l`;export op_count
proc_grep=`cat $op_log|awk '{print "ps -ef|grep -i " $6}'> $op_log3`;export proc_grep
#echo $op_count
if [ $op_count = 0 ]
then
echo "########################################################################## \n">> $op_log2
echo "No Runaway Form Processes during last run at $dateis \n">> $op_log2
echo "########################################################################## \n">> $op_log2
else
echo "########################################################################## \n">> $op_log2
echo "\tFind the Runaway Form Processes during last run at $dateis as follows,">> $op_log2
cat $op_log >> $op_log2
echo "\n">> $op_log2
echo "\t\tGrepping the Form Processes(These Runaway Processes are going to be killed!!!!)">> $op_log2
sh "$op_log3"|grep -v grep >> $op_log2
echo "\n">> $op_log2
sh "$op_log3"|grep -v grep|awk '{print "kill -9 "$2}'> $op_log4
echo "\tRunaway Processes Killed">> $op_log2
cat $op_log4 >> $op_log2
sh "$op_log4">> $op_log2
echo "\n">> $op_log2
echo "########################################################################## \n">> $op_log2
fi
>$op_log

Script to check the deferred item types in R12 Applications

$
0
0
. Source your environment file here##########################
sqlplus -s 'apps/*********'<<EOF >> /prdapp01/oracle/Monitoring_logs/log_weblogicbkg_deffer.log
spool /usr/tmp/weblogicbkg_deffer.log
select to_char(sysdate, 'DD-MON-YY HH:MI:SS AM')"Date" from dual;
select distinct item_type, count(*) from wf_item_activity_statuses where activity_status ='DEFERRED'and trunc(begin_date)=trunc(SYSDATE) group by item_type;
/**select 'Complete Deferred List' from dual;
select distinct item_type, count(*) from wf_item_activity_statuses where activity_status ='DEFERRED' group by item_type;**/
spool off
quit;
EOF
Viewing all 1640 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>