1 2 3 Previous Next 41 Replies Latest reply: Dec 4, 2012 12:42 PM by Haider Hussain Go to original post RSS
      • 30. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
        Srini Chavali-Oracle
        Haider Hussain wrote:
        Now I am getting the below error messages when I login as oracle user

        [oracle@localhost ~]$ sqlplus scott/tiger@orcl
        bash: sqlplus: command not found
        [oracle@localhost ~]$ sqlplus
        bash: sqlplus: command not found
        [oracle@localhost ~]$ lsnrctl
        bash: lsnrctl: command not found
        [oracle@localhost ~]$ export ORACLE_BASE=/u01/app/oracle
        [oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
        [oracle@localhost ~]$ export ORACLE_SID=orcl
        [oracle@localhost ~]$ export PATH=$ORACLE_HOME/BIN:$PATH
        [oracle@localhost ~]$ export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/NETWORK/ADMIN
        [oracle@localhost ~]$ sqlplus
        bash: sqlplus: command not found
        You will need to export these variables every time you open a command line window in your VM.
        [oracle@localhost ~]$ export ORACLE_BASE=/u01/app/oracle
        [oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
        [oracle@localhost ~]$ export ORACLE_SID=orcl
        [oracle@localhost ~]$ export PATH=$ORACLE_HOME/BIN:$PATH
        [oracle@localhost ~]$ export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/NETWORK/ADMIN
        [oracle@localhost ~]$ sqlplus
        bash: sqlplus: command not found
        "BIN" is not the same as "bin" - case matters in Unix - try "export PATH=$ORACLE_HOME/bin:$PATH" instead.
        [oracle@localhost ~]$ su - oracle
        Password:
        [oracle@localhost ~]$ sqlplus
        -bash: sqlplus: command not found
        [oracle@localhost ~]$ export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
        [oracle@localhost ~]$ sqlplus
        -bash: sqlplus: command not found
        [oracle@localhost ~]$ clear screen

        [oracle@localhost ~]$ export ORACLE_BASE=/u01/app/oracle
        [oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
        [oracle@localhost ~]$ export ORACLE_SID=orcl
        [oracle@localhost ~]$ export PATH=$ORACLE_HOME/BIN:$PATH
        [oracle@localhost ~]$ export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
        [oracle@localhost ~]$ sqlplus
        -bash: sqlplus: command not found
        [oracle@localhost ~]$ echo $ORACLE_HOME
        /u01/app/oracle/product/11.2.0/dbhome_1
        [oracle@localhost ~]$
        [oracle@localhost ~]$
        [oracle@localhost ~]$
        [oracle@localhost ~]$ echo $PATH
        /u01/app/oracle/product/11.2.0/dbhome_1/BIN:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin
        [oracle@localhost ~]$ echo $ORACLE_BASE
        /u01/app/oracle
        [oracle@localhost ~]$ echo $TNS_ADMIN
        /u01/app/oracle/product/11.2.0/dbhome_1/network/admin
        [oracle@localhost ~]$ sqlplus
        -bash: sqlplus: command not found
        [oracle@localhost ~]$ qlplus
        -bash: qlplus: command not found
        [oracle@localhost ~]$ sqlplus
        -bash: sqlplus: command not found
        [oracle@localhost ~]$
        HTH
        Srini
        • 31. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
          Srini Chavali-Oracle
          Haider Hussain wrote:
          also , I have checked the Oracle processes as :

          [oracle@localhost ~]$ ps -ef | grep oracle
          oracle 3097 2709 0 Dec03 ? 00:00:00 /usr/bin/gnome-session
          oracle 3147 1 0 Dec03 ? 00:00:00 /usr/bin/VBoxClient --clipboard
          oracle 3156 1 0 Dec03 ? 00:00:00 /usr/bin/VBoxClient --display
          oracle 3161 1 0 Dec03 ? 00:00:00 /usr/bin/VBoxClient --seamless
          oracle 3166 1 0 Dec03 ? 00:00:03 /usr/bin/VBoxClient --draganddrop
          oracle 3187 3097 0 Dec03 ? 00:00:00 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "/usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients"
          oracle 3210 1 0 Dec03 ? 00:00:00 /usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients
          oracle 3211 1 0 Dec03 ? 00:00:00 /bin/dbus-daemon fork print-pid 4 print-address 6 session
          oracle 3218 1 0 Dec03 ? 00:00:01 /usr/libexec/gconfd-2 11
          oracle 3221 1 0 Dec03 ? 00:00:00 /usr/bin/gnome-keyring-daemon
          oracle 3223 1 0 Dec03 ? 00:00:02 /usr/libexec/gnome-settings-daemon
          oracle 3239 1 0 Dec03 ? 00:00:04 metacity --sm-client-id=default1
          oracle 3248 1 0 Dec03 ? 00:00:02 gnome-panel --sm-client-id default2
          oracle 3250 1 0 Dec03 ? 00:00:04 nautilus no-default-window sm-client-id default3
          oracle 3254 1 0 Dec03 ? 00:00:00 /usr/libexec/bonobo-activation-server ac-activate ior-output-fd=16
          oracle 3256 1 0 Dec03 ? 00:00:00 /usr/libexec/gnome-vfs-daemon
          oracle 3260 1 0 Dec03 ? 00:00:00 eggcups --sm-client-id default4
          oracle 3261 1 0 Dec03 ? 00:00:00 gnome-volume-manager --sm-client-id default5
          oracle 3276 1 0 Dec03 ? 00:00:00 /usr/libexec/gam_server
          oracle 3278 1 0 Dec03 ? 00:00:02 /usr/libexec/wnck-applet oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory oaf-ior-fd=18
          oracle 3283 1 0 Dec03 ? 00:00:00 /usr/libexec/trashapplet oaf-activate-iid=OAFIID:GNOME_Panel_TrashApplet_Factory oaf-ior-fd=24
          oracle 3299 1 0 Dec03 ? 00:00:00 /usr/libexec/mapping-daemon
          oracle 3300 1 0 Dec03 ? 00:00:00 ./escd key_Inserted="/usr/bin/esc" on_Signal="/usr/bin/esc"
          oracle 3313 1 0 Dec03 ? 00:00:00 bt-applet --sm-disable
          oracle 3315 1 0 Dec03 ? 00:00:00 /usr/libexec/clock-applet oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory oaf-ior-fd=23
          oracle 3320 1 0 Dec03 ? 00:00:02 /usr/libexec/mixer_applet2 oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory oaf-ior-fd=24
          oracle 3322 1 0 Dec03 ? 00:00:00 /usr/libexec/notification-area-applet oaf-activate-iid=OAFIID:GNOME_NotificationAreaApplet_Factory oaf-ior-fd=25
          oracle 3338 1 0 Dec03 ? 00:00:00 /usr/bin/python -tt /usr/bin/puplet
          oracle 3346 1 0 Dec03 ? 00:00:00 nm-applet --sm-disable
          oracle 3356 1 0 Dec03 ? 00:00:00 pam-panel-icon --sm-client-id default0
          oracle 3357 1 0 Dec03 ? 00:00:02 gnome-power-manager
          oracle 3399 1 0 Dec03 ? 00:00:01 /usr/bin/python -E /usr/bin/sealert -s
          oracle 3402 1 0 Dec03 ? 00:00:03 gnome-screensaver
          oracle 3668 1 0 Dec03 ? 00:00:01 ora_pmon_orcl
          oracle 3670 1 0 Dec03 ? 00:00:08 ora_vktm_orcl
          oracle 3674 1 0 Dec03 ? 00:00:00 ora_gen0_orcl
          oracle 3676 1 0 Dec03 ? 00:00:01 ora_diag_orcl
          oracle 3678 1 0 Dec03 ? 00:00:00 ora_dbrm_orcl
          oracle 3680 1 0 Dec03 ? 00:00:01 ora_psp0_orcl
          oracle 3682 1 0 Dec03 ? 00:00:01 ora_dia0_orcl
          oracle 3684 1 0 Dec03 ? 00:00:07 ora_mman_orcl
          oracle 3686 1 0 Dec03 ? 00:00:02 ora_dbw0_orcl
          oracle 3688 1 0 Dec03 ? 00:00:04 ora_lgwr_orcl
          oracle 3690 1 0 Dec03 ? 00:00:02 ora_ckpt_orcl
          oracle 3692 1 0 Dec03 ? 00:00:01 ora_smon_orcl
          oracle 3694 1 0 Dec03 ? 00:00:00 ora_reco_orcl
          oracle 3696 1 0 Dec03 ? 00:00:03 ora_mmon_orcl
          oracle 3698 1 0 Dec03 ? 00:00:02 ora_mmnl_orcl
          oracle 3700 1 0 Dec03 ? 00:00:00 ora_d000_orcl
          oracle 3702 1 0 Dec03 ? 00:00:00 ora_s000_orcl
          oracle 3786 1 0 Dec03 ? 00:00:00 ora_qmnc_orcl
          oracle 3800 1 0 Dec03 ? 00:00:02 ora_cjq0_orcl
          oracle 3802 1 0 Dec03 ? 00:00:00 ora_q000_orcl
          oracle 3804 1 0 Dec03 ? 00:00:00 ora_q001_orcl
          oracle 3806 1 0 Dec03 ? 00:00:04 ora_vkrm_orcl
          oracle 3865 1 0 00:01 ? 00:00:00 /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER -inherit
          This indicates that the "orcl" database is up and running, and the listener is also up and running.

          HTH
          Srini
          • 32. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
            Haider Hussain
            Issue gets resolved , when I type the export commands , but it again reoccurs when I exit and then reopen the terminal :

            [oracle@localhost ~]$ sqlplus
            bash: sqlplus: command not found
            [oracle@localhost ~]$ export ORACLE_BASE=/u01/app/oracle
            [oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
            [oracle@localhost ~]$ export ORACLE_SID=orcl
            [oracle@localhost ~]$ export PATH=$ORACLE_HOME/bin:$PATH
            [oracle@localhost ~]$ export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
            [oracle@localhost ~]$ sqlplus\
            >
            [oracle@localhost ~]$ sqlplus

            SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 4 01:03:48 2012

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

            Enter user-name: / as sysdba

            Connected to:
            Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
            With the Partitioning, OLAP, Data Mining and Real Application Testing options

            SQL> select * from v$instance;

            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 orcl
            localhost.localdomain
            11.2.0.1.0 04-DEC-12 OPEN NO 1 STOPPED
            ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO


            SQL> desc v$instance
            Name Null? Type
            ----------------------------------------- -------- ----------------------------
            INSTANCE_NUMBER NUMBER
            INSTANCE_NAME VARCHAR2(16)
            HOST_NAME VARCHAR2(64)
            VERSION VARCHAR2(17)
            STARTUP_TIME DATE
            STATUS VARCHAR2(12)
            PARALLEL VARCHAR2(3)
            THREAD# NUMBER
            ARCHIVER VARCHAR2(7)
            LOG_SWITCH_WAIT VARCHAR2(15)
            LOGINS VARCHAR2(10)
            SHUTDOWN_PENDING VARCHAR2(3)
            DATABASE_STATUS VARCHAR2(17)
            INSTANCE_ROLE VARCHAR2(18)
            ACTIVE_STATE VARCHAR2(9)
            BLOCKED VARCHAR2(3)

            SQL> select status , database_status from v$instance;

            STATUS DATABASE_STATUS
            ------------ -----------------
            OPEN ACTIVE

            SQL> select status , database_status , SHUTDOWN_PENDING,ACTIVE_STATE from v$instance;

            SQL> select status , database_status , SHUTDOWN_PENDING,ACTIVE_STATE from v$instance;

            STATUS DATABASE_STATUS SHU ACTIVE_ST
            ------------ ----------------- --- ---------
            OPEN ACTIVE NO NORMAL

            SQL> exit
            Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
            With the Partitioning, OLAP, Data Mining and Real Application Testing options
            [oracle@localhost ~]$ sqlplus

            SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 4 01:07:49 2012

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

            Enter user-name: / as sysdba

            Connected to:
            Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
            With the Partitioning, OLAP, Data Mining and Real Application Testing options

            SQL> exit
            Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
            With the Partitioning, OLAP, Data Mining and Real Application Testing options
            [oracle@localhost ~]$
            • 33. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
              Srini Chavali-Oracle
              Haider Hussain wrote:
              Issue gets resolved , when I type the export commands , but it again reoccurs when I exit and then reopen the terminal :
              As noted above, every time you open a new terminal session, you will have to set these environment variables.

              Alternatively, set these in the ".profile" file for the "oracle" account - http://www.theunixschool.com/2011/07/what-is-profile-file.html

              HTH
              Srini
              • 34. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
                Haider Hussain
                My .profile file is as follows :

                # /etc/profile

                # System wide environment and startup programs, for login setup
                # Functions and aliases go in /etc/bashrc

                pathmunge () {
                     if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
                     if [ "$2" = "after" ] ; then
                     PATH=$PATH:$1
                     else
                     PATH=$1:$PATH
                     fi
                     fi
                }

                # ksh workaround
                if [ -z "$EUID" -a -x /usr/bin/id ]; then
                     EUID=`id -u`
                     UID=`id -ru`
                fi

                # Path manipulation
                if [ "$EUID" = "0" ]; then
                     pathmunge /sbin
                     pathmunge /usr/sbin
                     pathmunge /usr/local/sbin
                fi

                # No core files by default
                ulimit -S -c 0 > /dev/null 2>&1

                if [ -x /usr/bin/id ]; then
                     USER="`id -un`"
                     LOGNAME=$USER
                     MAIL="/var/spool/mail/$USER"
                fi

                HOSTNAME=`/bin/hostname`
                HISTSIZE=1000

                if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
                INPUTRC=/etc/inputrc
                fi

                export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

                # By default, we want umask to get set. This sets it for login shell
                # Current threshold for system reserved uid/gids is 200
                # You could check uidgid reservation validity in
                # /usr/share/doc/setup-*/uidgid file
                if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
                umask 002
                else
                umask 022
                fi

                for i in /etc/profile.d/*.sh ; do
                if [ -r "$i" ]; then
                if [ "${-#*i}" != "$-" ]; then
                . $i
                else
                . $i >/dev/null 2>&1
                fi
                fi
                done

                unset i
                unset pathmunge



                could you please advice where I need to set the env variables mentioned in your above post.
                • 35. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
                  Srini Chavali-Oracle
                  What shell does the "oracle" account use ? You will need to set your variables at the very end of the appropriate profile file.

                  HTH
                  Srini
                  • 36. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
                    Haider Hussain
                    BASH shell is being used


                    [oracle@localhost ~]$ ps -p $$
                    PID TTY TIME CMD
                    3751 pts/1 00:00:00 bash
                    [oracle@localhost ~]$



                    Could you please tell me the path where .profile (since BASH shell is being used, I feel .bash_profile file should be modified).
                    • 37. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
                      Srini Chavali-Oracle
                      Either ".bash_profile" or ".profile" will suffice - http://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

                      Pl start a new thread in the appropriate Linux forum, as the content is now Unix related and not database install related.

                      HTH
                      Srini
                      • 38. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
                        Haider Hussain
                        Thanks for suggestion, but the problem has been fixed now . I have edited the .bash_profile file and have added the required export commands to it.

                        However, 1 minor issue still persists. When I restart the VM, then Oracle has to be started using the STARTUP command.
                        sqlplus / as sysdba always gets connected to an idle instance.

                        Could you please help solve this.

                        Regards,
                        Haider
                        • 39. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
                          sb92075
                          Haider Hussain wrote:
                          Thanks for suggestion, but the problem has been fixed now . I have edited the .bash_profile file and have added the required export commands to it.

                          However, 1 minor issue still persists. When I restart the VM, then Oracle has to be started using the STARTUP command.
                          sqlplus / as sysdba always gets connected to an idle instance.

                          Could you please help solve this.
                          The Installation Guide shows required steps.

                          http://www.oracle.com/pls/db112/portal.portal_db?selected=11&frame=
                          • 40. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
                            Srini Chavali-Oracle
                            Haider Hussain wrote:
                            Thanks for suggestion, but the problem has been fixed now . I have edited the .bash_profile file and have added the required export commands to it.

                            However, 1 minor issue still persists. When I restart the VM, then Oracle has to be started using the STARTUP command.
                            sqlplus / as sysdba always gets connected to an idle instance.
                            This is normal and expected, as the database has not been set to automatically start up when you start your VM.
                            Could you please help solve this.
                            Instructions are here - http://docs.oracle.com/cd/B19306_01/server.102/b15658/strt_stp.htm#CFAHAHGA
                            Regards,
                            Haider
                            HTH
                            Srini
                            • 41. Re: Good Linux based OS for Oracle 11g R2 on Windows 7 (32 bit) Home Edition
                              Haider Hussain
                              I really owe you a big thank you for helping me out on this entire issue and that too in a prompt manner right from my first post on this thread. I have learnt a lot interacting with you.

                              Your blog : http://chavalis.blogspot.com is simply too good.

                              Thanks again.

                              Regards,
                              Haider
                              1 2 3 Previous Next