Visit Counter

Tuesday, September 20, 2016

Migrate from Non-ASM to ASM Oracle 12c Database



SQL> conn / as sysdba
Connected.
SQL> select status from v$instance;

STATUS
------------
OPEN

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/ora/app/oracle/oradata/oratest/system01.dbf
/ora/app/oracle/oradata/oratest/sysaux01.dbf
/ora/app/oracle/oradata/oratest/undotbs01.dbf
/ora/app/oracle/oradata/oratest/pdbseed/system01.dbf
/ora/app/oracle/oradata/oratest/users01.dbf
/ora/app/oracle/oradata/oratest/pdbseed/sysaux01.dbf
/ora/app/oracle/oradata/oratest/poratest/system01.dbf
/ora/app/oracle/oradata/oratest/poratest/sysaux01.dbf
/ora/app/oracle/oradata/oratest/poratest/poratest_users01.dbf

9 rows selected.

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/ora/app/oracle/oradata/oratest/control01.ctl
/ora/app/oracle/fast_recovery_area/oratest/control02.ctl

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/ora/app/oracle/oradata/oratest/redo03.log
/ora/app/oracle/oradata/oratest/redo02.log
/ora/app/oracle/oradata/oratest/redo01.log

SQL>




SQL>
SQL> show parameter db_reco

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest     string /ora/app/oracle/fast_recovery_
area
db_recovery_file_dest_size     big integer 4800M
SQL>              
SQL>
SQL>
SQL>
SQL> show parameter db_create_file

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest     string
SQL>    
SQL>
SQL>
SQL>
SQL>
SQL> show parameter control

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time     integer 7
control_files     string /ora/app/oracle/oradata/orates
t/control01.ctl, /ora/app/orac
le/fast_recovery_area/oratest/
control02.ctl
control_management_pack_access     string DIAGNOSTIC+TUNING
SQL>
SQL>
SQL>
SQL>
SQL> archive log list
Database log mode       Archive Mode
Automatic archival       Enabled
Archive destination       /ora/app/oratestarch1/
Oldest online log sequence     4
Next log sequence to archive   6
Current log sequence       6
SQL>

SQL> show parameter control_files

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files     string /ora/app/oracle/oradata/orates
t/control01.ctl, /ora/app/orac
le/fast_recovery_area/oratest/
control02.ctl
SQL>







SQL> alter system set control_files='+DATA' scope=spfile;

System altered.

SQL> alter system set db_create_file_dest='+DATA';

System altered.

SQL> show parameter control_files

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files     string /ora/app/oracle/oradata/orates
t/control01.ctl, /ora/app/orac
le/fast_recovery_area/oratest/
control02.ctl
SQL> show parameter db_create_file_dest

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest     string +DATA
SQL>


[oracle@rac01 bin]$ ./rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Tue Sep 27 00:34:44 2016

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORATEST (DBID=3458553188)

RMAN> backup current controlfile format '/ora/app/control.ctl';

Starting backup at 27-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=78 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 27-SEP-16
channel ORA_DISK_1: finished piece 1 at 27-SEP-16
piece handle=/ora/app/control.ctl tag=TAG20160927T003813 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 27-SEP-16

Starting Control File and SPFILE Autobackup at 27-SEP-16
piece handle=/ora/app/oracle/fast_recovery_area/ORATEST/autobackup/2016_09_27/o1_mf_s_923618301_cym5bh20_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 27-SEP-16

RMAN>




RMAN> shutdown immediate;

database closed
database dismounted
Oracle instance shut down



RMAN> startup nomount

connected to target database (not started)
Oracle instance started

Total System Global Area     597098496 bytes

Fixed Size                     2291136 bytes
Variable Size                289409600 bytes
Database Buffers             301989888 bytes
Redo Buffers                   3407872 bytes

RMAN> restore controlfile from '/ora/app/control.ctl';

Starting restore at 27-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=32 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:26
output file name=+DATA/ORATEST/CONTROLFILE/current.282.923618939
Finished restore at 27-SEP-16

RMAN>



RMAN> backup as copy database format '+DATA';

Starting backup at 27-SEP-16
Starting implicit crosscheck backup at 27-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=32 device type=DISK
Crosschecked 1 objects
Finished implicit crosscheck

backup at 27-SEP-16

Starting implicit crosscheck copy at 27-SEP-16
using channel ORA_DISK_1
Finished implicit crosscheck copy at 27-SEP-16

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /ora/app/oracle/fast_recovery_area/ORATEST/autobackup/2016_09_27/o1_mf_s_923618301_cym5bh20_.bkp

using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/ora/app/oracle/oradata/oratest/sysaux01.dbf
output file name=+DATA/ORATEST/DATAFILE/sysaux.283.923619095 tag=TAG20160927T005133 RECID=3 STAMP=923619184
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:37
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/ora/app/oracle/oradata/oratest/system01.dbf
output file name=+DATA/ORATEST/DATAFILE/system.284.923619193 tag=TAG20160927T005133 RECID=4 STAMP=923619250
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00009 name=/ora/app/oracle/oradata/oratest/poratest/sysaux01.dbf
output file name=+DATA/ORATEST/3D0B2B62361C7521E0532D0000C0E40F/DATAFILE/sysaux.285.923619259 tag=TAG20160927T005133 RECID=5 STAMP=923619288
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=/ora/app/oracle/oradata/oratest/pdbseed/sysaux01.dbf
output file name=+DATA/ORATEST/3D098F4378AF394BE0532D0000C0C78E/DATAFILE/sysaux.286.923619295 tag=TAG20160927T005133 RECID=6 STAMP=923619334
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00008 name=/ora/app/oracle/oradata/oratest/poratest/system01.dbf
output file name=+DATA/ORATEST/3D0B2B62361C7521E0532D0000C0E40F/DATAFILE/system.287.923619339 tag=TAG20160927T005133 RECID=7 STAMP=923619353
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/ora/app/oracle/oradata/oratest/pdbseed/system01.dbf
output file name=+DATA/ORATEST/3D098F4378AF394BE0532D0000C0C78E/DATAFILE/system.288.923619355 tag=TAG20160927T005133 RECID=8 STAMP=923619365
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/ora/app/oracle/oradata/oratest/undotbs01.dbf
output file name=+DATA/ORATEST/DATAFILE/undotbs1.289.923619371 tag=TAG20160927T005133 RECID=9 STAMP=923619372
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/ora/app/oracle/oradata/oratest/users01.dbf
output file name=+DATA/ORATEST/DATAFILE/users.290.923619373 tag=TAG20160927T005133 RECID=10 STAMP=923619374
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00010 name=/ora/app/oracle/oradata/oratest/poratest/poratest_users01.dbf
output file name=+DATA/ORATEST/3D0B2B62361C7521E0532D0000C0E40F/DATAFILE/users.291.923619375 tag=TAG20160927T005133 RECID=11 STAMP=923619375
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 27-SEP-16

RMAN-06497: WARNING: control file is not current, control file AUTOBACKUP skipped

RMAN>

RMAN> recover database;

Starting recover at 27-SEP-16
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 29 is already on disk as file /ora/app/oracle/oradata/oratest/redo02.log
archived log file name=/ora/app/oracle/oradata/oratest/redo02.log thread=1 sequence=29
media recovery complete, elapsed time: 00:00:02
Finished recover at 27-SEP-16

RMAN>

RMAN> alter database open resetlogs;

Statement processed

RMAN>



SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA/ORATEST/CONTROLFILE/current.282.923618939

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DATA/ORATEST/DATAFILE/system.284.923619193
+DATA/ORATEST/DATAFILE/sysaux.283.923619095
+DATA/ORATEST/DATAFILE/undotbs1.289.923619371
+DATA/ORATEST/3D098F4378AF394BE0532D0000C0C78E/DATAFILE/system.288.923619355
+DATA/ORATEST/DATAFILE/users.290.923619373
+DATA/ORATEST/3D098F4378AF394BE0532D0000C0C78E/DATAFILE/sysaux.286.923619295
+DATA/ORATEST/3D0B2B62361C7521E0532D0000C0E40F/DATAFILE/system.287.923619339
+DATA/ORATEST/3D0B2B62361C7521E0532D0000C0E40F/DATAFILE/sysaux.285.923619259
+DATA/ORATEST/3D0B2B62361C7521E0532D0000C0E40F/DATAFILE/users.291.923619375

9 rows selected.

SQL>





SQL> select group#,member from v$logfile;

    GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
3
/ora/app/oracle/oradata/oratest/redo03.log

2
/ora/app/oracle/oradata/oratest/redo02.log

1
/ora/app/oracle/oradata/oratest/redo01.log


SQL> select group#,status from v$log;

    GROUP# STATUS
---------- ----------------
1 CURRENT
2 UNUSED
3 UNUSED

SQL> ;
  1* select group#,status from v$log
SQL> /

    GROUP# STATUS
---------- ----------------
1 CURRENT
2 UNUSED
3 UNUSED

SQL> ;
  1* select group#,status from v$log
SQL> /

    GROUP# STATUS
---------- ----------------
1 CURRENT
2 UNUSED
3 UNUSED

SQL> ;
  1* select group#,status from v$log
SQL> /

    GROUP# STATUS
---------- ----------------
1 CURRENT
2 UNUSED
3 UNUSED

SQL>
SQL> alter database drop group 2;
alter database drop group 2
                    *
ERROR at line 1:
ORA-01900: LOGFILE keyword expected


SQL> alter database drop logfile group 3
  2  ;

Database altered.

SQL> alter database drop logfile group 2;
alter database drop logfile group 2
*
ERROR at line 1:
ORA-01567: dropping log 2 would leave less than 2 log files for instance
oratest (thread 1)
ORA-00312: online log 2 thread 1: '/ora/app/oracle/oradata/oratest/redo02.log'


SQL> desc v$log;                                      
 Name   Null?    Type
 ----------------------------------------- -------- ----------------------------
 GROUP#    NUMBER
 THREAD#    NUMBER
 SEQUENCE#    NUMBER
 BYTES    NUMBER
 BLOCKSIZE    NUMBER
 MEMBERS    NUMBER
 ARCHIVED    VARCHAR2(3)
 STATUS    VARCHAR2(16)
 FIRST_CHANGE#    NUMBER
 FIRST_TIME    DATE
 NEXT_CHANGE#    NUMBER
 NEXT_TIME    DATE
 CON_ID    NUMBER

SQL> select bytes from v$log;

     BYTES
----------
  52428800
  52428800

SQL> alter database add logfile 3 '+DATA' SIZE 50M;
alter database add logfile 3 '+DATA' SIZE 50M
                           *
ERROR at line 1:
ORA-00933: SQL command not properly ended


SQL> alter database add logfile group 3 '+DATA' size 50m;

Database altered.

SQL> select group#,status from v$log
  2  ;

    GROUP# STATUS
---------- ----------------
1 CURRENT
2 UNUSED
3 UNUSED

SQL> alter database drop logfile group 2;

Database altered.

SQL> alter database add logfile group 2 '+DATA' size 50m;

Database altered.

SQL> select group#,member from v$logfile;

    GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
3
+DATA/ORATEST/ONLINELOG/group_3.292.923626399

2
+DATA/ORATEST/ONLINELOG/group_2.293.923626491

1
/ora/app/oracle/oradata/oratest/redo01.log


SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> alter database drop logfile group 1;

Database altered.

SQL> alter database add logfile group 1 '+DATA' size 50m;

Database altered.

SQL> select group#,member from v$logfile;

    GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
3
+DATA/ORATEST/ONLINELOG/group_3.292.923626399

2
+DATA/ORATEST/ONLINELOG/group_2.293.923626491

1
+DATA/ORATEST/ONLINELOG/group_1.294.923626637


SQL>













Thursday, August 18, 2016

How to configure NetBackup Client Encryption Option


https://www.veritas.com/support/en_US/article.000039177

Problem

The NetBackup client encryption option is best for the following:



- Clients that can handle the CPU burden for compression / encryption
- Clients that want to retain control of the data encryption keys
- Situations where the tightest integration of NetBackup and encryption is
desired
- Situations where encryption is needed in terms of a per client basis




Solution

Follow steps below to configure Netbackup client encryption option and steps to verify if Netbackup client encryption is already enabled :-
1.  Push the encryption binaries to the client using the following command on the master:
Windows:
Note : By default Windows machines have Netbackup Client Encryption binaries installed.

Unix (The encryption binaries must already be installed on the master server):
/usr/openv/netbackup/bin/bpinst -ENCRYPTION <client name>
Note: Starting with NetBackup 7.0, the encryption binaries are automatically installed on the Unix/Linux clients.

Note :It is required to have the client running the same version of NetBackup as the master server.  It is also recommended to have them patched to the same level.
2. Install the license keys for encryption on the master server.

3. Create an encryption key file on the client by running the following command on the client (or on the master server with the -client option):
Windows:
<install_path>\NetBackup\bin\bpkeyutil -client <client name>

Unix:
/usr/openv/netbackup/bin/bpkeyutil -client <client name>
-- To do this, cd into /usr/openv/netbackup/bin
-- Then run ./bpkeyutil -client <client name>

Enter new NetBackup passphrase: **********
Re-enter new NetBackup passphrase: **********


Caution:  It is important that you remember the pass phrases, including the old pass phrases.  If a client's key file is damaged or lost, you need all of the previous pass phrases in order to recreate the key file.  Without the key file, you will be unable to restore files that were encrypted with the pass phrases.
4. Verify the following files are on the client:
Windows:
<install_path>\netbackup\share\version_crypt.txt
<install_path>\Veritas\netbackup\share\ciphers.txt
<install_path>\Veritas\netbackup\bin\bpkeyutil
<install_path>\Veritas\netbackup\var\keyfile.dat   
(this file is created by the bpkeyutil command)

Unix:
/usr/openv/share/version_crypt
/usr/openv/share/ciphers.txt
/usr/openv/netbackup/bin/bpkeyutil
/usr/openv/var/keyfile.dat 
 (this file is created by the bpkeyutil command)

5. On Netbackup administration console In the policy under the Attributes tab there is a selection for Encryption that determines if the backup will be encrypted. Check the check box.

6) In the NetBackup Administration Console, Expand NetBackup Management > Host Properties > Clients, double click to launch client properties window. Click on  "Encryption" and Configure this client to be enabled for encryption.








Tuesday, August 2, 2016

How to Install an Operating System on Dell PowerEdge Servers

How to Install an Operating System on Dell PowerEdge Servers R320




Operating System Installation

The Lifecycle Controller (LCC) provides a simple way of installing a 
supported Operating System onto your PowerEdge server including drivers 
you would need.


The steps have been made as easy as possible:
  1. Press F10 during boot to enter the LCC
  2. Select OS Deployment in the left hand menu
  3. Click Deploy OS
  4. Select Configure RAID First or Go Directly to OS Deployment depending on
  5.  if you have a RAID set up already or not
  6. If apliccable, follow the wizard to set up the RAID disk as you want
  7. Select Manual or Automatic install as needed
  8. Insert the OS installation disk
  9. Follow the OS installation wizard (If Manual install has been selected)



Here a collection of useful how-to videos:



Thursday, July 28, 2016

Install package on linux / Solaris rlwrap



RLWRAP for Linux / Solaris
------------

rlwrap is a 'readline wrapper', a small utility that uses the GNU
readline library to allow the editing of keyboard input for any
command. 

Download from below site

http://utopia.knoware.nl/~hlub/rlwrap/


[root@rac01 rlwrap-0.42]# ./configure

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking whether build environment is sane... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for perl... /usr/bin/perl
checking for strip... strip
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for sys/wait.h... (cached) yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking termcap.h usability... yes
checking termcap.h presence... yes
checking for termcap.h... yes
checking for term.h... yes
checking for ncurses/term.h... yes
checking argument type of tputs putc function... int
checking whether your getopt() correctly understands double colons in option string... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking return type of signal handlers... void
checking for getopt_long... yes
checking for getopt_long... (cached) yes
checking for isastream... yes
checking for mkstemps... yes
checking for pselect... yes
checking for putenv... yes
checking for readlink... yes
checking for sched_yield... yes
checking for setenv... yes
checking for setitimer... yes
checking for setsid... yes
checking for setrlimit... yes
checking for sigaction... yes
checking for snprintf... yes
checking for strlcpy... no
checking for strlcat... no
checking for strnlen... yes
checking for system... yes
checking for openpty in -lutil... yes
checking for openpty... yes
checking for getpty... no
checking for grantpt... yes
checking for unlockpt... yes
checking for getpt... yes
checking for pty/tty type... checking pty.h usability... yes
checking pty.h presence... yes
checking for pty.h... yes
OPENPTY
configure: checking for pty ranges...
checking for tgetent... no
checking for tgetent in -ltinfo... yes
checking for readline in -lreadline... yes
checking for tigetnum... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking whether your readline headers know about rl_set_screen_size... yes
checking whether your readline library knows about rl_set_screen_size... checking for rl_set_screen_size... yes
checking whether your readline knows about rl_variable_value... yes
checking whether your readline knows about rl_readline_version... yes
Will rlwrap find command's working directory under /proc/<commands pid>/cwd? let's see...
checking for /proc/29459/cwd/configure.ac... yes
checking whether we can find command line under <opt_proc_mountpoint>/<pid>/cmdline and mirror it by overwriting our own *argv... no


checking that generated files are newer than configure... done
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating filters/Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating doc/rlwrap.man
config.status: creating config.h
config.status: executing depfiles commands

Now do:
    make (or gmake)  to build rlwrap
    make check       for instructions how to test it
    make install     to install it




[root@rac01 rlwrap-0.42]# make
make  all-recursive
make[1]: Entering directory `/ora/Desktop/rlwrap-0.42'
Making all in doc
make[2]: Entering directory `/ora/Desktop/rlwrap-0.42/doc'
sed -e 's#@DATADIR@#/usr/local/share#'  rlwrap.man > rlwrap.1
make[2]: Leaving directory `/ora/Desktop/rlwrap-0.42/doc'
Making all in src
make[2]: Entering directory `/ora/Desktop/rlwrap-0.42/src'
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT signals.o -MD -MP -MF .deps/signals.Tpo -c -o signals.o signals.c
mv -f .deps/signals.Tpo .deps/signals.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT readline.o -MD -MP -MF .deps/readline.Tpo -c -o readline.o readline.c
mv -f .deps/readline.Tpo .deps/readline.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT pty.o -MD -MP -MF .deps/pty.Tpo -c -o pty.o pty.c
mv -f .deps/pty.Tpo .deps/pty.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT completion.o -MD -MP -MF .deps/completion.Tpo -c -o completion.o completion.c
mv -f .deps/completion.Tpo .deps/completion.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT term.o -MD -MP -MF .deps/term.Tpo -c -o term.o term.c
mv -f .deps/term.Tpo .deps/term.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT ptytty.o -MD -MP -MF .deps/ptytty.Tpo -c -o ptytty.o ptytty.c
mv -f .deps/ptytty.Tpo .deps/ptytty.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
mv -f .deps/utils.Tpo .deps/utils.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT string_utils.o -MD -MP -MF .deps/string_utils.Tpo -c -o string_utils.o string_utils.c
mv -f .deps/string_utils.Tpo .deps/string_utils.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT malloc_debug.o -MD -MP -MF .deps/malloc_debug.Tpo -c -o malloc_debug.o malloc_debug.c
mv -f .deps/malloc_debug.Tpo .deps/malloc_debug.Po
gcc -DHAVE_CONFIG_H -I. -I..    -DDATADIR=\"/usr/local/share\"  -g -O2 -MT filter.o -MD -MP -MF .deps/filter.Tpo -c -o filter.o filter.c
mv -f .deps/filter.Tpo .deps/filter.Po
gcc -DDATADIR=\"/usr/local/share\"  -g -O2   -o rlwrap main.o signals.o readline.o pty.o completion.o term.o ptytty.o utils.o string_utils.o malloc_debug.o filter.o  -lutil  -lreadline -ltinfo
make[2]: Leaving directory `/ora/Desktop/rlwrap-0.42/src'
Making all in filters
make[2]: Entering directory `/ora/Desktop/rlwrap-0.42/filters'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/ora/Desktop/rlwrap-0.42/filters'
make[2]: Entering directory `/ora/Desktop/rlwrap-0.42'
make[2]: Leaving directory `/ora/Desktop/rlwrap-0.42'
make[1]: Leaving directory `/ora/Desktop/rlwrap-0.42'
[root@rac01 rlwrap-0.42]# pwd





$ alias rl="rlwrap /ora/app/product/12.1.0/dbhome_1/bin/sqlplus / as sysdba"

$ r1

SQL> select * from cat;





Solaris Sparc 64-bit

Download Packages from below site.

http://ftp.telfort.nl/pub/mirror/sunfreeware/sparc/

# /tmp/

readline-6.2-sol10-sparc-local.gz
rlwrap-0.37-sol10-sparc-local.gz

#gunzip readline-6.2-sol10-sparc-local.gz  
#gunzip rlwrap-0.37-sol10-sparc-local.gz

readline-6.2-sol10-sparc-local 
rlwrap-0.37-sol10-sparc-local

#pkgadd -d readline-6.2-sol10-sparc-local
# pkgadd -d  rlwrap-0.37-sol10-sparc-local


root@afi-ssaerp2n:/tmp/test# pkgadd -d rlwrap-0.37-sol10-sparc-local

The following packages are available:
  1  SMCrlwrp     rlwrap
                  (sparc) 0.37

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing package instance <SMCrlwrp> from </tmp/test/rlwrap-0.37-sol10-sparc-local>

rlwrap(sparc) 0.37
Chet Ramey, Hans Lub, et al
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
  /usr/local/bin <attribute change only>
  /usr/local/bin/rlwrap
  /usr/local/share <attribute change only>
  /usr/local/share/rlwrap <attribute change only>

Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.

Installing rlwrap as <SMCrlwrp>

## Installing part 1 of 1.
/usr/local/bin/rlwrap
/usr/local/doc/rlwrap/AUTHORS
/usr/local/doc/rlwrap/BUGS
/usr/local/doc/rlwrap/COPYING
/usr/local/doc/rlwrap/ChangeLog
/usr/local/doc/rlwrap/INSTALL
/usr/local/doc/rlwrap/NEWS
/usr/local/doc/rlwrap/README
/usr/local/doc/rlwrap/TODO
/usr/local/doc/rlwrap/doc/Makefile
/usr/local/doc/rlwrap/doc/Makefile.am
/usr/local/doc/rlwrap/doc/Makefile.in
/usr/local/doc/rlwrap/doc/rlwrap.1
/usr/local/doc/rlwrap/doc/rlwrap.man
/usr/local/doc/rlwrap/doc/rlwrap.man.in
/usr/local/share/man/man1/rlwrap.1
/usr/local/share/rlwrap/completions/coqtop
/usr/local/share/rlwrap/completions/testclient
/usr/local/share/rlwrap/filters/README
/usr/local/share/rlwrap/filters/RlwrapFilter.3pm
/usr/local/share/rlwrap/filters/RlwrapFilter.pm
/usr/local/share/rlwrap/filters/censor_passwords
/usr/local/share/rlwrap/filters/count_in_prompt
/usr/local/share/rlwrap/filters/ftp_filter
/usr/local/share/rlwrap/filters/history_format
/usr/local/share/rlwrap/filters/listing
/usr/local/share/rlwrap/filters/logger
/usr/local/share/rlwrap/filters/null
/usr/local/share/rlwrap/filters/paint_prompt
/usr/local/share/rlwrap/filters/pipeline
/usr/local/share/rlwrap/filters/pipeto
/usr/local/share/rlwrap/filters/scrub_prompt
/usr/local/share/rlwrap/filters/simple_macro
/usr/local/share/rlwrap/filters/template
/usr/local/share/rlwrap/filters/unbackspace
[ verifying class <none> ]

Installation of <SMCrlwrp> was successful.
root@afi-ssaerp2n:/tmp/test# ls
readline-6.2-sol10-sparc-local     rlwrap-0.37-sol10-sparc-local
readline-6.2-sol10-sparc-local.gz  rlwrap-0.37-sol10-sparc-local.gz


root@afi-ssaerp2n:/tmp/test# pkgadd -d readline-6.2-sol10-sparc-local

The following packages are available:
  1  SMCreadl     readline
                  (sparc) 6.2

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing package instance <SMCreadl> from </tmp/test/readline-6.2-sol10-sparc-local>

readline(sparc) 6.2
Lionel Cons et al
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
   3 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
  /usr/local/include <attribute change only>
  /usr/local/include/readline <attribute change only>
  /usr/local/include/readline/chardefs.h
  /usr/local/include/readline/history.h
  /usr/local/include/readline/keymaps.h
  /usr/local/include/readline/readline.h
  /usr/local/include/readline/rlconf.h
  /usr/local/include/readline/rlstdc.h
  /usr/local/include/readline/rltypedefs.h
  /usr/local/include/readline/tilde.h
  /usr/local/lib <attribute change only>
  /usr/local/lib/libhistory.a
  /usr/local/lib/libhistory.so
  /usr/local/lib/libhistory.so.5
  /usr/local/lib/libreadline.a
  /usr/local/lib/libreadline.so
  /usr/local/lib/libreadline.so.5

Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.

Installing readline as <SMCreadl>

## Installing part 1 of 1.
/usr/local/doc/readline/CHANGELOG
/usr/local/doc/readline/CHANGES
/usr/local/doc/readline/COPYING
/usr/local/doc/readline/INSTALL
/usr/local/doc/readline/MANIFEST
/usr/local/doc/readline/NEWS
/usr/local/doc/readline/README
/usr/local/doc/readline/USAGE
/usr/local/doc/readline/doc/Makefile
/usr/local/doc/readline/doc/Makefile.in
/usr/local/doc/readline/doc/fdl.texi
/usr/local/doc/readline/doc/history.0
/usr/local/doc/readline/doc/history.3
/usr/local/doc/readline/doc/history.dvi
/usr/local/doc/readline/doc/history.html
/usr/local/doc/readline/doc/history.info
/usr/local/doc/readline/doc/history.pdf
/usr/local/doc/readline/doc/history.ps
/usr/local/doc/readline/doc/history.texi
/usr/local/doc/readline/doc/history_3.ps
/usr/local/doc/readline/doc/hstech.texi
/usr/local/doc/readline/doc/hsuser.texi
/usr/local/doc/readline/doc/readline.0
/usr/local/doc/readline/doc/readline.3
/usr/local/doc/readline/doc/readline.dvi
/usr/local/doc/readline/doc/readline.html
/usr/local/doc/readline/doc/readline.info
/usr/local/doc/readline/doc/readline.pdf
/usr/local/doc/readline/doc/readline.ps
/usr/local/doc/readline/doc/readline_3.ps
/usr/local/doc/readline/doc/rlman.texi
/usr/local/doc/readline/doc/rltech.texi
/usr/local/doc/readline/doc/rluser.texi
/usr/local/doc/readline/doc/rluserman.dvi
/usr/local/doc/readline/doc/rluserman.html
/usr/local/doc/readline/doc/rluserman.info
/usr/local/doc/readline/doc/rluserman.pdf
/usr/local/doc/readline/doc/rluserman.ps
/usr/local/doc/readline/doc/rluserman.texi
/usr/local/doc/readline/doc/texi2dvi
/usr/local/doc/readline/doc/texi2html
/usr/local/doc/readline/doc/texinfo.tex
/usr/local/doc/readline/doc/version.texi
/usr/local/include/readline/chardefs.h
/usr/local/include/readline/history.h
/usr/local/include/readline/keymaps.h
/usr/local/include/readline/readline.h
/usr/local/include/readline/rlconf.h
/usr/local/include/readline/rlstdc.h
/usr/local/include/readline/rltypedefs.h
/usr/local/include/readline/tilde.h
/usr/local/lib/libhistory.a
/usr/local/lib/libhistory.so <symbolic link>
/usr/local/lib/libhistory.so.5
/usr/local/lib/libhistory.so.6
/usr/local/lib/libreadline.a
/usr/local/lib/libreadline.so <symbolic link>
/usr/local/lib/libreadline.so.4
/usr/local/lib/libreadline.so.5
/usr/local/lib/libreadline.so.6
/usr/local/share/info/history.info
/usr/local/share/info/readline.info
/usr/local/share/info/rluserman.info
/usr/local/share/man/man3/history.3
/usr/local/share/man/man3/readline.3
[ verifying class <none> ]

Installation of <SMCreadl> was successful.
root@afi-ssaerp2n:/tmp/test#


$ alias rlsql="/usr/local/bin/rlwrap /ora/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus /nolog"

$ rlsql

$alias sql="/usr/local/bin/rlwrap /ora/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus / as sysdba"

$ sql

Wednesday, July 27, 2016

Creating EM repository on Cluster Server




-bash-4.1$ ./emca -config dbcontrol db -repos recreate



STARTED EMCA at Jul 27, 2016 1:55:15 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: ssaerp
Listener port number: 1521
Listener ORACLE_HOME [ /ora/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /ora/app/oracle/product/11.2.0/dbhome_1

Local hostname ................ afi-ssaerp2n
Listener ORACLE_HOME ................ /ora/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ ssaerp
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 27, 2016 1:55:36 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /ora/app/oracle/cfgtoollogs/emca/ssaerp/emca_2016_07_27_13_55_15.log                                                            .
Jul 27, 2016 1:55:36 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: ORA-12541: TNS:no listener

Jul 27, 2016 1:55:36 PM oracle.sysman.emcp.EMConfig perform
SEVERE:

Database connection through listener failed. Fix the error and run EM Configuration Assistant again.

Some of the possible reasons may be:

1) Listener port 1521 provided is incorrect. Provide the correct port.
2) Listener is not up. Start the Listener.
3) Database service ssaerp is not registered with listener. Register the database service.
4) Listener is up on physical host and ORACLE_HOSTNAME environment variable is set to virtual host. Unset OR                                                            ACLE_HOSTNAME environment variable.


5) Listener is up on virtual host. Set environment variable ORACLE_HOSTNAME=<virtual host>.


6) /etc/hosts does not have correct entry for hostname.

Refer to the log file at /ora/app/oracle/cfgtoollogs/emca/ssaerp/emca_2016_07_27_13_55_15.log for more detai                                                            ls.
Could not complete the configuration. Refer to the log file at ora/app/oracle/cfgtoollogs/emca/ssaerp/emca_                                               2016_07_27_13_55_15.log for more details.



Define Virtual name of host


-bash-4.1$ ORACLE_HOSTNAME=lh-ora-rs
-bash-4.1$ export ORACLE_HOSTNAME




-bash-4.1$ ./emca -config dbcontrol db -repos recreate



STARTED EMCA at Jul 27, 2016 1:56:15 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: ssaerp
Listener port number: 1521
Listener ORACLE_HOME [ /ora/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /ora/app/oracle/product/11.2.0/dbhome_1

Local hostname ................ lh-ora-rs
Listener ORACLE_HOME ................ /ora/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ ssaerp
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 27, 2016 1:56:34 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /ora/app/oracle/cfgtoollogs/emca/ssaerp/emca_2016_07_27_13_56_15.log                                                            .
Jul 27, 2016 1:56:35 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jul 27, 2016 1:59:08 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jul 27, 2016 1:59:08 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 27, 2016 2:05:00 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 27, 2016 2:05:03 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jul 27, 2016 2:06:11 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jul 27, 2016 2:06:13 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jul 27, 2016 2:06:18 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jul 27, 2016 2:06:18 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 27, 2016 2:06:34 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 27, 2016 2:06:34 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://lh-ora-rs:1158/em <<<<<<<<<<<
Jul 27, 2016 2:06:36 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the                       file: /ora/app/oracle/product/11.2.0/dbhome_1/lh-ora-rs_ssaerp/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will                       become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 27, 2016 2:06:36 PM
-bash-4.1$

Dbcontrol Repository already exists. Fix the error(s) and run EM Config




-bash-4.1$ ./emca -config dbcontrol db -repos create

STARTED EMCA at Jul 27, 2016 2:27:47 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: ssaerp
Listener port number: 1521
Listener ORACLE_HOME [ /ora/app/oracle/product/11.2.0/dbhome1104 ]:
Password for SYS user:
Password for DBSNMP user:
Jul 27, 2016 2:34:12 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-01017: invalid username/password; logon denied

Jul 27, 2016 2:34:20 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly

Jul 27, 2016 2:41:14 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-01017: invalid username/password; logon denied

Invalid username/password.
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /ora/app/oracle/product/11.2.0/dbhome1104

Local hostname ................ afi-ssaerp
Listener ORACLE_HOME ................ /ora/app/oracle/product/11.2.0/dbhome1104
Listener port number ................ 1521
Database SID ................ ssaerp
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 27, 2016 2:42:50 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /ora/app/1104/oracle/cfgtoollogs/emca/ss                                                                                        aerp/emca_2016_07_27_14_27_46.log.
Jul 27, 2016 2:42:51 PM oracle.sysman.emcp.DatabaseChecks performReposChecks
SEVERE: Dbcontrol Repository already exists.  Fix the error(s) and run EM Config                             Duration Assistant again in standalone mode.




Solution




-bash-4.1$ ./emca -config dbcontrol db -repos recreate

STARTED EMCA at Jul 27, 2016 2:51:34 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: ssaerp
Listener port number: 1521
Listener ORACLE_HOME [ /ora/app/oracle/product/11.2.0/dbhome1104 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /ora/app/oracle/product/11.2.0/dbhome1104

Local hostname ................ afi-ssaerp
Listener ORACLE_HOME ................ /ora/app/oracle/product/11.2.0/dbhome1104
Listener port number ................ 1521
Database SID ................ ssaerp
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 27, 2016 2:51:59 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /ora/app/1104/oracle/cfgtoollogs/emca/ssaerp/emca_2016_07_27_14_51_33.log.
Jul 27, 2016 2:52:00 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jul 27, 2016 2:53:55 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jul 27, 2016 2:53:56 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 27, 2016 2:58:38 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 27, 2016 2:58:41 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jul 27, 2016 3:00:12 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jul 27, 2016 3:00:13 PM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for afi-ssaerp
Jul 27, 2016 3:00:14 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jul 27, 2016 3:00:24 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jul 27, 2016 3:00:24 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 27, 2016 3:00:53 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 27, 2016 3:00:54 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://afi-ssaerp:1158/em <<<<<<<<<<<
Jul 27, 2016 3:00:56 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /ora/app/oracle/product/11.2.0/dbhome1104/afi-ssaerp_ssaerp/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 27, 2016 3:00:56 PM


-bash-4.1$


Oracle Enterprise Manager failed to start, OC4J Configuration issue. Configure Enterprise Manager Database Control Manually with Enterprise Manager Configuration Assistant

You can drop the EM Repository

--------------------------------

[oracle@localhost ~]$ emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Aug 5, 2013 7:54:35 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: fmw
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: Y
Aug 5, 2013 7:54:54 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/fmw/emca_2013_08_05_19_54_34.log.
Aug 5, 2013 7:54:55 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Aug 5, 2013 7:54:55 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Aug 5, 2013 7:57:04 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Aug 5, 2013 7:57:04 PM

Now, let's configure it again


Create new for EM repository
---------------------------------------

[oracle@localhost ~]$ emca -config dbcontrol db -repos create
STARTED EMCA at Aug 5, 2013 7:58:22 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: fmw
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Local hostname ................ localhost.localhost.com
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ fmw
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: Y
Aug 5, 2013 7:58:53 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/fmw/emca_2013_08_05_19_58_21.log.
Aug 5, 2013 7:58:54 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Aug 5, 2013 8:05:56 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Aug 5, 2013 8:06:02 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Aug 5, 2013 8:07:14 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Aug 5, 2013 8:07:17 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Aug 5, 2013 8:07:17 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Aug 5, 2013 8:08:07 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Aug 5, 2013 8:08:07 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Aug 5, 2013 8:08:53 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Aug 5, 2013 8:08:53 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Aug 5, 2013 8:10:16 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Aug 5, 2013 8:10:17 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://localhost.localhost.com:5500/em <<<<<<<<<<<
Aug 5, 2013 8:10:28 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0/dbhome_1/localhost.localhost.com_fmw/sysman/config/emkey.ora.   Please ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager Configuration completed successfully
FINISHED EMCA at Aug 5, 2013 8:10:28 PM

[oracle@localhost ~]$