oracle 9i db setting auto-bringup
$ vi /etc/oratab
*:/uxdb/ora9i/product/9.2:N
ora9i:/uxdb/ora9i/product/9.2:Y--indicates database would be bought up at system boot time.
[oracle@rac1 lib]$ dbstart
Database "orcl" already started.
$ vi /etc/oratab
*:/uxdb/ora9i/product/9.2:N
ora9i:/uxdb/ora9i/product/9.2:Y--indicates database would be bought up at system boot time.
[oracle@rac1 lib]$ dbstart
Database "orcl" already started.
Database "orcl" possibly left running when system went down (system crash?).
Notify Database Administrator.
Notify Database Administrator.
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jan 18 04:09:37 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> Connected.
SQL> ORACLE instance shut down.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Productio n
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> ORACLE instance shut down.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Productio n
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Can't find init file for Database "orcl".
Database "orcl" NOT started.
Database "orcl" NOT started.
solution:
[oracle@rac1 lib]$ sqlplus '/as sysdba'
[oracle@rac1 lib]$ sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jan 18 04:14:45 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
[oracle@rac1 lib]$ cd /u01/app/oracle/db9i/dbs/
[oracle@rac1 dbs]$ ls
initdw.ora init.ora initorcl.ora lkORCL orapworcl spfileorcl.ora
or
create init file by manual
[oracle@rac1 dbs]$ dbstart
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
[oracle@rac1 lib]$ cd /u01/app/oracle/db9i/dbs/
[oracle@rac1 dbs]$ ls
initdw.ora init.ora initorcl.ora lkORCL orapworcl spfileorcl.ora
or
create init file by manual
[oracle@rac1 dbs]$ dbstart
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jan 18 04:15:09 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> Connected to an idle instance.
SQL> ORACLE instance started.
SQL> ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 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.4.0 - Productio n
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Fixed Size 451684 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.4.0 - Productio n
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Database "orcl" warm started.
[oracle@rac1 bin]$ dbshut
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jan 18 04:24:31 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> Connected.
SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Database "orcl" shut down.
SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Database "orcl" shut down.
question2:
[oracle@rac1 bin]$ lsnrctl start
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 18-JAN-2011 04:27:21
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Starting /u01/app/oracle/db9i/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /u01/app/oracle/db9i/network/admin/listener.ora
Log messages written to /u01/app/oracle/db9i/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Linux Error: 99: Cannot assign requested address
System parameter file is /u01/app/oracle/db9i/network/admin/listener.ora
Log messages written to /u01/app/oracle/db9i/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Linux Error: 99: Cannot assign requested address
Listener failed to start. See the error message(s) above...
solution:
vi /etc/hosts--add host ip hostname
solution:
vi /etc/hosts--add host ip hostname
[oracle@rac1 bin]$ lsnrctl start
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 18-JAN-2011 04:27:53
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Starting /u01/app/oracle/db9i/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /u01/app/oracle/db9i/network/admin/listener.ora
Log messages written to /u01/app/oracle/db9i/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=1521)))
System parameter file is /u01/app/oracle/db9i/network/admin/listener.ora
Log messages written to /u01/app/oracle/db9i/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 18-JAN-2011 04:27:53
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /u01/app/oracle/db9i/network/admin/listener.ora
Listener Log File /u01/app/oracle/db9i/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 18-JAN-2011 04:27:53
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /u01/app/oracle/db9i/network/admin/listener.ora
Listener Log File /u01/app/oracle/db9i/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
finally add follow command to /etc/rc.d/rc.local:
su - oracle -c "lsnrctl start"
su - oracle -c "dbstart"
su - oracle -c "agentctl start"
other method
设置service
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21993926/viewspace-684127/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/21993926/viewspace-684127/