# Install Oracle 11gR2 database  on FreeBSD 9



## devildetail (Sep 4, 2013)

*Introduction*

After installing Debian GNU/Linux on a Jail, I wanted to check the degree of compatibility and robustness of this environment. For it I decided to install Oracle 11gR2 Database  for Linux, because it is one of the most demanding software packages that can be found, I think it's a good way to explore the limits of the proposed solution.

Another motivation is the fact that in the FreeBSD HandBook  the chapter  dedicated to installing Oracle is referred to version  Oracle 8.0.5, which is quite old, this circumstance stimulated my curiosity.

For failing to be certified by Oracle, this platform is not suitable for a production environment, which does not diminish the utility as a test environment and even a development environment for small projects, depends on the risk you want to take.

As I am not in favor of installing a GUI on servers, especially if they  have to support a database engine as heavy as it is Oracle, I will  perform a text mode installation using a response file for the Oracle  Installer.

To achieve a functional Oracle database must perform the following tasks;


Preinstallation Tasks for Oracle
Specific tasks in FreeBSD
Specific tasks in Debian
 
Installing the Oracle Database Software
Creating a test Database


----------



## devildetail (Sep 4, 2013)

*Preinstallation Tasks for Oracle*

In all installations of Oracle database, must be prepared the OS so that you can install and run properly. These preliminary tasks are specific to each OS and Oracle version.

*Specific tasks in FreeBSD*

The following tasks must be run as root:

1.- We cloned  the predefined Jail deb-master, using Lenny version, to create the new Jail debora:

```
root@morsa:/root # zfs clone fbsdzpool1/jailz/deb-master@deboostrap fbsdzpool1/jailz/debora
```
2.- We configure semaphores, shared memory and asynchronous I/O according to the requirements of Oracle 11gR2, for this we edit the files /boot/loader.conf and /etc/sysctl.conf:

/boot/loader.conf:

```
kern.ipc.shmmni=4096
kern.ipc.semmns=32000
kern.ipc.semmni=128
aio_load="YES"
```

/etc/sysctl.conf:

```
security.jail.sysvipc_allowed=1
kern.ipc.shmall=2097152
kern.ipc.shmseg=128
kern.ipc.shmmin=1
kern.ipc.shmmax=[HIGHLIGHT]1073741824[/HIGHLIGHT]
kern.ipc.semaem=16384
kern.ipc.semvmx=32767
kern.ipc.semusz=632
kern.ipc.semume=50
kern.ipc.semopm=100
kern.ipc.semmsl=340
kern.ipc.semmnu=150
```

3.- We enable shared memory in the  jail debora:

/jailz/etc/jail.conf

```
debora {
  path = /jailz/debora;
  allow.mount;
  [HIGHLIGHT]allow.sysvipc[/HIGHLIGHT];
  host.hostname = debora;
  mount.devfs;
  mount.fstab="/jailz/etc/fstab.debora";
  ip4.addr = 127.0.0.25;
  interface = lo0;
  exec.start = "/etc/init.d/rc 3";
  exec.stop = "/etc/init.d/rc 0";
}
```

4.- Start the Jail and login:

```
root@morsa:/root # [CMD]jail -f /jailz/etc/jail.conf -c debora[/CMD]
debora: created
Starting periodic command scheduler: crond.
root@morsa:/root # [CMD]jls[/CMD]
   JID  IP Address      Hostname                      Path
     1  127.0.0.25      debora                        /jailz/debora

root@morsa:/root # [CMD]jexec 1 /bin/bash[/CMD]
debora:/# [CMD]uname -a[/CMD]
Linux debora 2.6.16 FreeBSD 9.1-RELEASE-p4 #0: Mon Jun 17 11:42:37 UTC 2013 i686 GNU/Linux
```


----------



## devildetail (Sep 4, 2013)

*Specific tasks in Debian*

The following steps are done inside the jail debora as root. 

5 .- Install the required packages for Oracle 11gR2 on Debian:

```
debora:/# [CMD]apt-get install gcc make binutils lesstif2 rpm libaio1 libdb4.6 libstdc++5 unzip openjdk-6-jdk[/CMD]
```
*Note:* The package openjdk-6-jdk JRE is installed to provide an alternative JRE to that supplied by the Oracle installer.

6.- Create the following symbolic links:

```
debora:/# [CMD]ln -s /usr/bin/awk /bin/awk[/CMD]
debora:/# [CMD]ln -s /usr/bin/rpm /bin/rpm[/CMD]
debora:/# [CMD]ln -s /usr/bin/basename /bin/basename[/CMD]
```

7.- Create the groups dba, oinstall and the oracle user:


```
debora:/# [CMD]groupadd oinstall -g 1000[/CMD]
debora:/# [CMD]groupadd dba -g 1001[/CMD]
debora:/# [CMD]useradd -m -g oinstall -G dba -p passwd -s /bin/bash -d /home/oracle -u 1000 oracle[/CMD]
debora:/# [CMD]passwd oracle[/CMD]
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
```

8.- Create the directories for the software and change the owner to the oracle user:


```
debora:/# [CMD]mkdir -p /oracle/product/11.2.0[/CMD]
debora:/# [CMD]mkdir -p /oracle/admin/ORATEST/create[/CMD]
debora:/# [CMD]mkdir /oracle/admin/ORATEST/adump[/CMD]
debora:/# [CMD]mkdir /oracle/admin/ORATEST/logbook[/CMD]
debora:/# [CMD]mkdir /oracle/oraInventory[/CMD]
debora:/# [CMD]mkdir /oracle/oradata[/CMD]
debora:/# [CMD]mkdir /oracle/flash_recovery_area[/CMD]
debora:/# [CMD]chown  oracle.oinstall /oracle[/CMD]
debora:/# [CMD]chown -R oracle.oinstall /oracle/product[/CMD]
debora:/# [CMD]chown oracle.oinstall /oracle/oraInventory[/CMD]
debora:/# [CMD]chown -R oracle.dba /oracle/admin[/CMD]
debora:/# [CMD]chown oracle.dba /oracle/oradata[/CMD]
debora:/# [CMD]chown oracle.dba  /oracle/flash_recovery_area[/CMD]
```

9.- Add the hostname to the file /etc/hosts:

```
debora:/# [CMD]echo '127.0.0.25 debora' >> /etc/hosts[/CMD]
```

10.-  Create the file /etc/orainst.loc and change the owner to the oracle user:

/etc/orainst.loc:

```
inventory_loc=/oracle/oraInventory
inst_group=oinstall
```


```
debora:/# [CMD]chown oracle.oinstall /etc/orainst.loc[/CMD]
```


----------



## devildetail (Sep 4, 2013)

*Installing the Oracle Database Software*

The following steps are done inside the jail debora as oracle.

11.- Change the root user to oracle:

```
debora:/# [CMD]su - oracle[/CMD]
oracle@debora:~$ [CMD]id[/CMD]
uid=1000(oracle) gid=1000(oinstall) groups=1000(oinstall),1001(dba)
oracle@debora:~$
```

12.- Copy to the /oracle directory (for example) the files linux_11gR2_database_1of2.zip and linux_11gR2_database_2of2.zip that contains the installer and unzip:


```
oracle@debora:/oracle $ [CMD]unzip linux_11gR2_database_1of2.zip[/CMD]
oracle@debora:/oracle $ [CMD]unzip linux_11gR2_database_2of2.zip[/CMD]
```

13.- To perform an unattended installation, create the response file /oracle/database/response/install_debora.rsp. Marked in bold are the values â€‹â€‹that can be useful to modify the rest of the file should be left unchanged, as this version of the installer is problematic and this is the format that it must maintain by  the response file:

install_debora.rsp:

```
oracle.install.responseFileVersion=/oracle/instal/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=[HIGHLIGHT]debora[/HIGHLIGHT]
UNIX_GROUP_NAME=[HIGHLIGHT]oinstall[/HIGHLIGHT]
INVENTORY_LOCATION=[HIGHLIGHT]/oracle/oraInventory[/HIGHLIGHT]
SELECTED_LANGUAGES=en
ORACLE_HOME=[HIGHLIGHT]/oracle/product/11.2.0[/HIGHLIGHT]
ORACLE_BASE=[HIGHLIGHT]/oracle[/HIGHLIGHT]
oracle.install.db.InstallEdition=SE
oracle.install.db.isCustomInstall=false
oracle.install.db.customComponents=
oracle.install.db.DBA_GROUP=[HIGHLIGHT]dba[/HIGHLIGHT]
oracle.install.db.OPER_GROUP=[HIGHLIGHT]dba[/HIGHLIGHT]
oracle.install.db.CLUSTER_NODES=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false
oracle.install.db.config.starterdb.dbcontrol.emailAddress=
oracle.install.db.config.starterdb.dbcontrol.SMTPServer=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=username@mailaddress.com
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
```

14.- Run the installer with the options listed as they are:


```
oracle@debora:~$ /oracle/database/[CMD]runInstaller -silent  -ignorePrereq -jreloc /usr/lib/jvm/java-6-openjdk -responseFile /oracle/database/response/install_debora.rsp[/CMD]
    Starting Oracle Universal Installer...

    Checking Temp space: must be greater than 80 MB.   Actual -2147483648 MB    Passed
    Checking swap space: must be greater than 150 MB.   Actual 4096 MB    Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-09-01_08-30-45PM. Please wait ...
    [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
       CAUSE: The Central Inventory is located in the Oracle base.
       ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
    [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
       CAUSE: The Central Inventory is located in the Oracle base.
       ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
    You can find the log of this install session at:
     /oracle/oraInventory/logs/installActions2013-09-01_08-30-45PM.log  

    The following configuration scripts need to be executed as the "root" user.

     #!/bin/sh
     #Root scripts to run

    /oracle/oraInventory/orainstRoot.sh
    /oracle/product/11.2.0/root.sh

    To execute the configuration scripts:

             1. Open a terminal window
             2. Log in as "root"
             3. Run the scripts
             4. Return to this window and hit "Enter" key to continue

    Successfully Setup Software.
```

15.- Check the installer logs:


```
debora:~# [CMD]tail -10 /oracle/oraInventory/logs/installActions2013-09-01_08-30-45PM.log[/CMD]

    INFO: Validating state <finish>
    WARNING: Validation disabled for the state finish
    INFO: Completed validating state <finish>
    INFO: Terminating all background operations
    INFO: Terminated all background operations
    INFO: Successfully executed the flow in SILENT mode
    INFO: Finding the most appropriate exit status for the current application
    INFO: [HIGHLIGHT]Exit Status is 0[/HIGHLIGHT]
    INFO: Shutdown Oracle Database 11g Release 2 Installer
    INFO: Unloading Setup Driver
```

16.- If the installation is successful, run as root the scripts orainstRoot.sh and root.sh:


```
oracle@debora:~$ [CMD]logout[/CMD]
    debora:~# [CMD]id[/CMD]
    uid=0(root) gid=0(root) groups=5(tty)
    debora:~# [CMD]/oracle/oraInventory/orainstRoot.sh[/CMD]
    Changing permissions of /oracle/oraInventory.
    Adding read,write permissions for group.
    Removing read,write,execute permissions for world.

    Changing groupname of /oracle/oraInventory to oinstall.
    The execution of the script is complete.

    debora:~# [CMD]/oracle/product/11.2.0/root.sh[/CMD]
    Check /oracle/product/11.2.0/install/root_debora_2013-09-01_20-39-01.log for the
     output of root script

    debora:~# [CMD]more /oracle/product/11.2.0/install/root_debora_2013-09-01_20-39-01.log
[/CMD]
    Running Oracle 11g root.sh script...

    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /oracle/product/11.2.0

    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created
    Finished running generic part of root.sh script.
    Now product-specific root actions will be performed.
    Finished product-specific root actions.
```


----------



## devildetail (Sep 4, 2013)

*Creating a test Database*

Prior to create an Oracle database is required an init.ora parameter file and a script with the SQL commands that perform the database creation.

17.- Create the file /oracle/admin/ORATEST/create/initORATEST.ora:


```
db_name='ORATEST'
db_domain=''
sga_target=512M
sga_max_size=1G
pga_aggregate_target=1G
processes = 150
audit_trail ='db'
db_block_size=8192
db_recovery_file_dest='/oracle/flash_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/oracle/'
#dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
compatible ='11.2.0'
db_create_file_dest='/oracle/oradata'
filesystemio_options = SETALL
disk_asynch_io = TRUE
```

18.- Create the files /oracle/admin/ORATEST/create/ORATEST.sh and /oracle/admin/ORATEST/create/cr_ORATEST.sh:

/oracle/admin/ORATEST/create/ORATEST.sh:

```
ORACLE_HOME=/oracle/product/11.2.0
ORACLE_SID=ORATEST

NLS_LANG=American_america.WE8ISO8859P15
ORA_NLS11=${ORACLE_HOME}/nls/data
PATH=$PATH:$ORACLE_HOME/bin
export PATH
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID
export NLS_LANG
export ORA_NLS33
```

/oracle/admin/ORATEST/create/cr_ORATEST.sh:

```
#!/bin/bash

. ./ORATEST.sh

rm ${ORACLE_HOME}/dbs/orapw${ORACLE_SID}
orapwd file=${ORACLE_HOME}/dbs/orapw${ORACLE_SID} password=diablo entries=2

rm -r /oracle/oradata/${ORACLE_SID}

sqlplus /nolog << EOF
spool ../logbook/cr_${ORACLE_SID}.log
conn / as sysdba;
CREATE SPFILE
FROM   PFILE='/oracle/admin/${ORACLE_SID}/create/init${ORACLE_SID}.ora';

DISCONNECT;

conn / as sysdba;

STARTUP NOMOUNT;
CREATE DATABASE ${ORACLE_SID}
CHARACTER SET WE8ISO8859P15
NATIONAL CHARACTER SET UTF8
USER SYS IDENTIFIED BY diablo
USER SYSTEM IDENTIFIED BY diablo
EXTENT MANAGEMENT LOCAL
DEFAULT TEMPORARY TABLESPACE temp
UNDO TABLESPACE undotbs1
DEFAULT TABLESPACE users;

@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/sqlplus/admin/pupbld.sql

SHUTDOWN IMMEDIATE;

EXIT
spool off

EOF
```

19.- Grant execute permissions to the scripts:


```
oracle@debora:/oracle/admin/ORATEST/create$ [CMD]chmod 750 *.sh[/CMD]
oracle@debora:/oracle/admin/ORATEST/create$ [CMD]ls -la[/CMD]
total 31
drwxr-xr-x 2 oracle dba   5 Sep  1 21:04 .
drwxr-xr-x 5 oracle dba   5 Sep  1 20:11 ..
-rwxr-x--- 1 oracle dba 258 Sep  1 21:02 ORATEST.sh
-rwxr-x--- 1 oracle dba 782 Sep  1 21:04 cr_ORATEST.sh
-rw-r--r-- 1 oracle dba 490 Sep  1 21:01 initORATEST.ora
```

20.- Start creating the database.


```
oracle@debora:/oracle/admin/ORATEST/create$ [CMD]nohup ./cr_ORATEST.sh &[/CMD]
```

21.- Check that the creation of the database was completed successfully:


```
oracle@debora:/oracle/admin/ORATEST/create$ [CMD]tail -10 nohup.out[/CMD]
SQL> CREATE PUBLIC SYNONYM PRODUCT_USER_PROFILE FOR SYSTEM.PRODUCT_PRIVS;

Synonym created.

SQL>
SQL> -- [HIGHLIGHT]End of pupbld.sql[/HIGHLIGHT]
SQL> SQL> [HIGHLIGHT]Database closed.
Database dismounted.
ORACLE instance shut down.[/HIGHLIGHT]
SQL> SQL> Disconnected from Oracle Database 11g Release 11.2.0.1.0 - Production
```

22.- Start the database and login:


```
oracle@debora:/oracle/admin/ORATEST/create$  [CMD]. ./ORATEST.sh[/CMD]
oracle@debora:/oracle/admin/ORATEST/create$ [CMD]sqlplus /nolog[/CMD]

SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 1 22:09:58 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL>  [CMD]conn / as sysdba;[/CMD]
Connected to an idle instance.

SQL> [CMD]startup;[/CMD]
ORACLE instance started.

Total System Global Area 1071333376 bytes
Fixed Size                  1341312 bytes
Variable Size             750782592 bytes
Database Buffers          314572800 bytes
Redo Buffers                4636672 bytes
Database mounted.
Database opened.
SQL>
SQL> [CMD]select * from v$instance;
[/CMD]
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
HOST_NAME
----------------------------------------------------------------
VERSION           STARTUP_T STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_WAIT
----------------- --------- ------------ --- ---------- ------- ---------------
LOGINS     SHU DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST BLO
---------- --- ----------------- ------------------ --------- ---
              1 ORATEST
debora
11.2.0.1.0        01-SEP-13 OPEN         NO           1 STOPPED
ALLOWED    NO  ACTIVE            PRIMARY_INSTANCE   NORMAL    NO

SQL> [CMD]!uname -a[/CMD]
Linux debora 2.6.16 FreeBSD 9.1-RELEASE-p4 #0: Mon Jun 17 11:42:37 UTC 2013 i686 GNU/Linux

SQL>
```

Done.


----------



## devildetail (Sep 4, 2013)

*Final Thoughts*

The decision to install in the jail the Lenny version of Debian GNU/Linux is motivated by two reasons: first, the kernel version of Linux that the Oracle Installer  requires as a prerequisite is 2.6.9, and on the other hand, the minimum kernel version for Squeeze is 2.6.18, which is higher than that supported by the Linux compatibility module for FreeBSD 9.


```
INFO: *********************************************
INFO: OS Kernel Version: This is a prerequisite condition to test whether the system kernel version is at least "2.6.9".
INFO: Severity:CRITICAL
INFO: OverallStatus:SUCCESSFUL
INFO: -----------------------------------------------
INFO: Verification Result for Node:debora
INFO: Expected Value:2.6.9
INFO: Actual Value:2.6.16
INFO: -----------------------------------------------
INFO: *********************************************
```

During the development of this Post, I detected a problem while running Oracle Installer, that randomly failed on at initial startup. One way to avoid this problem is to use an alternate jre to the provided with the installer.

I have not been able to configure the Automatic Memory Management (AMM) which is one of the new features introduced in version 11g. This is because I have not managed to configure the device /dev/shm within the Jail.

Therefore, there is no choice but to use the Automatic Shared Memory Management (ASMM) giving values â€‹â€‹to the parameters SGA_TARGET and SGA_MAX_SIZE  in the parameter file initORATEST.ora.

The ZFS file system on which you created the database is not optimized for the files in the database, is an issue that should be improved to a more intensive use of the database.

Enjoy!


----------



## Dmitry1987 (Jun 17, 2015)

Please, help me! I have problem on step 20.
When I run command I see:

```
nohup ./cr_ORATEST.sh & 
[1] 91300
oracle@debora:/oracle/admin/ORATEST/create$ nohup: ignoring input and appending output to `nohup.out'
```
My report file (with -xv parametr):

```
#!/bin/bash -xv

. ./ORATEST.sh
+ . ./ORATEST.sh
ORACLE_HOME=/oracle/product/11.2.0
++ ORACLE_HOME=/oracle/product/11.2.0
ORACLE_SID=ORATEST
++ ORACLE_SID=ORATEST

NLS_LANG=American_america.WE8ISO8859P15
++ NLS_LANG=American_america.WE8ISO8859P15
ORA_NLS11=${ORACLE_HOME}/nls/data
++ ORA_NLS11=/oracle/product/11.2.0/nls/data
PATH=$PATH:$ORACLE_HOME/bin
++ PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/oracle/product/11.2.0/bin
export PATH
++ export PATH
export ORACLE_BASE
++ export ORACLE_BASE
export ORACLE_HOME
++ export ORACLE_HOME
export ORACLE_SID
++ export ORACLE_SID
export NLS_LANG
++ export NLS_LANG
export ORA_NLS33
++ export ORA_NLS33


rm ${ORACLE_HOME}/dbs/orapw${ORACLE_SID}
+ rm /oracle/product/11.2.0/dbs/orapwORATEST
orapwd file=${ORACLE_HOME}/dbs/orapw${ORACLE_SID} password=zebracat entries=2
+ orapwd file=/oracle/product/11.2.0/dbs/orapwORATEST password=zebracat entries=2
./cr_ORATEST.sh: line 6: 91302 Segmentation fault  orapwd file=${ORACLE_HOME}/dbs/orapw${ORACLE_SID} password=zebracat entries=2

rm -r /oracle/oradata/${ORACLE_SID}
+ rm -r /oracle/oradata/ORATEST
rm: cannot remove `/oracle/oradata/ORATEST': No such file or directory

sqlplus /nolog << EOF
spool ../logbook/cr_${ORACLE_SID}.log
conn / as sysdba;
CREATE SPFILE
FROM  PFILE='/oracle/admin/${ORACLE_SID}/create/init${ORACLE_SID}.ora';

DISCONNECT;

conn / as sysdba;

STARTUP NOMOUNT;
CREATE DATABASE ${ORACLE_SID}
CHARACTER SET WE8ISO8859P15
NATIONAL CHARACTER SET UTF8
USER SYS IDENTIFIED BY zebracat
USER SYSTEM IDENTIFIED BY zebracat
EXTENT MANAGEMENT LOCAL
DEFAULT TEMPORARY TABLESPACE temp
UNDO TABLESPACE undotbs1
DEFAULT TABLESPACE users;

@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/sqlplus/admin/pupbld.sql

SHUTDOWN IMMEDIATE;

EXIT
spool off

EOF
+ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 17 04:49:29 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> SQL> Connected to an idle instance.
SQL>  2  CREATE SPFILE
*
ERROR at line 1:
ORA-01012: not logged on
Process ID: 0
Session ID: 0 Serial number: 0


SQL> SQL> Disconnected
SQL> SQL> Connected to an idle instance.
SQL> SQL> ORA-01012: not logged on
SQL>  2  3  4  5  6  7  8  9  CREATE DATABASE ORATEST
*

ERROR at line 1:
ORA-01012: not logged on
Process ID: 0
Session ID: 0 Serial number: 0


SQL> SQL> DOC>######################################################################
DOC>######################################################################
DOC>  The following statement will cause an "ORA-01722: invalid number"
DOC>  error and terminate the SQLPLUS session if the user is not SYS.
DOC>  Disconnect and reconnect with AS SYSDBA.
DOC>######################################################################
DOC>######################################################################
DOC>#
SELECT TO_NUMBER('MUST_BE_AS_SYSDBA') FROM DUAL
*
ERROR at line 1:
ORA-01012: not logged on
Process ID: 0
Session ID: 0 Serial number: 0


Disconnected
```

I think that this line is main error:

```
./cr_ORATEST.sh: line 6: 91302 Segmentation fault  orapwd file=${ORACLE_HOME}/dbs/orapw${ORACLE_SID} password=zebracat entries=2
```

What do you think about this?


----------

