oracle 快速创建数据库,手动快速创建数据库

$cd $ORACLE_HOME/dbs

$export ORACLE_SID=test

$

$mkdir -p $ORACLE_BASE/admin/testdb/adump

$mkdir $ORACLE_BASE/oradata/testdb

$mkdir $ORACLE_BASE/flash_recovery_area/testdb

$

$orapwd file=orapwtestdb password=oracle entries=5

$

$vim inittest.ora

db_name='testdb'

db_block_size=8192

instance_name='testdb'

memory_target=500M

processes=150

audit_file_dest='/u01/app/oracle/admin/testdb/adump'

audit_trail='db'

db_block_size=8192

db_recovery_file_dest='/u01/app/oracle/flash_recovery_area/testdb'

db_recovery_file_dest_size=100M

diagnostic_dest='/u01/app/oracle'

dispatchers='(PROTOCOL=TCP)(SERVICE=testdbXDB)'

open_cursor=100

undo_tablespace='UNDOTBS1'

control_files=

('/u01/app/oracle/oradata/testdb/control01.ctl','/u01/app/oracle/oradata/testdb/control02.ctl','/u01/app/oracl

e/oradata/testdb/control03.ctl')

compatible ='11.2.0.0.0'

$

$

$sqlplus /nolog

SQL> conn / as sysdba

SQL> startup pfile=?/dbs/inittestdb.ora nomount;

SQL>

SQL> !

$cd $ORACLE_HOME/dbs

$vim crdb.sql

create database testdb

maxinstances 1

maxloghistory 1

maxlogfiles 16

maxlogmembers 3

maxdatafiles 10

logfile group 1   ('/u01/app/oracle/oradata/testdb/redo01_a.log',/u01/app/oracle/oradata/testdb/redo01_b.log')

size 10M,

group 2  ('/u01/app/oracle/oradata/testdb/redo02_a.log',/u01/app/oracle/oradata/testdb/redo02_b.log') size 10M

datafile '/u01/app/oracle/oradata/testdb/system01.dbf' size 50M

autoextend on next 10M extent management local

sysaux datafile  '/u01/app/oracle/oradata/testdb/sysaux01.dbf' size 50M

autoextend on next 10M

default tablespace users

datafile  '/u01/app/oracle/oradata/testdb/users01.dbf' size 20M

autoextend on next 10M

default temporary tablespace temp

tempfile  '/u01/app/oracle/oradata/testdb/temp01.dbf' size 10M

undo tablespace UNDOTBS1 datafile  '/u01/app/oracle/oradata/testdb/undotbs1.dbf' size 20M

character set AL32UTF8

national character set AL16UTF16

user sys identified by oracle

user system identified by oracle;

$exit

SQL> @?/dbs/crdb.sql

SQL> @?/rdbms/catalog.sql

SQL> @?/rdbms/catproc.sql

SQL> conn system/oracle

SQL> @?/sqlplus/admin/pupbld.sql

SQL> conn / as sysdba

SQL> create spfile from pfile;

SQL> startup force

SQL>

SQL>--安装oracle Help 系统

SQL> CONN system/oracle

SQL> @?/sqlplus/admin/help/helpbld.sql

Enter value for 1:  /u01/app/oracle/product/11.2.0/db_1/sqlplus/admin/help

Enter value for 2:  /u01/app/oracle/product/11.2.0/db_1/sqlplus/admin/help/helpus.sql

SQL>

SQL> startup force

SQL> conn / as sysdba

SQL> help index

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27795363/viewspace-746249/,如需转载,请注明出处,否则将追究法律责任。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值