创建密码文件cd $oracle_HOME/dbsorapwd file=orapwogg02 passWord=oracle entries=5mkdir -p $ORACLE_BASE/flash_re
创建密码文件
cd $oracle_HOME/dbs
orapwd file=orapwogg02 passWord=oracle entries=5
mkdir -p $ORACLE_BASE/flash_recovery_area
mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/adump
mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/dpdump
mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/pfile
mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/scripts
cd $ORACLE_HOME
cd dbs
cat init.ora|grep -v ^$|grep -v ^# > initicsdb.ora
vim 编辑icsdb.sh 文件
db_name='icsdb' #此处设置为SID
memory_target=450M #SGA 大小
processes = 150 #连接数
audit_file_dest='/oracle/admin/icsdb/adump'
audit_trail ='db'
db_block_size=8192 #块大小
db_domain=''
db_recovery_file_dest='/oracle/flash_recovery_area' #指定快速恢复区路径
db_recovery_file_dest_size=2G
diagnostic_dest='/oracle' #oracle 软件安装目录
dispatchers='(PROTOCOL=tcp) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS' #指定control 文件路径
control_files = (/ora_data/icsdb/control01.ctl, /ora_data/icsdb/control02.ctl)
compatible ='11.2.0'
启动实例到nomount状态
sqlplus / as sysdba
SQL> startup nomount pfile='$ORACLE_HOME/dbs/initicsdb.ora'
SQL> create spfile from pfile;
运行如下脚本:
CREATE DATABASE icsdb
USER SYS IDENTIFIED BY sys_password
USER SYSTEM IDENTIFIED BY system_password
LOGFILE GROUP 1 ('/ora_data/icsdb/redo01a.log','/ora_data/icsdb/redo01b.log') SIZE 100M BLOCKSIZE 512,
GROUP 2 ('/ora_data/icsdb/redo02a.log','/ora_data/icsdb/redo02b.log') SIZE 100M BLOCKSIZE 512,
GROUP 3 ('/ora_data/icsdb/redo03a.log','/ora_data/icsdb/redo03b.log') SIZE 100M BLOCKSIZE 512
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET ZHS16GBK
NATioNAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/ora_data/icsdb/system01.dbf' SIZE 325M REUSE
SYSAUX DATAFILE '/ora_data/icsdb/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE users
DATAFILE '/ora_data/icsdb/users01.dbf'
SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/ora_data/icsdb/temp01.dbf'
SIZE 50M REUSE
UNDO TABLESPACE undotbs
DATAFILE '/ora_data/icsdb/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
#create oracle dictionary infORMation
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
conn system/password 注意执行否则后面使用普通用户连接会报“访问 PRODUCT_USER_PROFILE 时出错”
@?/sqlplus/admin/pupbld.sql
The database was created successfully
--结束END--
本文标题: oracle 11g 手工建库
本文链接: https://lsjlt.com/news/44062.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0