Oracle 10 Gb manual database creation & amp; OEM Configuration

Source: Internet
Author: User

A manual database creation was implemented and OEM was enabled to manage the database.

The following operations use the Oracle user group:

1. Create the text initialization parameter file init $ SID. ora and the corresponding dump directory

Vi $ ORACLE_HOME/dbs/initLHZ. ora
Compatible = '10. 2.0.4.0'
Db_name = 'lhz'
Sga_max_size = 500 M
Sga_target = 200 M
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. Create a password file
Cd $ ORACLE_HOME/dbs
Orapwd file = orapwLHZ password = oracle

3. Create a manual database 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 50 M,
GROUP 2 ('$ ORACLE_BASE/oradata/LHZ/redo02.log') SIZE 50 M,
GROUP 3 ('$ ORACLE_BASE/oradata/LHZ/redo03.log') SIZE 50 M
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 500 M autoextend on next 10 M maxsize unlimited extent management local
Sysaux datafile '$ ORACLE_BASE/oradata/LHZ/sysaux01.dbf' SIZE 500 M autoextend on next 10 M maxsize unlimited
Default temporary tablespace temp TEMPFILE '$ ORACLE_BASE/oradata/LHZ/temp01.dbf' SIZE 200 M autoextend on next 10 M maxsize

Unlimited
Undo tablespace undotbs DATAFILE '$ ORACLE_BASE/oradata/LHZ/undotbs01.dbf' SIZE 200 M autoextend on maxsize unlimited;

4. Create a binary initialization parameter file and create a database
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 a user tablespace and assign it to the database

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

Alter database default tablespace user; # modify the default tablespace of the database

6. Create the corresponding SQL
(Create a data dictionary view)
@? /Rdbms/admin/catalog. SQL
(Create a stored procedure package)
@? /Rdbms/admin/catproc. SQL

7. Install OEM Components

Create an EM Archive

[Oracle @ oracle ~] $ Emca-repos create

EMCA starts at 17:22:52

EM Configuration Assistant, 10.2.0.1.0 official version

Copyright (c) 2003,200 5, Oracle. All rights reserved.

Enter the following information:

Database SID: LHZ
Listener port: 1521
SYS User Password: oracle
SYSMAN user's password: oracle
Continue? [Yes (Y)/NO (N)]: y

2010-7-28 16:22:48 oracle. sysman. emcp. EMConfig perform
Information: this operation is being logged to/opt/app/oracle/10g/export toollogs/emca/LHZ/emca_2010-07-28_04-22-22-Afternoon. log.
16:22:48 oracle. sysman. emcp. EMReposConfig createRepository
Information: creating the EM archives (this operation may take some time )...
16:25:02 oracle. sysman. emcp. EMReposConfig invoke
Information: You have created a Data Archiving database.
The Enterprise Manager configuration has been completed successfully.
EMCA ended at 16:25:02

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.