| C:\Documents and Settings\robin>oradim -NEW -SID ocmdb |
pfile used to create the database:
| ocmdb.__db_cache_size=205520896 ocmdb.__java_pool_size=4194304 ocmdb.__large_pool_size=4194304 ocmdb.__shared_pool_size=104857600 ocmdb.__streams_pool_size=0 *.audit_file_dest='d:\oracle/admin/ocmdb/adump' *.background_dump_dest='d:\oracle/admin/ocmdb/bdump' *.compatible='10.2.0.1.0' *.control_files='d:\oracle/oradata/ocmdb/\control01.ctl','d:\oracle/oradata/ocmdb/\control02.ctl','d:\oracle/oradata/10g2/\control03.ctl' *.core_dump_dest='d:\oracle/admin/ocmdb/cdump' *.db_block_size=8192 *.db_domain='' *.db_file_multiblock_read_count=16 *.db_name='ocmdb' *.db_recovery_file_dest='d:\oracle/flash_recovery_area' *.db_recovery_file_dest_size=536870912 *.dispatchers='(PROTOCOL=TCP) (SERVICE=10g2XDB)' *.job_queue_processes=10 *.nls_language='SIMPLIFIED CHINESE' *.nls_territory='CHINA' *.open_cursors=300 *.pga_aggregate_target=67108864 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.sga_target=327155712 *.undo_management='AUTO' *.undo_tablespace='UNDOTBS1' *.user_dump_dest='d:\oracle/admin/ocmdb/udump' |
Scripts used to create database:
| CREATE DATABASE OCMDB USER SYS IDENTIFIED BY change_on_install USER SYSTEM IDENTIFIED BY manager LOGFILE GROUP 1 ('D:\oracle\oradata\ocmdb\redo01.log') SIZE 10M, GROUP 2 ('D:\oracle\oradata\ocmdb\redo02.log') SIZE 10M, GROUP 3 ('D:\oracle\oradata\ocmdb\redo03.log') SIZE 10M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 DATAFILE 'D:\oracle\oradata\ocmdb\system01.dbf' SIZE 325M REUSE EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE 'D:\oracle\oradata\ocmdb\sysaux01.dbf' SIZE 325M REUSE DEFAULT TABLESPACE tbs_1 DATAFILE 'D:\oracle\oradata\ocmdb\tbs01.dbf' SIZE 50M REUSE DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE 'D:\oracle\oradata\ocmdb\temp01.dbf' SIZE 20M REUSE UNDO TABLESPACE undotbs DATAFILE 'D:\oracle\oradata\ocmdb\undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED; |
Execute the scripts to create the database, however met below error message:
| C:\Documents and Settings\robin>set oracle_sid=ocmdb C:\Documents and Settings\robin>sqlplus "/ as sysdba" SQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 16 16:38:00 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. _USER'@'_CONNECT_IDENTIFIER > SYS@ocmdb > SYS@ocmdb > startup nomount; ORACLE instance started. Total System Global Area 327155712 bytes Fixed Size 1248792 bytes Variable Size 113246696 bytes Database Buffers 205520896 bytes Redo Buffers 7139328 bytes SYS@ocmdb > @D:\oracle\admin\ocmdb\scripts\createdb.txt CREATE DATABASE OCMDB * ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced |
Reason: you can see in pfile has defined the undo tablesapce as “undotbs1”, however in the create database script we define the undo tablespace again and this time the name is “undotbs”. Modify the script for creating database and try again:
This time it succeed! cheers!
| SYS@ocmdb > @D:\oracle\admin\ocmdb\scripts\createdb.txt Database created. SYS@ocmdb > |
The next step is to run scripts to build data dictionary:
SYS@ocmdb >@D:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\catalog.sql; PL/SQL procedure successfully completed. SYS@ocmdb > @D:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\catproc.sql; PL/SQL procedure successfully completed. |
The next step is to manually configure the dbconsole:
| C:\Documents and Settings\robin>set oracle_sid=ocmdb C:\Documents and Settings\robin>emca -repos create EMCA 开始于 2010-9-16 18:09:33 EM Configuration Assistant 10.2.0.1.0 正式版 版权所有 (c) 2003, 2005, Oracle。保留所有权利。 输入以下信息: 数据库 SID: ocmdb 监听程序端口号: 1521 SYS 用户的口令: SYSMAN 用户的口令: SYSMAN 用户的口令: 是否继续? [yes(Y)/no(N)]: y 2010-9-16 18:13:08 oracle.sysman.emcp.EMConfig perform 信息: 正在将此操作记录到 d:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\ocmdb\em ca_2010-09-16_06-09-32-下午.log。 2010-9-16 18:13:10 oracle.sysman.emcp.EMReposConfig createRepository 信息: 正在创建 EM 资料档案库 (此操作可能需要一段时间)... 2010-9-16 18:19:01 oracle.sysman.emcp.EMReposConfig invoke 信息: 已成功创建资料档案库 已成功完成 Enterprise Manager 的配置 EMCA 结束于 2010-9-16 18:19:01 C:\Documents and Settings\robin>emca -config dbcontrol db EMCA 开始于 2010-9-16 18:25:55 EM Configuration Assistant 10.2.0.1.0 正式版 版权所有 (c) 2003, 2005, Oracle。保留所有权利。 输入以下信息: 数据库 SID: ocmdb 监听程序端口号: 1521 SYS 用户的口令: DBSNMP 用户的口令: SYSMAN 用户的口令: SYSMAN 用户的口令: 通知的电子邮件地址 (可选): 通知的发件 (SMTP) 服务器 (可选): ----------------------------------------------------------------- 已指定以下设置 数据库 ORACLE_HOME ................ d:\oracle\product\10.2.0\db_1 数据库主机名 ................ 192.168.1.100 监听程序端口号 ................ 1521 数据库 SID ................ ocmdb 通知的电子邮件地址 ............... 通知的发件 (SMTP) 服务器 ............... ----------------------------------------------------------------- 是否继续? [yes(Y)/no(N)]: y 2010-9-16 18:27:59 oracle.sysman.emcp.EMConfig perform 信息: 正在将此操作记录到 d:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\ocmdb\em ca_2010-09-16_06-25-55-下午.log。 2010-9-16 18:28:24 oracle.sysman.emcp.util.DBControlUtil startOMS 信息: 正在启动 Database Control (此操作可能需要一段时间)... 2010-9-16 18:29:24 oracle.sysman.emcp.EMDBPostConfig performConfiguration 信息: 已成功启动 Database Control 2010-9-16 18:29:25 oracle.sysman.emcp.EMDBPostConfig performConfiguration 警告: 无法创建 Database Control 快捷方式 2010-9-16 18:29:25 oracle.sysman.emcp.EMDBPostConfig performConfiguration 信息: >>>>>>>>>>> Database Control URL 为 http://192.168.1.100:5502/em <<<<<<<<< << 已成功完成 Enterprise Manager 的配置 EMCA 结束于 2010-9-16 18:29:25 |
Note: I found when do this step, the emca automatically create sysman user
need use orapwd to create a password file for sys user, otherwise can’t login dbcontrol.
Please reference the next post.
--end.