Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g
Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g
系统环境:
操作系统: RedHat EL6
Oracle: Oracle 10g and Oracle 11g
手工建库相对来说很容易实现,本案例是从10g和11g,通过手工建库的方式做一个简单的对比,可以看出11g和10g之间的一个简单的差异!
VMware+Linux+Oracle 10G RAC全程详细图解
案例二:
在Oracle 11g 环境下手工建库
DB_NAME='test1'
INSTANCE_NAME='test1'
1、建立Instance的初始化参数文件和口令文件
[oracle@rh6 dbs]$cat inittest1.ora
db_name='test1'
memory_target=400m //Oracle 11g增加了内存自动管理
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@rh6 dbs]$ orapwd file=orapwtest1 password=oracle entries=3
2、建立数据库相关的目录
Oracle 11g增加了diagnostic directory,,默认的为$ORACLE_BASE
[oracle@rh6 dbs]$ mkdir -p $ORACLE_BASE/admin/test1/adump
[oracle@rh6 dbs]$ mkdir -p /u01/app/oracle/oradata/test1
3、建立建库脚本
[oracle@rh6 ~]$ cat cr_db.sql
CREATE DATABASE test1
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE
GROUP 1 ('/u01/app/oracle/oradata/test1/redo01a.log') SIZE 50M ,
GROUP 2 ('/u01/app/oracle/oradata/test1/redo02a.log') SIZE 50M
MAXLOGFILES 10
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 200
CHARACTER SET zhs16gbk
DATAFILE '/u01/app/oracle/oradata/test1/system01.dbf' SIZE 325M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/test1/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/test1/temp01.dbf'
SIZE 100M REUSE
UNDO TABLESPACE undotbs1
DATAFILE '/u01/app/oracle/oradata/test1/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
4、启动Instance并建立数据库
[oracle@rh6 ~]$ export ORACLE_SID=test1
[oracle@rh6 ~]$ 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>
建库告警日志:
CREATE TABLESPACE sysaux DATAFILE '/u01/app/oracle/oradata/test1/sysaux01.dbf' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE
Wed May 21 11:01:08 2014
Completed: CREATE TABLESPACE sysaux DATAFILE '/u01/app/oracle/oradata/test1/sysaux01.dbf' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE
processing ?/rdbms/admin/dplsql.bsq
processing ?/rdbms/admin/dtxnspc.bsq
CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE '/u01/app/oracle/oradata/test1/undotbs01.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 '/u01/app/oracle/oradata/test1/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
CREATE TEMPORARY TABLESPACE TEMPTS1 TEMPFILE '/u01/app/oracle/oradata/test1/temp01.dbf'
SIZE 100M REUSE
Completed: CREATE TEMPORARY TABLESPACE TEMPTS1 TEMPFILE '/u01/app/oracle/oradata/test1/temp01.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 ('/u01/app/oracle/oradata/test1/redo01a.log') SIZE 50M ,
GROUP 2 ('/u01/app/oracle/oradata/test1/redo02a.log') SIZE 50M
MAXLOGFILES 10
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 200
CHARACTER SET zhs16gbk
DATAFILE '/u01/app/oracle/oradata/test1/system01.dbf' SIZE 325M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/test1/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/test1/temp01.dbf'
SIZE 100M REUSE
UNDO TABLESPACE undotbs1
DATAFILE '/u01/app/oracle/oradata/test1/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
更多详情见请继续阅读下一页的精彩内容:
10gRAC-10.2.0.4-dbca建库时配置OEM遇到BUG-p8350262
Oracle 11g R2 手动建库(create database manually)
Oracle 11g + ASM DBCA 建库问题解决心得
Linux下Oracle 10g手工建库全过程
Oracle 9i数据库手工建库过程简记
静默安装Oracle 11gR2软件并且手动建库

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values and pointers to data rows, and is suitable for non-primary key column queries.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

MySQL supports four index types: B-Tree, Hash, Full-text, and Spatial. 1.B-Tree index is suitable for equal value search, range query and sorting. 2. Hash index is suitable for equal value searches, but does not support range query and sorting. 3. Full-text index is used for full-text search and is suitable for processing large amounts of text data. 4. Spatial index is used for geospatial data query and is suitable for GIS applications.

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.
