Error in Process orapwd.exe and unable to find error file opw.msb

I was trying to install Oracle 11g R2(64bit) on Windows 7 64 bit OS.
But While Creating Database using DBCA i got this error. Below is the screenshot.


Error in Process: %ORACLE_HOME%\server\bin\orapwd.exe
Unable to find error file %ORACLE_HOME%\RDBMS\opw<lang>.msb




Resolution:

Set proper Home and Path using cmd and launch the dbca.


 C:\Users\orahow>set ORACLE_HOME=C:\Oracle\app\oracle\product\11.2.0\dbhome_1
 C:\Users\orahow>set PATH=C:\Oracle\app\oracle\product\11.2.0\dbhome_1\server\bin:$PATH:.
  C:\Users\orahow> dbca

Read more ...

Oracle Listener failed to start with error TNS-12555, TNS-00525, TNS-12560

 As oracle user, when I tried to start the listener using lsnrctl start command, I get the below messages:

[oracle@orahow ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 25-MAR-2017 08:24:46

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Starting /data/oracle/app/product/11.2.0.3/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /data/oracle/app/product/11.2.0.3/dbhome_1/network/admin/listener.ora
Log messages written to /data/oracle/app/product/11.2.0.3/dbhome_1/log/diag/tnslsnr/ip-172-31-21-209/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=171.31.21.209)(PORT=1521)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=extproc)))
TNS-12555: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00525: Insufficient privilege for operation
Linux Error: 1: Operation not permitted

Listener failed to start. See the error message(s) above...

Cause:

In the directory /var/tmp/.oracle there exist some socket files which do not belong to oracle user but to another user (e.g. oraapp) and another group (e.g. root).

Example:

$ ls -l /var/tmp/.oracle
srwxrwxrwx 1 oraapp oraapp 0 Mar  8 12:08 s#1947.2
srwxrwxrwx 1 oraapp oraapp 0 Mar  8 12:08 s#1947.1
srwxrwxrwx 1 oraapp oraapp 0 Mar  8 16:15 s#5200.1
srwxrwxrwx 1 oraapp oraapp 0 Mar  8 16:15 s#5200.2
srwxrwxrwx 1 oraapp oraapp 0 Mar  8 16:54 s#2021.2
srwxrwxrwx 1 oraapp oraapp 0 Mar  8 16:54 s#2021.1
srwxrwxrwx 1 oraapp oraapp 0 Mar  9 08:58 s#3348.2
srwxrwxrwx 1 oraapp oraapp 0 Mar  9 08:58 s#3348.1



When the Listener process starts, it tries to create the following socket files:

/var/tmp/.oracle/s#<pid>.1
/var/tmp/.oracle/s#<pid>.2
/var/tmp/.oracle/sREGISTER

where <pid> is the ID of the operating system process for the Listener.

As the file /var/tmp/.oracle/sREGISTER already exists and belongs to a UNIX user other than oracle, the Listener process cannot create a new socket file with that name. Therefore the Listener fails to start.

Resolution:

Delete all socket files from directory /var/tmp/.oracle as UNIX user root.


Start the Listener by executing the command "lsnrctl start" using oracle user.

[oracle@orahow]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 25-MAR-2017 08:32:43

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Starting /data/oracle/app/product/11.2.0.3/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /data/oracle/app/product/11.2.0.3/dbhome_1/network/admin/listener.ora
Log messages written to /data/oracle/app/product/11.2.0.3/dbhome_1/log/diag/tnslsnr/ip-171-31-21-209/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.31.21.209)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=171.31.21.209)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                25-MAR-2017 08:32:43
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/oracle/app/product/11.2.0.3/dbhome_1/network/admin/listener.ora
Listener Log File         /data/oracle/app/product/11.2.0.3/dbhome_1/log/diag/tnslsnr/ip-171-31-21-209/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=171.31.21.209)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "almnew" has 1 instance(s).
  Instance "almnew", status UNKNOWN, has 1 handler(s) for this service...
Service "extproc" has 1 instance(s).
  Instance "extproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Read more ...

How to Spool SqlPlus Output to Microsoft Excel Format




It is very easy to export and save output of executed query in xls sheet using toad but how to do it on sql prompt. To do so you need to use some text formatting options and spool file name to save output.

To Spool SQLPLus output to Excel (.xls) file, the trick is to turn On "MARKUP HTML".


SET PAGESIZE 40000

SET FEEDBACK OFF

SET MARKUP HTML ON

SET NUM 24

SPOOL file_name.xls



---- Execute your query



SPOOL OFF

SET MARKUP HTML OFF

SPOOL OFF



Example:

SQL> SET PAGESIZE 40000

SQL> SET FEEDBACK OFF

SQL> SET MARKUP HTML ON

SQL> SET NUM 24

SQL> SPOOL ora_htl_hist.xls

SQL>

SQL>SELECT COUNT * FROM ORA.HTL_HIST;

SQL>

SQL>SPOOL OFF

SQL>SET MARKUP HTML OFF

SQL>SPOOL OFF


A file name ora_htl_hist.xls will be generated in the current directory. This is the best way to export and save sql plus output to xls sheet.

Read more ...

VI editor shows the error Terminal too wide within Solaris


Terminal too wide


You may receive the following error when using VI editor within Solaris. I got this error when I was adding tns entry in tnsnames.ora file.



$ vi tnsnames.ora

Terminal too wide




Here, Vi will not allow to edit files. For editing you must increase the number of columns as shown below.


To resolve this increase the number of columns using below command:

stty columns 120


Read more ...

How to Change the Default SSH Port When Selinux is Enable on Linux

In this How-To guide we are going to explain you though changing the default SSH port on a Linux system.

SSH - The Secure Shell Protocol by default uses port 22. You can change this port number for security purpose. If you use Oracle Linux 7, Centos 7 or Red Hat Linux 7 versions, you can change port number with below operations.

Change the default SSH port

Accepting this value does not make your system insecure, nor will changing the port provide a
significant variance in security. However, changing the default SSH port will stop attacker from making unauthorized access or from many automated attacks and a bit harder to guess on which port SSH is accessible from.

 If selinux is enabled, you have to add new port number to selinux configuration because of the fact that selinux allows only 22 port number for ssh connections.


How to Change SSH Port When Selinux is Enable in Linux



STEP1 : As root user, edit the sshd configuration file using default VI editor.
 # vi /etc/ssh/sshd_config

Port 2290

Save and Exit


STEP 2: Edit the line which states 'Port 22'. 
But before doing so, you must choose an appropriate port and also make sure that it not currently used by any other application on the system.

# What ports, IPs and protocols we listen for

Port 2290

Note: The Internet Assigned Numbers Authority (IANA) is responsible for the global coordination of the DNS Root, IP addressing, and other Internet protocol resources. It is good practice to follow their port assignment guidelines. Having said that, port numbers are divided into three ranges: Well Known Ports, Registered Ports, and Dynamic and/or Private Ports. The Well Known Ports are those from 0 through 1023 and SHOULD NOT be used. Registered Ports are those from 1024 through 49151 should also be avoided too. Dynamic and/or Private Ports are those from 49152 through 65535 and can be used. Though nothing is stopping you from using reserved port numbers, our suggestion may help avoid technical issues with port allocation in the future.


STEP 3 : Change Selinux Configuration

To change:
 # semanage port -a -t ssh_port_t -p tcp 2290


To list using grep:
# semanage port -l | grep ssh


STEP 4: Restart SSHD Service to Activate New Confiuration
 # systemctl restart sshd.service

Switch over to the new port by restarting SSH.

#/etc/init.d/ssh restart


STEP 5: Verify SSH is listening on the new port by connecting to it.
Now connect using new port no 2290.
ssh username@hostname.com -p 2290

Read more ...

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

Question: I am getting ORA-32004 error while starting the database but all the parameters in spfile are fine. This issue came after upgrade the database from 10g to 11.2.0.4.0

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance


How to fix the ORA-32004 error?


Cause: ORA-32004 causes because one or more obsolete parameters were specified in the SPFILE. These depreciated parameters are still in use by spfile.

Action: See alert log for a list of parameters that are obsolete or deprecated. Remove it from the SPFILE.

You must check alert log to see the names of the parameters that are obsolete.


You can also find the obsolete parameters with this SQL*Plus query:
select name from v$obsolete_parameter where isspecified='TRUE';
                                           OR
select p.name,p.value
from v$parameter p, v$spparameter s
where s.name=p.name
and p.isdeprecated='TRUE'
and s.isspecified='TRUE';

Once found, you must remove it from the spfile or pfile.  You can use alter system command to remove it from spfile.

Read more ...

[A-Z] VI Editor Commands for Editing Files in Linux

For operating systems like Solaris and Linux, you must know some of the basic vi editor commands for the smooth and frequent editing of files. These commands are frequently used in searching patterns within a file, moving arrows up, down, left and right, deleting characters/lines, inserting text etc.

vi editor commands in Linux


vi Editor Commands




Editing and Saving Files


        To create a new file: vi filename
        To exit vi and save changes: [esc][colon] ZZ or wq like Press esc then :wq
        To exit vi without saving changes: :q!
        To saves the current file without quitting: :w
        To enter vi command mode: [esc]
        To enter vi insert mode: Press i



Moving Cursor Within a file


h       move left (backspace)

j       move down

k       move up

l       move right (spacebar)

[return]   move to the beginning of the next line

$       last column on the current line

0       move cursor to the first column on the
current line

^       move cursor to first nonblank column on the
current line

w       move to the beginning of the next word or
punctuation mark

W       move past the next space

b       move to the beginning of the previous word
or punctuation mark

B       move to the beginning of the previous word,
ignores punctuation

        e       end of next word or punctuation mark

        E       end of next word, ignoring punctuation

        H       move cursor to the top of the screen

        M       move cursor to the middle of the screen

        L       move cursor to the bottom of the screen



 Finding Patterns in a File

?       finds a word going backwards

/       finds a word going forwards

        f       finds a character on the line under the
cursor going forward

        F       finds a character on the line under the
cursor going backwards

        t       find a character on the current line going
forward and stop one character before it

T       find a character on the current line going
backward and stop one character before it

; repeat last f, F, t, T



Screen Movement

       G        move to the last line in the file

       xG       move to line x

       z+       move current line to top of screen

       z        move current line to the middle of screen

       z-       move current line to the bottom of screen

       ^F       move forward one screen

       ^B       move backward one line

       ^D       move forward one half screen

       ^U       move backward one half screen

       ^R       redraw screen
( does not work with VT100 type terminals )

       ^L       redraw screen
( does not work with Televideo terminals )

:# move to line #

:$ move to last line of file



Inserting character in a File

       r        replace character under cursor with next
character typed

       R        keep replacing character until [esc] is hit

       i        insert before cursor

       a        append after cursor

       A        append at end of line

       O        open line above cursor and enter append mode



Deleting words and characters within a file

x       delete character under cursor

dd      delete line under cursor

        dw      delete word under cursor

        db      delete word before cursor



Useful Miscellaneous Commands

. repeat last command

u undoes last command issued

U undoes all commands on one line

xp deletes first character and inserts after
second (swap)

J join current line with the next line

^G display current line number

% if at one parenthesis, will jump to its mate

mx mark current line with character x

'x find line marked with character x

NOTE: Marks are internal and not written to the file.

        yy      (yank)'copies' line which may then be put by
the p(put) command. Precede with a count for
multiple lines.



Put Command
        brings back previous deletion or yank of lines,
words, or characters

        P       bring back before cursor

        p       bring back after cursor



Reading Files
copies (reads) filename after cursor in file
currently editing

:r filename



Shell Escape
executes 'cmd' as a shell command.

:!'cmd'

Read more ...

CONTACT

Name

Email *

Message *