Ubuntu 10.04啟動/關閉資料庫、監聽、iSQL*Plus和企業管理器

來源:互聯網
上載者:User

一 啟動和停止資料庫

1.啟動資料庫

1.1 登入。

XX-laptop:~$ sqlplus "scott/tiger as sysdba"

將出現如下串連資料庫資訊:

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 9 15:30:16 2010

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

Connected to an idle instance.

SQL>

表明登入資料庫系統成功。

1.2 啟動資料庫。運行 startup 命令啟動資料庫。

SQL> startup

ORACLE instance started.

Total System Global Area  603979776 bytes

Fixed Size              1220796 bytes

Variable Size                171970372 bytes

Database Buffers      423624704 bytes

Redo Buffers                 7163904 bytes

Database mounted.

Database opened.

SQL>

表示資料庫正常啟動。

2.關閉資料庫

2.1 登入。與1.1相同,不再贅述。

2.2 成功登入資料庫系統後,運行 shudown 命令關閉資料庫。

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

表明資料庫已關閉。

二  啟動和停止監聽程式

Oracle 的監聽程式主要是為用戶端的串連提供介面,在控制台視窗鍵入如下命令:

1 啟動監聽程式。

注意:不是在sql中,而是在bsh等中。

XX-laptop:~$ lsnrctl

將出現如下監聽程式資訊:

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-AUG-2010 15:37:47

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> start

將出現監聽程式的一系列啟動和配置情況資訊列表。資訊行的最後一行是“The command completed successfully”字樣時,監聽程式啟動成功。

2. 關閉 Oracle10g 監聽程式 :運行 stop 命令關閉監聽程式。

LSNRCTL> stop

資訊行的最後一行是“The command completed successfully”字樣時,監聽程式停止成功。

=====================================================================

三  啟動和停止iSQL*Plus。

1 啟動iSQL*Plus。

XX-laptop:~$ isqlplusctl start

iSQL*Plus 10.2.0.1.0

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Starting iSQL*Plus ...

iSQL*Plus started.

看到  iSQL*Plus started.表示iSQL*Plus啟動成功。

2 關閉iSQL*Plus。

XX-laptop:~$ isqlplusctl stop

iSQL*Plus 10.2.0.1.0

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Stopping iSQL*Plus ...

iSQL*Plus stopped.

看到  iSQL*Plus stopped.表示iSQL*Plus停止成功。

=====================================================================

四  使用企業管理器

1 啟動控制台

XX-laptop:~$emctl start dbconsole

TZ set to PRC

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.

http://xhlh-laptop:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 10g Database Control ......................... started.

------------------------------------------------------------------

Logs are generated in directory /opt/ora10/product/10.2.0/db_1/xhlh-laptop_openlab/sysman/log

表明啟動成功。

2.停止控制台:

XX-laptop:~$ emctl stop dbconsole

TZ set to PRC

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.

http://xhlh-laptop:1158/em/console/aboutApplication

Stopping Oracle Enterprise Manager 10g Database Control ...

...  Stopped.

表明關閉成功。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.