Visit Counter

Friday, December 30, 2016

RESIZE Datafiles and Tempfile IN ORACLE 12c




SQL> alter database datafile '/ora/app/oracle/oradata/inforln/undotbs01.dbf' resize 10G;

Database altered.




SQL> alter database tempfile '/ora/app/oracle/oradata/inforln/temp01.dbf' resize 10G;

Database altered.





SQL> alter database datafile '/ora/app/oracle/oradata/inforln/system01.dbf' resize 5G;

Database altered.

RESIZE REDOLOG FILE IN ORACLE 12c




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

    GROUP#  SEQUENCE#   BYTES ARC STATUS
---------- ---------- ---------- --- ----------------
1   16 52428800 NO  CURRENT
2   14 52428800 YES INACTIVE
3   15 52428800 YES INACTIVE

SQL> alter database add logfile group 4 '/ora/app/oracle/oradata/inforln/redo04.log' size 6G;

Database altered.

SQL> alter database add logfile group 5 '/ora/app/oracle/oradata/inforln/redo05.log' size 6G;

Database altered.

SQL> alter database add logfile group 6 '/ora/app/oracle/oradata/inforln/redo06.log' size 6G;

Database altered.

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

    GROUP#  SEQUENCE#   BYTES ARC STATUS
---------- ---------- ---------- --- ----------------
1   16 52428800 NO  CURRENT
2   14 52428800 YES INACTIVE
3   15 52428800 YES INACTIVE
4    0 6442450944 YES UNUSED
5    0 6442450944 YES UNUSED
6    0 6442450944 YES UNUSED

6 rows selected.



SQL> alter database drop logfile group 2;




Database altered.

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

    GROUP#  SEQUENCE#   BYTES ARC STATUS
---------- ---------- ---------- --- ----------------
1   16 52428800 NO  CURRENT
3   15 52428800 YES INACTIVE
4    0 6442450944 YES UNUSED
5    0 6442450944 YES UNUSED
6    0 6442450944 YES UNUSED

SQL> alter database add logfile group 2 '/ora/app/oracle/oradata/inforln/redo02.log' size 6G;
alter database add logfile group 2 '/ora/app/oracle/oradata/inforln/redo02.log' size 6G
*
ERROR at line 1:
ORA-00301: error in adding log file
'/ora/app/oracle/oradata/inforln/redo02.log' - file cannot be created
ORA-27038: created file already exists
Additional information: 1


$ rename the redo file

$ mv redo02.log redo02.old.log


SQL> alter database add logfile group 2 '/ora/app/oracle/oradata/inforln/redo02.log' size 6G;

Database altered.

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

    GROUP#  SEQUENCE#   BYTES ARC STATUS
---------- ---------- ---------- --- ----------------
1   16 52428800 NO  CURRENT
2    0 6442450944 YES UNUSED
3   15 52428800 YES INACTIVE
4    0 6442450944 YES UNUSED
5    0 6442450944 YES UNUSED
6    0 6442450944 YES UNUSED

6 rows selected.



SQL> alter database drop logfile group 3;

Database altered.


$ rename the redo file

$ mv redo03.log redo03.old.log

SQL> alter database add logfile group 3 '/ora/app/oracle/oradata/inforln/redo03.log' size 6G;

Database altered.

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

    GROUP#  SEQUENCE#   BYTES ARC STATUS
---------- ---------- ---------- --- ----------------
1   16 52428800 NO  CURRENT
2    0 6442450944 YES UNUSED
3    0 6442450944 YES UNUSED
4    0 6442450944 YES UNUSED
5    0 6442450944 YES UNUSED
6    0 6442450944 YES UNUSED

6 rows selected.



SQL> alter system switch logfile;

System altered.

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

    GROUP#  SEQUENCE#   BYTES ARC STATUS
---------- ---------- ---------- --- ----------------
1   16 52428800 YES ACTIVE
2   17 6442450944 NO  CURRENT
3    0 6442450944 YES UNUSED
4    0 6442450944 YES UNUSED
5    0 6442450944 YES UNUSED
6    0 6442450944 YES UNUSED

6 rows selected.




SQL> alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance inforln (thread 1)
ORA-00312: online log 1 thread 1: '/ora/app/oracle/oradata/inforln/redo01.log'


SQL> alter system checkpoint global;

System altered.

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

    GROUP#  SEQUENCE#   BYTES ARC STATUS
---------- ---------- ---------- --- ----------------
1   16 52428800 YES INACTIVE
2   17 6442450944 NO  CURRENT
3    0 6442450944 YES UNUSED
4    0 6442450944 YES UNUSED
5    0 6442450944 YES UNUSED
6    0 6442450944 YES UNUSED

6 rows selected.

SQL> alter database drop logfile group 1;

Database altered.

$ rename the redo file

$ mv redo01.log redo01.old.log

SQL> alter database add logfile group 1 '/ora/app/oracle/oradata/inforln/redo01.log' size 6G;

Database altered.

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

    GROUP#  SEQUENCE#   BYTES ARC STATUS
---------- ---------- ---------- --- ----------------
1    0 6442450944 YES UNUSED
2   17 6442450944 NO  CURRENT
3    0 6442450944 YES UNUSED
4    0 6442450944 YES UNUSED
5    0 6442450944 YES UNUSED
6    0 6442450944 YES UNUSED

6 rows selected.

SQL>

Wednesday, December 28, 2016

ORA-00845: MEMORY_TARGET not supported on this system


While converting Non-RAC to RAC database getting below error.




[oracle@rac01 bin]$ ./rconfig contorac.xml
Converting Database "oratech" to Cluster Database. Target Oracle Home: /ora/orac                         le/product/12.1.0/dbhome_1. Database Role: PRIMARY.
Setting Data Files and Control Files
Adding Trace files
Adding Database Instances
Adding Redo Logs
Enabling threads for all Database Instances
Setting TEMP tablespace
Adding UNDO tablespaces
Setting Fast Recovery Area
Updating Oratab
Creating Password file(s)
Configuring related CRS resources
Starting Cluster Database
<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
    <Convert>
      <Response>
        <Result code="1" >
          Got Exception
        </Result>
       <ErrorDetails>
             oracle.sysman.assistants.rconfig.engine.CRSStartupException: PRCR-1079 : Failed to start resource ora.oratech.db
CRS-5017: The resource action "ora.oratech.db start" encountered the following error:
ORA-00845: MEMORY_TARGET not supported on this system
. For details refer to "(:CLSN00107:)" in "/ora/grid/log/rac02/agent/crsd/oraagent_oracle/oraagent_oracle.log".

CRS-2674: Start of 'ora.oratech.db' on 'rac02' failed
CRS-2632: There are no more servers to try to place resource 'ora.oratech.db' on that would satisfy its placement policy
Operation Failed. Refer logs at /ora/oracle/oracle12/cfgtoollogs/rconfig/rconfig_12_28_16_18_43_14.log for more details.


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

Solution:





[oracle@rac01 bin]$ df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        20G   18G  994M  95% /
tmpfs           2.0G  1.1G  901M  55% /dev/shm
/dev/sda2        96G   27G   66G  29% /ora
/dev/sda3        20G   60M   19G   1% /tmp


# umount tmpfs
# mount -t tmpfs shmfs -o size=4G /dev/shm


# /etc/fstab

# Created by anaconda on Tue Dec 20 17:07:44 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=db2938b3-db31-4abf-ac1e-9e6869f825c9 /                       ext4    defaults        1 1
UUID=ce2cece9-fa18-458c-a384-3fec9b507b2e /ora                    ext4    defaults        1 2
UUID=99e7a8dc-a14a-4a85-ad67-b2459043af3d /tmp                    ext4    defaults        1 2
UUID=c8915969-3315-4ba1-a941-0cc32240707d swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   size=4G        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0


#reboot


Monday, December 26, 2016

Convert non-RAC database to RAC database using rconfig



In $ORACLE_HOME/assistants/rconfig/sampleXMLs directory, there are two templates ConvertToRAC_AdminManaged.xml and ConvertToRAC_PolicyManaged.xml that are used to convert a single instance database to RAC admin managed or policy managed database respectively.
In this article we will convert the single instance database to an admin managed RAC database.

Source Server:

$ORACLE_HOME/assistants/rconfig/sampleXMLs


Change the following parameters according to your environment


Convert verify="ONLY">
<SourceDBHome>/ora/oracle/oracle12/product/12.1.0/dbhome_12</n:SourceDBHome>
<TargetDBHome>/ora/oracle/product/12.1.0/dbhome_1</n:TargetDBHome>
 <SourceDBInfo SID="oratech">
 <Password>afi123</n:Password>
 <Node name="rac01"/>
 <Node name="rac02"/>
 <InstancePrefix>oratech</n:InstancePrefix>
  <SharedStorage type="ASM">
  <TargetFlashRecoveryArea>+DATA</n:TargetFlashRecoveryArea>


[oracle@rac01 bin]$ cat contorac.xml

<?xml version="1.0" encoding="UTF-8"?>
<n:RConfig xmlns:n="http://www.oracle.com/rconfig"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.oracle.com/rconfig rconfig.xsd">
    <n:ConvertToRAC>
<!-- Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY -->
        <n:Convert verify="ONLY">
<!--Specify current OracleHome of non-rac database for SourceDBHome -->
              <n:SourceDBHome>/ora/oracle/oracle12/product/12.1.0/dbhome_12</n:SourceDBHome>
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
              <n:TargetDBHome>/ora/oracle/product/12.1.0/dbhome_1</n:TargetDBHome>
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
              <n:SourceDBInfo SID="oratech">
                <n:Credentials>
                  <n:User>sys</n:User>
                  <n:Password>xyz</n:Password>
                  <n:Role>sysdba</n:Role>
                </n:Credentials>
<!--Specify Windows Secure Oracle Home Credentials if the Oracle Home was installed with Secure User option  -->
<!--
                <n:Credentials>
                  <n:User>UserDomain\SecureHomeUserName</n:User>
                  <n:Password>oracle</n:Password>
                  <n:Role>windows_svc</n:Role>
                </n:Credentials>
-->
              </n:SourceDBInfo>
<!--Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist. -->
              <n:NodeList>
                <n:Node name="rac01"/>
                <n:Node name="rac02"/>
              </n:NodeList>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
              <!--n:RacOneNode  servicename="salesrac1service"/-->
<!--Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.-->
              <n:InstancePrefix>oratech</n:InstancePrefix>
<!-- Listener details are no longer needed starting 11.2. Database is registered with default listener and SCAN listener running from Oracle Grid Infrastructure home. -->
<!--Specify the type of storage to be used by rac database. Allowable values are CFS|ASM. The non-rac database should have same storage type. ASM credentials are no needed for conversion. -->
              <n:SharedStorage type="ASM">
<!--Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be used for rac database. For CFS, this field will have directory path. -->
                <n:TargetDatabaseArea>+DATA</n:TargetDatabaseArea>
<!--Specify Fast Recovery Area to be configured for rac database. If this field is left empty, current recovery area of non-rac database will be configured for rac database. If current database is not using recovery Area, the resulting rac database will not have a recovery area. -->
                <n:TargetFlashRecoveryArea>+DATA</n:TargetFlashRecoveryArea>
              </n:SharedStorage>
        </n:Convert>
    </n:ConvertToRAC>
</n:RConfig>
[oracle@rac01 bin]$




[oracle@rac01 bin]$ ps -eaf|grep smon

oracle    3858  2537  0 13:47 pts/13   00:00:00 grep smon
oracle    4695     1  0 Dec21 ?        00:00:38 ora_smon_orasoft1
oracle   16287     1  0 Dec21 ?        00:00:14 asm_smon_+ASM1
oracle   17562     1  0 Dec22 ?        00:00:16 ora_smon_test

[oracle@rac01 bin]$ pwd




[oracle@rac01 bin]$ ./rconfig /ora/oracle/oracle12/product/12.1.0/dbhome_12/assistants/contorac.xml
<?xml version="1.0" ?>
<RConfig>
      <Response>
        <Result code="1" >
          Got Exception
        </Result>
       <ErrorDetails>
Error oracle.sysman.assistants.rconfig.parser.ParserException:File Not Found
       </ErrorDetails>
      </Response>
</RConfig>


I got above error while run the contorac.xml file then I copy the controrac.xml under bin directory and then run the rconfig contorac.xml

$ cd /ora/oracle/oracle12/product/12.1.0/dbhome_12/assistants/rconfig/sampleXMLs

$ cp contrac.xml /ora/oracle/oracle12/product/12.1.0/dbhome_12/bin



[oracle@rac01 bin]$ ./rconfig contorac.xml
<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
    <Convert>
      <Response>
        <Result code="0" >
          Operation Succeeded
        </Result>
      </Response>
      <ReturnValue type="object">
There is no return value for this step     </ReturnValue>
    </Convert>
  </ConvertToRAC></RConfig>

[oracle@rac01 bin]$

















• Logs to monitor
– Single instance database alert log file.
– RAC database alert log file.
– /u01/app/oracle/cfgtoollogs/rconfig [records entire operation step-by-step]
– For RMAN log and SQL log, check the respective directories under /u01/app/oracle/cfgtoollogs/rconfig/db





Sunday, December 25, 2016

Cross Platform Transportable Tablespace Migration in Oracle 11g


Transportable Technologies

Transportable Database 

As explained in "Overview of Cross-Platform Data Transport Using Image Copies", you can use the RMAN CONVERT DATABASE command to automate the copying of an entire database from one platform to another. You convert the database data files on either the source or destination platforms.
Before converting the database, see the list of CONVERT DATABASE command prerequisites described in Oracle Database Backup and Recovery Reference. Confirm that you meet all these prerequisites before attempting the procedure in this section.
One prerequisite is that both the source and destination platform must share the same endian format. For example, you can transport a database from Microsoft Windows to Linux for x86 (both little-endian), or from HP-UX to AIX (both big-endian), but not from HP-UX to Linux for x86 (big-endian to little-endian).

Transportable Tablespace

Transportable Tablespaces is a feature designed to move a subnet of one database into another, eve among platform that differ in endian format. The cross-platform capability of transportable tablespace can be used to migrate all user data within a database to new platform with a different endian format
leveraging transportable table spaces in this manner permits a minimal downtime migration to a new platform by a avoiding the time consuming method of unloading all user data from source database and loading it into the target database.


Source Server:
------------------

Solaris 11 - Sparc 64-bit
Database 11.2.0.4


SQL> select d.platform_name,endian_format from v$transportable_platform tp, v$database d WHERE tp.platform_name=d.platform_name;

PLATFORM_NAME
--------------------------------------------------------------------------------
ENDIAN_FORMAT
--------------
Solaris[tm] OE (64-bit) Big


SQL>



Target Server
----------------
Oracle Linux 6 32-bit (x86_64)
Database 11.2.0.4




SQL> select d.platform_name,endian_format from v$transportable_platform tp, v$database d WHERE tp.platform_name=d.platform_name;

PLATFORM_NAME
--------------------------------------------------------------------------------
ENDIAN_FORMAT
--------------
Linux x86 64-bit Little


SQL>



Source Database

We plan to move to three tablespaces EMP,EMP1,USERS

SQL> select name from v$tablespace;

NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
USERS
TEMP
EMP
EMP1

7 rows selected.

SQL>



SQL> execute DBMS_TTS.TRANSPORT_SET_CHECK('USERS,EMP,EMP1',TRUE);

PL/SQL procedure successfully completed.

SQL> SELECT * FROM TRANSPORT_SET_VIOLATIONS;

no rows selected

SQL>


Generate a Transportable tablespace set

SQL> create directory dump_dir as '/ora/export';
SQL>grant read,write on directory dump_dir to system
SQL>alter tablespace users read only;
SQL>alter tablespace emp1 read only;
SQL>alter tablespace emp read only;



Invoke the data pump export utility on the host system an specify which tablespaces are in the trasnportable set.





oracle@afi-ssaerp:~/app/oracle/product/11.2.0/dbhome1104/bin$ ./expdp system/afi123 DUMPFILE=expdat.dmp DIRECTORY=dump_dir TRANSPORT_TABLESPACES=users,emp,emp1 logfile=expdat.log

Export: Release 11.2.0.4.0 - Production on Mon Dec 26 14:08:03 2016

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** DUMPFILE=expdat.dmp DIRECTORY=dump_dir TRANSPORT_TABLESPACES=users,emp,emp1 logfile=expdat.log
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is:
  /ora/export/expdat.dmp
******************************************************************************
Datafiles required for transportable tablespace EMP:
  /ora/app/1104/oracle/oradata/oratest/emp.pdf
Datafiles required for transportable tablespace EMP1:
  /ora/app/1104/oracle/oradata/oratest/emp1.pdf
Datafiles required for transportable tablespace USERS:
  /ora/app/1104/oracle/oradata/oratest/users01.dbf
Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at Mon Dec 26 14:08:55 2016 elapsed 0 00:00:50

oracle@afi-ssaerp:~/app/oracle/product/11.2.0/dbhome1104/bin$


collect the required  users,roles,grants,profile to create again in the target database.



oracle@afi-ssaerp:~/app/oracle/product/11.2.0/dbhome1104/bin$ ./expdp system/afi123 DUMPFILE=exp_meta_dmp.dmp DIRECTORY=dump_dir full=y include=USER,ROLE,ROLE_GRANT,PROFILE content=METADATA_ONLY

Export: Release 11.2.0.4.0 - Production on Mon Dec 26 14:14:37 2016

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_FULL_01":  system/******** DUMPFILE=exp_meta_dmp.dmp DIRECTORY=dump_dir full=y include=USER,ROLE,ROLE_GRANT,PROFILE content=METADATA_ONLY
Processing object type DATABASE_EXPORT/PROFILE
Processing object type DATABASE_EXPORT/SYS_USER/USER
Processing object type DATABASE_EXPORT/SCHEMA/USER
Processing object type DATABASE_EXPORT/ROLE
Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT
Master table "SYSTEM"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_FULL_01 is:
  /ora/export/exp_meta_dmp.dmp
Job "SYSTEM"."SYS_EXPORT_FULL_01" successfully completed at Mon Dec 26 14:14:52 2016 elapsed 0 00:00:14

oracle@afi-ssaerp:~/app/oracle/product/11.2.0/dbhome1104/bin$



Convert before transporting the tablespace  set and then convert the datafiles composing the users and emp,emp1 tablespaces.


RMAN convert command is used to do the conversion. Start RMAN and connect to the target database.



$ RMAN target /

RMAN> convert tablespace 'users','emp','emp1' to platform 'Linux IA (32-bit)'

Copy all export move to destination server.



Import folder we have to create.

$ mkdir /ora/import
$chmod 700 /ora/import


$ scp *.* 192.0.0.45:/ora/import


Convert the database files in target machine

$ rman target /

RMAN> convert database '/ora/import/ data_D-ORATEST_I-3466644995_TS-EMP1_FNO-6_01ro4k07' format "/ora/oracle11/app/oracle/oradata/test/users.dbf";


Same steps we have to do to other data files.

import the tablespace set



$./impdp system/afi123 directory=dump_dir dumpfile=exp_meta.dmp.dmp full=y

If above command show error like in my case one users was missing. So I created that missing user in destination server after that I run the above.



 ./impdp system/afi123 DIRECTORY=dump_dir DUMPFILE=expdat.dmp transport_datafiles='/ora/oracle11/app/oracle/oradata/test/emp1.dbf','/ora/oracle11/app/oracle/oradata/test/emp.dbf','/ora/oracle11/app/oracle/oradata/test/user011.dbf'


Same steps u have to do it for other datafiles as well.


Verify the tablespace from destination server.





SQL> select name from v$tablespace;

NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
USERS100
TEMP
EMP
EMP1
USERS

8 rows selected.

SQL>



SQL> alter tablespace users read write;

SQL> alter tablespace emp read write;

SQL> alter tablespace emp1 read write;






Tuesday, October 11, 2016

Solaris 11 Sparc Create user using GUI





I try to create user using Solaris 11 sparc GUI but GUI not responding and I unable to create user using GUI then I google it and found command to set mediator of java version. Actually there is bug in Solaris 11. Every restart of Solaris 11 it goes to old version of java.


So the work around of this problem run below command.



root@afi-ssaerp1n:~# /usr/bin/pkg set-mediator -V 1.8 java
Packages to change:                      3
Mediators to change:                     1
Create boot environment:              No
Create backup boot environment: Yes
PHASE                                          ITEMS
Removing old actions                   2/2
Updating modified actions           3/3
Updating package state database  Done
Updating package cache               0/0
Updating image state                    Done
Creating fast lookup database       Done
Updating package cache                2/2
root@afi-ssaerp1n:~#
root@afi-ssaerp1n:~#



root@afi-ssaerp1n:~#
root@afi-ssaerp1n:~#
root@afi-ssaerp1n:~# vp usermgr &

Wednesday, October 5, 2016

Share NAS drive with Suse 11 Linux




My cloud NAS box 192.0.0.100


I want backup NAS using veritas netbackup. I create folder on root partition.



# mkdir test



#  sudo mount -t cifs -o username=afi //192.0.0.100/24052016abkp /test


-t cifs
-o username
-NAS drive Ip address + Share folder 
-Test folder 


I created net backup policy and define backup selection /test/ and take a backup.


Note- If you receive the error: wrong fs type, bad option, bad superblock on... make sure you have cifs-utils installed, it may not be installed on your distro by default.


sudo apt-get install cifs-utils



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