The Open Source Swiss Army Knife

/sql_servers/oracle/
/sql_servers/oracle/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /sql_servers   /oracle 
Permalink: startup.htm
Title: add
article options : please login   |  print view

startup

  1. introduction
  2. oracle provided scripts
  3. from inside sqlplus
  4. problems

introduction

manual methods
for this 9i release, there is no svrmgr or sysdba installed, having to go the route of using sql scripts and the connect string as in connect scott/tiger @/home/u01/scripts/shutdown.sql where shutdown.sql is the script with the meat.
manually, though a series of steps; preparation, e.g. . oraenv will source the environment variables from the oraenv file, the dba can then loginto sql plus or SVRMGR to start the database by
  • into SVRMGR as INTERNAL
  • into SQLPLUS as SYS
then issuing a startup command.

oracle provided scripts

  1. unix
  2. windows

unix

  1. startup
  2. shutdown

startup

Remember that before these commands will work the admin must edit /etc/oratab (as per Ault, p. 87). Specifically, 'change the last fieldof $ORACLE_SID to Y'.

the command to use is $ORACLE_HOME/bin/dbstart. See the following which occurs after rebooting the machine and logging in as oracle to the linux box, to give permissions to start/shutdown: (be patient!! takes about 25 seconds for this cycle to complete.

[oracle@www oracle]$ $ORACLE_HOME/bin/dbstart
SQL*Plus: Release 9.2.0.1.0 - Production on Wed Feb 19 22:22:57 2003
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
SQL>
Connected to an idle instance.
SQL>
Total System Global Area  235999352 bytes
Fixed Size                   450680 bytes
Variable Size             201326592 bytes
Database Buffers           33554432 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning and OLAP options
JServer Release 9.2.0.1.0 - Production
Database "db2" warm started.
[oracle@www oracle]$

after the above has executed, ps -aux shows the following:

oracle    1069  0.0  0.7 333880 7588 ?       S    22:23   0:00 ora_pmon_db2
oracle    1071  0.0  0.8 335192 8888 ?       S    22:23   0:00 ora_dbw0_db2
oracle    1073  0.0  0.7 338240 7816 ?       S    22:23   0:00 ora_lgwr_db2
oracle    1075  0.0  0.6 333296 7156 ?       S    22:23   0:00 ora_ckpt_db2
oracle    1077  0.5  2.0 333320 21436 ?      S    22:23   0:00 ora_smon_db2
oracle    1079  0.0  0.6 333248 6216 ?       S    22:23   0:00 ora_reco_db2
oracle    1081  0.0  0.9 333284 9956 ?       S    22:23   0:00 ora_cjq0_db2
oracle    1083  1.0  1.4 333376 14980 ?      R    22:23   0:00 ora_qmn0_db2
oracle    1085  0.0  0.6 333864 6212 ?       S    22:23   0:00 ora_s000_db2
oracle    1087  0.0  0.6 333740 6588 ?       S    22:23   0:00 ora_d000_db2

Database "db2" warm started.: which means???? Because to try to start sqlplus by typing sqlplus and uname/pass is scott/tiger complains that

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory

[oracle@www oracle]$ echo $ORACLE_SID
db
[oracle@www oracle]$ sqlplus scott@db

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Feb 19 22:38:07 2003

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter password:
ERROR:
ORA-12541: TNS:no listener

follow problem #1 below. that won't solve all problems: shared memory realm still will not exist.

[oracle@www oracle]$ sqlplus scott@db2

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Feb 19 22:46:53 2003

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter password:

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning and OLAP options
JServer Release 9.2.0.1.0 - Production

SQL>
SQL>
where the only uncommented line in /etc/oratab is "db2:/home/u01:Y". And $ORACLE_HOME/bin/oratab was not sourced.

windows

c:\orant\bin\oradim73

from inside sqlplus

SQL> connect sys/sys as sysdba
Connected.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  235999352 bytes
Fixed Size                   450680 bytes
Variable Size             201326592 bytes
Database Buffers           33554432 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL>
    other plsql arguments to STARTUP which are available:
  • STARTUP OPEN dbname PFILE=filename
  • STARTUP MOUNT
    starts the instance, mounts the database but leaves it closed
  • STARTUP NOMOUNT
    starts the instance but leaves the database dismountd and closed
  • STARTUP NOMOUNT PFILE=filename
    the instance is started in an unmounted condition
    PFILE refers to the init.ora; a path must be provided to it if it's not in the CWD
then a CREATE DATABASE statement cold be issued??

problems

  1. dbstart
    SQL> ERROR:
    ORA-12162: TNS:service name is incorrectly specified ...........
    tnsping $ORACLE_SID
    will test syntactical validity of tnsnames.ora
    returned 'OK'
    unsure at this time if depended on my starting tnslsnr first
  2. ORA-12541: TNS:no listener "if you want to connect to the instance with SID=ORCL on a computer named TAMIN_NT using TCP protocol on PORT=1521 then it means that a listener has to be associated with SID = ORCL on machine TAMIN_NT and be listening for TCP protocol on port 1521. The listener must be up and running when one requests a connection. " (http://www.orafaq.com/error/ora-12541.htm).
    [oracle@www oracle]$ lsnrctl
    
    LSNRCTL for Linux: Version 9.2.0.1.0 - Production on 19-FEB-2003 22:42:26
    
    Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
    
    Welcome to LSNRCTL, type "help" for information.
    
    LSNRCTL> start
    Starting /home/u01/bin/tnslsnr: please wait...
    
    TNSLSNR for Linux: Version 9.2.0.1.0 - Production
    System parameter file is /home/u01/network/admin/listener.ora
    Log messages written to /home/u01/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.4)(PORT=1521)))
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 9.2.0.1.0 - Production
    Start Date                19-FEB-2003 22:42:31
    Uptime                    0 days 0 hr. 0 min. 0 sec
    Trace Level               off
    Security                  OFF
    SNMP                      OFF
    Listener Parameter File   /home/u01/network/admin/listener.ora
    Listener Log File         /home/u01/network/log/listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.4)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "db.sirfsup.com" has 1 instance(s).
      Instance "db", status UNKNOWN, has 1 handler(s) for this service...
    Service "db2" has 1 instance(s).
      Instance "db2", status UNKNOWN, has 1 handler(s) for this service...
    Service "small" has 1 instance(s).
      Instance "small", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL>quit
    [oracle@www oracle]$ ps -aux
    oracle    1169  0.0  0.3 13424 3292 pts/1    S    22:42   0:00 /home/u01/bin/tns
    oracle    1170  0.0  0.0  2868  880 pts/1    R    22:43   0:00 ps -aux
    
(#33) poster : neo date: 2004-06-29

hello everybody, this is the webmaster, there have been 747 hits to this page from 6-13-04 to 6-29-04, and that is the most of the 24,829 web requests made to www.sirfsup.com during the same period.

(#53) poster : anonymous (owner)date: 2005-11-17

No, no, not the floating turds....


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top