In Oracle Applications professional Users can access professional forms via Appletin web browser. This Form Applet must run with in Java Virtual Machine (JVM) and Oracle bundles its own JVM as Oracle Jinitiator. This Jinitiator is available only for Windows Client and for Unix/Linux you have to use Java Plug-In.
Till Oracle Apps 11i default JVM was Jinitiator but with Oracle Apps R12 default JVM under which form Applet run is J2SE Plug-In. If you are accessing Oracle Applications (11i/R12), Apps will automatically prompt you to install Jinitiator/J2SE Plug-in (If Jinitiator/J2SE is not installed in client machine) but if you are accessing same Oracle Applications from Linux/Unix it does not prompt to install plug-in and you can’t apps forms from Linux client.
How to access Oracle Apps 11i/R12 professional forms from Linux Client ?
In you to access forms from Linux client, Three steps are installed (You can skip first if Mozilla is installed on your Linux client) –
1. Install Mozilla Browser
2. Install JRE on client machine (JRE version to install will depend on Server configuration, for R 12.0.o you need JRE 5 update 10) .
3. Use JRE installed above on client machine in Browser (Mozilla) Plugin
1. Install FireFox Mozilla
–Download Mozilla for Linux from http://www.mozilla.com/en-US/firefox/all.html#en firefox-2.0.0.7.tar.gz
– “gunzip -d firefox-2.0.0.7.tar.gz” (You will get unzipped file with name as firefox-2.0.0.7.tar)
– Extract tar file as “tar -xvf firefox-2.0.0.7.tar”
– This will create directory called “firefox” which is under you will see executable called “firefox“; Use this executable to start FireFox on Linux machine.
2. Install JRE on client machine
–Download JRE 5.0 Update 10 for Linux from http://java.sun.com/products/archive/j2se/5.0_10/index.html ”jre-1_5_0_10-linux-i586-rpm.bin”
–”chmod 755 jre-1_5_0_10-linux-i586-rpm.bin”
–./jre-1_5_0_10-linux-i586-rpm.bin (You will be asked to accept license agreement , click enter and when prompted to accept license enter Yes)
–This will install jre 1.5.10 in linux machine under /usr/java and plugin is installed under /usr/java/jre1.5.0_10/plugin/i386/ns7/libjavaplugin_oji.so
Configure JRE Plug-in in browser
–Go to Mozilla FireFox plug-in directory which is $location_where_you_unziped_firefox_directory/plugins and create soft link like
–ln -s /usr/java/jre1.5.0_10/plugin/i386/ns7/libjavaplugin_oji.so ./libjavaplugin_oji.so
Shailesh Gudimalla Oracle Apps DBA All Posting is my own workshop example,if you're using this then please check first in your test environment.
Wednesday, July 30, 2008
Oracle Apps on Mozilla Firefox
You actually don't need to install JInitiator (jinit 1.3.1.21) to run Oracle Applications on Firefox if you already installed the Sun JRE 1.4.2 and above. You will need to edit pluginreg.dat
On Windows, that file is located at %APPDATA%\Mozilla\Firefox. Make a copy of the existing one first in case something goes wrong.
Search for NPJava14.dll because Oracle runs on Java 1.4. This will appear whether you have installed Java 5 or 6.
You will need to add the following line to at the end of the plugins.
6|application/x-jinit-applet;version=1.3.1.21|Java||$
Then update the count at the top of the section. Your modified pluginreg.dat will look like:
C:\Program Files\Java\jre1.5.0_09\bin\NPJava14.dll|$
|$
1160594743000|1|5|$
Java Plug-in 1.5.0_09 for Netscape Navigator (DLL Helper)|$
Java(TM) 2 Platform Standard Edition 5.0 Update 9|$
7
0|application/x-java-applet;version=1.4.2|Java Applet||$
1|application/x-java-bean;version=1.4.2|JavaBeans||$
2|application/x-java-applet;version=1.4.1|Java Applet||$
3|application/x-java-bean;version=1.4.1|JavaBeans||$
4|application/x-java-applet;version=1.5|Java Applet||$
5|application/x-java-bean;version=1.5|JavaBeans||$
6|application/x-jinit-applet;version=1.3.1.21|Java||$
Just replace the | with : if you're in Linux. Run Firefox and you're good to go.
On Windows, that file is located at %APPDATA%\Mozilla\Firefox. Make a copy of the existing one first in case something goes wrong.
Search for NPJava14.dll because Oracle runs on Java 1.4. This will appear whether you have installed Java 5 or 6.
You will need to add the following line to at the end of the plugins.
6|application/x-jinit-applet;version=1.3.1.21|Java||$
Then update the count at the top of the section. Your modified pluginreg.dat will look like:
C:\Program Files\Java\jre1.5.0_09\bin\NPJava14.dll|$
|$
1160594743000|1|5|$
Java Plug-in 1.5.0_09 for Netscape Navigator (DLL Helper)|$
Java(TM) 2 Platform Standard Edition 5.0 Update 9|$
7
0|application/x-java-applet;version=1.4.2|Java Applet||$
1|application/x-java-bean;version=1.4.2|JavaBeans||$
2|application/x-java-applet;version=1.4.1|Java Applet||$
3|application/x-java-bean;version=1.4.1|JavaBeans||$
4|application/x-java-applet;version=1.5|Java Applet||$
5|application/x-java-bean;version=1.5|JavaBeans||$
6|application/x-jinit-applet;version=1.3.1.21|Java||$
Just replace the | with : if you're in Linux. Run Firefox and you're good to go.
Monday, July 21, 2008
Manual Database Creation steps for Single-Instance.
Oracle RAC
=====================================================
Here are the steps to be followed:
1. Make a init.ora in your $ORACLE_HOME/dbs directory. On Windows this
file is in $ORACLE_HOME\database. To simplify, you can copy init.ora to
init.ora and modify the file.
*** Path names, file names, and sizes will need to be modified
Example parameter settings :
db_block_size=8192
db_cache_size=52428800
background_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
core_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
user_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
timed_statistics=TRUE
control_files=("/u01/rbdb1/control_01.ctl", "/u01/rbdb1/control_02.ctl")
db_name=rbdb1
shared_pool_size=52428800
sort_area_size=524288
undo_management=AUTO
undo_tablespace=UNDOTBS
** You can also use an spfile as described in Note 162491.1.
2. Run the following sqlplus command to connect to the database:
sqlplus '/ as sysdba'
3. Startup up the database in NOMOUNT mode:
SQL> startup nomount
4. Create the Database :
*** Path names, file names, and sizes will need to be modified
CREATE DATABASE
MAXLOGFILES 255
MAXINSTANCES 1
MAXDATAFILES 256
MAXLOGHISTORY 256
DATAFILE '/u01/oracle/rbdb1/system_01.dbf' SIZE 400M REUSE
UNDO TABLESPACE "UNDOTBS" DATAFILE '/u01/oracle/rbdb1/undotbs_01.dbf'
SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET US7ASCII
LOGFILE GROUP 1 ('/u01/oracle/rbdb1/redo1_01.dbf') SIZE 100M REUSE,
GROUP 2 ('/u01/oracle/rbdb1/redo1_02.dbf') SIZE 100M REUSE;
5. Create a Users Tablespace :
*** Path names, file names, and sizes will need to be modified
CREATE TABLESPACE "USERS" DATAFILE '/u01/oracle/rbdb1/users01.dbf'
SIZE 300M REUSE AUTOEXTEND ON
NEXT 5M MAXSIZE 1500M;
6. Create a Temporary Tablespace :
*** Path names, file names, and sizes will need to be modified
CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE '/u01/oracle/rbdb1/temp_01.dbf'
SIZE 40M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE "TEMP";
7. Run the scripts necessary to build views, synonyms, etc. :
The primary scripts that you must run are:
i> CATALOG.SQL-- creates the views of data dictionary tables and the
dynamic performance views.
ii> CATPROC.SQL-- establishes the usage of PL/SQL functionality and
creates many of the PL/SQL Oracle supplied packages.
==============================================================
Manual Database Creation steps for Real Application Clusters
==============================================================
Here are the steps to be followed to create a Real Application Clusters database:
1. Make a init.ora in your $ORACLE_HOME/dbs directory. On Windows this
file is in $ORACLE_HOME\database. To simplify, you can copy init.ora to
init.ora and modify the file. Remember that your control file must
be pointing to a pre-existing raw device or cluster file system location.
*** Path names, file names, and sizes will need to be modified
Example parameter settings for the first instance:
Cluster-Wide Parameters for Database "RAC":
db_block_size=8192
db_cache_size=52428800
background_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
core_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
user_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
timed_statistics=TRUE
control_files=("/dev/RAC/control_01.ctl", "/dev/RAC/control_02.ctl")
db_name=RAC
shared_pool_size=52428800
sort_area_size=524288
undo_management=AUTO
cluster_database=true
cluster_database_instances=2
remote_listener=LISTENERS_RAC
Instance Specific Parameters for Instance "RAC1":
instance_name=RAC1
instance_number=1
local_listener=LISTENER_RAC1
thread=1
undo_tablespace=UNDOTBS
* The local_listener parameter requires that you first add the listener
address to the TNSNAMES.ORA - remember to do so on both Node 1 and Node 2.
** You can also use an spfile as described in Note 136327.1.
2. Run the following sqlplus command to connect to the database:
sqlplus '/ as sysdba'
3. Startup up the database in NOMOUNT mode:
SQL> startup nomount
4. Create the Database (All raw devices must be pre-created) :
*** Path names, file names, and sizes will need to be modified
CREATE DATABASE
CONTROLFILE REUSE
MAXDATAFILES 254
MAXINSTANCES 32
MAXLOGHISTORY 100
MAXLOGMEMBERS 5
MAXLOGFILES 64
DATAFILE '/dev/RAC/system_01_400.dbf' SIZE 400M
REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
UNDO TABLESPACE "UNDOTBS" DATAFILE
'/dev/RAC/undotbs_01_210.dbf' SIZE 200M REUSE
NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET US7ASCII
LOGFILE GROUP 1 ('/dev/RAC/redo1_01_100.dbf') SIZE 100M REUSE,
GROUP 2 ('/dev/RAC/redo1_02_100.dbf') SIZE 100M REUSE;
5. Create a Users Tablespace:
*** Path names, file names, and sizes will need to be modified
CREATE TABLESPACE "USERS" LOGGING DATAFILE
'/dev/RAC/users_01_125.dbf' SIZE 120M REUSE
NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
6. Create a Temporary Tablespace:
*** Path names, file names, and sizes will need to be modified
CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE
'/dev/RAC/temp_01_50.dbf' SIZE 40M REUSE
7. Create a 2nd Undo Tablespace:
*** Path names, file names, and sizes will need to be modified
CREATE UNDO TABLESPACE "UNDOTBS2" DATAFILE
'/dev/RAC/undotbs_02_210.dbf' SIZE 200M REUSE
NEXT 5120K MAXSIZE UNLIMITED;
8. Run the necessary scripts to build views, synonyms, etc.:
The primary scripts that you must run are:
i> CATALOG.SQL--creates the views of data dictionary tables and the
dynamic performance views
ii> CATPROC.SQL--establishes the usage of PL/SQL functionality and
creates many of the PL/SQL Oracle supplied packages
iii> CATPARR.SQL--creates RAC specific views
9. Edit init.ora and set appropriate values for the 2nd instance on the
2nd Node:
*** Names may need to be modified
instance_name=RAC2
instance_number=2
local_listener=LISTENER_RAC2
thread=2
undo_tablespace=UNDOTBS2
10. From the first instance, run the following command:
*** Path names, file names, and sizes will need to be modified
alter database
add logfile thread 2
group 3 ('/dev/RAC/redo2_01_100.dbf') size 100M,
group 4 ('/dev/RAC/redo2_02_100.dbf') size 100M;
alter database enable public thread 2;
12. Start the second Instance. (Assuming that your cluster configuration
is up and running).
=====================================================
Here are the steps to be followed:
1. Make a init
file is in $ORACLE_HOME\database. To simplify, you can copy init.ora to
init
*** Path names, file names, and sizes will need to be modified
Example parameter settings :
db_block_size=8192
db_cache_size=52428800
background_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
core_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
user_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
timed_statistics=TRUE
control_files=("/u01/rbdb1/control_01.ctl", "/u01/rbdb1/control_02.ctl")
db_name=rbdb1
shared_pool_size=52428800
sort_area_size=524288
undo_management=AUTO
undo_tablespace=UNDOTBS
** You can also use an spfile as described in Note 162491.1.
2. Run the following sqlplus command to connect to the database:
sqlplus '/ as sysdba'
3. Startup up the database in NOMOUNT mode:
SQL> startup nomount
4. Create the Database :
*** Path names, file names, and sizes will need to be modified
CREATE DATABASE
MAXLOGFILES 255
MAXINSTANCES 1
MAXDATAFILES 256
MAXLOGHISTORY 256
DATAFILE '/u01/oracle/rbdb1/system_01.dbf' SIZE 400M REUSE
UNDO TABLESPACE "UNDOTBS" DATAFILE '/u01/oracle/rbdb1/undotbs_01.dbf'
SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET US7ASCII
LOGFILE GROUP 1 ('/u01/oracle/rbdb1/redo1_01.dbf') SIZE 100M REUSE,
GROUP 2 ('/u01/oracle/rbdb1/redo1_02.dbf') SIZE 100M REUSE;
5. Create a Users Tablespace :
*** Path names, file names, and sizes will need to be modified
CREATE TABLESPACE "USERS" DATAFILE '/u01/oracle/rbdb1/users01.dbf'
SIZE 300M REUSE AUTOEXTEND ON
NEXT 5M MAXSIZE 1500M;
6. Create a Temporary Tablespace :
*** Path names, file names, and sizes will need to be modified
CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE '/u01/oracle/rbdb1/temp_01.dbf'
SIZE 40M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE "TEMP";
7. Run the scripts necessary to build views, synonyms, etc. :
The primary scripts that you must run are:
i> CATALOG.SQL-- creates the views of data dictionary tables and the
dynamic performance views.
ii> CATPROC.SQL-- establishes the usage of PL/SQL functionality and
creates many of the PL/SQL Oracle supplied packages.
==============================================================
Manual Database Creation steps for Real Application Clusters
==============================================================
Here are the steps to be followed to create a Real Application Clusters database:
1. Make a init
file is in $ORACLE_HOME\database. To simplify, you can copy init.ora to
init
be pointing to a pre-existing raw device or cluster file system location.
*** Path names, file names, and sizes will need to be modified
Example parameter settings for the first instance:
Cluster-Wide Parameters for Database "RAC":
db_block_size=8192
db_cache_size=52428800
background_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
core_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
user_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
timed_statistics=TRUE
control_files=("/dev/RAC/control_01.ctl", "/dev/RAC/control_02.ctl")
db_name=RAC
shared_pool_size=52428800
sort_area_size=524288
undo_management=AUTO
cluster_database=true
cluster_database_instances=2
remote_listener=LISTENERS_RAC
Instance Specific Parameters for Instance "RAC1":
instance_name=RAC1
instance_number=1
local_listener=LISTENER_RAC1
thread=1
undo_tablespace=UNDOTBS
* The local_listener parameter requires that you first add the listener
address to the TNSNAMES.ORA - remember to do so on both Node 1 and Node 2.
** You can also use an spfile as described in Note 136327.1.
2. Run the following sqlplus command to connect to the database:
sqlplus '/ as sysdba'
3. Startup up the database in NOMOUNT mode:
SQL> startup nomount
4. Create the Database (All raw devices must be pre-created) :
*** Path names, file names, and sizes will need to be modified
CREATE DATABASE
CONTROLFILE REUSE
MAXDATAFILES 254
MAXINSTANCES 32
MAXLOGHISTORY 100
MAXLOGMEMBERS 5
MAXLOGFILES 64
DATAFILE '/dev/RAC/system_01_400.dbf' SIZE 400M
REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
UNDO TABLESPACE "UNDOTBS" DATAFILE
'/dev/RAC/undotbs_01_210.dbf' SIZE 200M REUSE
NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET US7ASCII
LOGFILE GROUP 1 ('/dev/RAC/redo1_01_100.dbf') SIZE 100M REUSE,
GROUP 2 ('/dev/RAC/redo1_02_100.dbf') SIZE 100M REUSE;
5. Create a Users Tablespace:
*** Path names, file names, and sizes will need to be modified
CREATE TABLESPACE "USERS" LOGGING DATAFILE
'/dev/RAC/users_01_125.dbf' SIZE 120M REUSE
NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
6. Create a Temporary Tablespace:
*** Path names, file names, and sizes will need to be modified
CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE
'/dev/RAC/temp_01_50.dbf' SIZE 40M REUSE
7. Create a 2nd Undo Tablespace:
*** Path names, file names, and sizes will need to be modified
CREATE UNDO TABLESPACE "UNDOTBS2" DATAFILE
'/dev/RAC/undotbs_02_210.dbf' SIZE 200M REUSE
NEXT 5120K MAXSIZE UNLIMITED;
8. Run the necessary scripts to build views, synonyms, etc.:
The primary scripts that you must run are:
i> CATALOG.SQL--creates the views of data dictionary tables and the
dynamic performance views
ii> CATPROC.SQL--establishes the usage of PL/SQL functionality and
creates many of the PL/SQL Oracle supplied packages
iii> CATPARR.SQL--creates RAC specific views
9. Edit init
2nd Node:
*** Names may need to be modified
instance_name=RAC2
instance_number=2
local_listener=LISTENER_RAC2
thread=2
undo_tablespace=UNDOTBS2
10. From the first instance, run the following command:
*** Path names, file names, and sizes will need to be modified
alter database
add logfile thread 2
group 3 ('/dev/RAC/redo2_01_100.dbf') size 100M,
group 4 ('/dev/RAC/redo2_02_100.dbf') size 100M;
alter database enable public thread 2;
12. Start the second Instance. (Assuming that your cluster configuration
is up and running).
Monday, July 14, 2008
important commands on solaris & linux operating system we are using oracle
Today I am sharing the some important commands on solaris & linux operating system we are using oracle
it's will give the perfect ipaddress
nslookup <>
--> firing "awk" command
ls -l | grep 'Feb 15' | awk '{print $9}' | xargs -i rm {}
ls -l | grep 'Dec Jan' | awk '{print $9}' | xargs -i rm {}
I use the following ps commands in order to check for performance probelms:
1) Displaying top CPU_consuming processes:
ps aux | head -1; ps aux | sort -rn +2 | head -10
2) Displaying top 10 memory-consuming processes:
ps aux | head -1; ps aux | sort -rn +3 | head
3) Displaying process in order of being penalized:
ps -eakl | head -1; ps -eakl | sort -rn +5 |grep -i aioserver|wc -l --(to check aioserver)
4) Displaying process in order of priority:
ps -eakl | sort -n +6 | head
5) Displaying process in order of nice value
ps -eakl | sort -n +7
6) Displaying the process in order of time
ps vx | head -1;ps vx | grep -v PID | sort -rn +3 | head -10
7) Displaying the process in order of real memory use
ps vx | head -1; ps vx | grep -v PID | sort -rn +6 | head -10
8) Displaying the process in order of I/O
ps vx | head -1; ps vx | grep -v PID | sort -rn +4 | head -10
9) Displaying WLM classes
ps -a -o pid, user, class, pcpu, pmem, args
10) Determinimg process ID of wait processes:
ps vg | head -1; ps vg | grep -w wait
11) Wait process bound to CPU
ps -mo THREAD -p
REVERTING BACK FROM 64 BIT TO 32 BIT
Login as root on both servers
# bootinfo -K
# ln -sf /usr/lib/boot/unix_mp /unix
# ln -sf /usr/lib/boot/unix_mp /usr/lib/boot/unix
# bosboot -ad /dev/ipldevice
-- comment the line containing "orapw:2:wait:/etc/loadext -l /etc/pw-syscall64"
-- remove the comment from line "orapw:2:wait:/etc/loadext -L /etc"
# shutdown -Fr
you can find it the xclock this location at solaris operating system
/usr/openwin/bin/xclock
How can we verify the how many archives are generating per day
ls -ltr *|grep "Jul 8"|wc -l
cut -f 1,2 -d : /etc/passwd (it's displaying the first two fields of the password file)
using this command is changing the archives format
for FILENAME in `ls verpp_*.arc.Z`
do
NF=`echo $FILENAME | sed 's/verpp/verpq2/'`
mv $FILENAME $NF
done
This is of particularly the concurrent processes is running or not we can verify
ps -fu applerpu1 |grep -i FND | awk '{print $2}'
Killing the concurrent processes
ps -fu applerpu1 |grep -i FND | awk '{print $2}' | xargs kill -9
These are the different applications we are verifying
ps -ef|grep -i defunc
ps -ef|grep -i applerpu2
ps -fu applerpu2
FIND THE RAM MEMORY IN SOLARIS
/usr/sbin/prtdiag | more
cpio -idmv > (patchnumber) ---------à While installation .cpio extention patcheswe need to unzip using this command
DISPLAYING PROCESSES STATISTICS
prstat -a
Displaying the who are logging at OS level If you type (w) character.
-------------
w
-------------
This is the command in vi file how to take a space in starting line instead of kama (,)
In column mode like this
:g/,/s// /g (if you give this command in column mode you can receive space instead of coma)
find /U01/vol1/arc/*.arc -type f -mtime +1 -exec rm {} \; ---------In the cronjobs they are mentioning of removing archives older than oneday
For analyzing schema
exec dbms_stats.gather_schema_stats ( ownname=>'ARN', options=>'GATHER', estimate_percent =>dbms_stats.auto_sample_size, cascade=>TRUE, degree=>15 );
exec dbms_stats.gather_schema_stats (ownname => 'SCOTT',options => 'GATHER',estimate_percent => dbms_stats.auto_sample_size, method_opt => 'for all columns size auto',cascade => true, degree => 4 );
USING THIS QUERY YOU CAN FIND IT HOW MANY DATAFILES & THEIR LOCATION FOR CLONING PURPOSE IT'S USEFUL
select distinct substr(file_name,1,13) from dba_data_files;
How can you check the contents in a procedure (or)package
select TEXT from dba_source where NAME='OWNER.PACKAGE (OR)PROCEDURE';
CONSTRAINT
alter table disable constraint ;
LOAD TEST OF COMMANDS
select count(1) from v$open_cursor;
select sid, count(1) from v$open_cursor group by sid order by 2;
SELECT sid, user_name, COUNT(*) "Cursors per session" FROM v$open_cursor
GROUP BY sid, user_name;
select username,status,sid,serial#,osuser,machine,program from v$session;
SELECT sess.sid,stxt.piece,stxt.sql_text FROM v$session sess,v$sqltext stxt WHERE sess.sql_address = stxt.address
AND sess.sql_hash_value = stxt.hash_value AND sess.sid = &sid ORDER BY stxt.piece
sar
top
vmstat
IF YOU CANNOT FIND THE TOP COMMAND IN SOLARIS
instead of top command you can execute this /usr/bin/prstat
perfstat/perfstat
@?/rdbms/admin/spreport.sql
we can find the cpu usage of inactive sessions using this command
select p.spid,s.sid,s.serial#,s.username,s.osuser,s.status,s.schemaname from v$process p,v$session s where s.paddr=p.addr and s.sid=18
HIGHER VERSION IMPORTING
TAKE EXPORT like this
Exp user/password@ db file='local file path.dmp' log='local path.log'
BLOCK CORRUPTION
v$copy_corruption
v$database_block_corruption
v$backup_corruption
SQL> select CORRUPTION_CHANGE#,CORRUPTION_TYPE,BLOCK#,a.BLOCKS,TABLE_NAME,OWNER from v$database_block_corruption a, dba_tables b
where a.BLOCKS=b.BLOCKS and b.TABLE_NAME='SYMC2_CUF_TXN';
SQL> SELECT SEGMENT_TYPE,OWNER||'.'||SEGMENT_NAME FROM DBA_EXTENTS WHERE FILE_ID = 32 AND 328013 BETWEEN BLOCK_ID AND BLOCK_ID+BLOCKS -1;
SQL> alter index owner.indexname rebuild online;
select ds.*
from dba_segments ds, sys.uet$ e
where ds.header_file=e.segfile#
and ds.header_block=e.segblock# and ds.owner='EAIMGR'
and between e.block# and e.block#+e.length-1;
and e.header_file=
and between e.block# and e.block#+e.length-1;
Creating Database LINK
CREATING DATABASE LINK
create database link STAGE_DATBASE connect to USER0 identified by ST3G1 using 'ALIAS';
select 'grant '||privilege||' to '||r.grantee||';' from dba_role_privs r, dba_sys_privs s where r.granted_role = 'CONNECT' and s.grantee = 'CONNECT' and r.grantee <> 'SYS';
select * from dba_dml_locks where name='AGG_ORDER_STG';
How can you check the table corrupted using this view
SELECT segment_name,segment_type,owner,tablespace_name,block_id,blocks FROM dba_extents WHERE file_id=393 AND 114 BETWEEN block_id and block_id + blocks -1 ;
SELECT segment_name,segment_type, owner, tablespace_name, block_id, blocks FROM dba_extents WHERE file_id = 388 and block_id=33;
alter index indexname modify partition partition_name unuseable;
alter index indexname rebuild online;
This is procedure of EXPLAIN PLAN
explain plan for <>
After that you execute this procedure
@$ORACLE_HOME/rdbms/admin/utlxpls
How to check the OEM VERSIONG
select * from dba_registry;
Procedure of Datapump
First create a directory on OS level.
Then create directory on sql prompt using the OS directory path by using the user who is going to take the export.
Ex. Create directory pqr as 'path of os directory';
Expdp user/passwd directory=pqr dumpfile=xyz.dmp logfile=xyz.log schemas/tables=a,b,c
Mooving archives using this date
nohup mv `ls -ltr *.gz|grep "Mar 7"|tr -s " "|cut -d " " -f9` /U01/vol9/arc_bkp &
How can we verify the how many archives are generating per day
ls -ltr *|grep "Jul 8"|wc -l
How to take export using datapump
U01> Create directory export as '/U01/vol1/bkp/export';
Directory created.
expdp system/xxx directory=export dumpfile=23May2008.dmp logfile=23May2008.log tables='STAGE.RPT_SKU','STAGE.SU_SUBSCRIPTIONS_SPD_ORIG'
impdp dumpfile=23May2008.dmp logfile=imp_23May2008.log REMAP_TABLESPACE=STAGE_DATA01:SASSTGD_DATA01
YOU CAN CREATE A DUMP FILES USING THIS PARALLEL=4 WHILE TAKING EXPORT AT A TIME IN DATAPUMP
nohup expdp system/xxxx dumpfile=SR_ETL_exp_tables_%U.dmp directory=SD LOGFILE=SR_ETL_exp_table_1.log PARALLEL=4 &
nohup impdp system/xxxx dumpfile=SR_ETL_exp_tables_%U.dmp directory=HD LOGFILE=SR_ETL_imp_tables_1.log PARALLEL=4 &
How to analyze table
exec dbms_stats.gather_table_stats(ownname=>'USER',tabname=>'TABLENAME',estimate_percent=>20, cascade=>true,degree=>8,method_opt=>'FOR ALL COLUMNS size 250');
export & import
nohup exp system/xxxxx owner=xxxx rows=n file=xxxx.dmp log=xxxx.log Buffer=80000000 &
nohup imp \"/ as sysdba\" file=xxxxx.dmp log=xxxxxx.log fromuser=xxxxxx touser=xxxxxx buffer=800000 feedback=20000 ignore=y &
Taking export using PAR file Below is an example of an export parameter file: export_options.par.
compress=n
direct=y
buffer=1000
rows=n
tables=table_with_one_million_rows, table_with_one_million_rows_1
userid=scott/tiger
file= file.dmp
log=file.log
Using this parameter file, the export command line is executed by the following:
exp parfile=export_options.par
some important views
select s.username, sum(p.pga_alloc_mem), sum (p.pga_used_mem) from v$session s, v$process p where s.paddr = p.addr and sid=35 group by s.username order by 2;
select a.username,a.account_status,a.lock_date,a.expiry_date,a.profile,b.resource_name,b.resource_type,b.limit from dba_users a, dba_profiles b where a.profile=b.profile and a.username like 'SYSTEM';
select owner,object_name,object_type,status
2 from dba_objects
3 where status != 'VALID'
4 and substr(object_name,1,1) != chr(95)
5 order by 1,2;
select owner,constraint_name,constraint_type TYPE,status,table_name
2 from dba_constraints
3 where status != 'ENABLED'
4 order by 1,2;
select owner,trigger_name,table_name
2 from dba_triggers
3 where status = 'DISABLED' and owner != 'SYS';
select TABLE_NAME, TABLE_NAME, PRIVILEGE from dba_tab_privs where GRANTOR ='USER';
select * from dba_role_privs where grantee='USER';
Creating Tablespace
Create tablespace VEN_REF01_DATA datafile '/U01/vol3/dat/data_01.dbf' SIZE 5120m
LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO;
ANALYZING TABLE
EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>'HYBRID',TABNAME=>'PS_INSTALLBASE',ESTIMATE_PERCENT=>20,CASCADE=>TRUE,DEGREE=>8);
it's will give the perfect ipaddress
nslookup <
--> firing "awk" command
ls -l | grep 'Feb 15' | awk '{print $9}' | xargs -i rm {}
ls -l | grep 'Dec Jan' | awk '{print $9}' | xargs -i rm {}
I use the following ps commands in order to check for performance probelms:
1) Displaying top CPU_consuming processes:
ps aux | head -1; ps aux | sort -rn +2 | head -10
2) Displaying top 10 memory-consuming processes:
ps aux | head -1; ps aux | sort -rn +3 | head
3) Displaying process in order of being penalized:
ps -eakl | head -1; ps -eakl | sort -rn +5 |grep -i aioserver|wc -l --(to check aioserver)
4) Displaying process in order of priority:
ps -eakl | sort -n +6 | head
5) Displaying process in order of nice value
ps -eakl | sort -n +7
6) Displaying the process in order of time
ps vx | head -1;ps vx | grep -v PID | sort -rn +3 | head -10
7) Displaying the process in order of real memory use
ps vx | head -1; ps vx | grep -v PID | sort -rn +6 | head -10
8) Displaying the process in order of I/O
ps vx | head -1; ps vx | grep -v PID | sort -rn +4 | head -10
9) Displaying WLM classes
ps -a -o pid, user, class, pcpu, pmem, args
10) Determinimg process ID of wait processes:
ps vg | head -1; ps vg | grep -w wait
11) Wait process bound to CPU
ps -mo THREAD -p
REVERTING BACK FROM 64 BIT TO 32 BIT
Login as root on both servers
# bootinfo -K
# ln -sf /usr/lib/boot/unix_mp /unix
# ln -sf /usr/lib/boot/unix_mp /usr/lib/boot/unix
# bosboot -ad /dev/ipldevice
-- comment the line containing "orapw:2:wait:/etc/loadext -l /etc/pw-syscall64"
-- remove the comment from line "orapw:2:wait:/etc/loadext -L /etc"
# shutdown -Fr
you can find it the xclock this location at solaris operating system
/usr/openwin/bin/xclock
How can we verify the how many archives are generating per day
ls -ltr *|grep "Jul 8"|wc -l
cut -f 1,2 -d : /etc/passwd (it's displaying the first two fields of the password file)
using this command is changing the archives format
for FILENAME in `ls verpp_*.arc.Z`
do
NF=`echo $FILENAME | sed 's/verpp/verpq2/'`
mv $FILENAME $NF
done
This is of particularly the concurrent processes is running or not we can verify
ps -fu applerpu1 |grep -i FND | awk '{print $2}'
Killing the concurrent processes
ps -fu applerpu1 |grep -i FND | awk '{print $2}' | xargs kill -9
These are the different applications we are verifying
ps -ef|grep -i defunc
ps -ef|grep -i applerpu2
ps -fu applerpu2
FIND THE RAM MEMORY IN SOLARIS
/usr/sbin/prtdiag | more
cpio -idmv > (patchnumber) ---------à While installation .cpio extention patcheswe need to unzip using this command
DISPLAYING PROCESSES STATISTICS
prstat -a
Displaying the who are logging at OS level If you type (w) character.
-------------
w
-------------
This is the command in vi file how to take a space in starting line instead of kama (,)
In column mode like this
:g/,/s// /g (if you give this command in column mode you can receive space instead of coma)
find /U01/vol1/arc/*.arc -type f -mtime +1 -exec rm {} \; ---------In the cronjobs they are mentioning of removing archives older than oneday
For analyzing schema
exec dbms_stats.gather_schema_stats ( ownname=>'ARN', options=>'GATHER', estimate_percent =>dbms_stats.auto_sample_size, cascade=>TRUE, degree=>15 );
exec dbms_stats.gather_schema_stats (ownname => 'SCOTT',options => 'GATHER',estimate_percent => dbms_stats.auto_sample_size, method_opt => 'for all columns size auto',cascade => true, degree => 4 );
USING THIS QUERY YOU CAN FIND IT HOW MANY DATAFILES & THEIR LOCATION FOR CLONING PURPOSE IT'S USEFUL
select distinct substr(file_name,1,13) from dba_data_files;
How can you check the contents in a procedure (or)package
select TEXT from dba_source where NAME='OWNER.PACKAGE (OR)PROCEDURE';
CONSTRAINT
alter table
LOAD TEST OF COMMANDS
select count(1) from v$open_cursor;
select sid, count(1) from v$open_cursor group by sid order by 2;
SELECT sid, user_name, COUNT(*) "Cursors per session" FROM v$open_cursor
GROUP BY sid, user_name;
select username,status,sid,serial#,osuser,machine,program from v$session;
SELECT sess.sid,stxt.piece,stxt.sql_text FROM v$session sess,v$sqltext stxt WHERE sess.sql_address = stxt.address
AND sess.sql_hash_value = stxt.hash_value AND sess.sid = &sid ORDER BY stxt.piece
sar
top
vmstat
IF YOU CANNOT FIND THE TOP COMMAND IN SOLARIS
instead of top command you can execute this /usr/bin/prstat
perfstat/perfstat
@?/rdbms/admin/spreport.sql
we can find the cpu usage of inactive sessions using this command
select p.spid,s.sid,s.serial#,s.username,s.osuser,s.status,s.schemaname from v$process p,v$session s where s.paddr=p.addr and s.sid=18
HIGHER VERSION IMPORTING
TAKE EXPORT like this
Exp user/password@
BLOCK CORRUPTION
v$copy_corruption
v$database_block_corruption
v$backup_corruption
SQL> select CORRUPTION_CHANGE#,CORRUPTION_TYPE,BLOCK#,a.BLOCKS,TABLE_NAME,OWNER from v$database_block_corruption a, dba_tables b
where a.BLOCKS=b.BLOCKS and b.TABLE_NAME='SYMC2_CUF_TXN';
SQL> SELECT SEGMENT_TYPE,OWNER||'.'||SEGMENT_NAME FROM DBA_EXTENTS WHERE FILE_ID = 32 AND 328013 BETWEEN BLOCK_ID AND BLOCK_ID+BLOCKS -1;
SQL> alter index owner.indexname rebuild online;
select ds.*
from dba_segments ds, sys.uet$ e
where ds.header_file=e.segfile#
and ds.header_block=e.segblock# and ds.owner='EAIMGR'
and between e.block# and e.block#+e.length-1;
and e.header_file=
and between e.block# and e.block#+e.length-1;
Creating Database LINK
CREATING DATABASE LINK
create database link STAGE_DATBASE connect to USER0 identified by ST3G1 using 'ALIAS';
select 'grant '||privilege||' to '||r.grantee||';' from dba_role_privs r, dba_sys_privs s where r.granted_role = 'CONNECT' and s.grantee = 'CONNECT' and r.grantee <> 'SYS';
select * from dba_dml_locks where name='AGG_ORDER_STG';
How can you check the table corrupted using this view
SELECT segment_name,segment_type,owner,tablespace_name,block_id,blocks FROM dba_extents WHERE file_id=393 AND 114 BETWEEN block_id and block_id + blocks -1 ;
SELECT segment_name,segment_type, owner, tablespace_name, block_id, blocks FROM dba_extents WHERE file_id = 388 and block_id=33;
alter index indexname modify partition partition_name unuseable;
alter index indexname rebuild online;
This is procedure of EXPLAIN PLAN
explain plan for <
After that you execute this procedure
@$ORACLE_HOME/rdbms/admin/utlxpls
How to check the OEM VERSIONG
select * from dba_registry;
Procedure of Datapump
First create a directory on OS level.
Then create directory on sql prompt using the OS directory path by using the user who is going to take the export.
Ex. Create directory pqr as 'path of os directory';
Expdp user/passwd directory=pqr dumpfile=xyz.dmp logfile=xyz.log schemas/tables=a,b,c
Mooving archives using this date
nohup mv `ls -ltr *.gz|grep "Mar 7"|tr -s " "|cut -d " " -f9` /U01/vol9/arc_bkp &
How can we verify the how many archives are generating per day
ls -ltr *|grep "Jul 8"|wc -l
How to take export using datapump
U01> Create directory export as '/U01/vol1/bkp/export';
Directory created.
expdp system/xxx directory=export dumpfile=23May2008.dmp logfile=23May2008.log tables='STAGE.RPT_SKU','STAGE.SU_SUBSCRIPTIONS_SPD_ORIG'
impdp dumpfile=23May2008.dmp logfile=imp_23May2008.log REMAP_TABLESPACE=STAGE_DATA01:SASSTGD_DATA01
YOU CAN CREATE A DUMP FILES USING THIS PARALLEL=4 WHILE TAKING EXPORT AT A TIME IN DATAPUMP
nohup expdp system/xxxx dumpfile=SR_ETL_exp_tables_%U.dmp directory=SD LOGFILE=SR_ETL_exp_table_1.log PARALLEL=4 &
nohup impdp system/xxxx dumpfile=SR_ETL_exp_tables_%U.dmp directory=HD LOGFILE=SR_ETL_imp_tables_1.log PARALLEL=4 &
How to analyze table
exec dbms_stats.gather_table_stats(ownname=>'USER',tabname=>'TABLENAME',estimate_percent=>20, cascade=>true,degree=>8,method_opt=>'FOR ALL COLUMNS size 250');
export & import
nohup exp system/xxxxx owner=xxxx rows=n file=xxxx.dmp log=xxxx.log Buffer=80000000 &
nohup imp \"/ as sysdba\" file=xxxxx.dmp log=xxxxxx.log fromuser=xxxxxx touser=xxxxxx buffer=800000 feedback=20000 ignore=y &
Taking export using PAR file Below is an example of an export parameter file: export_options.par.
compress=n
direct=y
buffer=1000
rows=n
tables=table_with_one_million_rows, table_with_one_million_rows_1
userid=scott/tiger
file= file.dmp
log=file.log
Using this parameter file, the export command line is executed by the following:
exp parfile=export_options.par
some important views
select s.username, sum(p.pga_alloc_mem), sum (p.pga_used_mem) from v$session s, v$process p where s.paddr = p.addr and sid=35 group by s.username order by 2;
select a.username,a.account_status,a.lock_date,a.expiry_date,a.profile,b.resource_name,b.resource_type,b.limit from dba_users a, dba_profiles b where a.profile=b.profile and a.username like 'SYSTEM';
select owner,object_name,object_type,status
2 from dba_objects
3 where status != 'VALID'
4 and substr(object_name,1,1) != chr(95)
5 order by 1,2;
select owner,constraint_name,constraint_type TYPE,status,table_name
2 from dba_constraints
3 where status != 'ENABLED'
4 order by 1,2;
select owner,trigger_name,table_name
2 from dba_triggers
3 where status = 'DISABLED' and owner != 'SYS';
select TABLE_NAME, TABLE_NAME, PRIVILEGE from dba_tab_privs where GRANTOR ='USER';
select * from dba_role_privs where grantee='USER';
Creating Tablespace
Create tablespace VEN_REF01_DATA datafile '/U01/vol3/dat/data_01.dbf' SIZE 5120m
LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO;
ANALYZING TABLE
EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>'HYBRID',TABNAME=>'PS_INSTALLBASE',ESTIMATE_PERCENT=>20,CASCADE=>TRUE,DEGREE=>8);
Subscribe to:
Posts (Atom)