SQL server Simplest data loading script

Posted by Sagar Patil

T-SQL script to add a server load . I have used this script to test backup timings, replication latency. One run of following procedure incerased log fie to 8GB and datafile to 6GB

use subscriber_A
go

if exists (select * from sysobjects where name = ‘Load_Data’)
drop table Load_Data
go
create table Load_Data (
x int not null,
y char(896) not null default (”),
z char(120) not null default(”)
)
go
insert Load_Data (x)
select r
from
(
select row_number() over (order by (select 1)) r
from master..spt_values a, master..spt_values b
) p
where r <= 4000000
go
create clustered index ix_x on Load_Data (x, y)
with fillfactor=51
go

Change EBS Apps Ports

Posted by Sagar Patil

If concurrent ma nagers are running then see the process using ps- ef | grep FND : Normally can take upto 5 minutes to kill all processes so be patient.

To abort all procsses = kill -9 `ps -ef | grep FND | awk `{print $2}’`

Status of each concurrent requests are hosted at FND_Concurrent_requests & Fnd_concurrent_queues. Running is R and complegted is set as C in this tables. Read more…

Healthcheck of EBS Components Using AOL

Posted by Sagar Patil

All checks are done using aoljtest.jsp. The app front end connects to database suing $INST_TOP/fnd/secure/DBC- Database connector file

An experience with Oracle EBS Patching :Upgrade from 12.0.2 -> 12.0.4

Posted by Sagar Patil

Hierarchy : One off Patch -> Mini pack -> Family pack & Finally Maintenance Pack

Maintenance pack : Upgrade from one version to another . 12.0.2 -> 12.0.4

Family pack – Fixing the functional modules.FIN.B – Latest family pack for release 12 . FIN is financial B where B denotes the version -. For 11i HRPF.K – K is level of Module.

One off – One off issue

Mini Pack : Small functionality

Enhance functionality like VAT change. – One off else MINI pack. Apps patch is done by adpatch utility. Also look into readme file. “adpatch” is like opatch so can be copied from CD.

Read more…

How to bounce & Debug Apache /Forms : Log files

Posted by Sagar Patil

[applmgr@ebs scripts]$ pwd
/oracle/u01/VIS/inst/apps/VIS_ebs/admin/scripts

[applmgr@ebs scripts]$ adapcctl.sh stop

You are running adapcctl.sh version 120.6.12000000.2

Stopping OPMN managed Oracle HTTP Server (OHS) instance …

adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /oracle/u01/VIS/inst/apps/VIS_ebs/logs/appl/admin/log/adapcctl.txt for more information …

[applmgr@ebs scripts]$ adapcctl.sh status

You are running adapcctl.sh version 120.6.12000000.2 Read more…

Backups and Recovery Options on SQL server

Posted by Sagar Patil

Backup Types

There are 5 backup types. All these backups can be carried out online. databases. Offline backups require SQLSERVER be stopped. Offline backups are useful for the master, msdb and model databases

1. Full : This takes a complete copy of the database and logs.

2. Differential : This takes a copy of all changed pages since the last full backup (for database and logs.)

3. Transaction Log : This takes a copy of the transactions logs and clears its contents on completion.

4. File or File group : This copies only the specified file or group.

5. File differential : This takes a copy of all changed pages in file since the last file backup. In situations when the backup is too big for a backup window. Read more…

Using a Maintenance Plan to Backup SQL Databases

Posted by Sagar Patil

Maintenance Plans are only displayed to those users who are connected to the SQL Server using Windows Authentication Mode.

I will use AdventureWorksDW database which uses Simple Recovery Model and hence transactional log backups is not possible.

We first need to change the Recovery Model of AdventureWorks database to Full using GUI/TSQL.

Use master
GO

ALTER DATABASE AdventureWorks
SET RECOVERY FULL
GO

1. Connect to SQL Server 2008 Instance using SQL Server Management Studio.

2. In the Object Explorer, Click on Management and right click Maintenance Plans to open up the popup windows. In the popup windows you need to select Maintenance Plan Wizard.

In the Select Maintenance Tasks screen you need to choose Back up Databases (Full), Backup Databases (Differential) and Back up Database (Transactional Log) as shown in the below snippet and then click Next to continue with the wizard.

This will pop up a screen to Select a database you want to backup.

Then you need to select the option Create a backup file for every database, next select the checkbox, Create a sub-directory for each database checkbox and then provide the folder location where you want the databases backups to be stored along with the file extension as “diff”. If you are interested in verifying backup integrity then you can select Verify backup integrity option.

Click on “Change” to schedulethe the job & timing

Define where you want to store log files on the server.

In Complete the Wizard screen you could see the summary of all the options which you have selected so far in the maintenance plan wizard,

In the Maintenance Plan Wizard Progress screen you need to make sure that all the tasks have completed successfully and then click Close to complete the wizard.

If you want to run the backups manually just navigate to SQL Serevr Agent -> Job Activity Monitor . Right click on the job and select “Start Job”

I can now see a successful backup fie at “D:\SQL_TRAN_LOG\backups\AdventureWorksDW”

EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet..

Posted by Sagar Patil

EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet..

Maks sure AGENT_HOME is set and EMCTL is not running from ORACLE_DATABASE_HOME than AGENT_HOME

[oracle@NODE1 bin]$ ./emctl upload agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
—————————————————————
EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors.

[oracle@NODE1 bin]$ ./emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Stopping agent … stopped.

[oracle@NODE1 bin]$ ./emctl unsecure agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Checking Agent for HTTP…   Done.
Agent is already stopped…   Done.
Unsecuring agent…   Started.
Agent is now unsecured…   Done.
Unsecuring agent…   Ended.

[oracle@NODE1 bin]$ ./emctl secure agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Agent is already stopped…   Done.
Securing agent…   Started.
Enter Agent Registration Password :
Securing agent…   Successful.

[oracle@NODE1 bin]$ ./emctl clearstate agent

[oracle@NODE1 bin]$ ./emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Starting agent …….. started.

[oracle@NODE1 bin]$ ./emctl upload agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
—————————————————————
EMD upload completed successfully

SQL Server Transaction Log Shipping Replication

Posted by Sagar Patil

Prerequisite :

  • 2 separate SQL database instances at 2 different physical boxes – T-B0399254ED744 & TVLX4686.
  • A share accessible to Primary and Secondary Server for log shipping

Here I am going to log replicate AdventureWorks database from T-B0399254ED744 to TVLX4686

Read more…

SQL Server Remote Connection Error : An error has occurred while establishing a connection to the server.

Posted by Sagar Patil

This morning I installed a new instance of SQL server and while connecting remotely it sent me an error message.

Error Has Occurred While Establishing A Connection To SQL Server 2005 Which Does Not Allow Local and Remote Connections

ITLE: Connect to Server—————————– Cannot connect to .——————————
ADDITIONAL INFORMATION:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 233)

Solution is here : http://support.microsoft.com/kb/914277

  • Please check firewall and make sure it is disabled else create an exception
  • Enable the SQL Server Browser Service
  • Enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer.

To do this, follow these steps:

1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.

2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.

3. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.

Note Click OK when you receive the following message:
Changes to Connection Settings will not take effect until you restart the Database Engine service.

4. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.

Maintaining SQL Server High Availability

Posted by Sagar Patil
  • Failover Clustering
  • Log Shipping
  • Database Mirroring

Failover Clustering : Used for entire SQL server Instance , Hardware Solution based on MSCS

Shared disks configured between MSCS cluster and automatic failover Will be achieved if one of the node goes down

Database Mirroring :: High availability for Database, Software solution based on HOT standby (New 2005)

  1. Principle database is applied at Mirror database almost real time.
  2. There is one t one relationship and means there would be only one HOT standby for any database.
  3. The mirrored database is in recovery mode and never available until failed over
  4. A witness box could be used to carry automatic failover when needed
  5. Will only work with FULL recovery Model
  6. Could be configured into 3 different modes- High Availability (Sync operation with Witness server ), High Protection (Sync Operation with NO Witness server ) & High Performance (ASync operation with NO Witness server )

Log Shipping : High availability for Database, Software solution based on WARM standby (Old 2000)

  1. Secondary database is not sync with primary . The primary database doesn’t send the transaction logs directly to the Secondary. The moving of logs is done by the SQL agent using a network share. Primary server has a backup Job which backs up the transaction logs to a network share while Secondary server have Job to apply them at destination.
  2. The warm standby can have one to one else one to many relationship with Primary database.
  3. The Warm standby is always available in read only mode
  4. A monitor server could be used to setup all jobs needed between Primary and Secondary server. We Can omit the Monitor server and push jobs into Primary & secondary if needed.
  5. Supports Manuel Failover only
  6. Can work with FULL else BULK recovery Model

Locks,Monitoring SQL Server Pocesses

Posted by Sagar Patil

Please navigate to Management ->Activity Monitor -> Double Click

AWR : How to run Reports

Posted by Sagar Patil

The architecture of the AWR is quite simple. The MMON background process polls the x$ fixed tables from the SGA region and stores them in the AWR tables. From there, the performance data is instantly available for analysis. The Enterprise Manager can be used for graphical data display. Alternatively, the Automatic Database Diagnostic Monitor (ADDM) can be used for automated tuning analysis, or SQL*Plus can be used if customized Oracle tuning size reports are desired.

AWR interval could be changed using API :
execute dbms_workload_repository.modify_snapshot_settings (
interval => 60,
retention => 43200);
Interval : How often snaps are taken
Retention: Duration in Minutes

Values updated at “dba_hist_wr_control”

AWR Reports

AWR reports are very similar to STATSPACK reports. They typically show:
SQL> @?/rdbms/admin/awrrpt.sql

A nice feature is that an HTML version of the report can be generated. Just follow the prompts. SELECT_ANY_DICTIONARY privilege is required to run a report.

Managing Snapshots
DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT
DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT
DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE

DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS
retention_period => 0
interval => 0

AWR Views

DBA_HIST_SNAPSHOT # show all snapshots
DBA_HIST_WR_CONTROL # show AWR settings

Installing Oracle 9.2.0.6 on Red Hat Linux AS release 5 Update 3

Posted by Sagar Patil

Objectives

The objectives of this document are to:

Record the setup and configuration of the 9i Oracle Standalone environment.

Read more…

Installing Oracle 10.2.0.1 on Red Hat Linux AS release 4 Update 5 (Nahant Update)

Posted by Sagar Patil

Table of Contents
1.1 Objectives
1.2 Scope
2 System Configuration
2.1 Architecture
3 System Configuration
3.1 Machine Configuration
3.2 External/Shared Storage
4 Oracle Pre-Installation tasks
4.1 Redhat Pre-Requisite
4.2 Copy Oracle 10.2.0.1 software onto server
4.3 Unpack Files
4.4 Download Patches
4.5 Check kernel and update rpm files
4.6 Creating Required Operating System Groups and Users
4.7 Oracle required directory creation
4.8 Set Kernel Parameters
4.9 Create Oracle Profile
5 Oracle Software Configuration
5.1 Directory Structure
5.2 Download ASM packages
5.3 ASM package install
5.4 Configuring and Loading ASM
5.5 Creating ASM Disks
5.6 Installation
5.6.1 Database Only Installation
5.6.2 Installing the Listener
5.6.3 DBCA : Creating an ASM /Database Instance

Read more…

Views Relevant to Oracle Data Guard

Posted by Sagar Patil
LOGICAL DBA_LOGSTDBY_EVENTS Contains information about the activity of the logical standby database system. It can be used to determine the cause of failures that occur when SQL Apply is applying redo to logical standby databases.
LOGICAL DBA_LOGSTDBY_LOG Shows the log files registered for logical standby databases.
LOGICAL DBA_LOGSTDBY_NOT_UNIQUE Identifies tables that have no primary and no non-null unique indexes.
LOGICAL DBA_LOGSTDBY_PARAMETERS Contains the list of parameters used by SQL apply.
LOGICAL DBA_LOGSTDBY_PROGRESS Describes the progress of SQL Apply on the logical standby database.
LOGICAL DBA_LOGSTDBY_SKIP Lists the tables that will be skipped by SQL Apply.
LOGICAL DBA_LOGSTDBY_SKIP_TRANSACTION Lists the skip settings chosen.
  DBA_LOGSTDBY_UNSUPPORTED Identifies the schemas and tables (and columns in those tables) that contain unsupported datatypes. Use this view when you are preparing to create a logical standby database.
PHYSICAL/LOGICAL V$ARCHIVE_DEST

Describes, for the current instance, all of the destinations in the Data Guard configuration, including each destination’s current value, mode, and status.
Note: The information in this view does not persist across an instance shutdown.

PHYSICAL/LOGICAL V$ARCHIVE_DEST_STATUS

Displays runtime and configuration information for the archived redo log destinations.
Note: The information in this view does not persist across an instance shutdown.

PHYSICAL/LOGICAL V$ARCHIVE_GAP Displays information to help you identify a gap in the archived redo log files.
PHYSICAL/LOGICAL V$ARCHIVED_LOG Displays archive redo log information from the control file, including names of the archived redo log files.
PHYSICAL/LOGICAL V$DATABASE Provides database information from the control file.
PHYSICAL/LOGICAL V$DATABASE_INCARNATION Displays information about all database incarnations. Oracle Database creates a new incarnation whenever a database is opened with the RESETLOGS option. Records about the current and the previous incarnation are also contained in the V$DATABASE view.
PHYSICAL/LOGICAL V$DATAFILE Provides datafile information from the control file.
PHYSICAL/LOGICAL V$DATAGUARD_CONFIG Lists the unique database names defined with the DB_UNIQUE_NAME and LOG_ARCHIVE_CONFIG initialization parameters.
PHYSICAL/LOGICAL V$DATAGUARD_STATUS Displays and records events that would typically be triggered by any message to the alert log or server process trace files.
PHYSICAL/LOGICAL V$LOG Contains log file information from the online redo log files.
PHYSICAL/LOGICAL V$LOGFILE Contains information about the online redo log files and standby redo log files.
PHYSICAL/LOGICAL V$LOG_HISTORY Contains log history information from the control file.
PHYSICAL V$MANAGED_STANDBY

Displays current status information for Oracle database processes related to physical standby databases.
Note: The information in this view does not persist across an instance shutdown.

PHYSICAL/LOGICAL V$STANDBY_LOG Contains log file information from the standby redo log files.

Multimaster Replication :How to resolve Replication Errors

Posted by Sagar Patil

While using multimaster replication often you would be bombarded with errors like “No data found”, “Unique Key Violated” etc .

These are purely data mismatch errors and a user intervention needed to resolve them.

I often come across these errors when we run applications at multiple sites which are part of same replication group/tables when they are designed to run at one replication site at any given time.

You can get list of these errors at DEFERROER view with transaction ids but there is no easy way to locate the parameters,columns and tables on which these errors occurred.

Thankfully there is a solution if you have EM installed.

Read more…

10g RAC Install under RHEL/OEL 4.5

Posted by Sagar Patil

1.Objectives

5 Installation
5.1 CRS install
2 System Configuration 5.2 ASM Install
2.1 Machine Configuration 5.3 Install Database Software
2.2 External/Shared Storage 5.4 create RAC Database
2.3 Kernel Parameters 6 Scripts and profile files
5.4 .bash_profile rac01
3 Oracle Software Configuration 5.5 .bash_profile rac02
3.1 Directory Structure
3.2 Database Layout
3.3 Redo Logs 6 RAC Infrastructure Testing
3.4 Controlfiles 6.1 RAC Voting Disk Test
6.2 RAC Cluster Registry Test
4 Oracle Pre-Installation tasks 6.3 RAC ASM Tests
4.1 Installing Redhat 6.4 RAC Interconnect Test
4.2 Network Configuration 6.5 Loss of Oracle Config File
4.3 Copy Oracle 10.2.0.1 software onto server
4.4 Check installed packages Appendix
4.5 validate script 1. OCR/Voting disk volumes INAccessible by rac02 87
4.6 Download ASM packages 2. RAC cluster went down On PUBLIC network test. 88
4.7 Download OCFS packages
4.8 Creating Required Operating System Groups and Users.
4.9 Oracle required directory creation
4.10 Verifying That the User nobody Exists
4.11 Configuring SSH on Cluster Member Nodes For oracle
4.12 Configuring SSH on Cluster Member Nodes for root.
4.13 VNC setup
4.14 Kernel parameters
4.15 Verifying Hangcheck-timer Module on Kernel 2.6
4.16 Oracle user limits
4.17 Installing the cvuqdisk Packeage for linux.
4.18 Disk Partitioning
4.19 Checking the Network Setup with CVU
4.20 Checking the Hardware and Operating System Setup with CVU
4.21 Checking the Operating System Requirements with CVU.
4.22 Verifying Shared Storage
4.23 Verifying the Clusterware Requirements with CVU
4.24 ASM package install
4.25 OCFS package install
4.26 disable SELinux
4.27 OCFS2 Configuration
4.28 OCFS2 File system format
4.29 OCFS2 File system mount

Read more…

Compare and copy files remotely using SCP

Posted by Sagar Patil

Following script will only work if your servers were enabled with password less login ( How to for linux /HP UNIX)

For TRUE64 Unix , I am using cksum here instead of linux md5sum. To use same script for linux just change cksum to md5sum or un comment lines in script.

Usage :

1. Your Archive Space filled up and database is stuck until you make space available. Rman backup runs every night and you don’t have access to netbackup scheduler. You want to keep on pushing archive files to a secure directory ASAP.

2. Your trace dump (udump/bdump) is filling up and you want to save trace files for future use by copying files at different location.

3. You have a dataguard standby server . Standby was down for couple of days and somehow MRP has not copied files and complaining about archives in an apply process.

How this script works? : This script will compare md5sum with local & remote files , and only copy files not available at remote site.It will also spool script “remove-$timeStamp.sh.old” to delete files once copied. I have not integrated delete functionality in script but you can delete files by running this script manually.

Parameters :

Name of Instance/File Name  : My archive files are named as “INSTANCE_NAME_%%Sequence%%.arc” like CVD_LIVE_00100.arc so I will run as “<script_name> CVD_LIVE”

Delete Days : If you pass  “<script_name> delete 5” it will delete files older than 5 days excluding today

#!/bin/bash

# Define the target host
host=”%backup_server%”

# Define the remote storage path
remotePath=”/backup2/oracle/CPI_L2_A”

# Command to use for removing files
rmCommand=”rm -f” # -f recommended, to prevent missing files breaking the script

#define the pattern to use when removing old files
# this removes old backups
removePattern=”*.[Aa][Rr][Cc]”
#this removes old remove scripts
#removePattern=”remove-*.sh”

# make sure to get a parameter
if [ “${1}” = “” ]; then
echo “Parameter required”
exit
fi

# if the parameter is delete, act specially
if [ “${1}” = “delete” ]; then
# delete needs an numeric augment
if [ “${2}” = “” ]; then
echo “delete requires an argument”
exit
fi
# remove all matching files modified in the last few days
# excluding those modified today
#    touch -t $(date +%m%d)0000 .tmp.$$
find $removePattern -mtime -${2} -and ! -newer .tmp.$$ -exec echo {} \;
rm .tmp.$$
exit
fi

# otherwise, act as if its the first part of a .arc file
list=`ls ${1}_*.[aA][rR][cC]`

timeStamp=`date +%Y-%m-%d-%H%M`

for i in $list
do
#    remoteres=`ssh $host md5sum $remotePath/$i 2>&1`
remoteres=`ssh $host cksum $remotePath/$i 2>&1`

#  localres=`md5sum $i 2>&1`
localres=`cksum $i 2>&1`

remoteMD5=`echo $remoteres | awk ‘{ print $1; }’`
localMD5=`echo $localres | awk ‘{ print $1; }’`

# these show the md5’s being returned above, just disable them not to see it
echo $i $remoteMD5
echo $i $localMD5

if [ “$remoteMD5” != “$localMD5” ]; then
# the files dont match, or the remote doesn’t have the file …
echo “$rmCommand $i” >> remove-$timeStamp.sh.old
scp $i $host:$remotePath/$i
fi
done

# make sure you can run the remove script …
if [ -f remove-$timeStamp.sh ]; then
chmod +x remove-$timeStamp.sh.old
fi

Using adadmin to compile an Apps environment

Posted by Sagar Patil

While installing apps 12 under OEL 5, I came across a problem and one of the suggestion made was to relink/compile an apps setup to see if that resolves the problem…

1. Locate your environment file.

For me, apps 12 with VISION database the env file “APPSVIS_ebs.env” is located at “/oracle/u01/apps/apps_st/appl” where “/oracle/u01” is Oracle_base

2. Setup your environment by running the env file

[applmgr@ebs appl]$ . APPSVIS_ebs.env

[applmgr@ebs appl]$ set | grep ORACLE
IAS_ORACLE_HOME=/oracle/u01/apps/tech_st/10.1.3
INCLUDE_FLAGS=’-I. -I$(FND_TOP)/include -I$(ORACLE_HOME)/precomp/public -I$(ORACLE_HOME)/rdbms/demo’
ORACLE_CONFIG_HOME=/oracle/u01/inst/apps/VIS_ebs/ora/10.1.2
ORACLE_HOME=/oracle/u01/apps/tech_st/10.1.2
ORACLE_TERM=vt220
PCC=’$(ORACLE_HOME)/bin/proc’
PCCINC=’. include=$(FND_TOP)/include include=$(ORACLE_HOME)/precomp/public’

3. Run adadmin now

Accept all default parameters and enter system password MANAGER & apps user password apps for default install.

To relink apps select option 2 and then 1.

Disk Space Required for EBS 11i & 12

Posted by Sagar Patil

Release 12  Disk Space Required

Rapid Install installs the file system and database files for all products, regardless of their licensed status. The approximate file system requirements in a standard installation are:

Applications node file system (includes OracleAS 10.1.2 ORACLE_HOME, OracleAS 10.1.3 ORACLE_HOME, COMMON_TOP, APPL_TOP, and INST_TOP) 28 GB (40 GB on HP-UX Itanium)
Database node file system (Fresh install) 45 GB
Database node file system (Vision Demo database) 133 GB (145 GB on HP-UX Itanium)

I just finished installing a Release 12 Vision instance on my dell Poweredge 2650 servers and here is a space usage

[oracle@ebs ~]$ df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              9920592   3335540   6072984  36% /
/dev/sda3            263226696 240114568   9525156  97% /oracle
tmpfs                  1749784         0   1749784   0% /dev/shm

MY /oracle volume consists of Staging area for software , about 70GB

[oracle@ebs ~]$ cd /oracle/stage/
[oracle@ebs stage]$ du -s
72527264 

Total Space used by Apps 12 install = 240114568   – 72527264    = 167587304 i.e 167 GB

Release 11i  Disk Space Required

Rapid Install installs the file system and database files for all products regardless of their licensed status. The approximate file sizes in a single-node installation are:

Applications node file system (includes iAS/8.0.6 ORACLE_HOME, COMMON_TOP, and APPL_TOP) 26 GB
Database tier file system (fresh install with a production database)  OR

Database tier file system (fresh install with a Vision Demo database)

31 GB

65 GB

Total space for a single node system, not including stage area 57 GB for a fresh Install with a production database
91 GB for a fresh install with a Vision Demo

Multi Node to Single Node Cloning

Posted by Sagar Patil

With Oracle Applications 11.5.10 the ability to clone from a multi node to a single node system using rapid clone has now been certified.

This is accomplished by the Shared APPL_TOP and Merging APPL_TOP features.
In this post i am listing out the steps to perform a multi note to a single node cloning from scratch. The information mentioned here is the steps which i have used and found them to be successful for a more elaborate explanation you might want to refer to the metalink note Sharing the Application Tier File System in Oracle E-Business Suite 11i (233428.1).

Source System here refers to the multi node system to be cloned
Target System refers to the newly to be created single node system
Applications Version 11.5.10
Operating System Linux ES 4

The following Steps are required to be performed on the source system
1. Apply application tier patches using adpatch
Apply patch 4038964
Apply patch 4175764
Both the above patches are include in the consolidated update 2 or CU2 so in case you are on 11.5.10.2 or later you can ignore this step.

2. Maintain snapshot information
This explanation was from http://forums.oracle.com/forums/thread.jspa?threadID=535869
There are two types of snapshots:
1) APPL_TOP snapshots –> lists patches and versions of files in the APPL_TOP
2) Global snapshots –> lists patches and latest versions of files in the entire Applications system (that is, across all APPL_TOPs)
Both APPL_TOP snapshots and global snapshots may be either current view snapshots or named view snapshots. A current view snapshot is created once and updated when appropriate to maintain a consistent view. A named view snapshot is a copy of the current view snapshot at a particular time (not necessarily the latest current view snapshot) and is not updated.
Patch Wizard uses the information contained in the global current view snapshot to determine which patches have already been applied. AutoPatch uses the APPL_TOP current view snapshot to determine if all prerequisite patches have been applied to that APPL_TOP. Snapshot information is stored in the AD_SNAPSHOTS, AD_SNAPSHOT_FILES, and AD_SNAPSHOT_BUGFIXES tables.
A complete current view snapshot is required for automatic prerequisite patch checking to operate. During the installation, Rapid Install created a current snapshot as a baseline. And, each time you run AutoPatch, it automatically creates a new (updated) snapshot so that the information is current as of the application of the patch. However, after an upgrade to Release 11i, you must update the current snapshot by running this AD Administration task.
Log in as the applications user on each application tier node and run ‘Maintain Snapshot Information’ by using adadmin
Go to APPL_TOP
$ . APPSORA.env
$ adadmin
Choose Maintain Applications Files menu
Choose Maintain Snapshot Information

3. Merge existing APPL_TOPs
Log in to the primary node of your application tier as the application user user and run:
$ cd [COMMON_TOP]/admin/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl appsTier merge
This will prompt you with option to merge secondary nodes
Now log in as the applications user to each of the secondary application tier nodes being merged and run:
$ cd [COMMON_TOP]/admin/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl appltop merge

4. Prepare the source system database tier.
Log on to the database tier of the source system as the oracle user and run the following commands:
$ cd [RDBMS ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl dbTier
With this all the pre clone tasks on the source system have been completed.
The next sets of tasks are required to be carried out on the target system that is the system on which you wish to place the merged single node instance.

1. Create OS user accounts
Create a OS user account for your applications
$ useradd -g dba -d [home_directory] -p password username
Similarly create a OS user account for your database

2. Modify the orainventory to reflect the new location
$ vi /etc/oraInst.loc

3. Copy the following application tier directories
Copy the following application tier directories from the primary node of your source system to the target application tier node, retaining the original directory structure:
– [APPL_TOP]
– [OA_HTML]
– [OA_JAVA]
– [COMMON_TOP/util]
– [COMMON_TOP/clone>
– [806 ORACLE_HOME]
– [iAS ORACLE_HOME]

4. Copy the required files for merging
Log in as the applications user to each of the secondary source nodes and recursively copy:
directory [COMMON_TOP]/clone/appl
– to –
directory [COMMMON_TOP]/clone/appl on the target system node
Before proceeding with the next steps you must shutdown your oracle applications services and the database on the source system

5. Copy the database tier file system
Log on to the source system as the database user
Copy the database (DBF) files from the source to the target system
Copy the source database ORACLE_HOME to the target system
After this you can now startup the database and applications services on your source system and release it for use.

6. Configure the target system database server
Log on to the target system as the database user and type the following commands to configure and start the database:
$ cd [RDBMS ORACLE_HOME]/appsutil/clone/bin
$ perl adcfgclone.pl dbTier
This will prompt for new ORACLE_SID,ORACLE_HOME,Port Pool,JAVA_TOP and DATA_TOP give the appropriate values matching your target system
Once successful this should start your database and listener

7. Configure the application tier server nodes
The database and its listener should remain up before executing the next set of commands.
Log in to the merged APPL_TOP node as the applications user and execute the following commands:
$ cd [COMMON_TOP]/clone/bin
$ perl adcfgclone.pl appsTier
This will prompt you new port pool for applictaion tier services as well as new APPLTOP,COMMON_TOP,ORACLE_HOME and IAS_TOP
Successful completion of this task will bring up your application tier services on the target or the cloned node.

8. Post Clone Tasks
Log in to the target system application tier node as the APPLMGR user.
Run the following tasks in adadmin for all products:
o generate JAR files
o generate message files
o relink executables
o copy files to destination

9. Clean up of the target system
Remove the temporary directory [COMMON_TOP]/clone/appl to reduce disk space usage.
Note: The version of Oracle Applications used is 11.5.10 and the operating system is Linux ES 4

Best way to check patches on Metalink

Posted by Sagar Patil

http://metalink.oracle.com
Using Patches -> simple search with following details

Product and Family : E-Business Suite
Release : Applications R12
Patch Type : Any
Classification : Recommended
Plateform or Language : Select Relevant
Click on Go button. This search will show recommended patches.

OR

Click on Top right hand Side “Patches” , select “Quick Links to: Latest Patchsets, Mini Packs and Maintenance Packs” & you will see “Latest Oracle Applications R12 Packs”

Example : Let’s locate 10.2.0.4 patch for 10.2.0.1 baseline environment

How to deploy form on server

Posted by Sagar Patil

Generally, in Oracle Applications

– All *.fmb located at $AU_TOP/forms/US

– All *.fmx will be located at their respective Product top’s/forms/US.

If you want to create any new form, copy .fmb in to $AU_TOP/forms/US.
11i – Using f60gen syntax, you can generate .fmx in respective product top/forms/US

12 – use frmcmp

http://applicationsdba.wordpress.com/?s=frmcmp

Some people will place both .fmb & .fmx at their Product top’s/forms/US itself.  At runtime it will use .fmx file.

Log4plsql for PL/SQL Logging

Posted by Sagar Patil

Log4plsql is an open source tool that uses PL/SQL framework to log into PL/SQL code package, function, web application, procedure, trigger and various oracle tools such as reports, forms etc. Before we proceed with Log4plsql for PL/SQL Logging, it is important to understand the concept behind the importance of logging and logs in the development environment.
Logging is very important part of development lifecycle for any process or application. These logs are important for tracing functional events, data and operations. Logs are also used for code debugging and in testing or maintenance phase to understand unforeseen events such as system crash, quit or launch. It is considered as a very time-consuming tedious job as all the logs during the development strategy have to be considered which utilizes vital computer memory or resources.

What Is LOG4PLSQL ?

LOG4PLSQL is a PL/SQL framework for logging in all PL/SQL code
·        Package,
·        Procedure,
·        Function,
·        Trigger,
·        PL/SQL Web application.
·        Oracle Tools (form, report, …)
Purpose:
·        Easy implementation and use
·        Possibility to log apart from transaction
·        Possibility to adapt the level of logging depending on user requirements
·        Ability to use all LOG4J feature.
·        Provide a complete set of  PL/SQL development tools (debug variable, SQLERRM, assert, call stack, … ).

Log destination:
·        table TLOG
·        alert.log file
·        trace file
·        standard output
·        session information (view V$SESSION)
·        advanced queue read by Log4JBackgroundProcess. :
o       Async,
o       JDBC,
o       JMS,
o       NTEventLog,
o       SMTP,
o       Socket,
o       SocketHub,
o       Syslog,
o       Telnet,
o       Writer

Log4plsql was born from the log4J spirit (and use it).

Architecture

 

Package PLOG  It is the main package of the log functionality. Your PL/SQL applications call its public functions to create a log event (info, debug …)

Package PLOGPARAM Package containing default values for the logging context

Package PLOG_INTERFACE  Dispatcher package built dynamically during the installation of the schema (for compilation raison). Its role is to call the dedicated packages for output according to the configuration and installation choices.

Package SL_PLOG_OUT_ALERT Optional package writing log information into the Oracle alert file alert.log. The function DBMS_SYSTEM. Ksdwrt() function is used.

Package SL_PLOG_OUT_TRACE Optional package writing log information into the Oracle trace file ora.trc. The function DBMS_SYSTEM. Ksdwrt() function is used.

Package SL_PLOG_OUT_AQ Optional package writing log information in a multi-consumer advanced queue consumed by the Java background process. The messages are enqueued using the package DBMS_AQ.

Package SL_PLOG_OUT_DBMS_OUTPUT Optional package writing log information into the standard output. The package DBMS_OUTPUT is used.

Package SL_PLOG_OUT_TLOG Package writing the log information in the table SL_TLOG. The package is part of the basis installation.

 

Installation of Log4plsql for PL/SQL Logging is very easy. Just follow these simple steps:

  • Download Log4Sql from sourceforge.
  • Unzip the zip file at the location where you want Log4plsql for PL/SQL Logging to be installed.
  • Run the executable install file in cmd directory.
  • Basic installation of Log4plsql for PL/SQL Logging is complete and now you need to proceed only if you want to functions or features.

An advanced user has more requirements or desires from Log4plsql for PL/SQL Logging as compared to normal end users. Some of these advanced requirements are:

  • He or she needs to test logging level for which they code it before logging with any of the IsEnabled functions such as isInfoEnabled, isErrorEnabled, isDebugEnabled, isWarnEnabled and isFatalEnabled.
  • An advanced user may want to change the default log parameters for a certain application.
  • Need to create log section in hierarchical log node. You can also specify your own hierarchical log node by defining begin, end and get section.
Top of Page

Top menu