1、建目录:

[oracle@wen ~]$ mkdir $ORACLE_BASE/admin/rezin/{a,b,c,dp}dump -p

[oracle@wen ~]$ mkdir $ORACLE_HOME/oradata/rezin

2、建立参数文件

[oracle@wen ~]$ cd $ORACLE_HOME/dbs

[oracle@wen dbs]$ vim initrezin.ora

内容如下:

compatible='11.2.0.1'

db_name='rezin'

db_block_size=8192

core_dump_dest='/u01/app/oracle/admin/rezin/cdump'

sga_max_size=200m

db_create_file_dest='/u01/app/oracle/oradata'

db_create_online_log_dest='/u01/app/oracle/oradata'

undo_management=auto

undo_tablespace='SYS_UNDOTS'

非omf下的建库pfile文件内容(传统):

compatible='11.2.0.1'

db_name='rezin'

db_block_size=8192

core_dump_dest='/u01/app/oracle/admin/rezin/cdump'

sga_max_size=200m

pga_max_size=200m

control_files='/u01/app/oracle/oradata/rezin/control01.ctl'

db_create_file_dest='/u01/app/oracle/oradata'

db_create_online_log_dest='/u01/app/oracle/oradata'

undo_management=auto

undo_tablespace='SYS_UNDOTS'

3、启动实例到nomount阶段

[oracle@wen dbs]$ export ORACLE_SID=rezin

[oracle@wen dbs]$ sqlplus / as sysdba

[uniread] Loaded history (22 lines)

SQL*Plus: Release 11.2.0.1.0 Production on Sat May 23 23:36:46 2015

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

Connected to an idle instance.

SQL> startup nomount

ORACLE instance started.

Total System Global Area  217157632 bytes

Fixed Size                  2211928 bytes

Variable Size             159387560 bytes

Database Buffers           50331648 bytes

Redo Buffers                5226496 bytes

SQL> create spfile from pfile;

File created.

SQL> startup force nomount;

ORACLE instance started.

Total System Global Area  217157632 bytes

Fixed Size                  2211928 bytes

Variable Size             159387560 bytes

Database Buffers           50331648 bytes

Redo Buffers                5226496 bytes

4、建立数据库

SQL> ho ls /u01/app/oracle/oradata/rezin

SQL> create database rezin;

Database created.

SQL> select name from v$datafile;

NAME

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/REZIN/datafile/o1_mf_system_bp195k6f_.dbf

/u01/app/oracle/oradata/REZIN/datafile/o1_mf_sysaux_bp195tmj_.dbf

/u01/app/oracle/oradata/REZIN/datafile/o1_mf_sys_undo_bp1962fs_.dbf

非ofm下的建库语句内容(传统):

create database rezin

maxdatafiles 100

maxlogfiles 16

maxlogmembers 3

maxinstances 1

character set al32utf8

notional character set al16utf16

user sys identified by oracle

user system identified by oracle

datafile

'/u01/app/oracle/oradata/rezin/system01.dbf' size 300m autoextend on next 1m maxsize unlimited extent management local

sysaux datafile

'/u01/app/oracle/oradata/rezin/sysaux01.dbf' size 200m autoextend on

undo tablespace undotbs datafile '/u01/app/oracle/oradata/rezin/undotbs01.dbf' size 300m autoextend on

logfile

group 1 ' /u01/app/oracle/oradata/rezin/redo01.log' 50m

group 2 ' /u01/app/oracle/oradata/rezin/redo01.log' 50m

/

create tablespace users datafile '/u01/app/oracle/oradata/rezin/users01.dbf' size 100m autoextend on

create temporary ablespace temp tempfile '/u01/app/oracle/oradata/rezin/temp01.dbf' size 10m autoextend on

5、建立users表空间和temp表空间并设置其为默认表空间

SQL> create tablespace users;

Tablespace created.

SQL> create temporary tablespace temp;

Tablespace created.

SQL> alter database default tablespace users;

Database altered.

SQL> alter database default temporary tablespace temp;

Database altered.

6、创建脚本并运行脚本、创建数据字典视图

[oracle@wen ~]$vim sgjk.sql

内容如下:

@/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catalog.sql

@/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catproc.sql

conn system/oracle

@/u01/app/oracle/product/11.2.0/dbhome_1/sqlplus/admin/pupbld.sql

conn / as sysdba

shutdown immediate

startup

SQL>@sgjk.sql

7、配置dbca、oem和netca

Oracle安装部署之命令建库的更多相关文章

  1. Centos 下oracle 11g 安装部署及手动建库过程

    Oracle 11g 手动建库,在虚拟环境中,不使用DBCA工具进行创建数据库 1.Linux环境的基本配置 2.ip  10.11.30.60 3.Oracle 11g安装过程 ---------- ...

  2. Oracle安装部署,版本升级,应用补丁快速参考

    一.Oracle安装部署 1.1 单机环境 1.2 Oracle RAC环境 1.3 Oracle DataGuard环境 1.4 主机双机 1.5 客户端部署 二.Oracle版本升级 2.1 单机 ...

  3. Oracle安装部署之dbca静默建库和删除库

    dbca查看帮助: [oracle@wen ~]$ dbca -help 1).运行静默建库语句 [oracle@wen ~]$ dbca -silent -cloneTemplate -gdbNam ...

  4. oracle linux 6.5 安装 oracle 12cR2数据库(2)-DBCA建库

    援引:http://www.cnblogs.com/kerrycode/p/3386917.html  by 潇湘隐者 Oracle 12C引入了CDB与PDB的新特性,在ORACLE 12C数据库引 ...

  5. 002.Oracle安装部署-ASM

    一 环境准备 图形界面:略 安装包: linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip 二 安装ASM-Oracl ...

  6. 1. Oracle安装部署文档

    一. 部署环境步骤 1.1 软件环境 操作系统:CentOS release 6.5oracle安装包:linux.x64_11gR2_database_1of1.zip:linux.x64_11gR ...

  7. Oracle安装部署之Win7下oracle11g数据库的安装及配置

    1.下载安装包 到oracle官网downloads下下载(第一次下载需要注册账号). Win7 64位下载64位oracle11g安装包 Win7 32位下载32位oracle11g(Oracle_ ...

  8. Oracle安装部署之一键安装oracle数据库及其脚本

    准备工作:通过ftp工具上传oracle安装软件到linux系统/mnt目录下,并通过unzip命令解压软件.--------------------------------------------- ...

  9. Oracle安装部署之RedHat安装Oracle11g_R2

    硬件配置 内存 :≥1G 硬盘空间:≥10G 上传oracle11g安装包: putty上用wcw用户登录,通过ftp服务上传oracle安装文件到/home/wcw目录下解压 #unzip linu ...

随机推荐

  1. Springboot启动后报错【This application has no explicit mapping for /error, so you are seeing this as a fallback····】

    This application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Dec 1 ...

  2. sharepoint权限操作(记录以备忘)

    using Microsoft.SharePoint; using System; using System.Collections.Generic; using System.Linq; using ...

  3. Splash Lua 脚本

    Splash 可以通过 Lua 脚本执行一系列渲染操作,这样我们就可以用 Splash 来模拟浏览器的操作了,Splash Lua 基础语法如下: function main(splash, args ...

  4. [Python] First-class Everything (Python缔造者Guido van Rossum关于bound/unbound method的来历叙述)

    First-class Everything -- Guido van Rossum First-class object: 第一类对象.意指可在执行期创建并作为参数传递给其他函数或存入一个变量的对象 ...

  5. jquery 动态展示查询条件

    <table class="queryTable" width="100%" > <tr> <td class="que ...

  6. 《转》windows下通过cmd切换python2和python3版本

    当电脑中同时安装了python2和python3时,往往会由切换版本的需求.那么如何通过cmd命令行做到呢? 方法:修改python.exe的文件名 举个栗子: 我的电脑中同时安装了py2.7.10和 ...

  7. 清理和关闭多余的Windows 7系统服务

    清理和关闭多余的Windows 7系统服务 现在已经有不少配置不是很高的电脑用户正式用上了Windows 7(以下简称Win 7),如何让低配置电脑可以更流畅的运行Win 7呢?虽然部分软件提供了傻瓜 ...

  8. Linux终端多用户通信实用命令

    一  命令 1.1 write 该命令将当前终端(源)输入的字符拷贝至目标用户的终端,从而发送消息给系统中某个用户.用法如下: #write <user> <msg> [Ctr ...

  9. strcat的几种实现及性能比较

    一  原型说明 strcat()为C语言标准库函数,用于字符串拼接.函数原型声明在string.h头文件中: char *strcat(char *dest, const char *src); 该函 ...

  10. python基础---->python的使用(六)

    这里记录一下python中关于class类的一些知识.不解释就弄不懂的事,就意味着怎样解释也弄不懂. python中的类知识 一.class的属性引用与实例 class MyClass(): '''A ...