Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A case of manual construction of Oracle 10g AND Oracle 11g-- Oracle 11g

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

A case of manual construction of Oracle 10g AND Oracle 11g-- Oracle 11g

System environment:

Operating system: RedHat EL6

Oracle: Oracle 10g and Oracle 11g

Manual library is relatively easy to achieve, this case is from 10g and 11g, through a simple comparison, we can see a simple difference between 11g and 10g!

Case 2:

Build the library manually under the environment of Oracle 11g

DB_NAME='test1'

INSTANCE_NAME='test1'

1. Establish the initialization parameter file and password file of Instance.

[oracle@rh7 dbs] $cat inittest1.ora

Db_name='test1'

Memory_target=400m / / Oracle 11g added automatic memory management

Processes = 150

Audit_file_dest='$ORACLE_BASE/admin/test1/adump'

Audit_trail = 'db'

Db_block_size=8192

Db_domain=''

Open_cursors=300

Remote_login_passwordfile='EXCLUSIVE'

Undo_tablespace='UNDOTBS1'

# You may want to ensure that control files are created on separate physical

# devices

Control_files = / u01/app/oracle/oradata/test1/control01.ctl

Compatible = '11.2.0'

[oracle@rh7 dbs] $orapwd file=orapwtest1 password=oracle entries=3

2. Establish a directory related to the database

Oracle 11g added diagnostic directory, default is $ORACLE_BASE

[oracle@rh7 dbs] $mkdir-p $ORACLE_BASE/admin/test1/adump

[oracle@rh7 dbs] $mkdir-p / u01/app/oracle/oradata/test1

3. Create a script for building a database

[oracle@rh7 ~] $cat cr_db.sql

CREATE DATABASE test1

USER SYS IDENTIFIED BY oracle

USER SYSTEM IDENTIFIED BY oracle

LOGFILE

GROUP 1 ('/ u01amp SIZE SIZE 50m)

GROUP 2 ('/ u01ax SIZE SIZE 50m)

MAXLOGFILES 10

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 200

CHARACTER SET zhs16gbk

DATAFILE'/ u01 SIZE REUSE

SYSAUX DATAFILE'/ u01 SIZE REUSE

DEFAULT TEMPORARY TABLESPACE tempts1

TEMPFILE'/ u01qqappActionoradataUniplicatetemp01.dbf'

SIZE 100M REUSE

UNDO TABLESPACE undotbs1

DATAFILE'/ u01qqappActionoradataUndotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

4. Start Instance and set up the database

[oracle@rh7 ~] $export ORACLE_SID=test1

[oracle@rh7 ~] $sqlplus'/ as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Wed May 21 10:59:58 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

10:59:59 SYS@ test1 > startup nomount

ORACLE instance started.

Total System Global Area 417546240 bytes

Fixed Size 2213936 bytes

Variable Size 268437456 bytes

Database Buffers 142606336 bytes

Redo Buffers 4288512 bytes

11:00:12 SYS@ test1 > @ / home/oracle/cr_db

Database created.

Elapsed: 00:01:23.44

11:01:51 SYS@ test1 >

Database alarm log:

CREATE TABLESPACE sysaux DATAFILE'/ u01 SIZE REUSE

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE

Wed May 21 11:01:08 2014

Completed: CREATE TABLESPACE sysaux DATAFILE'/ u01max app REUSE oracle SIZE oradata REUSE

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE

Processing? / rdbms/admin/dplsql.bsq

Processing? / rdbms/admin/dtxnspc.bsq

CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE'/ u01qqappActionoradataUndotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

Wed May 21 11:01:23 2014

Successfully onlined Undo Tablespace 2.

Completed: CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE'/ u01amp appAccord oradataUniplex Test1Universe undotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

CREATE TEMPORARY TABLESPACE TEMPTS1 TEMPFILE'/ u01qqappActionoradataUniplicatetemp01.dbf'

SIZE 100M REUSE

Completed: CREATE TEMPORARY TABLESPACE TEMPTS1 TEMPFILE'/ u01qqappActionoradataUniple Test1Ontemp01.dbf'

SIZE 100M REUSE

ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMPTS1

Completed: ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMPTS1

ALTER DATABASE DEFAULT TABLESPACE SYSTEM

Completed: ALTER DATABASE DEFAULT TABLESPACE SYSTEM

Processing? / rdbms/admin/dfmap.bsq

Processing? / rdbms/admin/denv.bsq

Processing? / rdbms/admin/drac.bsq

Processing? / rdbms/admin/dsec.bsq

Processing? / rdbms/admin/doptim.bsq

Processing? / rdbms/admin/dobj.bsq

Processing? / rdbms/admin/djava.bsq

Processing? / rdbms/admin/dpart.bsq

Wed May 21 11:01:34 2014

Processing? / rdbms/admin/drep.bsq

Processing? / rdbms/admin/daw.bsq

Processing? / rdbms/admin/dsummgt.bsq

Processing? / rdbms/admin/dtools.bsq

Processing? / rdbms/admin/dexttab.bsq

Processing? / rdbms/admin/ddm.bsq

Processing? / rdbms/admin/dlmnr.bsq

Processing? / rdbms/admin/ddst.bsq

Wed May 21 11:01:43 2014

SMON: enabling tx recovery

Starting background process SMCO

Wed May 21 11:01:44 2014

SMCO started with pid=17, OS id=2816

Wed May 21 11:01:50 2014

Replication_dependency_tracking turned off (no async multimaster replication found)

Starting background process QMNC

Wed May 21 11:01:50 2014

QMNC started with pid=20, OS id=2826

Completed: CREATE DATABASE test1

USER SYS IDENTIFIED BY * * USER SYSTEM IDENTIFIED BY * LOGFILE

GROUP 1 ('/ u01amp SIZE SIZE 50m)

GROUP 2 ('/ u01ax SIZE SIZE 50m)

MAXLOGFILES 10

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 200

CHARACTER SET zhs16gbk

DATAFILE'/ u01 SIZE REUSE

SYSAUX DATAFILE'/ u01 SIZE REUSE

DEFAULT TEMPORARY TABLESPACE tempts1

TEMPFILE'/ u01qqappActionoradataUniplicatetemp01.dbf'

SIZE 100M REUSE

UNDO TABLESPACE undotbs1

DATAFILE'/ u01qqappActionoradataUndotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

5. Establish a data dictionary

Data dictionary script:

[oracle@rh7 ~] $cat cr_dict.sql

@? / rdbms/admin/catalog.sql

@? / rdbms/admin/catproc.sql

Conn system/oracle

@? / sqlplus/admin/pupbld.sql

11:00:12 SYS@ test1 > @ / home/oracle/cr_dict.sql

6. Create the Users table space and set it as the default table space

The default table space of the system is system. If system is used as the default table space, it will affect the management and performance of the database.

12:09:56 SQL > create tablespace users

12:10:01 2 datafile'/ u01 size size

Tablespace created.

12:10:41 SQL > alter database default tablespace users

Database altered.

7. Add an example case

12:11:45 SQL > @ $ORACLE_HOME/rdbms/admin/utlsampl.sql

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production

With the Partitioning, OLAP and Data Mining options

[oracle@oracle ~] $

From the above Oracle 10g and Oracle 11g to build the library manually, there is no big change; it's just that Oracle 11g adds new features such as automatic memory management and diagnostic directory, so there is a slight change when building the library!

@ at this point, the manual construction of the library is completed!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report