oracle11g手工建库
1.设置环境变量
[oracle@HE3~]$ vi .bash_profile
exportPATH
exportEDITOR=vi
exportORACLE_SID=orcl
exportORACLE_BASE=/u01/app/oracle
exportORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
exportnls_date_format="yyyy-mm-dd hh24:mi:ss"
exportPATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:$PATH
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
#aliassqlplus='rlwrap sqlplus'
#aliasrman='rlwrap rman'
exportNLS_LANG=AMERICAN_AMERICA.ZHS16GBK
[oracle@HE3 ~]$ source .bash_profile
2.准备密码文件及初始化参数文件和创建数据库脚本
[oracle@HE3~]$ cd $ORACLE_HOME/dbs
[oracle@HE3dbs]$ ls
hc_orcl.dat init.ora initorcl.ora lkORCL
[oracle@HE3dbs]$ orapwd file=orapwdorcl password=oracle entries=30
[oracle@HE3dbs]$ ls
hc_orcl.dat init.ora initorcl.ora lkORCL orapwdorcl
[oracle@HE3 dbs]$ vi initorcl.ora
diagnostic_dest='/u01/app/oracle'
db_name='orcl'
memory_target=512M
processes= 150
audit_file_dest='/u01/app/oracle/admin/orcl/adump'
audit_trail='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
db_recovery_file_dest_size=512M
diagnostic_dest='/u01/app/oracle'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
control_files=(/u01/app/oracle/oradata/orcl/control01.ctl,/u01/app/oracle/oradata/orcl/control02.ctl)
compatible='11.2.0'
3.准备创建数据库需要的相关目录
[oracle@HE3dbs]$ mkdir -p /u01/app/oracle/admin/orcl/adump/
[oracle@HE3dbs]$ mkdir -p /u01/app/oracle/flash_recovery_area
[oracle@HE3dbs]$ mkdir -p /u01/app/oracle/oradata/orcl
[oracle@HE3dbs]$ ls
hc_orcl.dat init.ora initorcl.ora lkORCL orapwdorcl
4.开始手工建库
[oracle@ENMOEDU ENMOEDU]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 10 00:39:10 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1349732 bytes
Variable Size 620758940 bytes
Database Buffers 444596224 bytes
Redo Buffers 4628480 bytes
[oracle@HE3~]$ vi create_db.sql
CREATEDATABASE orcl
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1('/u01/app/oracle/oradata/orcl/redo01a.log','/u01/app/oracle/oradata/orcl/redo01b.log')SIZE 50M BLOCKSIZE 512,
GROUP 2('/u01/app/oracle/oradata/orcl/redo02a.log','/u01/app/oracle/oradata/orcl/redo02b.log')SIZE 50M BLOCKSIZE 512,
GROUP 3('/u01/app/oracle/oradata/orcl/redo03a.log','/u01/app/oracle/oradata/orcl/redo03b.log')SIZE 50M BLOCKSIZE 512
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE'/u01/app/oracle/oradata/orcl/system01.dbf' SIZE 325M REUSE
SYSAUX DATAFILE'/u01/app/oracle/oradata/orcl/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE users
DATAFILE'/u01/app/oracle/oradata/orcl/users01.dbf'
SIZE 500M REUSE AUTOEXTEND ON MAXSIZEUNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE'/u01/app/oracle/oradata/orcl/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs1
DATAFILE'/u01/app/oracle/oradata/orcl/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZEUNLIMITED;
[oracle@HE3~]$ tail -100f /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
SQL>@/home/oracle/create_db.sql
Databasecreated.
SQL>@?/rdbms/admin/catalog.sql ----------------------------创建数据字典
……
PL/SQLprocedure successfully completed.
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMPCATALOG 2016-01-26 00:07:42
SQL> @?/rdbms/admin/catproc.sql-----------------------------创建存储过程和数据库的包
......
SQL>
SQL> SELECT dbms_registry_sys.time_stamp('CATPROC') AS timestamp FROM DUAL;
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP CATPROC 2014-02-10 01:25:21
1 row selected.
SQL>
SQL> SET SERVEROUTPUT OFF
SQL>
SQL>
SQL> select status from v$instance;
STATUS
------------
OPEN
1 row selected.
SQL> quit
5.完成手工建库
oracle11g手工建库的更多相关文章
- oracle11g手工建库步骤
平台:Linux AS release 5,Oracle11.1.0.7db_name = SBDB 1. 设置环境变量export ORACLE_BASE=/opt/oracleexport ORA ...
- oracle11g 手工建库步骤
#create oracle instance parameter vi initkevin.or db_name='kevin' memory_target=0 sga_max_size=5G sg ...
- Oracle手工建库
环境准备 手工建库的前提是ORACLE软件已经正确安装到操作系统中,只是需要我们利用ORACLE软件提供的一些工具和脚本来创建一个数据库,创建这个数据库可以运行DBCA工具图形化创建,也可以使用CRE ...
- CENTOS 6.4 安装oracle 10g,手工建库及升级到10.2.0.5
一. 数据库软件安装 参照官方手册 1.安装rpm包 注这里的yum直接用163的yum yum -y install binutils compat-libstdc++-33 compat-libs ...
- Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g
Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g 系统环境: 操作系统: RedHat EL6 Oracle: Oracle 10g and Oracle 11 ...
- 静默方式安装10g数据库软件+升级patch+手工建库
通常我们安装Oracle数据库软件,都是用OUI图形界面来完成的,但有些Unix/Linux系统中并未安装图形系统,也就无法使用图形界面来安装Oracle的产品了,对于这种场景,就只能采用静默方式来安 ...
- Oracle 10g AND Oracle 11g手工建库案例--Oracle 10g
Oracle 10g AND Oracle 11g手工建库案例--Oracle 10g 系统环境: 操作系统: RedHat EL6 Oracle: Oracle 10g and Oracle 11 ...
- Oracle:手工建库
今天学习了小布老师的手工建库视频,自己也做了一遍,下面是创建过程记录: 本地环境oracle10.2.0.1 一.前期准备工作 1.设置环境变量 [oracle@app dbs]$ vi bbk.en ...
- Oracle 11g 手工建库
假设数据库软件已经安装好,现在没有图形界面无法用dbca安装数据库,那么用手工建库,数据库名为edw 创建目录 [oracle@localhost ~]$ mkdir -p /u01/app/orac ...
随机推荐
- Python之路:堡垒机实例以及数据库操作
一.堡垒机前戏 开发堡垒机之前,先学习Python的paramiko模块,该模块基于SSH用于连接远程服务器并执行相关操作. SSHClient 用于连接远程服务器并执行基本命令 基于用户名密码连接: ...
- MountService初探
MountService作为Vold的客户端,会接收来自vold的消息,并且内部定义保存了各种Volume相关的状态定义: 1.VolumeState class VolumeState { publ ...
- eclipse shortcut binding
有些真的是太方便了,我竟然不知道,比如ctrl + h 就是打开search 功能,包括file search,我竟然每次都点击工具条上的放大镜图标! use Ctrl+Shift+T for ope ...
- bzoj 3879 虚树
题目大意: 给一个字符串,多次询问k个后缀,求它们两两间LCP长度总和 分析: 转化为后缀树,用虚树求 注意: 后缀树中代表后缀的点都是叶子节点 题目中取模并没有卵用 #include <cst ...
- LVS详解
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...
- 打印等腰三角形as3
package { import flash.display.Sprite; public class san extends Sprite { public function san() { var ...
- mysql trouble shooting---- 从库停止同步lock_wait_timeout_exceeded_try_restarting_transaction
问题描述: 数据库从库停止同步. 问题分析: show slave status\G;(也可使用show full processlist) 显示 某个update语句出错,Lock wait tim ...
- 比较实用的webpack配置代码
var path = require('path');var webpack = require('webpack');var ExtractTextPlugin = require('extract ...
- AFNetworking封装思路简析
http://blog.csdn.net/qq_34101611/article/details/51698473 一.AFNetworking的发展 1. AFN 1.0版本 AFN 的基础部分是 ...
- linux命令学习-4-lsof
lsof(list open files)是一个列出当前系统打开文件的工具.在linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件. 在终端下输入ls ...