Oracle手工安装数据库

前端之家收集整理的这篇文章主要介绍了Oracle手工安装数据库前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


本次演示是在linux环境下手工安装oracle数据库

由于环境中已有了一个库,本次安装是第二个数据库,所以沿用之前的ORACLE_BASE和ORACLE_HOME目录

ORACLE_BASE目录为:/u01/app/oracle

ORACLE_HOME目录为:/u01/app/oracle/product/11.2.0/db_1

oracle控制文件及数据文件目录: /manual

本次演示创建的数据库实例名为:manual

1)创建adump目录

[oracle@shanxi ~]$ mkdir -p /u01/app/oracle/admin/manual/adump


2)创建pfile文件

[oracle@shanxi dbs]$ pwd
/u01/app/oracle/product/11.2.0/db_1/dbs


[oracle@shanxi dbs]$ vi initmanual.ora
orcl.__db_cache_size=339738624
orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASEset from environment
orcl.__pga_aggregate_target=339738624
orcl.__sga_target=503316480
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=146800640
orcl.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/manual/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/manual/control01.ctl','/manual/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='manual'
*.diagnostic_dest='/u01/app/oracle'
*.memory_target=839909376
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'

3)创建密码文件

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

[oracle@shanxi dbs]$ orapwdfile=orapwmanual password=xxxxxx entries=30


4)以创建好的pfile启动数据库到nomount状态

[oracle@shanxi dbs]$ export ORACLE_SID=manual

[oracle@shanxi dbs]$ sqlplus / as sysdba

sql>  startup nomount pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initmanual.ora';
 
 
 
 

5)创建数据库

sql>  CREATE DATABASE "manual"
MAXINSTANCES 8
MAXLOGHISTORY 32
MAXLOGFILES 32
MAXLOGMEMBERS 3
MAXDATAFILES 4096
DATAFILE '/manual/system01.dbf' SIZE 700M
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/manual/sysaux01.dbf' SIZE600M
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMPTEMPFILE '/manual/temp01.dbf' size 20M
AUTOEXTEND OFF EXTENT MANAGEMENT LOCALUNIFORM SIZE 1M
SMALLFILE UNDO TABLESPACE"UNDOTBS1" DATAFILE '/manual/undotbs1.dbf' SIZE 200M
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('/manual/redo11.log','/manual/redo12.log')SIZE 5M,GROUP 2 ('/manual/redo21.log','/manual/redo22.log') SIZE 5M,GROUP 3 ('/manual/redo31.log','/manual/redo32.log') SIZE 5M
USER SYS IDENTIFIED BY system USER SYSTEM IDENTIFIED BY system;

6)以pfile来创建spfile

sql> create spfile='/u01/app/oracle/product/11.2.0/db_1/dbs/spfilemanual.ora' from pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initmanual.ora';

7)执行脚本

sql>  @$ORACLE_HOME/rdbms/admin/catalog.sql;

sql>  @$ORACLE_HOME/rdbms/admin/catblock.sql;

sql>  @$ORACLE_HOME/rdbms/admin/catproc.sql;

sql>  @$ORACLE_HOME/rdbms/admin/catoctk.sql;

sql>  @$ORACLE_HOME/rdbms/admin/owminst.plb;

sql>  @$ORACLE_HOME/sqlplus/admin/pupbld.sql;

8)创建成功

sql> select instance_name from v$instance;

INSTANCE_NAME
----------------
manual
原文链接:https://www.f2er.com/oracle/213139.html

猜你在找的Oracle相关文章