Linux 下的Oracle的基本操作

來源:互聯網
上載者:User

  1、su -Oracle――切換Oracle使用者(如果使用su oracle ,則啟動時不運行.profile使用者環境設定檔)

  $ lsnrctl start――啟動監聽

  2 啟動資料庫

  $ sqlplus "/ as sysdba"――用sys使用者登陸sqlplus

  SQL*Plus: Release 9.2.0.5.0 - Production on Thu Oct 9 15:06:11 2003

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

  Connected to an idle instance.

  SQL> startup――啟動資料庫

  ORACLE instance started.

  Total System Global Area 538412728 bytes

  Fixed Size 743096 bytes

  Variable Size 268435456 bytes

  Database Buffers 268435456 bytes

  Redo Buffers 798720 bytes

  Database mounted.

  Database opened.

  SQL> exit――退出sqlplus

  Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production

  With the Partitioning option

  JServer Release 9.2.0.5.0 - Production

  或者

  $dbstart

  3 查看資料庫進程

  $ ps -ef|grep ora_――查看oracle進程

  oracle 688322 1 0 15:06:20 - 0:00 ora_smon_bxmis

  oracle 696534 704704 0 15:06:35 pts/4 0:00 grep ora_

  oracle 729224 1 0 15:06:20 - 0:00 ora_dbw0_bxmis

  oracle 745618 1 0 15:06:20 - 0:00 ora_reco_bxmis

  oracle 770216 1 0 15:06:20 - 0:00 ora_ckpt_bxmis

  oracle 778394 1 0 15:06:20 - 0:00 ora_pmon_bxmis

  oracle 843876 1 0 15:06:20 - 0:00 ora_qmn0_bxmis

  oracle 901342 1 0 15:06:20 - 0:00 ora_lgwr_bxmis

  oracle 925704 1 0 15:06:20 - 0:00 ora_cjq0_bxmis

  $ ps -ef|grep lsnr――查看oracle監聽進程

  4 關閉資料庫

  $ sqlplus "/ as sysdba"

  SQL*Plus: Release 9.2.0.5.0 - Production on Thu Oct 9 15:07:04 2003

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

  Connected to:

  Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production

  With the Partitioning option

  JServer Release 9.2.0.5.0 - Production

  SQL> shutdown immediate――關閉資料庫

  Database closed.

  Database dismounted.

  ORACLE instance shut down.

  SQL> exit

  Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production

  With the Partitioning option

  JServer Release 9.2.0.5.0 - Production

  或者

  $dbshut

  5 停止資料庫監聽

  $ lsnrctl stop---停止監聽

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.