Moneycontrol Brokerage Recos

Thursday, November 7, 2013

Unable to Open Oracle 11g R2 OEM in Internet Explorer but works in Chrome

Today, when I entered in the office and tried to play with Oracle 11g R2 OEM then it didn't work in Internet Explorer while it was working in Google Chrome and after some investigation I came up with the following command:

C:\Windows\system32>certutil -setreg chain\EnableWeakSignatureFlags 8
Software\Microsoft\Cryptography\OID\EncodingType 0\CertDllCreateCertificateChainEngine\Config\EnableWeakSignatureFlags:

New Value:
  EnableWeakSignatureFlags REG_DWORD = 8
CertUtil: -setreg command completed successfully.
The CertSvc service may need to be restarted for changes to take effect.

C:\Windows\system32>

Finally, it worked great even on IE9.....!!

Saturday, August 17, 2013

SP2-1503: Unable to initialize Oracle call interface

Today, I installed Oracle 10.2.0.1.0 on my windows 7 system, the installation was successful without any glitches but when I tried to open SQLPLUS console using command prompt then I got the following error.
C:\Users\RAJKUMAR>sqlplus /nolog

SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
C:\Users\RAJKUMAR>

Solution: Such errors generally comes on Windows Vista and Windows 7 systems due to not loading of some required library files so to overcome to this error you will have to open the command prompt as Administrator then try, it will work.
Hope it will work for you............!!

Saturday, May 25, 2013

How to increase Oracle 11g OEM heap Size?


When we try to compare or synchronize data between two databases using OEM, OEM should have enough space required to perform well without any glitches. So in order to avoid Heap Size issue or to resolve Heap size issue yon can follow the following set of steps.

Run the following command to increase dbconsole heap size. You can define enough Heap Size value for the parameter -heap_size as per your requirement.

$ emctl config dbconsole -heap_size 512M
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://RAC-1:1158/em/console/aboutApplication
OMS heap size properties successfully added to emoms.properties file.


 The changes we made to increase the heap size will take effect after restarting the dbconsole.

$ emctl stop dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://RAC-1:1158/em/console/aboutApplication
The OracleDBConsoleorcl service is stopping...........

The OracleDBConsoleorcl service was stopped successfully.

 $ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://RAC-1:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ...The OracleDBConsoleor
cl service is starting.....................

The OracleDBConsoleorcl service was started successfully.

 Hope it will help…………!!

Tuesday, April 30, 2013

Linux Shell Script to Backup Oracle database using RMAN


Here are the steps making Linux shell scripts to backup oracle database using RMAN.

First of all, I have created a shell script named rmanfullbak.sh which contains the actual sequence of commands to backup the database.

[oracle@rac1 ~]$ cat rmanfullbak.sh
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
backup as compressed backupset archivelog all not backed up delete input;
backup as compressed backupset database;
release channel c1;
release channel c2;
release channel c3;
}

[oracle@rac1 ~]$

Note: - You can modify this shell script as per your requirement like backup format.

 Now, I have created another shell script named rmanbak.sh which will start the RMAN session and call the above shell script as the above created shell script is given as input parameter here and record the screen log into a separate log file named rmanback.log for future reference making sure whether our backup has been done successfully without any error.
[oracle@rac1 ~]$ cat rmanbak.sh

#!/bin/bash
rman target / @/home/oracle/rmanfullbak.sh >>rmanback.log

Now, you can run this script checking whether it's working the way we want.

[oracle@rac1 ~]$ ./rmanbak.sh

Finally, you can make sure what did this script do after executing by looking at rmanback.log file which records the screen log produced by this operation.

Now, We will schedule it to run automatically on specified time interval using CON Job command.

[oracle@rac1 ~]$ crontab -e

20 10 * * * /home/oracle/bkpscript/rmanbak.sh

It will execute on 10:20AM every day.

Hope it will help someone!


...................................!!

Swtich SElinux to Permissive mode from Enforcing mode

Security-Enhanced Linux (SELinux) is a security architecture integrated into the 2.6.x kernel using the Linux Security Modules (LSM). It is a project of the United States National Security Agency (NSA) and the SELinux community. SELinux integration into Red Hat Enterprise Linux was a joint effort between the NSA and Red Hat.

On EL5/RHEL5+ 11g, Someone might find some error. example:

I was encountering the following error on Oracle 11.2.0.1.0 while trying to connect using sqlplus /nolog on Oracle Linux-5.7
error while loading shared libraries: $ORACLE_HOME/lib/libnnz11.so: cannot restore segment prot after reloc: Permission denied
To overcome this error we need to set SElinux to Permissive mode from Enforcing mode.

If we need to change "Enforcing" mode to the "Permissive" mode, we can use "setenforce" command.
# setenforce
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]

setenforce 1 — SELinux runs in enforcing mode.
setenforce 0 — SELinux runs in permissive mode.
Example:
# getenforce
Enforcing

# setenforce 0

# getenforce
Permissive

# sestatus -v
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 18
Policy from config file:targeted
.
.
A "setenforce" command, that change mode immediate, and effect until the next reboot.

If we need to use "Permissive" mode at the next reboot, we have to modify /etc/selinux/config file as well.

SELINUX=permissive
SELINUX=enforcing|permissive|disabled

enforcing — The SELinux security policy is enforced.

permissive — The SELinux system prints warnings but does not enforce policy.

This is useful for debugging and troubleshooting purposes. In permissive mode, more denials are logged because subjects can continue with actions that would otherwise be denied in enforcing mode. For example, traversing a directory tree in permissive mode produces avc: denied messages for every directory level read. In enforcing mode, SELinux would have stopped the initial traversal and kept further denial messages from occurring.

disabled — SELinux is fully disabled. SELinux hooks are disengaged from the kernel and the pseudo-file system is unregistered.

Friday, April 5, 2013

VMware 8 Serial key

Here is the license key for VMware 8 product.

5A403-AYLE6-NZFM1-YHC7M-83Z5M

Thursday, February 28, 2013

Recover UNDO Tablespace when No Backups available


Here I'll show you how to make our Oracle database up and running after loosing UNDO tablespace/UNNDO datafile at OS level. First of all to simulate this situation let's us shutdown the database and delete the undotbs01.dbf file manually from OS level.

After droping the UNDO datafile then following error will appear on your screen that you have lost the UNDO tablespace's datafile and is no longer available.

SQL> startup
ORACLE instance started.

Total System Global Area 1071333376 bytes
Fixed Size                  1375792 bytes
Variable Size             654311888 bytes
Database Buffers          411041792 bytes
Redo Buffers                4603904 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: 'E:\APP\RAJKUMAR\ORADATA\ORCL\UNDOTBS01.DBF'
 SQL>

2nd step would be to make undo management parameter to manual from automatic in the parameter file.

SQL> show parameter undo
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS1
SQL>

SQL> alter system set undo_management=manual scope=spfile;
System altered.

To make it effective, we have to restart the database instance.

SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORACLE instance started.

Total System Global Area 1071333376 bytes
Fixed Size                  1375792 bytes
Variable Size             654311888 bytes
Database Buffers          411041792 bytes
Redo Buffers                4603904 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: 'E:\APP\RAJKUMAR\ORADATA\ORCL\UNDOTBS01.DBF'
SQL>

Now you can check here undo management.

SQL> show parameter undo
NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------
undo_management                      string      MANUAL
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS1
SQL>

SQL> alter database datafile 3 offline drop;
Database altered.

SQL> alter database open;
Database altered.

SQL> select name from v$tablespace; 
NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
USERS
TEMP
DEMO_DATA
DEMO_INDX
MIGRATION_DATA
TRIRIGAQA_DATA
TRIRIGAQA_INDX

10 rows selected.

SQL> drop tablespace undotbs1;
Tablespace dropped.

SQL> create undo tablespace undotbs1
  2  datafile 'e:\app\rajkumar\oradata\orcl\undotbs01.dbf' size 2048m autoextend on next 10m maxsize unlimited; 
Tablespace created.

SQL> alter system set undo_management=auto scope=spfile;
System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1071333376 bytes
Fixed Size                  1375792 bytes
Variable Size             654311888 bytes
Database Buffers          411041792 bytes
Redo Buffers                4603904 bytes
Database mounted.
Database opened.
SQL> 

Hope it would help !