資源描述:
《Linux下手動(dòng)創(chuàng)建Oracle數(shù)據(jù)庫(kù)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、在LINUX平臺(tái)上手動(dòng)創(chuàng)建數(shù)據(jù)庫(kù)(oracle10g)1.首先設(shè)置要?jiǎng)?chuàng)建的ORACLE的SID,如果在.bash_profile文件里設(shè)置里該變量,就不用設(shè)置了。$echo$ORACEL_SIDmdy如果沒(méi)有設(shè)置,就手動(dòng)設(shè)置,如果一個(gè)服務(wù)器上要運(yùn)行多個(gè)ORACLE實(shí)例,也需要手動(dòng)設(shè)置。exportORACLE_SID=mydb2.創(chuàng)建需要的診斷目錄,這些目錄都是ORACLE進(jìn)程遇到錯(cuò)誤或用戶手動(dòng)TRACE時(shí)需要的。mkdir-p$ORACLE_BASE/admin/mydb/adumpmkdir-p$ORACLE_BASE/admin/mydb/bdumpmkdir-p$ORACLE
2、_BASE/admin/mydb/cdumpmkdir-p$ORACLE_BASE/admin/mydb/udumpmkdir-p$ORACLE_BASE/admin/mydb/pfile創(chuàng)建oracle的數(shù)據(jù)文件目錄mkdir-p$ORACLE_BASE/oradata/mydb3.創(chuàng)建ORACLE的參數(shù)文件$ORACLE_HOME/dbs/initmydb.ora內(nèi)容如下:aq_tm_processes=0audit_file_dest=/oracle/admin/mydb/adumpbackground_dump_dest=/oracle/admin/mydb/bdumpcom
3、patible=10.2.0.1.0control_files=/oracle/oradata/mydb/control01.ctl,/oracle/oradata/mydb/control02.ctl,/oracle/oradata/mydb/control03.ctlcore_dump_dest=/oracle/admin/mydb/cdumpdb_block_size=8192db_domain=""db_file_multiblock_read_count=16db_name=mydbinstance_name=mydbdispatchers="(PROTOCOL=TCP)(
4、SERVICE=mydbXDB)"job_queue_processes=10nls_length_semantics=BYTEopen_cursors=300pga_aggregate_target=94371840processes=150remote_login_passwordfile=EXCLUSIVEresource_manager_plan=""sessions=170sga_target=285212672undo_management=AUTOundo_retention=900undo_tablespace=UNDOTBS1user_dump_dest=/orac
5、le/admin/mydb/udump4.創(chuàng)建密碼文件orapwdfile=$ORACLE_HOME/dbs/orapwmydbpassword=adminentries=5force=y5.創(chuàng)建oracle的建庫(kù)腳本createdb.sql,內(nèi)容如下:createdatabasemydbMAXINSTANCES1MAXLOGHISTORY1MAXLOGFILES5MAXLOGMEMBERS5MAXDATAFILES100DATAFILE'/oracle/oradata/mydb/system01.dbf'size100mreuseautoextendonnext1mmaxsizeu
6、nlimitedextentmanagementlocalsysauxdatafile'/oracle/oradata/mydb/sysaux01.dbf'size100mreuseautoextendonnext1mmaxsizeunlimiteddefaulttemporarytablespaceTEMPtempfile'/oracle/oradata/mydb/temp01.dbf'size20mreuseautoextendonnext640kmaxsizeunlimitedundotablespaceUNDOTBS1datafile'/oracle/oradata/mydb
7、/undo01.dbf'size20mreuseautoextendonnext5MmaxsizeunlimitedlogfileGROUP1('/oracle/oradata/mydb/redo1.dbf')size10m,GROUP2('/oracle/oradata/mydb/redo2.dbf')size10m,GROUP3('/oracle/oradata/mydb/redo3.dbf')size10mCHARACTERSETZHS16GBKNA