在linux上建立多個ORACLE的執行個體

來源:互聯網
上載者:User

標籤:ase   export   sql   dba   database   多個   oracle   變數   啟動   

1、開啟終端,輸入如下的命令;
      [[email protected] ~]# export DISPLAY=localhost:1 
      [[email protected] ~]# xhost + 
2、切換到oracle 使用者,使用如下的命令:
      [[email protected] ~]# su - oracle 
3、指定資料庫執行個體的變數與值,假設要建立的資料執行個體的SID是test
      [[email protected] ~]$export ORACLE_SID=test

4、使用DBCA工具建立執行個體

      [[email protected] ~]$ dbca

這裡可以使用Xstart軟體,遠端連線到伺服器的案頭。在本地開啟,oracle建立執行個體的可視化操作視窗。一步步完成安裝。

5、手工啟動兩個執行個體

   lsnrctl start   #啟動監聽

   --假設一個執行個體是orcl、另外一個是test
   export ORACLE_SID=orcl
   sqlplus / as sysdba
   startup

   quit

 

   export ORACLE_SID=test
   sqlplus / as sysdba
   startup

   quit

或者

[[email protected] admin]$ sqlplus sys/[email protected] as sysdba;

SQL> select name from v$database;

SQL> exit

 6、自動啟動,可以在/etc/rc.local中設定,增加如下的內容
--啟動預設的資料庫執行個體
su - oracle < lsnrctl start
sqlplus / as sysdba
startup
quit
EOF
--啟動第二個資料庫執行個體
su - oracle < export ORACLE_SID=test
sqlplus / as sysdba
startup
quit
EOF

在linux上建立多個ORACLE的執行個體

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.