Friday, April 21, 2017

OMS_HOST and EM_UPLOAD_PORT is not available While deploying OMS AGENT ON TARGET 13C OEM

dont forget  OMS server to write in /etc/hosts on all TARGET servers

OMS SERVER must be reachable From all target servers....!!

add oms server in /etc/hosts

vi /etc/hosts

xxx.xxx.x.xxx OMSSERVER.DOMAIN.NAME OMSSERVER




Thursday, February 6, 2014

How to Configure Multipath on Oracle Linux

After creating new disk on SAN and presenting on host.. Scan the host bus  with below command on server;

echo "- - -" > /sys/class/scsi_host/host0/scan

Note: if you have more then one host bus then scan for each one by changing "host0"  to  "host1" and go on...

Output  Before Scanning host bus;

[root@testdb /]# cd /dev/disk/
[root@testdb disk]# ll
total 0
drwxr-xr-x. 2 root root 240 Feb  5 16:52 by-id
drwxr-xr-x. 2 root root 120 Feb  5 16:52 by-path
drwxr-xr-x. 2 root root 100 Feb  5 16:52 by-uuid
[root@testdb disk]# cd by-id/
[root@testdb by-id]# ll
total 0
lrwxrwxrwx. 1 root root 16 Feb  5 16:52 cciss-3600508b100184a39535748394f500006 -> ../../cciss/c0d0
lrwxrwxrwx. 1 root root 18 Feb  5 16:52 cciss-3600508b100184a39535748394f500006-part1 -> ../../cciss/c0d0p1
lrwxrwxrwx. 1 root root 18 Feb  5 16:52 cciss-3600508b100184a39535748394f500006-part2 -> ../../cciss/c0d0p2
lrwxrwxrwx. 1 root root 10 Feb  5 16:52 dm-name-vg_testdb-lv_root -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Feb  5 16:52 dm-name-vg_testdb-lv_swap -> ../../dm-1
lrwxrwxrwx. 1 root root 10 Feb  5 16:52 dm-uuid-LVM-a84PMI5ipJD3bHQ3jD5MKMpRxCoXRWn0pBKsI1EsJVypftv78hkRRPbpJMvO71Q2 -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Feb  5 16:52 dm-uuid-LVM-a84PMI5ipJD3bHQ3jD5MKMpRxCoXRWn0zIvrWlJWKRoW126ZyzhSwd1Tr0Pyd7sx -> ../../dm-1
lrwxrwxrwx. 1 root root 16 Feb  5 16:52 wwn-0x600508b100184a39535748394f500006 -> ../../cciss/c0d0
lrwxrwxrwx. 1 root root 18 Feb  5 16:52 wwn-0x600508b100184a39535748394f500006-part1 -> ../../cciss/c0d0p1
lrwxrwxrwx. 1 root root 18 Feb  5 16:52 wwn-0x600508b100184a39535748394f500006-part2 -> ../../cciss/c0d0p2

Tuesday, September 17, 2013

Oracle 12c Cloud ORA-01017 and Changing 'SYSMAN' Password

 check the oms  logs  located in ;

            /u01/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out


make sure you get the error ORA-01017 in log file...

then stop all the OMS

/u01/app/oracle/Middleware/oms/bin/emctl stop oms

Modify the password of 'SYSMAN';

/u01/app/oracle/Middleware/oms/bin/emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd <Password of SYS> -new_pwd <New Password for SYSMAN>

output of the above command;

[oracle@emcloud bin]$ ./emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd oracle -new_pwd Password1


Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
Changing passwords in backend ...
Passwords changed in backend successfully.
Updating repository password in Credential Store...
Successfully updated Repository password in Credential Store.
Restart all the OMSs using 'emctl stop oms -all' and 'emctl start oms'.
Successfully changed repository password.

start all the OMS;

 /u01/app/oracle/Middleware/oms/bin/emctl start oms  


- Erol

Tuesday, August 20, 2013

Monday, June 17, 2013

EMCTL(Enterprise Manager) Invalid Connection Pool. ERROR = ORA-28000:




Check SYSMAN and DBSNMP account status...this problem can be related with wrong password configuration of emctl...

first check status of SYSMAN and DBSNMP;

select account_status,lock_date,username from dba_users where username in ('SYSMAN','DBSNMP');


ACCOUNT_STATUS                   LOCK_DATE       USERNAME
-------------------------------- --------------- ------------------------------
OPEN                                                                          DBSNMP
LOCKED(TIMED)                         17-06-13              SYSMAN

SYSMAN status LOCKED ...before unlocking sysman accout stop the dbconsole;

 emctl stop dbconsole

Then

 sqlplus / as sysdba

SQL> alter user sysman account unlock;
SQL> alter user sysman identified by  NEWPASSWORD;

and set password of emctl  with oracle user; and set dbconsole password as NEWPASSWORD

emctl setpasswd dbconsole
start dbconsole

emctl start dbconsole 


-Erol


Wednesday, June 12, 2013

TRUNCATE Aud$ table to prevent system tablespace from getting bigger...

My system tablespace was getting bigger everyday and i realized that  aud$ table was causing this problem and scheluding a  crontab-job truncating aud$ table on monday and thursday ..simply solved my problem..

with oracle user;

vi /home/oracle/scripts/truncate_aud_table.sh

then copy paste  into truncate_aud_table.sh

 #!/bin/bash
. /home/oracle/.bash_profile
output=`sqlplus -s "/ as sysdba" <<EOF
       set heading off feedback off verify off
       TRUNCATE TABLE aud$;
       exit
EOF
`
echo $output

after creating sh , give permissions

chmod 775  /home/oracle/scripts/truncate_aud_table.sh

and add it on crontab ;

00 15 * * 1,4 /home/oracle/scripts/audit_sil.sh > /home/oracle/scripts/audit_sil.log 2>&1


Will run on Monday and Thursday at 15:00 ..

Thursday, May 16, 2013

ASM file metadata operation (Non-Exadata)


    Today our developers were complaining about performance issue , and there were nothing special which could cause high cpu usage on server  but  there were many sessions with wait event "ASM file metadata operation" and "ksv master wait'"...after googling and digging the oracle support,  finally found doc id (1308282.1) related to problem with paramater "cell_offload_processing".. whydoes oracle use cell_offload_processing? 

     In Exadata Database Machine , Cell Offloading:The storage cells are saving the database node from processing some workload  to inside them..this process can be referred to as cell offloading...In a Non-Exadata Oracle database , when someone selects a single column in a row , entire block related to row will be writting from the disks to  buffer cache and then selected row will be extracted from this block..but Exadata database machine can pull desired rows from disks directly instead of writing entire block to buffer cache(this is also know as smart-scan)..Smart-scan can help to reduce I/O on database server.
  
     But in a Non-Exadata Oracle database, cell_offload_processing can be set as "FALSE" to solve this problem...

"alter system set cell_offload_processing = false;" 


This issue is also known as a bug and can be handled by applying Patch 
11800170...

- Erol


Thursday, May 9, 2013

Oracle Linux Desktop Gui Problem

You have to install these packages while installing oracle linux to have desktop gui...
"X Window System" , "Desktop General Purpose", "Desktop Graphical Administration Tools", "Legacy X Window System compatibility"
If u miss installing these packages.. u can install with yum
yum groupinstall "X Window System" Desktop "General Purpose Desktop" "Graphical Administration Tools" "Legacy X Window System compatibility"
if u dont have internet u need to install rpms manually from installation cd

-Erol

Thursday, April 18, 2013

ORA-12991: column is referenced in a multi-column constraint (Related to GoldenGate)

After moving our 10g database to 11g with golden gate...our developers were complaining about ORA-12991: column is referenced in a multi-column constraint...This problem is related to enabling Supplemental Logging with "ALTER DATABASE ADD SUPPLEMENTAL LOG DATA" , when u try to drop a column...First of all u have to find what  log_group_name causes the problem...

SQL> select log_group_name from dba_log_groups where table_name = 'TABLE_NAME' ;

LOG_GROUP_NAME
============================
GGS_DROP_COLS_24242


Then drop it;


SQL> alter table table_name drop supplemental log group GGS_DROP_COLS_24242;

table altered.



- Erol

Friday, April 5, 2013

re-executing root.sh when installation fails

rootcrs.pl -deconfig -force

how to set NLS_DATA_FORMAT on linux before starting rman

NLS_DATE_FORMAT='DD-MON-YYYY:HH24:MI:SS'; export NLS_DATE_FORMAT

 rman target sys/password

Creating user with dbms_metadata.get_ddl


select dbms_metadata.get_ddl('USER',username) from dba_users where username in ('user_1',user_2',user_3','user_4')


user_1,user_2,user_3,user_4 should be defined by dba as real user names...

Thursday, April 4, 2013

Wednesday, December 26, 2012

every 5 minutes how to copy files after certain date time (linux)


here the script  to copy  archive logs ,created after certain date time, into different location every 5 minutes for our production database; simply , writing the last time of archive log created by oracle on os into a log file and then read the time from this log file to find out which archive logs should be copied next time.create a sh file and copy paste this script into file and then add it into crontab ,if u have any question feel free to ask...


REF=.tmp.$$
export date_name=`cat last_time`
touch -t $(date +%m%d)$date_name $REF
ls -lra | tail -1 | awk '{print $8}' | sed 's/\://g' > last_time
find . -newer $REF -exec cp {} /opt/oracle / \;
rm -f $REF



before run this script create a file called last_time in archive logs destination folder and write the time after files u wanna copy.for example write 1900  in last_time file to copy files after 19:00..


adding crontab to execute sh every 5 mins;

crontab -e then add this line ;

*/5 * * * * /opt/name_of_file.sh

Monday, December 24, 2012

PRVF-5637 and PRVF-9802 installing oracle database on oracle linux or redhat 6.x

Solution for PRVF-5637
if u have more than one  node then perform these steps for each nodes;

# mv /usr/bin/nslookup /usr/bin/nslookup.orig
# echo '#!/bin/bash
/usr/bin/nslookup.orig $*
exit 0' > /usr/bin/nslookup
# chmod a+x nslookup

its well-known bug for OEL6 or RHEL6 while installing oracle 11.2.0.3.

 grid installer returning exit code of 1 which means as a problem;



* Mon May 07 2012 Adam Tkac <atkac redhat com> 32:9.8.2-0.9.rc1
- fix race condition in the resolver module
- nslookup: return non-zero exit code when fail to get answer (#816164)

simply returning nlslookup behaviors like OEL 5.8 will solve your problem.

  Good luck.

Solution for PRVF-9802

u need to download oracleasmlib from the below link and install it

oracleasmlib.rpm

after installing rpm u can see the disks with "/usr/sbin/oracleasm-discover"


[root@rac1 opt]# rpm -ivh oracleasmlib-2.0.4-1.el5.x86_64.rpm
warning: oracleasmlib-2.0.4-1.el5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 1e5e0159: NOKEY
Preparing...                ########################################### [100%]
   1:oracleasmlib           ########################################### [100%]
[root@rac1 opt]#  /usr/sbin/oracleasm-discover
Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.4 (KABI_V2)]
Discovered disk: ORCL:DISK1 [3078144 blocks (1576009728 bytes), maxio 512]

Also check permissions for disks, they must belong to grid user..


[root@rac1 opt]# cd /dev/oracleasm/disks/
[root@rac1 disks]# ll
total 0
brw-rw---- 1 grid oinstall 8, 1 May 15 14:57 DISK1


- Erol









Sunday, December 16, 2012

ORA-07445: exception encountered: core dump [ptmak()+191] [SIGSEGV]

Usually this problem is related with debug scructures.Today one of our developers was complaining with ora-031114: Not Connected to Oracle and when i checked the alert log i saw ORA-07445: exception encountered: core dump [ptmak()+191] [SIGSEGV] in alert log and this problem can occur if last time debug mode was on and compiled package before upgrading to database and retry to compile the same package after upgrading.What you should do is to check if package has debug flag or not.if it has debug flag then just disable it.Good luck.

Thursday, December 6, 2012

Installation Oracle OS Watcher and User's Guide



if your java version below 1.4.2 then you need to download latest java version and install it.

download latest java from the below link;

latest java

installation java on redhat

Step 1: installing rpm;

[oracle@isupdbsh opt]$  rpm -ivh jdk-7u9-linux-x64.rpm


Step 2: installation and configuration java

[oracle@isupdbsh /]$ alternatives  --install     /usr/bin/java   java /usr/java/jdk1.7.0_09/jre/bin/java 1


[oracle@isupdbsh /]$ alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
 + 2           /usr/java/jdk1.7.0_09/jre/bin/java

Enter to keep the current selection[+], or type selection number: 2

select the new location installed java and check java version;

Step 3: Checking java version;

[oracle@isupdbsh /]$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)


Tuesday, December 4, 2012

how to get column names,DATA_TYPE,DATA_LENGTH of any table....


select a.table_name,U.OWNER, column_name,DATA_TYPE,DATA_LENGTH from user_tab_columns a,ALL_CATALOG u
where a.TABLE_NAME=u.TABLE_NAME
AND u.table_name='table_name'
and column_name like upper('%column_name%')
and u.owner='owner'
order by DATA_LENGTH desc;

Friday, November 23, 2012

ORA-15018, ORA-15072 on node 2 when running root.sh

U have to give the path of asm disks manually when installing 11g grid Infrastructure

click Disk discovery path and then write

/dev/oracleasm/disks

automatically asm disks will be showned on list.And dont forget to check owner of disks they should belong to oracle:oinstall..

then edit /etc/sysconfig/oracleasm and add dm,sd parameters otherwise u can have a trouble with disks after restarting server.(if  you are using multipath.)

ORACLEASM_SCANORDER="dm"
ORACLEASM_SCANEXCLUDE="sd"

last thing, dont forget to restart  oracleasm

/etc/init.d/oracleasm restart.

after these steps are done simply run rootcrs.pl -verbose -deconfig -force on first node , if u have more than two nodes then u have to add -verbose. good luck.