欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Oracle11.2 命令行手工最簡創(chuàng)建數(shù)據(jù)庫的過程

 更新時間:2009年09月13日 22:18:57   作者:  
Oracle 11.2命令行手工最簡創(chuàng)建數(shù)據(jù)庫的過程 命令行手工最簡創(chuàng)建數(shù)據(jù)庫的過程
環(huán)境:RHEL 5.4 x86 , oracle 11.2
1.設定環(huán)境變量
在/home/oracle編輯
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# 11g R2
export ORACLE_HOME=/app/oracle/product/11.2.0/dbhome_1
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export NLS_LANG=AMERICAN_AMERICA.UTF8
export ORACLE_SID=orcl
umask 022

2.禁用SELinux
如果在安裝RHEL的時候啟用了SELinux,需要
以root用戶setenforce 0
否則會出現(xiàn):sqlplus: error while loading shared libraries

3.以oracle用戶登錄編輯init.ora
只要1行
db_name=orcl

4.登錄sqlplus / as sysdba
create spfile='spfileorcl.ora' from pfile='/home/oracle/init.ora'
startup nomount
create database orcl;
等候創(chuàng)建數(shù)據(jù)庫成功。
select sysdate from dual;
已經(jīng)可以查出日期。

5.執(zhí)行腳本建立系統(tǒng)視圖和包
@?/rdbms/admin/catalog
@?/rdbms/admin/catproc
以system用戶執(zhí)行
@?/sqlplus/admin/pupbld
此時可以看到v$datafile和v$controlfile
位于$ORACLE_HOME/dbs,文件名分別是dbs1orcl dbx1orcl dbu1orcl cntrlorcl
幾點疑問:
1.文檔上說至少pfile需要3個參數(shù),其他都有默認值,而我只寫了1個,也可以。
2.創(chuàng)建數(shù)據(jù)庫的表空間只有system sysaux sys_undots,沒有臨時表空間,數(shù)據(jù)庫運行也不出錯
不知道是否這也是oracle 11.2的新特性?
3.曾經(jīng)在一個.sql文件中寫了如下的語句,但沒有執(zhí)行成功
create database orcl
user sys identified by sys
user system identified by sys
extent management local
default temporary tablespace temp
undo tablespace undotbs1
default tablespace users;
4.文檔中沒有說需要system用戶執(zhí)行pupbld,我用sys用戶執(zhí)行
結果在新建用戶oo登錄時提示error accessing PRODUCT_USER_PROFILE

相關文章

最新評論