상세 컨텐츠

본문 제목

오라클 10g 기동방법

IT 정보

by 사람사는 세상 만들기 2007. 2. 12. 11:46

본문

반응형

Oracle9i를 사용하다가 10g로 업그레이드를 했는게 구동방법이 변경되었네, svrmgrl에서 하려고 했는데 명령어가 없다는... 허걱~~~

WonYong Jung님의 블러그에서 찾았습니다... ^^

Oracle10g부터는 sqlplus를 사용하여 기동 및 정지를 행하도록 변경되었다.

4.2. Starting database services
Note: If you just installed Oracle, the database, TNS listener and enterprise manager are already running.

Start TNS Listener:

[oracle@denisnb ~]$ lsnrctl start

You can start the database via dbstart utility:

[oracle@denisnb ~]$ dbstart

or via SQL*Plus:

[oracle@denisnb ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Nov 12 17:13:01 2004

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 188743680 bytes
Fixed Size 778036 bytes
Variable Size 162537676 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@denisnb ~]$

Start Enterprise manager server (optional):

[oracle@denisnb ~]$ emctl start dbconsole

4.3. Stopping database services
Stop Enterprise manager server:

[oracle@denisnb ~]$ emctl stop dbconsole

You can stop the database via dbshut utility:

[oracle@denisnb ~]$ dbshut

or via SQL*Plus:

[oracle@denisnb ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Nov 12 17:21:32 2004

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@denisnb ~]$

Stop TNS listener:

[oracle@denisnb ~]$ lsnrctl stop

4.4 Automating oracle startup and shutdown
To automatically start/shut oracle database during system startup/shutdown you need to write a script in /etc/rc.d/init.d directory. You can view or Download an example script.
Copy the script to /etc/rc.d/init.d as root user, edit environment variables to match your settings and modify its permissions:

[root@denisnb ~]# chown root.root /etc/rc.d/init.d/ora10
[root@denisnb ~]# chmod 755 /etc/rc.d/init.d/ora10

This startup/shutdown script uses chkconfig utility to simplify service management. It is configured to start oracle services in runlevels 3 and 5,with start priority 95 and stop priority 1.
Initialize new service:

[root@denisnb ~]# chkconfig ora10 reset
[root@denisnb ~]# chkconfig --list ora10
ora10 0:off 1:off 2:off 3:on 4:off 5:on 6:off

Now oracle services will be automatically started when entering runlevels 3 and 5, and shut down when entering any other runlevel. For more information on chkconfig utility refer to its man page.
To manually start/stop oracle services you can use

[root@denisnb ~]# service ora10 start

and

[root@denisnb ~]# service ora10 stop

반응형

관련글 더보기