ϵͳ»·¾³£º
1¡¢²Ù×÷ϵͳ£ºWindows 2000 Server
2¡¢Êý¾Ý¿â£º¡¡Oracle 8i R2 (8.1.6) for NT ÆóÒµ°æ/Oracle 9i for NT ÆóÒµ°æ
3¡¢°²×°Â·¾¶£ºD:ORACLE
²½Ö裺
1¡¢ÊÖ¹¤´´½¨Ïà¹ØĿ¼
2¡¢ÊÖ¹¤´´½¨³õʼ»¯²ÎÊýÎļþ
3¡¢Í¨¹ýoradim´´½¨Ò»¸öORACLE·þÎñ
4¡¢´´½¨Êý¾Ý¿â
5¡¢´´½¨Êý¾Ý¿âÊý¾ÝÎļþ£¬Ö´Ðнű¾
6¡¢´´½¨Êý¾Ý×ֵ䣬ÔËÐÐ
ÊÖ¹¤´´½¨Êý¾Ý¿âÍêÕû²½Öè
ϵͳ»·¾³
²Ù×÷ϵͳ£ºWindows 2000 Server
Êý¾Ý¿â£ºOracle 9i
°²×°Â·¾¶£ºC:Oracle
1¡¢ÊÖ¹¤´´½¨Ïà¹ØĿ¼
C£ºOracleadminweb
C£ºOracleadminwebdump
C£ºOracleadminwebudump
C£ºOracleadminwebcdump
C£ºOracleadminwebpfile
C£ºOracleadminwebcreate
C£ºOracleoradataweb
C£ºOracleoradatawebarchive
2¡¢ÊÖ¹¤´´½¨³õʼ»¯²ÎÊýÎļþc:oracleadminwebpfileinit.ora£¬ÄÚÈÝ¿ÉÒÔcopy±ðµÄʵÀýinit.oraÎļþºóÐ޸ġ£
3¡¢ÊÖ¹¤´´½¨initweb.oraÎļþ£¬ÄÚÈÝ£º£ºifile= c:oracleadminwebpfileinit.ora
4¡¢Ê¹ÓÃorapwd.exeÃüÁ´´½¨¿ÚÁîÎļþpwdweb.ora,ÃüÁî¸ñʽÈçÏ£º
orapwd.exe file=c:oracleora90databasepwdweb.ora password=ltjsb entries=5
5¡¢Í¨¹ýoradim.exeÃüÁÔÚ·þÎñÀïÉú³ÉÒ»¸öеÄʵÀý¹ÜÀí·þÎñ£¬Æô¶¯·½Ê½ÎªÊÖ¹¤
set ORACLE_SID=web
C:oracleora90inoradim -new -sid WEB -startmode m
-pfile C:oracleora90databaseinitweb.ora
6¡¢´´½¨Êý¾Ý¿â£¬Ö´ÐÐcreatedb.sql½Å±¾ÃüÁ
SQL>sqlplus /nolog
SQL>connect SYS/change_on_install as SYSDBA
SQL>@Createdb.sql
Createdb.sql½Å±¾ÄÚÈÝÈçÏ£º
set echo on
spool C:oracleadminmydbcreateCreateDB.log
startup nomount pfile="C:oracleadminwebpfileinit.ora";
CREATE DATABASE web
MAXINSTANCES 1
MAXLOGHISTORY 1
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
DATAFILE 'C:oracleoradatawebsystem01.dbf' SIZE 325M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
UNDO TABLESPACE "UNDOTBS" DATAFILE 'C:oracleoradatawebundotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('C:oracleoradataweb edo01.log') SIZE 100M,
GROUP 2 ('C:oracleoradataweb edo02.log') SIZE 100M,
GROUP 3 ('C:oracleoradataweb edo03.log') SIZE 100M;
spool off
exit;
×¢£º´´½¨Êý¾Ý¿âʱ£¬Ö´ÐÐsql.bsqj½Å±¾ÃüÁ´Ë½Å±¾ÃüÁî´´½¨ÈçÏÂÄÚÈÝ£º
´´½¨¿ØÖÆÎļþºÍÁª»úÈÕÖ¾Îļþ
´´½¨Êý¾Ý¿âϵͳ±í¿Õsystem
ÔÚsystem±í¿Õ¼äÉÏ´´½¨systemϵͳ»Ø¹ö¶Î
´´½¨sysºÍsystemÕ˺Å
´´½¨»ù±íºÍ´Ø
´´½¨Êý¾Ý×Öµä±í¡¢Ë÷ÒýºÍÐòÁÐ
´´½¨Ïà¹Ø½ÇɫȨÏÞ
7¡¢´´½¨Êý¾Ý¿âÊý¾ÝÎļþ£¬Ö´Ðнű¾createfiles.sql
SQL>sqlplus /nolog
SQL> connect SYS/change_on_install as SYSDBA
SQL>@createfiles.sql
Createfiles.sql½Å±¾ÄÚÈÝÈçÏ£º
set echo on
spool C:oracleadminmydbcreateCreateDBFiles.log
CREATE TABLESPACE "INDX" LOGGING DATAFILE 'C:oracleoradatawebindx01.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE 'C:oracleoradataweb emp01.dbf' SIZE 40M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE "TEMP";
CREATE TABLESPACE "TOOLS" LOGGING DATAFILE 'C:oracleoradataweb ools01.dbf' SIZE 10M REUSE AUTOEXTEND ON NEXT 320K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
CREATE TABLESPACE "USERS" LOGGING DATAFILE 'C:oracleoradatawebusers01.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
CREATE UNDO TABLESPACE "UNDOTBS" DATAFILE 'C:oracleoradatawebundotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K;
spool off
exit;
8¡¢´´½¨Êý¾Ý×ֵ䣬ÔËÐÐcreatedbcatalog.sql½Å±¾ÃüÁî
SQL>sqlplus /nolog
SQL> connect SYS/change_on_install as SYSDBA
SQL>@createdbcatalog.sql
Createdbcatalog.sql½Å±¾ÄÚÈÝÈçÏ£º
set echo on
spool C:oracleadminmydbcreateCreateDBCatalog.log
@C:oracleora90 dbmsadmincatalog.sql;
@C:oracleora90 dbmsadmincatexp7.sql;
@C:oracleora90 dbmsadmincatblock.sql;
@C:oracleora90 dbmsadmincatproc.sql;
@C:oracleora90 dbmsadmincatoctk.sql;
@C:oracleora90 dbmsadmincatobtk.sql;
@C:oracleora90 dbmsadmincaths.sql;
@C:oracleora90 dbmsadminowminst.plb;
connect SYSTEM/manager
@C:oracleora90sqlplusadminpupbld.sql;
connect SYSTEM/manager
set echo on
spool C:oracleora90assistantsdbcalogssqlPlusHelp.log
@C:oracleora90sqlplusadminhelphlpbld.sql helpus.sql;
spool off
spool off
exit;
9¡¢ÍêÉÆÊý¾Ý¿â,´´½¨spfileÎļþ£¬½«Êý¾Ý¿âʵÀýÆô¶¯·þÎñÉèÖóÉ×Ô¶¯Æô¶¯·½Ê½¡£
SQL>sqlplus /nolog
SQL> connect SYS/change_on_install as SYSDBA
SQL> @postdbcreation.sql
Postdbcreation.sql½Å±¾ÄÚÈÝÈçÏ£º
set echo on
spool C:oracleadminwebcreatepostDBCreation.log
create spfile='C:oracleora90databasespfileweb.ora' FROM pfile='C:oracleadminwebinit.ora';
connect SYS/change_on_install as SYSDBA
set echo on
spool C:oracleora90assistantsdbcalogspostDBCreation.log
shutdown ;
startup ;
×¢£ºÒÔÉ϶¼ÉèÖÃPATH»·¾³±äÁ¿£¬½«binĿ¼¼ÓÈëµ½PATHÖÐÒÔ±ãÓÚʹÓù¤¾ßGMGRLl,sqlplusµÈ¡£
==========================================================================================
ϵͳ»·¾³£º
1¡¢²Ù×÷ϵͳ£ºWindows 2000 Server£¬»úÆ÷ÄÚ´æ128M
2¡¢Êý¾Ý¿â£º¡¡Oracle 8i R2 (8.1.6) for NT ÆóÒµ°æ
3¡¢°²×°Â·¾¶£ºD:ORACLE
½¨¿â²½Ö裺
1¡¢ÊÖ¹¤´´½¨Ïà¹ØĿ¼
D:Oracleadmin est
D:Oracleadmin estadhoc
D:Oracleadmin estdump
D:Oracleadmin estcdump
D:Oracleadmin estcreate
D:Oracleadmin estexp
D:Oracleadmin estpfile
D:Oracleadmin estudump
D:Oracleoradata est
D:Oracleoradata estarchive
2¡¢ÊÖ¹¤´´½¨³õʼ»¯Æô¶¯²ÎÊýÎļþ£ºD:Oracleadmin estpfileinittest.ora£¬ÄÚÈÝ£º
3¡¢ÊÖ¹¤´´½¨D:OracleOra81DATABASEinittest.oraÎļþ£¬
ÄÚÈÝ£ºIFILE='D:Oracleadmin estpfileinittest.ora'
4¡¢Ê¹ÓÃorapwd.exeÃüÁ´´½¨D:OracleOra81DATABASEPWDtest.ora
ÃüÁD:OracleOra81inorapwd file=D:OracleOra81DATABASEPWDtest.ora password=ORACLE entries=5
5¡¢Í¨¹ýoradim.exeÃüÁÔÚ·þÎñÀïÉú³ÉÒ»¸öеÄʵÀý¹ÜÀí·þÎñ£¬Æô¶¯·½Ê½ÎªÊÖ¹¤
set ORACLE_SID=test
D:OracleOra81inoradim -new -sid test -startmode manual -pfile "D:Oracleadmin estpfileinittest.ora"
6¡¢Éú³É¸÷ÖÖÊý¾Ý¿â¶ÔÏó
D:>svrmgrl
--´´½¨Êý¾Ý¿â
connect INTERNAL/oracle
startup nomount pfile="D:Oracleadmin estpfileinittest.ora"
CREATE DATABASE test
LOGFILE 'D:Oracleoradata est edo01.log' SIZE 2048K,
'D:Oracleoradata est edo02.log' SIZE 2048K,
'D:Oracleoradata est edo03.log' SIZE 2048K
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXLOGHISTORY 1
DATAFILE 'D:Oracleoradata estsystem01.dbf' SIZE 58M REUSE AUTOEXTEND ON NEXT 640K
MAXDATAFILES 254
MAXINSTANCES 1
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET ZHS16GBK;
¿ØÖÆÎļþ¡¢ÈÕÖ¾ÎļþÔÚÉÏÃæÓï¾äÖ´ÐÐʱÉú³É
connect INTERNAL/oracle
--ÐÞ¸Äϵͳ±í¿Õ¼ä
ALTER TABLESPACE SYSTEM DEFAULT STORAGE ( INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 50);
ALTER TABLESPACE SYSTEM MINIMUM EXTENT 64K;
--´´½¨»Ø¹ö±í¿Õ¼ä
CREATE TABLESPACE RBS DATAFILE 'D:Oracleoradata est bs01.dbf' SIZE 256M REUSE
AUTOEXTEND ON NEXT 5120K
MINIMUM EXTENT 512K
DEFAULT STORAGE ( INITIAL 512K NEXT 512K MINEXTENTS 8 MAXEXTENTS 4096);
--´´½¨Óû§±í¿Õ¼ä
CREATE TABLESPACE USERS DATAFILE 'D:Oracleoradata estusers01.dbf' SIZE 128M REUSE
AUTOEXTEND ON NEXT 1280K
MINIMUM EXTENT 128K
DEFAULT STORAGE ( INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0);
--´´½¨ÁÙʱ±í¿Õ¼ä
CREATE TABLESPACE TEMP DATAFILE 'D:Oracleoradata est emp01.dbf' SIZE 32M REUSE
AUTOEXTEND ON NEXT 640K
MINIMUM EXTENT 64K
DEFAULT STORAGE ( INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0) TEMPORARY;
--´´½¨¹¤¾ß±í¿Õ¼ä
CREATE TABLESPACE TOOLS DATAFILE 'D:Oracleoradata est ools01.dbf' SIZE 64M REUSE
AUTOEXTEND ON NEXT 320K
MINIMUM EXTENT 32K
DEFAULT STORAGE ( INITIAL 32K NEXT 32K MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0);
--´´½¨Ë÷Òý±í¿Õ¼ä
CREATE TABLESPACE INDX DATAFILE 'D:Oracleoradata estindx01.dbf' SIZE 32M REUSE
AUTOEXTEND ON NEXT 1280K
MINIMUM EXTENT 128K
DEFAULT STORAGE ( INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0);
--´´½¨»Ø¹ö¶Î
CREATE PUBLIC ROLLBACK SEGMENT RBS0 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS1 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS2 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS3 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS4 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS5 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS6 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS7 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS8 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS9 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS10 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS11 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS12 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS13 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS14 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS15 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS16 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS17 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS18 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS19 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS20 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS21 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS22 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS23 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS24 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
--ʹ»Ø¹ö¶ÎÔÚÏß
ALTER ROLLBACK SEGMENT "RBS0" ONLINE;
ALTER ROLLBACK SEGMENT "RBS1" ONLINE;
ALTER ROLLBACK SEGMENT "RBS2" ONLINE;
ALTER ROLLBACK SEGMENT "RBS3" ONLINE;
ALTER ROLLBACK SEGMENT "RBS4" ONLINE;
ALTER ROLLBACK SEGMENT "RBS5" ONLINE;
ALTER ROLLBACK SEGMENT "RBS6" ONLINE;
ALTER ROLLBACK SEGMENT "RBS7" ONLINE;
ALTER ROLLBACK SEGMENT "RBS8" ONLINE;
ALTER ROLLBACK SEGMENT "RBS9" ONLINE;
ALTER ROLLBACK SEGMENT "RBS10" ONLINE;
ALTER ROLLBACK SEGMENT "RBS11" ONLINE;
ALTER ROLLBACK SEGMENT "RBS12" ONLINE;
ALTER ROLLBACK SEGMENT "RBS13" ONLINE;
ALTER ROLLBACK SEGMENT "RBS14" ONLINE;
ALTER ROLLBACK SEGMENT "RBS15" ONLINE;
ALTER ROLLBACK SEGMENT "RBS16" ONLINE;
ALTER ROLLBACK SEGMENT "RBS17" ONLINE;
ALTER ROLLBACK SEGMENT "RBS18" ONLINE;
ALTER ROLLBACK SEGMENT "RBS19" ONLINE;
ALTER ROLLBACK SEGMENT "RBS20" ONLINE;
ALTER ROLLBACK SEGMENT "RBS21" ONLINE;
ALTER ROLLBACK SEGMENT "RBS22" ONLINE;
ALTER ROLLBACK SEGMENT "RBS23" ONLINE;
ALTER ROLLBACK SEGMENT "RBS24" ONLINE;
--ÐÞ¸ÄsysÓû§µÄÁÙʱ±í¿Õ¼äΪTEMP
alter user sys temporary tablespace TEMP;
--´´½¨Êý¾Ý×Öµä±í
@D:OracleOra81Rdbmsadmincatalog.sql;
@D:OracleOra81Rdbmsadmincatexp7.sql
@D:OracleOra81Rdbmsadmincatproc.sql
@D:OracleOra81Rdbmsadmincaths.sql
connect system/manager
@D:OracleOra81sqlplusadminpupbld.sql
connect internal/oracle
@D:OracleOra81Rdbmsadmincatrep.sql
exit
--Éú³ÉSQL*Plus°ïÖúϵͳ
sqlplus SYSTEM/manager
@D:OracleOra81sqlplusadminhelphelpbld.sql helpus.sql
exit
--ÐÞ¸ÄsystemÓû§Ä¬Èϱí¿Õ¼äºÍÁÙʱ±í¿Õ¼ä
svrmgrl
connect internal/oracle
alter user system default tablespace TOOLS;
alter user system temporary tablespace TEMP;
exit
7¡¢½«testʵÀýÆô¶¯·þÎñÉèÖóÉ×Ô¶¯Æô¶¯·½Ê½
D:OracleOra81inoradim -edit -sid test -startmode auto