如下是我手工创建的脚本,供大家参考![@more@]
第一步:创建密码文件
C:Documents and Settingsshiyihai>orapwd file="H:ora10gdbsorapwdora10g.pwd" entries=10 password=sys
第二步:编辑初始化参数文件,部分参数跟9i不一样,并nomount启动数据库
初始化参数文件init_10g.ora内容如下:
ora10g.__db_cache_size=100000000
ora10g.__java_pool_size=16777216
ora10g.__large_pool_size=16777216
ora10g.__shared_pool_size=50000000
ora10g.__streams_pool_size=0
*.audit_file_dest='H:adminora10gadump'
*.background_dump_dest='H:adminora10gbdump'
*.compatible='10.2.0.1.0'
*.control_files='H:oradataora10gCONTROL01.CTL','H:oradataora10gCONTROL02.CTL','H:oradataora10gCONTROL03.CTL'
*.core_dump_dest='H:adminora10gcdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=32
*.db_name='ora10g'
*.db_recovery_file_dest='h:flash_recovery_area'
*.db_recovery_file_dest_size=500000000
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ora10gXDB)'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=200000000
*.processes=550
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=610
*.sga_target=300000000
*.star_transformation_enabled='TRUE'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='H:adminora10gudump'
SQL> startup pfile='h:init_10g.ora' nomount
ORACLE 例程已经启动。
Total System Global Area 301989888 bytes
Fixed Size 1248672 bytes
Variable Size 96469600 bytes
Database Buffers 201326592 bytes
Redo Buffers 2945024 bytes
注意:是启动到nomount状态下。
第三步:创建数据库
create database ora10g
MAXINSTANCES 8
MAXLOGHISTORY 32
MAXLOGFILES 32
MAXLOGMEMBERS 3
MAXDATAFILES 2048
character set ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
DATAFILE 'H:oradataora10gsystem01.dbf' size 300M autoextend on next 64K maxsize unlimited
sysaux DATAFILE 'H:oradataora10gsysaux01.dbf' size 100M autoextend on next 64K maxsize unlimited
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE 'H:oradataora10gtemp01.dbf' size 50M autoextend on MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1024K
UNDO TABLESPACE UNDOTBS1 datafile 'H:oradataora10gundotbs01.dbf' SIZE 50M autoextend on next 64K maxsize unlimited
LOGFILE
GROUP 1 ('H:oradataora10gredo0101.dbf') SIZE 50M REUSE,
GROUP 2 ('H:oradataora10gredo0201.dbf') SIZE 50M REUSE,
GROUP 3 ('H:oradataora10gredo0301.dbf') SIZE 50M REUSE;
数据库已创建。
SQL>
第四步:创建数据字典
SQL>@ ?/rdbms/admin/catalog.sql;
SQL>@ ?/rdbms/admin/catproc.sql;
SQL>@ ?/rdbms/admin/catblock.sql;
SQL>@ ?/rdbms/admin/catoctk.sql;
SQL> conn system/manager
已连接。
SQL> @ ?/sqlplus/admin/pupbld.sql;
第五步:创建spfile并重启db
SQL> conn / as sysdba
已连接。
SQL> create spfile from pfile='h:init_10g.ora';
文件已创建。
SQL> startup force;
ORACLE 例程已经启动。
Total System Global Area 301989888 bytes
Fixed Size 1248672 bytes
Variable Size 96469600 bytes
Database Buffers 201326592 bytes
Redo Buffers 2945024 bytes
数据库装载完毕。
数据库已经打开。
SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/38542/viewspace-916552/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/38542/viewspace-916552/