一、确定全局数据库名与实例名
全局数据库名:dxm
SID :dxm
二、确定DBA认证方式
口令文件方式认证
全局数据库名:dxm
SID :dxm
二、确定DBA认证方式
口令文件方式认证
三、创建必要目录和创建初始化参数文件;
首先,需要创建必要的目录
首先,需要创建必要的目录
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\adhoc
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\bdump
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\cdump
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\create
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\exp
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\pfile
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\udump
mkdir D:\work_tools\oracle\product\10.2.0\oradata\dxm
mkdir D:\work_tools\oracle\product\10.2.0\oradata\dxm\archive
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\adhoc
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\bdump
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\cdump
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\create
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\exp
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\pfile
mkdir D:\work_tools\oracle\product\10.2.0\admin\dxm\udump
mkdir D:\work_tools\oracle\product\10.2.0\oradata\dxm
mkdir D:\work_tools\oracle\product\10.2.0\oradata\dxm\archive
四、创建初始化参数文件
D:\work_tools\oracle\product\10.2.0\db_1\database\initdxm.ora
D:\work_tools\oracle\product\10.2.0\db_1\database\initdxm.ora
processes = 400
__shared_pool_size = 88080384
shared_pool_size = 37748736
__large_pool_size = 4194304
__java_pool_size = 4194304
__streams_pool_size = 4194304
sga_target = 285212672
control_files = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ORADATA\DXM\CONTROL01.CTL, D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ORADATA\DXM\CONTROL02.CTL, D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ORADATA\DXM\CONTROL03.CTL
db_block_size = 8192
__db_cache_size = 176160768
db_cache_size = 50331648
compatible = 10.2.0.1.0
db_file_multiblock_read_count= 16
db_recovery_file_dest = D:\work_tools\oracle\product\10.2.0\flash_recovery_area
db_recovery_file_dest_size= 2147483648
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain = ''
dispatchers = '(PROTOCOL=TCP) (SERVICE=dxmXDB)'
job_queue_processes = 10
audit_file_dest = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ADMIN\DXM\ADUMP
background_dump_dest = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ADMIN\DXM\BDUMP
user_dump_dest = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ADMIN\DXM\UDUMP
core_dump_dest = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ADMIN\DXM\CDUMP
db_name = dxm
open_cursors = 300
pga_aggregate_target = 94371840
__shared_pool_size = 88080384
shared_pool_size = 37748736
__large_pool_size = 4194304
__java_pool_size = 4194304
__streams_pool_size = 4194304
sga_target = 285212672
control_files = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ORADATA\DXM\CONTROL01.CTL, D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ORADATA\DXM\CONTROL02.CTL, D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ORADATA\DXM\CONTROL03.CTL
db_block_size = 8192
__db_cache_size = 176160768
db_cache_size = 50331648
compatible = 10.2.0.1.0
db_file_multiblock_read_count= 16
db_recovery_file_dest = D:\work_tools\oracle\product\10.2.0\flash_recovery_area
db_recovery_file_dest_size= 2147483648
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain = ''
dispatchers = '(PROTOCOL=TCP) (SERVICE=dxmXDB)'
job_queue_processes = 10
audit_file_dest = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ADMIN\DXM\ADUMP
background_dump_dest = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ADMIN\DXM\BDUMP
user_dump_dest = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ADMIN\DXM\UDUMP
core_dump_dest = D:\WORK_TOOLS\ORACLE\PRODUCT\10.2.0\ADMIN\DXM\CDUMP
db_name = dxm
open_cursors = 300
pga_aggregate_target = 94371840
五、创建服务
D:\>oradim -new -sid dxm -pfile 'D:\work_tools\oracle\product\10.2.0\db_1\databa
se\initdxm.ora'
Instance created.
D:\>oradim -new -sid dxm -pfile 'D:\work_tools\oracle\product\10.2.0\db_1\databa
se\initdxm.ora'
Instance created.
D:\>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jan 23 19:09:14 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1248552 bytes
Variable Size 100664024 bytes
Database Buffers 176160768 bytes
Redo Buffers 7139328 bytes
六、创建数据库
CREATE DATABASE "dxm"
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\system01.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\sysaux01.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('D:\work_tools\oracle\product\10.2.0\oradata\dxm\redo01.log') SIZE 51200K,
GROUP 2 ('D:\work_tools\oracle\product\10.2.0\oradata\dxm\redo02.log') SIZE 51200K,
GROUP 3 ('D:\work_tools\oracle\product\10.2.0\oradata\dxm\redo03.log') SIZE 51200K
USER SYS IDENTIFIED BY "manager" USER SYSTEM IDENTIFIED BY "manager";
Fixed Size 1248552 bytes
Variable Size 100664024 bytes
Database Buffers 176160768 bytes
Redo Buffers 7139328 bytes
六、创建数据库
CREATE DATABASE "dxm"
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\system01.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\sysaux01.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('D:\work_tools\oracle\product\10.2.0\oradata\dxm\redo01.log') SIZE 51200K,
GROUP 2 ('D:\work_tools\oracle\product\10.2.0\oradata\dxm\redo02.log') SIZE 51200K,
GROUP 3 ('D:\work_tools\oracle\product\10.2.0\oradata\dxm\redo03.log') SIZE 51200K
USER SYS IDENTIFIED BY "manager" USER SYSTEM IDENTIFIED BY "manager";
七、配置网络服务命名
D:\work_tools\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
DXM =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = dengxm)
(PORT = 1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dxm)
)
)
D:\work_tools\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
DXM =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = dengxm)
(PORT = 1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dxm)
)
)
-------------------------------------------------------------------------------------
八、默认表空间
CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
ALTER DATABASE DEFAULT TABLESPACE "USERS";
八、默认表空间
CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE 'D:\work_tools\oracle\product\10.2.0\oradata\dxm\users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
ALTER DATABASE DEFAULT TABLESPACE "USERS";
九、
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\catalog.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\catblock.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\catproc.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\catoctk.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\owminst.plb;
@D:\work_tools\oracle\product\10.2.0\db_1\sqlplus\admin\pupbld.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\sqlplus\admin\help\hlpbld.sql helpus.sql;
-----------------------------------------------------------------------------------------------------------
SQL> create spfile from pfile;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\catalog.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\catblock.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\catproc.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\catoctk.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\rdbms\admin\owminst.plb;
@D:\work_tools\oracle\product\10.2.0\db_1\sqlplus\admin\pupbld.sql;
@D:\work_tools\oracle\product\10.2.0\db_1\sqlplus\admin\help\hlpbld.sql helpus.sql;
-----------------------------------------------------------------------------------------------------------
SQL> create spfile from pfile;
========================================================================================
--------- 创建表空间
--------- 创建表空间
这个就不发了
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13726712/viewspace-684527/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13726712/viewspace-684527/