Oracle 資料庫的管理

來源:互聯網
上載者:User

標籤:database   oracle   

--資料庫名的查看    

    select name from v$database;

650) this.width=650;" src="%5C" alt="spacer.gif\\"\"" />


--執行個體名的查看

    show parameter instance_name;

650) this.width=650;" src="%5C" alt="spacer.gif\\"\"" />



--資料檔案

select name from v$datafile;


--記錄檔

select name from v$logfile;


--控制檔案

select name from v$controlfile;

--歸檔檔案

select name from v$archived_file;

--參數檔案

select value from v$parameter where name=‘spfile‘


/*PGA官方解釋是程式全域區*/

--查看PGA

show pga;

--查看SGA

show sga;


oracle 8i  採用SGA靜態管理

oracle 9i  採用SGA動態管理

  SGA 的內部組件可以動態調整,也可以由資料庫自動管理,在設定記憶體大小的時候,設定的記憶體大小基本單位是粒度;

oralce 10i採用SGA自動管理


sga除了log_buffer不能自動管理,

其他的都能自動管理(db_cache_size,stream_pool_size,shared_pool_size,java_pool_size,large_pool_size);

--java池

alter system set java_pool_size=32m;

sga_max_size=(80%mem)*2/3


/*oracle軟體的卸載*/

1.rm /etc/ora*

2.rm /usr/local/bin


--一個執行個體只能訪問一個資料庫

資料庫中的表一旦被鎖住解鎖提交事務自動解鎖;


oracle資料庫的建立

1.create dir

 mkdir $ORACLE_BASE/admin/ulp/{a,b,c,u,dp}dump -p

mkdir $ORACLE_BASE/oradata/ULP

2.cd $ORACLE_HOME/dbs

vi initulp.ora

orapwd file=orapwulp  password=oracle

export ORACLE_SID=ulp

sqlplus "/as sysdba"

SQL>startup nomount 

SQL>create spfile from pfile


3.create database ulp

SQL>create database ulp


SQL>create tablespace user;


SQL>create temporary tablespace temp;


SQL>alter database default tablespace  user;


SQL>alter database default temporary tablespace temp;

 

4.catalog catproc pupbld

SQL>@/u01/oracle/10g/rdbms/admin/catalog.sql

SQL>@/u01/oracle/10g/rdbms/admin/catproc.sql


SQL>conn system/oracle


SQL>@/u01/oracle/10g/rdbms/admin/pupbld.sql

5.restart database

SQL>shutdown 

SQL>startup 

 

6.dbca

 

root-->vi /etc/oratab

emca --repos create

emca --config dbcontrol db


7.oem  -->

8.net




















 

 

 

 

 

 

 

本文出自 “使用者流失統計” 部落格,謝絕轉載!

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.