資源描述:
《Oracle11G在Linux上手動(dòng)創(chuàng)建數(shù)據(jù)庫(kù).doc》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、Oracle11G在Linux上手動(dòng)創(chuàng)建數(shù)據(jù)庫(kù)手動(dòng)創(chuàng)建數(shù)據(jù)庫(kù):1)定義實(shí)例名、數(shù)據(jù)庫(kù)名實(shí)例名:mysid數(shù)據(jù)庫(kù)名:mydb.bash_profileexportORACLE_SID=mysidexportORACLE_2)創(chuàng)建目錄su-oraclemkdir-p/u01/app/oradata/mydbmkdir-p/u01/app/flash_recovery_areamkdir-p/u01/app/admin/mysid/adump3)創(chuàng)建參數(shù)文件vi/u01/app/product/11.2.0/dbhome_1/dbs/initmysid.ora*.compa
2、tible='11.2.0.0.0'*.control_files='/u01/app/oradata/mydb/control01.ctl'*.db_block_size=8192*.db_name='mydb'*.db_recovery_file_dest='/u01/app/flash_recovery_area'*.db_recovery_file_dest_size=2G*.diagnostic_dest='/u01/app'*.memory_target=800M*.open_cursors=300*.processes=150*.remote_login
3、_passwordfile='EXCLUSIVE'*.undo_tablespace='UNDOTBS1'*.undo_management=auto4)啟動(dòng)實(shí)例sqlplus/assysdbastartupselectinstance_name,statusfromv$instance;5)創(chuàng)建數(shù)據(jù)庫(kù)createdatabasemydbusersysidentifiedbyoracleusersystemidentifiedbyoraclemaxinstances1maxloghistory100maxlogfiles5maxlogmembers3maxdatafi
4、les1000charactersetzhs16gbknationalcharactersetal16utf16logfilegroup1('/u01/app/oradata/mydb/redo01.log')size10m,group2('/u01/app/oradata/mydb/redo02.log')size10m,group3('/u01/app/oradata/mydb/redo03.log')size10mdatafile'/u01/app/oradata/mydb/system.dbf'size100mautoextendonnext1mmaxsize
5、unlimitedsysauxdatafile'/u01/app/oradata/mydb/sysaux.dbf'size50mautoextendonnext1mmaxsizeunlimiteddefaulttablespaceusersdatafile'/u01/app/oradata/mydb/user01.dbf'size50mautoextendonnext1mmaxsizeunlimiteddefaulttemporarytablespacetemptempfile'/u01/app/oradata/mydb/temp01.dbf'size50mautoe
6、xtendonnext1mmaxsizeunlimitedundotablespaceundotbs1datafile'/u01/app/oradata/mydb/undotbs01.dbf'size50mautoextendonnext1mmaxsizeunlimited;6)創(chuàng)建視圖和過(guò)程SQL>@/u01/app/product/11.2.0/dbhome_1/rdbms/admin/catalog.sql;SQL>@/u01/app/product/11.2.0/dbhome_1/rdbms/admin/catproc.sql;