Linux Oracle 维护文档

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:64

[root@db1 ~]#
[root@db1 ~]# df -h -------查看阵列是否挂载
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p1 105G 12G 88G 12% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
[root@db1 ~]# mount -------查看阵列是否挂载
/dev/cciss/c0d0p1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@db1 ~]# mount /dev/sda1 /oradata ---挂载阵列
[root@db1 ~]# mount ------查看阵列是否挂载
/dev/cciss/c0d0p1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda1 on /oradata type ext3 (rw)
[root@db1 ~]# df -k ------查看阵列是否挂载
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 109081104 11986000 91464728 12% /
tmpfs 2019948 0 2019948 0% /dev/shm
/dev/sda1 2113784984 64702768 1941708176 4% /oradata
[root@db1 ~]#

su - oracle ----进入ORACLE用户

lsnrctl ----进入监听程序

LSNRCTL> start ---启动监听
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.5.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db1)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 13-OCT-2013 10:25:32
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> quit ----退出监听命令
[oracle@db1 ~]$ sqlplus ---进入数据库操作

Connected to an idle instance.

SQL>
SQL>
SQL>
SQL> startup ---------启动数据库
ORACLE instance started.

Total System Global Area 2516582400 bytes
Fixed Size 2098368 bytes
Variable Size 536873792 bytes
Database Buffers 1962934272 bytes
Redo Buffers 14675968 bytes
Database mounted.
Database opened.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
[root@db1 ~]# df -k -----
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 109081104 11986060 91464668 12% /
tmpfs 2019948 0 2019948 0% /dev/shm
/dev/sda1 2113784984 64702768 1941708176 4% /oradata
[root@db1 ~]#
[root@db1 ~]#
[root@db1 ~]# umount /dev/sda1 ----卸载存储
[root@db1 ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 109081104 11986060 91464668 12% /
tmpfs 2019948 0 2019948 0% /dev/shm
[root@db1 ~]#

--------------120

[root@db ~]# df -k 查看阵列是否挂载
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 109086224 46520664 56934756 45% /
tmpfs 2019948 0 2019948 0% /dev/shm
[root@db ~]# mount /dev/sda1 /oradata ----挂载文件系统
[root@db ~]# df -k 查看阵列是否挂载
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 109086224 46520696 56934724 45% /
tmpfs 2019948 0 2019948 0% /dev/shm
/dev/sda1 2113784984 64702768 1941708176 4% /oradata
[root@db ~]#
[root@db ~]#

[root@db ~]# su - oracle ----进入oracle用户
[oracle@db ~]$
[oracle@db ~]$
[oracle@db ~]$
[oracle@db ~]$ lsnrctl -----进入监听程序

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 12-OCT-2013 10:34:48

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> stop ------关闭监听
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521)))
The command completed successfully
LSNRCTL>
LSNRCTL>
LSNRCTL> start ------启动监听
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.5.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 12-OCT-2013 10:34:58
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> quit ----退出

[oracle@db ~]$ sqlplus ----进入ORACLE操作

SQL*Plus: Release 10.2.0.5.0 - Production on Sat Oct 12 10:35:22 2013

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Enter user-name: conn / as sysdba ---登陆数据库
Enter password:
Connected to an idle instance.

SQL> startup --------打开数据库实例
ORACLE instance started.

Total System Global Area 2516582400 bytes
Fixed Size 2098368 bytes
Variable Size 536873792 bytes
Database Buffers 1962934272 bytes
Redo Buffers 14675968 bytes
Database mounted.
Database opened.
SQL> select * from dual;

DUM
---
X

SQL>

------数据库打开正常

本文标签:
本文标题:Linux Oracle 维护文档
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】