• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 安裝Oracle服務器

    發表于:2007-07-02來源:作者:點擊數: 標簽:
    準備工作--安裝Oracle服務器 我認為Microsoft Windows是個不錯的操作系統,它在市場方面獲得了空前的成功,并造就了蓋茨、巴爾默等百億富翁。它簡單易用,得到了廣泛地普及,幾乎每個計算機愛好者都會操作Windows,幾乎每個 程序員 都會Windows編程。目前為了

    準備工作--安裝Oracle服務器
    我認為Microsoft Windows是個不錯的操作系統,它在市場方面獲得了空前的成功,并造就了蓋茨、巴爾默等百億富翁。它簡單易用,得到了廣泛地普及,幾乎每個計算機愛好者都會操作Windows,幾乎每個程序員都會Windows編程。目前為了占領市場,排擠Linux,Windows2000在PC的預裝費用從以前Windows9x的65$,降到40$. 不過,SUN公司的Solaris8(支持IA-64)也宣布近乎免費!

    總之,自由軟件時代的腳步聲似乎可以聽到了! 屆時計算機行業的工程師主要靠技術靠服務掙錢。我這篇文章就是總結基于"免費/自由"的 Oracle on Linux的一些簡單經驗。如果你喜歡它,就是承認了我勞動,要是您有空給我提個補充建議,那我就更高興了。

    聲明: 本文當可以轉載,但應先求作者同意。
    版本號:Oracle8i HowTo V.66
    發布時間:2000.2.9
    作者:江蘇太倉丁聚崗


    --------------------------------------------------------------------------------

    現在假設你要在Linux上安裝Oracle服務器,請先過以下5關:

    系統要求
    規劃硬盤
    創建用戶
    創建目錄
    設置參數
    1.系統要求
    前提條件是能夠安裝運行Linux,然后應滿足以下硬件要求:

    內存 Requirements
    Memory 最小要求128 MB RAM.更多(256MB+)內存可以提高性能,
    更多的選件(JServer..),供多的用戶需要供多的內存!!
    SwapSpace 建議2倍內存
    CD-ROM Oracle采用ISO 9660格式CD-ROM,下載安裝可以省略。
    硬盤要求- Oracle8i EE Oracle8i Client
    最小 660 MB N/A
    典型 811 MB 306 MB
    操作系統 Linux kernel 2.2 +
    操作系統聯接庫- GLIBC package v2.1

    2.規劃硬盤
    對于10以下并發用戶的系統,可以用一個硬盤,建立oracle分區(或目錄),只要保證剩余磁盤空間1500MB+,一般就可以安裝運行Oracle8(不用interMedia,JServer等較大較難選件)。
    但是,如果選用Oracle8i,恐怕是為了支持更大規模的應用。與Oracle8i匹配的目前最佳的Intel硬件組合應該是:

    2xCPU PIII(L440GX+主板),512MB ECC,3塊SCSI硬盤(組裝參考價:4萬元)

    3塊SCSI硬盤的規劃應該是:

    #1 操作系統 訪問少,壽命長
    #2 Oracle軟件
    系統數據 system,tools,rbs,
    temp,user等表空間
    讀多寫少,變化不大
    #3 用戶數據 讀寫頻繁,經常備份

    關于容錯:

    三個日志文件、控制文件要分別分布在三個硬盤上
    三塊硬盤都有備有,或有一臺備份服務器,定期更新數據
    通過FTP,Samba等在網絡上備份關鍵的數據文件。
    通常的數據庫應用,都是這么一種結構:

    所有的數據表歸dbo所有,以此用戶開發程序
    創建各類讀寫角色,授權讀寫部分表
    創建表的同義詞,通常是public synonym
    創建一批數據用戶,授與某種讀寫角色
    因此,一個Oracle應用的數據通常在一個表空間->1-2個數據文件->1塊硬盤!!,如果有另外的應用可再加硬盤。

    3.創建用戶和用戶組
    推薦使用圖形界面的kuser工具,

    即:KDE - User Manager

    先建組dba,oper,

    再建用戶“oracle”, Shell= /bin/sh, Group=dba, Set Passwd=******

    通常來說,用戶“oracle”擁有數據庫軟件的安裝、升級等管理權限。在你的Oracle8i服務器上,它甚至比root用戶還重要!!! 你可以從字符界面以oracle用戶登錄Linux,然后運行Oracle數據庫服務!這樣更節省內存。

    4.創建目錄
    推薦使用圖形界面 GONE的Home Dir或KDE的File Manager,它們會更方便完成下面功能。

    root 創建oracle多登錄點:
    root$ mkdir /u01
    或者是直接做一個硬盤分區/u01

    授權別人讀寫:
    root$ chmod 755 /u01
    或直接改變所有者:
    root$ chown oracle.dba /u01

    oracle 繼續創建目錄,按照Oracle習慣:
    oracle$ mkdir /u01/app
    oracle$ mkdir /u01/app/oracle/product/8.1.5


    技巧:建立目錄別名(符號連接)以便快速又好記憶:

    root$ ln -s /u01/app/oracle/product/8.1.5 /ora
    root$ ln -s /home/oracle /orame


    5.設置參數
    按照下文的內容編輯 .bash_profiile, 另存為 .profile
    [oracle@lin oracle]$ more .profile
    # .bash_profile
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi
    # User specific environment and startup programs
    PATH=$PATH:/ora/bin:$HOME/bin
    BASH_ENV=$HOME/.bashrc
    USERNAME="oracle"
    ORACLE_HOME=/ora; export ORACLE_HOME
    LD_LIBRARY_PATH=/ora/lib; export LD_LIBRARY_PATH
    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    ORACLE_SID=ora8; export ORACLE_SID
    ORACLE_TERM=386; export ORACLE_TERM
    TMPDIR=/var/tmp; export TMPDIR
    # umask 022 (only if umask does not default to 022)
    export USERNAME BASH_ENV PATH

    用env檢查一下參數設置:

    [oracle@lin orainst0]$ env
    USERNAME=oracle
    ORACLE_SID=ora8
    LD_LIBRARY_PATH=/ora/lib
    ORACLE_BASE=/u01/app/oracle
    BASH_ENV=/home/oracle/.bashrc
    ORACLE_TERM=386
    DISPLAY=172.17.2.22:0.0
    ORACLE_HOME=/ora


    接下來就可以執行安裝程序了(需要KDE或AnotherLevel,目前不能從GONE安裝!)

    先安裝jre,即JAVA Runtime Environment,版本=jre116v5,用/usr/local/jre =>指向你安裝的jre116v5,然后是oracke815補丁。安裝時要注意"DISPLAY"設置問題。

    千萬不要心急,40分鐘裝完基礎部分,10分鐘安裝補丁,最后才能創建數據庫!

     
    Oracle8i軟件安裝過程
    準備軟件
    1)光盤安裝

    首先要加載光盤,可以簡單地執行命令: mount /mnt/cdrom

    或者使用KDE的圖形界面,執行fsconf ==> Acsee local driver ==> /dev/cdrom ==> Mount !!!

    這里,你也要先安裝 JRE(Jave運行環境) 116v5,準備好Oracle815patch_EE(企業版補丁8/27/99 6,4M)。

    2)下載方式:

    一共要下載3個文件(參考:詳細下載地址)

    JRE 116v5,Java 運行環境(6M jre_1.1.6-v5-glibc-x86.tar.gz)
    Oracle815 EE, 企業版(07/19/99 256M 815ship.tgz)
    Oracle815patch_EE, 企業版補丁(08/27/99 6,4M linux_81501patch_ee.tgz)
    把下載的壓縮文件分別復制到一個空文件夾中,然后解壓縮它:

    JRE : 請試試

    6,292,578 jre_1.1.6-v5-glibc-x86.tar.gz
    復制到空目錄,然后解開,
    tar -xvzf jre_1.1.6-v5-glibc-x86.tar.gz
    連接/復制/改名新建的jre116v5目錄為 /usr/local/jre

    Oracle815 EE, 企業版

    cp 815ship.tgz /home/oracle/orainst0/
    cd /home/oracle/orainst0/
    tar -xvzf 815ship.tgz .

    Oracle815patch_EE, 企業版補丁

    cp linux_81501patch_ee.tgz /home/oracle/patche/
    cd /home/oracle/patche/
    tar -xvzf linux_81501patch_ee.tgz .

    4.執行安裝程序(需要KDE或AnotherLevel,目前不能從GONE安裝!)

    先安裝jre,即JAVA Runtime Environment,版本=jre116v5

    用/usr/local/jre =>指向你安裝的jre116v5

    千萬不要心急,40分鐘裝完基礎部分,10分鐘安裝補丁,最后才能創建數據庫!

    安裝過程:
    從設置Xwindow 開始安裝
    推薦采用KDE界面,如果oracle用戶也在服務器上登錄安裝, root制定Xwindow顯示,我曾在安裝時遇到一個"DISPLAY"設置問題。

    [root@lin /root]$ xhost +172.17.2.22
    172.17.2.22 being added to aclearcase/" target="_blank" >ccess control list
    看到上面added信息,oracle用戶可以如此開始安裝:
    [oracle@lin orainst0]$ ./runI*
    Initializing Java Virtual Machine from /usr/local/jre/bin/jre. Please wait...

    如果是遠程登錄到服務器上,比如從172.17.2.21執行,則應該
    [oracle@lin orainst0]$ xhost +172.17.2.21
    172.17.2.21 being added to access control list
    當然要求事先定義DISPLAY=172.17.2.22:0.0 了:
    [oracle@lin orainst0]$ DISPLAY=172.17.2.22:0.0
    [oracle@lin orainst0]$ export DISPLAY
    同樣執行runInstaller
    [oracle@lin orainst0]$ ./runI*
    Initializing Java Virtual Machine from /usr/local/jre/bin/jre. Please wait...

    安裝選項
    典型安裝,最后提示DBCA數據庫助理安裝“不完善”,不過還可以繼續使用;
    最小化安裝,不要試圖從DBCA數據庫助理生成數據庫,因為還需要事先安裝“補丁”;
    自定義安裝,如果很熟練,可以挑選部件,同樣要先安裝“補丁”。

    安裝補丁
    [oracle@lin patche]$ ./linux*
    這里同樣有很多錯誤提示,它通過檢查子目錄文件數目來判斷是否繼續安裝,所以你一定不要動它的文件。

    幾個問題----如果遇到安裝問題,
    請對照一下我的參數表,然后再看看我的參數文件“環境變量簡要表 .profile”,它是從 .bash_profile 編輯修改過來的。
    [oracle@lin orainst0]$ env
    USERNAME=oracle
    HISTSIZE=1000
    HOSTNAME=lin.tcyy.com
    LOGNAME=oracle
    ORACLE_SID=ora8
    HISTFILESIZE=1000
    MAIL=/var/spool/mail/oracle
    LD_LIBRARY_PATH=/ora/lib
    ORACLE_BASE=/u01/app/oracle
    TERM=ansi
    HOSTTYPE=i386
    PATH=/usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/ora/bin:/home/ora cle/bin
    KDEDIR=/usr
    HOME=/home/oracle
    INPUTRC=/etc/inputrc
    SHELL=/bin/sh
    PS1=[\u@\h \W]\$
    USER=oracle
    TMPDIR=/var/tmp
    BASH_ENV=/home/oracle/.bashrc
    ORACLE_TERM=386
    DISPLAY=172.17.2.22:0.0
    ORACLE_HOME=/ora
    OSTYPE=Linux
    SHLVL=1
    _=/usr/bin/env


    設置“環境變量簡要 表 .profile”它是從 .bash_profile 編輯修改過來的。
    [oracle@lin oracle]$ more .profile
    # .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    # User specific environment and startup programs

    PATH=$PATH:/ora/bin:$HOME/bin
    BASH_ENV=$HOME/.bashrc
    USERNAME="oracle"
    ORACLE_HOME=/ora; export ORACLE_HOME
    LD_LIBRARY_PATH=/ora/lib; export LD_LIBRARY_PATH
    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    ORACLE_SID=ora8; export ORACLE_SID
    ORACLE_TERM=386; export ORACLE_TERM

    TMPDIR=/var/tmp; export TMPDIR
    # umask 022 (only if umask does not default to 022)

    export USERNAME BASH_ENV PATH


    安裝過程中間,它要求root用戶執行 root.sh,你要先修改讀寫權限:
    [root@lin /ora]$ chmod 750 root.sh
    [root@lin /ora]$ ./root.sh

    程序執行結果,生成了下面一個文件/etc/oratab:

    [oracle@lin oracle]$ more /etc/oratab
    # *:/u01/OraHome1:N
    # ORCL8:/u01/OraHome1:Y
    ora8:/ora:Y

    它的意思是定義自動啟動的名稱(ora8),dbstart,dbshut也要這個參數,不然就得是用 svrmgrl 來startup。

    注意為了簡化目錄名稱,我試用了符號聯接:
    /ora -> /u01/app/oracle/product/8.1.5
    /orame -> /home/oracle

    至此,Oracle軟件安裝完畢,可以試著從DBCA數據庫助理生成數據庫了:
    [oracle@lin /ora]$ ./bin/dbass*
    創建數據庫
    說明:這里的經驗是多次重裝Oracle-->建庫-->WebDB,細心總結的,而安裝軟件是很費時費事的,每次要不止6個小時。

    這里先談對幾個術語的解釋。
    在線事務處理OLTP/決策支持,前者用于小而多實時處理,后者用于大而少的統計查詢。

    并發用戶/并發連接, 同時連接的用戶數/相同用戶同時連接數。

    日志文件,redolog,用于重做數據庫

    控制文件, control,記載運行狀態。

    表空間/文件/表/數據,表示oracle的數據庫結構。

    創建數據庫
    按照Oracle的說法,創建數據庫有3種方法:

    1) 安裝時生成
    2) 安裝后使用DBCA創建
    3) 使用手工命令

    具體過程(個人經驗):
    方法1 不行,
    Oracle也說安裝過程不創建數據庫,只是在最后啟動數據庫創建助理DBCA,但你不要相信它,那也行不通,因為你必須在數據庫創建之前,安裝補丁,那個討厭又必須的東西。

    方法3 太難;
    方法2最好!
    方法2使用圖形化的工具:數據庫創建助理DBCA, 你可以一步步 輸入或選擇參數,最小化安裝的時間40分鐘,標準規模完全安裝的時間90分鐘(奔3-500/192MB內存),通常需要2個多小時。

    工具用法:啟動DBCA
    [oracle@lin /ora] bin/dbas*

    注意:自定義數據庫的參數
    數據庫文件的位置、大小、增長方式。例如:
    system = /u01/app/oracle/oradata/ora8/orasys01.dbf 188M next 100K
    Users = /home/oracle/oradata/ora8/orausr01.dbf 20M next 128K

    重置字符集
    缺省值 = US7ASCII, 要求Windows客戶端注冊表與之對應, 否則亂碼,
    Hkey_Local_machine \Software\Oracle\NLS_Lang=American.America.US7ASCII
    實際上,Oracle客戶端大多是支持中文的,甚至作為了缺省值。并且,如果Oracle WebDB開發一個中文電子商務站點,你的英文不成問題;但要向一個小公司Oracle DBA新手推廣WebDB作為管理工具,不能總是English面孔吧,所以應該選擇中國中文國標字字符集 ZHS16GBK (中國簡化漢字16位國標字庫),相應的客戶端配置為:
    Hkey_Local_machine\Software\Oracle\NLS_Lang = SIMPLIFIED CHINESE_CHINA.ZHS16GBK ,
    National Chartset 是國家語言,為Nchar等N 類型準備的。

    服務器成功案例
    服務器最小化安裝,兼容=8.0.5,不要任何選件(Option);
    最小化安裝完畢,更改兼容=8.1.0,啟動DBCA修改數據庫,添加除了interMedia之外的4個部件(因為interMedia需要在\ora\ord\adu,..\vid中預先裝入單獨產品,否則提示*.sql,*.plb找不到,如果你有了這些interMedia產品,可以使用DBCA修改數據庫,添加這些選項,并且要事先更改兼容=8.1.5),安裝成功;
    自定義安裝,軟件系統和數據庫文件分別裝在不同硬盤上,并改變文件大小、增長方式, 字符集=ZHS16GBK, (Oracle 建議的中文字符集=ZHS16cGB231280), 安裝成功;
    WebDB成功案例
    服務器字符集=US7ASCII,客戶端是ZHS16GBK或WE8ISO8859P1,WebDB也算安裝成功,但只能用OPERA3.6操作,附加的Simplified Chinese在微軟 IE5 瀏覽器顯示為?????亂碼,我因此判斷是因為 Windows.ZHS16GBK ==> Oracle.US7ASCII7bit)出錯。
    最小化安裝,即兼容8.0.5,語言都是ZHS16GBK, 但是,不要選擇任何附加語言,這時的瀏覽器只能顯示English,不會根據瀏覽器缺省語言顯示中文;
    WebDB最理想的境界:服務器中等安裝(即兼容8.1.0),C/S語言都是ZHS16GBK, 為瀏覽器添加附加語言Simplified Chinese, 瀏覽器語言顯示中/英文完全正常。
    一些經驗
    字符集要求一致,要么都是US7ASCII,要么都是ZHS16GBK。
    記?。篛racle for Windows的英文字符集是WE8ISO8859P1, 而不是Oracle Server for Linux/Unix的缺省字符集US7ASCII。同樣地,Oracle for Windows的重文字符集是ZHS16GBK, 而不是Oracle Server for Linux/Unix的缺省字符集ZHS16CGB231280, 但是ZHS16GBK 兼容 ZHS16CGB231280。
    中文/英文字符集轉換將會影響效率,最好選擇完全中文。
    安裝WebDB時,一定要新建目錄和Home,選擇附加語言(Simplified Chinese)時要求字符集一致。比如你的WebDB for WinNT4英語是 WE8ISO8859P1,那么你就無法向Oracle.US7ASCII服務器添加附加語言Simplified Chinese,因為US7ASCII和WE8ISO8859P1之間只能正確交換7位字符集比如英語或法語。
    下面這個想法也是行不通的:定制安裝WebDB2.1,裝完SqlPlus, SupportFiles, 和 Net8 后,修改字符集與數據庫服務器一致,再來安裝 WebDB2.1 和 Listener, 以便添加附加語言Simplified Chinese. 但是,每次當你啟動安裝程序時,都得設定一個字符集并同時作為變量供整個安裝過程使用,所以不可能中途改變字符集并使之生效。
    移植一個產品:你的Windows NT4有WebDB2.1了,但是Personal Oracle里有一個Navigator很好用, 那么你可以找到 Nav8.exe, Nav8cmd.dll, Navrsus.dll(英語支持), Navrszhs.dll(漢語支持)共4個文件復制到當前的 [OraWeb21]\bin 里來,即可使用“Oracle8導航器”了:在桌面或菜單目錄中添加Nav8.exe的快捷方式。
    想想看:你的Windows NT4有了Personal Oracle(只是部分產品或其他), 能不能在它的目錄里再裝載 WebDB服務? 哪怕不選擇附加語言支持。
    手工建庫
    重點討論方法3:
    你需要 較好的Linux和Oracle基礎,或者要鼓足勇氣,增加信心才行。
    請參考幫助文獻: [oracle@lin oracle]$ more /ora/rdbms/install/create/READ*

    首先定義好 ORACLE_SID,ORACLE_HOME等參數,
    編寫參數文件$ORACLE_HOME/dbs/init.ora
    對db_name, instance_name and service_name 稍微做修改
    set compatible ="8.1.5"
    依次執行以下命令腳本:

    crdb1.sh |
    crdb2.sh |-- To create database files, data dictionary views
    crdb3.sh | and add PL/SQL support
    replicate.sh --- Advanced replication option
    ordinst.sh |__ Oracle Intermedia
    imedia.sh |
    drsys.sh |__ Oracle interMedia Text
    context.sh |
    java.sh --- Oracle Jserver
    spatial.sh --- Oracel Spatial
    timeseries.sh --- Oracel TimeSeries
    virage.sh --- Oracle Visual Information Retrieval
    sqlplus1.sh |
    sqlplus2.sh |-- Demos and SQL*Plus help tables
    sqlplus3.sh |

    你不必依次全部執行,我在數據庫創建助理DBCA里也只是1) 2)
    1)The first three scripts (crdb1.sh, crdb2.sh and crdb3.sh) would create a database and
    2)the scripts sqlplus1.sh, sqlplus2.sh and sqlplus.sh would create some demo tables.

    Once the database is created, you could run other scripts mentioned above to use the respective 8i feature,
    3) e.g., for Jserver, run the java.sh script.
    4)To enable Oracle Intermedia Text, run the scripts - drsys.sh and context.sh, in this order only.
    5) Similarly, for Oracle Intermedia, run ordinst.sh followed by imedia.sh.

    下面是我用 "數據庫創建助理DBCA" 生成的參數文件幾個參數:
    [oracle@lin /ora]$ more dbs/initora8.ora
    instance_name = ora8
    control_files = ("/u01/app/oracle/oradata/ora8/control01.ctl", "/u01/app/oracle/oradata/ora8/control02.ctl")
    processes = 50
    log_buffer = 163840
    # audit_trail = false # 審計和interMedia 的軟件系統有漏洞
    rollback_segments = (r01, r02, r03, r04) // 記住去掉“#”
    compatible = "8.0.5" //

    根據選件內容,compatible可以是 8.1.0,8.1.5,

    修改數據庫方法:同樣啟動DBCA
    [oracle@lin /ora] bin/dbas*
    數據庫系統管理
    ----啟動/關閉Oracle
    本文的講述Oracle三個核心工具之一:svrmgrl ,
    一、先介紹一套簡便方法:使用系統命令開關數據庫
    二、詳細介紹服務器管理核心工具svrmgrl
    三、SQL*Plus 部分管理任務,測試數據庫
     

    Oracle正常工作需要啟動兩個服務:數據庫服務器實例,數據庫SQL*Net8服務。
    關于SQL*Net8服務的資料,請參考Lsnrctl(Net8)的相關超級聯結。
    一、簡便方法:使用系統命令開關數據庫
    1)啟動服務器 dbstart
    2)關閉服務器 dbshut
    3)網絡監聽服務(請參考聯接)lsnrctl
    1)啟動服務器
    [oracle@lin /ora]$ dbstart
    該命令校驗用戶身份后,調用SVRMGR工具,完成一下工序:
    啟用缺省參數文件init.ora, 初始化內存,登錄,打開數據庫。
    如果需要更多的控制參數,請看svrmgrl工具。
    2)關閉服務器
    [oracle@lin /ora]$ dbshut
    該命令校驗用戶身份,調用SVRMGR工具,完成一下工序:
    SVRMGR> Connected.
    SVRMGR> Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SVRMGR>
    Server Manager complete.
    Database "ora8" shut down.
    3)網絡監聽服務
    啟動: lsnrctl start
    停止: lsnrctl stop
    二、高級工具:詳細介紹 svrmgrl
    啟動方法:
    [oracle@lin /ora]$ svrmgrl
    Oracle Server Manager Release 3.1.5.0.0 - Production
    Oracle8i Enterprise Edition Release 8.1.5.0.1 - Production
    With the Partitioning and Java options
    PL/SQL Release 8.1.5.0.0 – Production
    如何獲得使用幫助
    打入help,得到: 下面是簡單的語法描述,詳細資料請看Oracle Server Manager User@#s Guide.
    SVRMGR> help
    STARTUP [DBA] [FORCE] [PFILE=filespec] [EXCLUSIVE | SHARED]
    [MOUNT dbname | OPEN dbname] [NOMOUNT]
    SHUTDOWN [NORMAL | IMMEDIATE | ABORT]
    MONITOR For graphical modes only, bring up a monitor
    ARCHIVE LOG [START] [STOP] [LIST] [NEXT] [] [ALL] [@#destination@#]
    RECOVER { [DATABASE [MANUAL] ] | [TABLESPACE ts-name [,tsname]] }
    CONNECT [username [/password] ] [INTERNAL] [@#@@#instance-spec]
    DISCONNECT
    SET options: INSTANCE, ECHO, TERMOUT, TIMING, NUMWIDTH, CHARWIDTH
    SHOW LONGWIDTH, DATEWIDTH, AUTOPRINT and for SHOW: ALL, SPOOL
    EXIT
    REM
    SQL statements can also be executed.
    以系統用戶oracle登錄:
    SVRMGR> connect internal
    Connected.
    關閉數據庫,現在嘗試一下?!
    SVRMGR> shutdown
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    啟動數據庫吧, 我想給它指定參數,并且打開:
    SVRMGR> startup pfile=/ora/dbs/initora8.ora open ora8
    ORACLE instance started.
    Total System Global Area 23670160 bytes
    Fixed Size 64912 bytes
    Variable Size 6656000 bytes
    Database Buffers 16777216 bytes
    Redo Buffers 172032 bytes
    Database mounted.
    Database opened.
    測試一下啦, 先看看數據庫的系統文件吧:
    SVRMGR> select * from system.sysfiles;
    TSNAME FNAME BLOCKS
    ------------------------------ -------------------------------------------------
    SYSTEM /u01/app/oracle/oradata/ora8/system01.dbf 89600
    OEM_REPOSITORY /u01/app/oracle/oradata/ora8/oemrep01.dbf 2560
    RBS /u01/app/oracle/oradata/ora8/rbs01.dbf 6144
    TEMP /u01/app/oracle/oradata/ora8/temp01.dbf 5120
    USERS /u01/app/oracle/oradata/ora8/users01.dbf 5120
    INDX /u01/app/oracle/oradata/ora8/indx01.dbf 5120
    6 rows selected.
    嗯, 感覺不錯, 我會了,謝謝?,F在退出休息一下吧。
    SVRMGR> exit
    Server Manager complete.
    三、 SQL*Plus 部分管理任務,測試數據庫
    在你第一次使用數據庫時,它的至少有兩個管理員賬戶:
    sys / change_on_install, 不要像以前那樣,給一個自己都不知道的口令。切記:在你安裝webdb時,需要它。
    system / manager 系統缺省的管理員,記住再給它建造一個工具表空間,作為他的卻省表空間:tools.
    現在試一下sqlplus:
    [oracle@lin /ora]$ sqlplus system/manager
    SQL*Plus: Release 8.1.5.0.0 - Production on Sun Nov 7 10:08:30 1999
    SQL> select * from tab;
    SQL> select * from sys.tab;
    SQL> exit
    最后提一下,Oracle+Linux 需要內存128MB,如果你運行了Apache Web進程的,那更需要內存。
    [oracle@lin /ora]$ free
    total used free shared buffers cached
    Mem: 192984 116904 76080 53212 5652 78064
    -/+ buffers/cache: 33188 159796
    Swap: 530104 0 530104
    Oracle Net8 網絡配置和聯接
    1)服務器端配置Listener:
    添加Listeners , 設置選擇 DataBase Name方式,填寫2個參數 { HomeDir = /ora/ , SID =ora8 }
    2)啟動Net8服務lsnrctl start
    3)停止Net8服務lsnrctl stop
    4)參數文件摘要
    5)客戶端配置:添加 Net Service Name ,同Windows客戶端一樣格式
    1)服務器端配置Listener:
    執行/ora/bin/netasst
    填寫描述->首選Oracle服務:
    。PROTOCOL = TCP
    。HOST = 172.17.2.22
    。PORT = 1521
    查看生成的 Net8 Server配置文件:listener.ora
    [oracle@lin admin]$ more listener.ora
    # LISTENER.ORA Configuration File:/ora/network/admin/listener.ora
    # Generated by Oracle Net8 Assistant

    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.2.22)(PORT = 1521))
    (PROTOCOL_STACK =
    (PRESENTATION = TTC)
    (SESSION = NS)
    )
    )

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = /ora)
    (SID_NAME = ora8)
    )
    )
    ### 如果指明監聽服務的"全局名",則有類似這一行:(GLOBAL_DBNAME = ora8)
    2)啟動Net8服務lsnrctl start
    首先你可以這樣取得幫助:
    [oracle@lin /ora]$ lsnrctl
    LSNRCTL> help
    然后開始啟動:start
    [oracle@lin bin]$ lsnrctl start
    聯接時,機器會逐步告訴你正在啟動…,正在聯接…,已經聯接的狀態,最后他說成功啦! 下面是一些簡要信息:
    LSNRCTL for Linux: Version 8.1.5.0.0 - Production on 19-NOV-99 22:02:54
    (c) Copyright 1998 Oracle Corporation. All rights reserved.
    Starting /ora/bin/tnslsnr: please wait...

    TNSLSNR for Linux: Version 8.1.5.0.0 - Production
    System parameter file is /ora/network/admin/listener.ora
    Log messages written to /ora/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.2.22)(PORT=1521))
    (PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS)))

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.2.22)(PORT=1521))
    (PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for Linux: Version 8.1.5.0.0 - Production
    Start Date 19-NOV-99 22:02:54
    Uptime 0 days 0 hr. 0 min. 0 sec
    Trace Level off
    Security OFF
    SNMP OFF
    Listener Parameter File /ora/network/admin/listener.ora
    Listener Log File /ora/network/log/listener.log
    Services Summary...
    ora8 has 1 service handler(s)
    The command completed successfully
    以上提示說,1個服務被處理,命令成功完成。
    3)停止Net8服務lsnrctl stop
    最簡單的方法是 [oracle@lin /ora]$ lsnrctl stop
    有時侯,進程出了差錯,tnslsnr沒有響應,像WindowsNT常犯的毛病一 樣,
    這里有一個強硬的手段:先找出它的進程號,然后 kill掉!
    [oracle@lin /ora]$ ps -ef|grep tns
    oracle 1331 1 0 15:51 ? 00:00:00 /ora/bin/tnslsnr LISTENER -inher

    或使用更少的參數也能找到tnslsnr:
    [oracle@lin /ora]$ ps -e
    PID TTY TIME CMD
    1331 ? 00:00:00 tnslsnr

    現在殺死PID = 1331的進程:
    [oracle@lin /ora]$ kill 1331
    LSNRCTL象 SVRMGRL一樣,是一個服務器管理程序,有不少參數,或者說是 子程序,帶星號的是一個外部程序。

    [oracle@lin bin]$ lsnrctl stop
    LSNRCTL for Linux: Version 8.1.5.0.0 - Production on 19-NOV-99 22:02:50
    (c) Copyright 1998 Oracle Corporation. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.2.22)(PORT=1521))
    (PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS)))
    The command completed successfully


    Listeners =DataBase Name = Global DB Name =ora8, HomeDir = /ora/ ,SID =ora8

    [oracle@lin oracle]$ cd /ora/net*/ad*
    [oracle@lin admin]$ ls
    listener.ora namesini.sql samples sqlnet.ora
    namesdrp.sql namesupg.sql sqlnet.fdf tnsnames.ora

    下面是在 Windwos NT/98 上遠程控制 TNSLSNR 的情形(圖略)。
    4)參數文件摘要
    [oracle@lin admin]$ more /u01/app/oracle/admin/ora8/pfile/initora8.ora
    db_name = ora8
    instance_name = ora8 ## "事例名"是關鍵字
    service_names = ora8

    control_files = ("/u01/app/oracle/oradata/ora8/control01.ctl", "/u01/app/oracle/oradata/ora8/control02.ctl")
    db_block_buffers = 8192
    shared_pool_size = 4194304
    log_checkpoint_interval = 10000
    log_checkpoint_timeout = 1800
    processes = 50
    log_buffer = 163840

    log_archive_start = true
    log_archive_dest_1 = "location=/u01/app/oracle/admin/ora8/arch"
    log_archive_format = %t_%s.dbf
    # 切記打開回滾段
    rollback_segments = (r01, r02, r03, r04)

    # global_names = false ### 監聽服務無需指明"全局名"
    # oracle_trace_enable = true
    # define directories to store trace and alert files
    background_dump_dest = /u01/app/oracle/admin/ora8/bdump
    core_dump_dest = /u01/app/oracle/admin/ora8/cdump
    user_dump_dest = /u01/app/oracle/admin/ora8/udump
    db_block_size = 2048
    remote_login_passwordfile = exclusive
    os_authent_prefix = ""
    compatible = "8.1.5" ## 也可以兼容 "8.0.5"
    5)客戶端網絡配置
    [oracle@lin admin]$ more tnsnames.ora
    # TNSNAMES.ORA Configuration File:/ora/network/admin/tnsnames.ora
    # Generated by Oracle Net8 Assistant

    使用net8助理,結果自動保存在 tnsnames.ora 中,
    [oracle@lin /ora]$ netass* 添加Service: 名稱ora8,參數如下:

    PROTOCOL=TCP HOST=172.17.2.22 PORT=1521 Oracle_SID=ora8
    機器解釋成一個Oracle服務器地址包:
    ( DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.2.22)(PORT=1521))
    (PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS))
    )
    一般說來,客戶端采用Windows9x/NT/2000,因為這里軟件開發容易,程序員和工具較為普及。
    Windows 客戶端網絡配置與此類似,其內容見于: \OraNT\net80\Admin\tnsname.ora
    ORA8.WORLD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.2.22)(PORT = 1521))
    (CONNECT_DATA = (SID = ora8))
    )

    -------------------------------------------
    在Windows2000(beta3專業版)中安裝Personal Oeacle8.05時,監聽服務安裝失敗,
    只要理解以上oracle結構原理,可以手工復制Net8文件,修改配置:
    copy CD-ROM\.\NT_x86\server\lsnrctl80.exe,tnslsnr80.exe,tnsping80.exe C:\orant\bin
    copy CD-ROM\.\listener.ora C:\orant\net80\admin
    我不久前有這么一次經歷。
     
    <=>
    Delphi/C++, PowerBuilder開發Oracle應用

    為什么需要多個版本? 因為可能開發新應用,也可能維護一個舊的應用。

    Delphi/C++ 開發Oracle應用的多種版本的參數對照表
    PowerBuilder開發Oracle應用的多種版本的參數對照表(以PB6為例)
    Oracle8, MSsql7各有什么優勢?

    以下特性對于10個以上的客戶端/用戶數很重要!

    特性\平臺 Oracle8 MSSQL7
    可移植性
    多平臺: Unix, Linux,Windows 鎖定在Windows!!!
    同義詞 create public synonym emp for system.emp; ?///
    系統日期 select sysdate from dual; select getdate();
    select current_timestamp;
    系統用戶 select user from dual; select user_id;
    select user_name; select suser;
    主機id ??/ select host_id; [char8]
    序列號 create sequence regist7 start with 10000;
    select regsit7.nextval into :orderid from dual
    //,可以取currval,授權其他用 ???

    -----------------------------------------------
    Delphi/C++ 開發Oracle應用的多種版本的參數對照表
    配置工具:borland BDE Administrator
    配置文件:borland Shared\BDE\idapi.cfg
    在 SQL Explorer 中新建一個別名:
    Object ===> New ... ===> ORACLE ===>myORACLE8

    關鍵參數 參數值 Oracle版本
    DLL32 SQLORA8.DLL
    SQLORA32.DLL ora8.x
    ora7.x/8.x
    VENDER INIT ORA805.DLL
    OCI.DLL
    OCIW32.DLL
    ORANT.DLL ORA80x.DLL
    ora8x
    ora8x for Win32
    <= ora7x.dll

    其他參數 :

    如果提示供應商有問題,就復制ORA7x.dll 到: ORANT.DLL再試!!

    NET PROTOCOL SQL*Net1, SQL*Net2, Net8
    SERVER NAME see TNSNAME.ORA , create by netasst
    USER NAME exmple: SCOTT/tiger,

    -----------------------------------------------

    PowerBuilder開發Oracle應用的多種版本的參數對照表:(以PB6為例)
    PowerBuilder6快速安裝路徑:CDROM:\pb6\setup


    SQL*net版本 pb動態庫 Profile參數名 參數值 適用Oracle版本
    SQL*net16
    ora7.2以前 pbOR760.dll Profile name
    Server
    Login ID
    Password oracle70
    @t:ora8
    scott
    tiger ora7.0
    ora7.x/8.x
    ora7.x/8.x
    SQL*net32
    ora7.x/8.x pbO7260.dll
    pbO7360.dll Profile name
    Server
    Login ID
    Password oracle73
    @tns:ora8
    scott
    tiger ora7.0
    ora7.x/8.x
    ora7.x/8.x
    ora8.x
    NET8 pbO8060.dll Profile name
    Server
    Login ID
    Password oracle8
    ora8
    scott
    tiger  

    其他參數 :
    如果提示供應商有問題,就復制ORA7x.dll 到: ORANT.DLL再試!!

    NET PROTOCOL SQL*Net1, SQL*Net2, Net8
    SERVER NAME see TNSNAME.ORA , create by netasst
    USER NAME exmple: SCOTT/tiger,


    --------------------------------------------------------------------------------
    Upgrade/Patch installation instructions for
    Oracle 8i Enterprise Edition for Intel-Linux
    --------------------------------------------------------------------------------
    1. Shutdown any running database instances

    2. Get the patch file linux_81501patch_ee.tgz

    3. Create a directory and extract the patch file
    mkdir orapatch
    cd orapatch
    tar xvzf linux_81501patch_ee.tgz

    4. Set the environment varibale ORACLE_HOME to the location of your
    Oracle 8i Enterprise Edition installation and run the script
    linux_81501patch_ee.sh to apply the patch.

    5. Startup your database instances

    6. Please read the FAQ provided along with the patch

    7. This patch fixes the following problems:

    955067 - LIBSKGSP8.SO NOT FOUND AS ALL USERS BUT ORACLE
    941530 - USE OF THE SUPPLIED RELINK SHELLSCRIPT FAILS
    960290 - 8.0.5->8.1.3 SQL*NET CONNECTION ATTEMPT DUMPS CORE
    962324 - NETASST DOESNT RUN RETURNS TO THE UNIX PROMPT WITH NO ERRROS
    * Last Updated 9/03/99

    I. Installation Issues----------------------

    1. Which JRE version is required for running the Oracle Universal Installer(OUI) and where is this available ?

    Use JRE 1.1.6 v5 from . The JRE 1.1.7 v3 (green threads) also should work, though not tested,which is also availble from this site.

    Download and install the above mentioned JRE in any location where thereis enough disk space and create a symbolic link from /usr/local/jreto the location where JRE was installed.

    2. On what window managers was OUI tested ?

    OUI runs on fvwm and KDE.

    There is a bug in the Enlightenment package used with GNOME on Red Hat 6.0that causes the Oracle Universal Installer (OUI) to fail. You may downloadthe RPM upgrade for the Enlightenment package,enlightenment-0.15.5-37.i386.rpm from the Red hat Errata site at .

    3. Could not locate gmake in the installed Linux distribution.

    Make /usr/bin/gmake as symbolic link to /usr/bin/make.

    $ su - root$ cd /usr/bin$ ln -s gmake make$ exit

    4. OUI couldn@#t determine the free disk space though there is enough spaceand instead displayed some warnings.

    It@#s a bug in the installer. Please ignore the warnings andcontinue the installation.

    5. When OUI reached installing protocol support, an empty list boxis displayed where the network protocols should have been listed.Unable to select any protocol.

    Only the TCP/IP adapter is supported which is default and built-in, andso the screen is blank.

    6. Just before the DB Assistant is launched, a dialog is displayed withthe warning:"JNLS Exception: oracle.ntp.jnls.JNLSException Unable to find anyNational Character Sets. Please check your Oracle installation."

    This is a known problem (884001). Ignore the warning

    7. Which one do we install to launch dbassist - JDK or JRE ?

    Download and install JRE 1.1.6 v5 as mentioned above, before launchingthe dbassist.

    8. While adding PL/SQL support, the DB Assistant complained thatdbmssml.sql script was missing.

    Apply patch 8.1.5.0.1 or above and launch dbassist.

    9. While testing the database creation using the dbassist, we haveobserved that, on a 4-way SMP system, it took more than 4 hours tocreate the database, if all the options are enabled. This may affectthe performance of the machine during this time.

    You could either select the option to create scripts and run them ORuse the scripts provided in $ORACLE_HOME/rdbms/install/create to createthe database. The scripts in $ORACLE_HOME/rdbms/install/createtake ORACLE_SID as the parameter. Before running these scripts copy theinit.ora available in this directory as $ORACLE_HOME/dbs/init.oraand modify any parameters in this to suit your requirements, at a minimumchange the db_name, instance_name and service_name parameters.To enable the 8i features set the compatible parameter to "8.1.5" in theinit.ora file.

    The order in which to run these scripts is

    crdb1.sh |crdb2.sh |-- To create database files, data dictionary viewscrdb3.sh | and add PL/SQL supportreplicate.sh --- Advanced replication optionordinst.sh |__ Oracle Intermediaimedia.sh |drsys.sh |__ Oracle interMedia Textcontext.sh |java.sh --- Oracle Jserverspatial.sh --- Oracel Spatialtimeseries.sh --- Oracle TimeSeriesvirage.sh --- Oracle Visual Information Retrievalsqlplus1.sh |sqlplus2.sh |-- Demos and SQL*Plus help tablessql
    關于jre_1.1.6-v5有多處可以下載,請試試看

    6,292,578 jre_1.1.6-v5-glibc-x86.tar.gz
    下載后復制到空目錄,然后解開,
    tar -xvzf jre_1.1.6-v5-glibc-x86.tar.gz
    復制/改名為 /usr/local/jre

    關于 Oracle8i,oracle805,WebDB,OAS,補丁下載有一個捷徑,可以請試試看,如果非要這樣,你也要遵守Oracle公司的協議,在OTN及其研究會注冊一下。

    07/20/99 12:00上午 621 815README
    07/19/99 12:00上午 29,360,128 815ship.1
    .....
    07/19/99 12:00上午 22,303,468 815ship.9
    07/19/99 12:00上午 257,184,492 815ship.tgz 企業版
    10/28/00 04:17下午 29,360,128 815shipstd.1
    ... ...
    10/28/00 04:19下午 27,955,443 815shipstd.9
    10/18/00 05:31下午 262,836,467 815shipstd.tgz 標準版
    03/01/99 12:00上午 171,305,412 Oracle8051EE_Intel.tgz
    06/02/99 12:00上午 3,281 README
    08/27/00 11:27上午 6,419,391 linux_81501patch_ee.tgz 企業版補丁
    02/05/99 12:00上午 794,538 lnxpatch.tgz
    02/03/00 10:29上午 Directory oas
    08/06/99 12:00上午 283,567,537 oas407ship_tar.gz 應用服務器
    01/31/00 12:35下午 Directory webdb
    08/02/99 12:00上午 92,069,519 webdb2_0_0528_tar.gz 萬維網數據庫
    -------------------------------------------------------------------

    下載方式,可以在windows進行,通過刻錄光盤、FTP、Samba、兼容磁盤分區等方式,讓Linux讀到。

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>