Manual Database Creation in Oracle9i Single Instance and RAC.docx
《Manual Database Creation in Oracle9i Single Instance and RAC.docx》由会员分享,可在线阅读,更多相关《Manual Database Creation in Oracle9i Single Instance and RAC.docx(10页珍藏版)》请在冰豆网上搜索。
ManualDatabaseCreationinOracle9iSingleInstanceandRAC
书签
固定字体
转到末尾
文档ID:
注释:
137288.1
主题:
ManualDatabaseCreationinOracle9i(SingleInstanceandRAC)
类型:
BULLETIN
状态:
PUBLISHED
内容类型:
TEXT/PLAIN
创建日期:
21-MAR-2001
上次修订日期:
22-NOV-2002
PURPOSE
-------
Thepurposeofthisbulletinistogiveanexampleofamanualdatabasecreation
in9i.
SCOPE&APPLICATION
-------------------
OraclerecommendsusingtheDatabaseConfigurationAssistant(DBCA)tocreate
yourdatabase.ThesestepsareavailableforDBAswhowanttomanuallycreatea
9idatabaseeitherinsingleinstanceorRealApplicationClustersmode.
Tipstocreateadatabasein9iSingleInstanceorRealApplicationClusters.
-----------------------------------------------------------------------------
ManualDatabaseCreationstepsforSingle-Instance.
=====================================================
Herearethestepstobefollowed:
1.Makeainit.orainyour$ORACLE_HOME/dbsdirectory.OnWindowsthis
fileisin$ORACLE_HOME\database.Tosimplify,youcancopyinit.orato
init.oraandmodifythefile.
***Pathnames,filenames,andsizeswillneedtobemodified
Exampleparametersettings:
db_block_size=8192
db_cache_size=52428800
background_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
core_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
user_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
timed_statistics=TRUE
control_files=("/u01/rbdb1/control_01.ctl","/u01/rbdb1/control_02.ctl")
db_name=rbdb1
shared_pool_size=52428800
sort_area_size=524288
undo_management=AUTO
undo_tablespace=UNDOTBS
*Thelocal_listenerparameterrequiresthatyoufirstaddthelistener
addresstotheTNSNAMES.ORA-remembertodosoonbothNode1andNode2.
**YoucanalsouseanspfileasdescribedinNote162491.1.
2.Runthefollowingsqlpluscommandtoconnecttothedatabase:
sqlplus'/assysdba'
3.StartupupthedatabaseinNOMOUNTmode:
SQL>startupnomount
4.CreatetheDatabase:
***Pathnames,filenames,andsizeswillneedtobemodified
CREATEDATABASE
MAXLOGFILES255
MAXINSTANCES1
MAXDATAFILES256
MAXLOGHISTORY256
DATAFILE'/u01/oracle/rbdb1/system_01.dbf'SIZE400MREUSE
UNDOTABLESPACE"UNDOTBS"DATAFILE'/u01/oracle/rbdb1/undotbs_01.dbf'
SIZE200MREUSEAUTOEXTENDONNEXT5120KMAXSIZEUNLIMITED
CHARACTERSETUS7ASCII
LOGFILEGROUP1('/u01/oracle/rbdb1/redo1_01.dbf')SIZE100MREUSE,
GROUP2('/u01/oracle/rbdb1/redo1_02.dbf')SIZE100MREUSE;
5.CreateaUsersTablespace:
***Pathnames,filenames,andsizeswillneedtobemodified
CREATETABLESPACE"USERS"DATAFILE'/u01/oracle/rbdb1/users01.dbf'
SIZE300MREUSEAUTOEXTENDON
NEXT5MMAXSIZE1500M;
6.CreateaTemporaryTablespace:
***Pathnames,filenames,andsizeswillneedtobemodified
CREATETEMPORARYTABLESPACE"TEMP"TEMPFILE'/u01/oracle/rbdb1/temp_01.dbf'
SIZE40MREUSEAUTOEXTENDONNEXT640KMAXSIZEUNLIMITED
EXTENTMANAGEMENTLOCAL;
ALTERDATABASEDEFAULTTEMPORARYTABLESPACE"TEMP";
7.Runthescriptsnecessarytobuildviews,synonyms,etc.:
Theprimaryscriptsthatyoumustrunare:
i>CATALOG.SQL--createstheviewsofdatadictionarytablesandthe
dynamicperformanceviews.
ii>CATPROC.SQL--establishestheusageofPL/SQLfunctionalityand
createsmanyofthePL/SQLOraclesuppliedpackages.
==============================================================
ManualDatabaseCreationstepsforRealApplicationClusters
==============================================================
HerearethestepstobefollowedtocreateaRealApplicationClustersdatabase:
1.Makeainit.orainyour$ORACLE_HOME/dbsdirectory.OnWindowsthis
fileisin$ORACLE_HOME\database.Tosimplify,youcancopyinit.orato
init.oraandmodifythefile.Rememberthatyourcontrolfilemust
bepointingtoapre-existingrawdeviceorclusterfilesystemlocation.
***Pathnames,filenames,andsizeswillneedtobemodified
Exampleparametersettingsforthefirstinstance:
Cluster-WideParametersforDatabase"RAC":
db_block_size=8192
db_cache_size=52428800
background_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
core_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
user_dump_dest=/u01/32bit/app/oracle/product/9.0.1/rdbms/log
timed_statistics=TRUE
control_files=("/dev/RAC/control_01.ctl","/dev/RAC/control_02.ctl")
db_name=RAC
shared_pool_size=52428800
sort_area_size=524288
undo_management=AUTO
cluster_database=true
cluster_database_instances=2
remote_listener=LISTENERS_RAC
InstanceSpecificParametersforInstance"RAC1":
instance_name=RAC1
instance_number=1
local_listener=LISTENER_RAC1
thread=1
undo_tablespace=UNDOTBS
*Thelocal_listenerparameterrequiresthatyoufirstaddthelistener
addresstotheTNSNAMES.ORA-remembertodosoonbothNode1andNode2.
**YoucanalsouseanspfileasdescribedinNote136327.1.
2.Runthefollowingsqlpluscommandtoconnecttothedatabase:
sqlplus'/assysdba'
3.StartupupthedatabaseinNOMOUNTmode:
SQL>startupnomount
4.CreatetheDatabase(Allrawdevicesmustbepre-created):
***Pathnames,filenames,andsizeswillneedtobemodified
CREATEDATABASE
CONTROLFILEREUSE
MAXDATAFILES254
MAXINSTANCES32
MAXLOGHISTORY100
MAXLOGMEMBERS5
MAXLOGFILES64
DATAFILE'/dev/RAC/system_01_400.dbf'SIZE400M
REUSEAUTOEXTENDONNEXT10240KMAXSIZEUNLIMITED
UNDOTABLESPACE"UNDOTBS"DATAFILE
'/dev/RAC/undotbs_01_210.dbf'SIZE200MREUSE
NEXT5120KMAXSIZEUNLIMITED
CHARACTERSETUS7ASCII
LOGFILEGROUP1('/dev/RAC/redo1_01_100.dbf')SIZE100MREUSE,
GROUP2('/dev/RAC/redo1_02_100.dbf')SIZE100MREUSE;
5.CreateaUsersTablespace:
***Pathnames,filenames,andsizeswillneedtobemodified
CREATETABLESPACE"USERS"LOGGINGDATAFILE
'/dev/RAC/users_01_125.dbf'SIZE120MREUSE
NEXT1280KMAXSIZEUNLIMITEDEXTENTMANAGEMENTLOCAL;
6.CreateaTemporaryTablespace:
***Pathnames,filenames,andsizeswillneedtobemodified
CREATETEMPORARYTABLESPACE"TEMP"TEMPFILE
'/dev/RAC/temp_01_50.dbf'SIZE40MREUSE
7.Createa2ndUndoTablespace:
***Pathnames,filenames,andsizeswillneedtobemodified
CREATEUNDOTABLESPACE"UNDOTBS2"DATAFILE
'/dev/RAC/undotbs_02_210.dbf'SIZE200MREUSE
NEXT5120KMAXSIZEUNLIMITED;
8.Runthenecessaryscriptstobuildviews,synonyms,etc.:
Theprimaryscriptsthatyoumustrunare:
i>CATALOG.SQL--createstheviewsofdatadictionarytablesandthe
dynamicperformanceviews
ii>CATPROC.SQL--establishestheusageofPL/SQLfunctionalityand
createsmanyofthePL/SQLOraclesuppliedpackages
iii>CATPARR.SQL--createsRACspecificviews
9.Editinit.oraandsetappropriatevaluesforthe2ndinstanceonthe
2ndNode:
***Namesmayneedtobemodified
instance_name=RAC2
instance_number=2
local_listener=LISTENER_RAC2
thread=2
undo_tablespace=UNDOTBS2
10.Fromthefirstinstance,runthefollowingcommand:
***Pathnames,filenames,andsizeswillneedtobemodified
alterdatabase
addlogfilethread2
group3('/dev/RAC/redo2_01_100.dbf')size100M,
group4('/dev/RAC/redo2_02_100.dbf')size100M;
alterdatabaseenablepublicthread2;
12.StartthesecondInstance.(Assumingthatyourclusterconfiguration
isupandrunning).
RELATEDDOCUMENTS
-----------------
Oracle9iDatabaseAdministrator'sGuideRelease1(9.0.1)
PartNumberA90117-01
.
Copyright(c)1995,2000OracleCorporation.AllRightsReserved.法律声明和使用条款。