Home > Database > Mysql Tutorial > Oracle 10g手工建库OEM配置

Oracle 10g手工建库OEM配置

WBOY
Release: 2016-06-07 17:09:58
Original
1029 people have browsed it

实施了一次手工建库,并启用OEM来管理数据库以下操作都是用 Oracle 用户组1、创建文本初始化参数文件init$SID.ora及相应的dump目

实施了一次手工建库,,并启用OEM来管理数据库

以下操作都是用 Oracle 用户组

1、创建文本初始化参数文件init$SID.ora及相应的dump目录

vi  $ORACLE_HOME/dbs/initLHZ.ora
compatible='10.2.0.4.0'
db_name='LHZ'
sga_max_size=500M
sga_target=200M
undo_management='AUTO'
undo_tablespace='UNDOTBS'
audit_file_dest='$ORACLE_BASE/admin/LHZ/adump'
background_dump_dest='$ORACLE_BASE/admin/LHZ/bdump'
core_dump_dest='$ORACLE_BASE/admin/LHZ/cdump'
user_dump_dest='$ORACLE_BASE/admin/LHZ/udump'
control_files='$ORACLE_BASE/oradata/LHZ/control01.ctl','$ORACLE_BASE/oradata/LHZ/control02.ctl','$ORACLE_BASE/oradata/LHZ/control03.ctl'
instance_name='LHZ'

mkdir -p $ORACLE_BASE/admin/LHZ/adump
mkdir -p $ORACLE_BASE/admin/LHZ/bdump
mkdir -p $ORACLE_BASE/admin/LHZ/cdump
mkdir -p $ORACLE_BASE/admin/LHZ/udump
mkdir -p $ORACLE_BASE/oradata/LHZ

2、创建密码文件
cd $ORACLE_HOME/dbs
orapwd file=orapwLHZ password=oracle

3、创建手工建库SQL
vi /home/oracle/CreateDataBase.sql
CREATE DATABASE LHZ
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('$ORACLE_BASE/oradata/LHZ/redo01.log') SIZE 50M,
        GROUP 2 ('$ORACLE_BASE/oradata/LHZ/redo02.log') SIZE 50M,
        GROUP 3 ('$ORACLE_BASE/oradata/LHZ/redo03.log') SIZE 50M
MAXLOGFILES 30
MAXLOGMEMBERS 5
MAXLOGHISTORY 200
MAXDATAFILES 100
MAXINSTANCES 1
character set ZHS16GBK national character set AL16UTF16
DATAFILE '$ORACLE_BASE/oradata/LHZ/system01.dbf' SIZE 500M autoextend on next 10M maxsize unlimited extent management local
SYSAUX DATAFILE '$ORACLE_BASE/oradata/LHZ/sysaux01.dbf' SIZE 500M autoextend on next 10M maxsize unlimited
DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '$ORACLE_BASE/oradata/LHZ/temp01.dbf' SIZE 200M autoextend on next 10M maxsize

unlimited
UNDO TABLESPACE undotbs DATAFILE '$ORACLE_BASE/oradata/LHZ/undotbs01.dbf' SIZE 200M autoextend on maxsize unlimited;

4、创建二进制初始化参数文件并建库
sqlplus sys/oracle as sysdba
startup nomount pfile=initLHZ.ora
create spfile from pfile
startup nomount
@/home/oracle/CreateDataBase.sql

select open_mode, name from v$database;
select current_scn, CHECKPOINT_CHANGE# from v$database;

5、建立用户表空间并赋予数据库

CREATE TABLESPACE users DATAFILE '$ORACLE_BASE/oradata/LHZ/user01.dbf' SIZE 100M autoextend on next 10M maxsize unlimited   extent management local segment space management auto;

alter database default tablespace user;   #修改数据库的默认表空间

6、建立相应SQL
(建数据字典视图)
@?/rdbms/admin/catalog.sql
(建存储过程包)
@?/rdbms/admin/catproc.sql 

7.安装OEM组件

创建 EM 资料档案库

[oracle@oracle ~]$ emca  -repos create

EMCA 开始于 2010-7-28 17:22:52

EM Configuration Assistant, 10.2.0.1.0 正式版

版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息:

数据库 SID: LHZ        
监听程序端口号: 1521
SYS 用户的口令:  oracle
SYSMAN 用户的口令:  oracle
是否继续? [是(Y)/否(N)]: y

2010-7-28 16:22:48 oracle.sysman.emcp.EMConfig perform
信息: 正在将此操作记录到 /opt/app/oracle/10g/cfgtoollogs/emca/LHZ/emca_2010-07-28_04-22-22-下午.log。
2010-7-28 16:22:48 oracle.sysman.emcp.EMReposConfig createRepository
信息: 正在创建 EM 资料档案库 (此操作可能需要一段时间)...
2010-7-28 16:25:02 oracle.sysman.emcp.EMReposConfig invoke
信息: 已成功创建资料档案库
已成功完成 Enterprise Manager 的配置
EMCA 结束于 2010-7-28 16:25:02

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template