【DBCA -SILENT】靜默方式安裝11gR2 oracle資料庫軟體

Appleses發表於2016-01-30

DBCA -SILENT】靜默方式安裝11gR2資料庫軟體單例項

BLOG文件結構圖

wpsC5B4.tmp 

 

 

 

相關文章連結:

 

  DBCA靜默方式建庫 http://blog.itpub.net/26736162/viewspace-1448220/

【DBCA -SILENT】靜默安裝如何啟用歸檔模式:http://blog.itpub.net/26736162/viewspace-1585925/

【DBCA -SILENT】靜默安裝之rac資料庫安裝http://blog.itpub.net/26736162/viewspace-1586352/

 

 

 

資料庫:11.2.0.3

OS:RHEL6.5

 

 

 

最近一直在研究oracle的靜默方式,覺得挺好的,免去了圖形介面的方式,今天我們來看看單例項的oracle資料庫軟體的靜默安裝方式,rac的資料庫軟體安裝後邊再補上吧。

一、 安裝前的準備工作

 

安裝前的準備工作和圖形介面的安裝無異,都是配置。。。

1、 檢查硬體

 

注意這裡的記憶體應該滿足要求,不然可能引起資料庫在安裝過程中長時間的掛起等待。。。。

在正式安裝開始前,請先檢查你的軟硬體條件是否滿足安裝需要。

 

1. 檢視系統實體記憶體,以下輸出可以看出,有2G的記憶體,記憶體最低要求1G

[root@rhel6 tmp]# grep MemTotal /proc/meminfo

MemTotal:        1914492 kB

2. 檢視交換空間大小,以下輸出可以看出,有2G的交換空間,交換空間的最優設定與你實體記憶體大小相關,詳細說明請參考安裝文件

[root@rhel6 tmp]# grep SwapTotal /proc/meminfo

SwapTotal:       1015800 kB

 

3.檢視可用實體記憶體和交換空間

[root@rhel6 tmp]# free

             total       used       free     shared    buffers     cached

Mem:       1914492    1558568     355924          0      79604    1092996

-/+ buffers/cache:     385968    1528524

Swap:      1015800     170592     845208

4.檢視掛載的臨時分割槽空間情況

[root@rhel6 tmp]#  df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda2        48G   29G   17G  63% /

tmpfs           935M  228K  935M   1% /dev/shm

/dev/sda1       291M   39M  238M  14% /boot

.host:/         331G  309G   22G  94% /mnt/hgfs

/dev/sr0        3.6G  3.6G     0 100% /media/RHEL_6.5 x86_64 Disc 1

[root@rhel6 tmp]#

 

 

2、 檢查軟體

 

 

1.檢視Linux版本

[root@rhel6 tmp]# cat /etc/issue

Red Hat Enterprise Linux Server release 6.5 (Santiago)

Kernel \r on an \m

2.檢視核心版本

[root@rhel6 tmp]# uname -a

Linux rhel6.5 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

 

 

3、 修改host檔案

永久生效:

[root@rhel6 tmp]# more /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=orcltest

[root@rhel6 tmp]#                                                               

 

 

檢視/etc/hosts檔案中必須包含a fully qualified name for the server

[root@rhel6 tmp]# cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.59.129 orcltest

[root@rhel6 tmp]#

 

 

4、 安裝軟體包檢查

 

可以統一檢查:

rpm -q binutils \
compat-libstdc++-33 \
elfutils-libelf \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgomp \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
unixODBC-devel \
numactl-devel \
elfutils-libelf-devel

 

 

我們可以看到沒有安裝過的包會已is not installed 出現:

[root@rhel6_lhr ~]# rpm -q binutils \

> compat-libstdc++-33 \

> elfutils-libelf \

> gcc \

> gcc-c++ \

> glibc \

> glibc-common \

> glibc-devel \

> glibc-headers \

> ksh \

> libaio \

> libaio-devel \

> libgomp \

> libgcc \

> libstdc++ \

> libstdc++-devel \

> make \

> sysstat \

> unixODBC \

> unixODBC-devel \

> numactl-devel

binutils-2.20.51.0.2-5.36.el6.x86_64

compat-libstdc++-33-3.2.3-69.el6.x86_64

compat-libstdc++-33-3.2.3-69.el6.i686

elfutils-libelf-0.152-1.el6.x86_64

gcc-4.4.7-4.el6.x86_64

gcc-c++-4.4.7-4.el6.x86_64

glibc-2.12-1.132.el6.x86_64

glibc-common-2.12-1.132.el6.x86_64

glibc-devel-2.12-1.132.el6.x86_64

glibc-headers-2.12-1.132.el6.x86_64

package ksh is not installed

libaio-0.3.107-10.el6.x86_64

libaio-devel-0.3.107-10.el6.x86_64

libaio-devel-0.3.107-10.el6.i686

libgomp-4.4.7-4.el6.x86_64

libgcc-4.4.7-4.el6.x86_64

libstdc++-4.4.7-4.el6.x86_64

libstdc++-devel-4.4.7-4.el6.x86_64

libstdc++-devel-4.4.7-4.el6.i686

make-3.81-20.el6.x86_64

sysstat-9.0.4-22.el6.x86_64

unixODBC-2.2.14-12.el6_3.x86_64

unixODBC-2.2.14-12.el6_3.i686

unixODBC-devel-2.2.14-12.el6_3.i686

unixODBC-devel-2.2.14-12.el6_3.x86_64

package numactl-devel is not installed

[root@rhel6_lhr ~]#

 

如果部分包不存在

可以批次更新安裝,但如果依賴關係缺失,可能需要多執行兩遍

或者手工調整

 

 

 

5、 核心引數--shell限制

 

 

 

①、 limits.conf

 

為了最佳化效能,需要新增 oracle 使用者 3 個限制引數:

[root@localhost ~]# vi /etc/security/limits.conf

 

為oracle使用者設定Shell限制修改/etc/security/limits.conf,加入

[root@oracle ~]# vi /etc/security/limits.conf

oracle           soft    nproc   2047

oracle           hard    nproc   16384

oracle           soft    nofile  1024

oracle           hard    nofile  65536

 

 

②、 login

 

修改/etc/pam.d/login,加入

[root@oracle ~]# vim /etc/pam.d/login

session    required     pam_limits.so

 

③、 profile

[root@oracle ~]# vim /etc/profile

if [ \$USER = "oracle" ]; then   

if [ \$SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

 

 

④、 sysctl.conf

 

Configuring Kernel Parameters for Linux

vim /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 4294967296

kernel.shmmax = 4294967295

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

 

生效

# /sbin/sysctl -p

⑤、 關閉selinux

 

vi /etc/selinux/config

 

SELINUX=disabled

 

6、 關閉防火牆

關閉防火牆

chkconfig iptables off   ---永久

/etc/init.d/iptables status 

7、 新建使用者和組

The Oracle Inventory group (oinstall)  資料庫安裝組

The OSDBA group (dba)  資料庫管理員組

The Oracle software owner (oracle)  管理員使用者

 

 

groupadd oinstall

groupadd dba

groupadd oper

useradd -g oinstall -G dba -m  oracle

passwd oracle

 

[root@oracle ~]# groupadd oinstall

[root@oracle ~]# groupadd dba

[root@oracle ~]# useradd -g oinstall -G dba -m  oracle

[root@oracle ~]# passwd oracle

 

-m 表示為使用者oracle 新建一個目錄
-g 表示為使用者指定一個主group
-G 表示為使用者指定一個group
這樣oracle既屬於oinstall組也屬於dba組。
平時主要是oinstall組發生作用。

 

 

8、 新建安裝目錄

ROOT執行:

mkdir  -p  /u02/app/oracle/product/11.2.0/dbhome_1

chown -R  oracle:oinstall  /u02

chmod  -R  775  /u02

 

 

 

9、 新建/etc/oraInst.loc

在/etc目錄下建立一個名為 oraInst.loc 的檔案,檔案中的內容(兩行程式碼)如下:
inventory_loc=$ORACLE_BASE/oraInventory
inst_group= oinstall

[root@ORCLTEST ~]# vi /etc/oraInst.locinventory_loc=/u02/app/oracle/oraInventoryinst_group= oinstall 

4. 輸入下面的命令在oraInst.loc檔案上設定合適的擁有者,組和許可權:

[root@ORCLTEST ~] chown oracle:oinstall /etc/oraInst.loc[root@ORCLTEST ~] chmod 664 /etc/oraInst.loc

 

 

10、 設定環境變數

 

Vi ~/.bash_profile  增加如下內容:

 

export EDITOR=vi

export ORACLE_SID=orcltest

export ORACLE_BASE=/u02/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib

export PATH=$ORACLE_HOME/bin:$PATH

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib

 

umask 022

 

#export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export SQLPATH=$ORACLE_HOME/sqlplus/admin

 

 

 

 

 

 

二、 開始安裝

 

1、 準備oracle安裝檔案

 

解壓oracle安裝檔案包

 

[oracle@rhel6 tmp]$ ll

total 2442088

drwxr-x---. 2 grid   oinstall       4096 Jan  6 00:10 hsperfdata_grid

drwxr-x---. 2 oracle oinstall       4096 Jan  6 00:36 hsperfdata_oracle

drwxr-xr-x. 2 root   root           4096 Jan  5 23:49 hsperfdata_root

drwx------. 2 oracle oinstall       4096 Jan  5 22:08 keyring-5qr0Bb

drwx------. 2 gdm    gdm            4096 Jan  5 22:08 orbit-gdm

drwx------. 2 oracle oinstall       4096 Apr 21 09:26 orbit-oracle

-rwxr-xr-x. 1 oracle oinstall 1358454646 Apr 21 09:35 p10404530_112030_Linux-x86-64_1of7.zip

-rwxr-xr-x. 1 oracle oinstall 1142195302 Apr 21 09:36 p10404530_112030_Linux-x86-64_2of7.zip

drwx------. 2 oracle oinstall       4096 Jan  5 22:08 pulse-LbDtLtLYhc91

drwx------. 2 root   root           4096 Apr  8 17:40 vmware-root-2083271499

[oracle@rhel6 tmp]$

[oracle@rhel6 tmp]$ unzip  p10404530_112030_Linux-x86-64_1of7.zip  && unzip p10404530_112030_Linux-x86-64_2of7.zip

 

。。。。。。。。。。。。。。。

 

 

 

 

2、 執行靜默安裝

 

修改解壓後的安裝資料夾下response下面的db_install.rsp檔案,將相關的引數設定為如下:

ORACLE_HOSTNAME=192.168.59.129

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u02/app/oracle/oraInventory

SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_1

ORACLE_BASE=/u02/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.EEOptionsSelection=false

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oper

oracle.install.db.isRACOneInstall=false

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

oracle.installer.autoupdates.option=SKIP_UPDATES

 

 

然後執行安裝:

[oracle@ORCLTEST database]$ cd /tmp/database

[oracle@ORCLTEST database]$ ./runInstaller -silent -noconfig -responseFile /tmp/database/response/db_install.rsp -ignoreSysPrereqs -ignorePrereq

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 20781 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 796 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-04-21_12-09-17PM. Please wait ...[oracle@ORCLTEST database]$ [WARNING] [INS-13014] Target environment do not meet some optional requirements.

   CAUSE: Some of the optional prerequisites are not met. See logs for details. /u02/app/oracle/oraInventory/logs/installActions2015-04-21_12-09-17PM.log

   ACTION: Identify the list of failed prerequisite checks from the log: /u02/app/oracle/oraInventory/logs/installActions2015-04-21_12-09-17PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.

You can find the log of this install session at:

/u02/app/oracle/oraInventory/logs/installActions2015-04-21_12-09-17PM.log

The installation of Oracle Database 11g was successful.

Please check '/u02/app/oracle/oraInventory/logs/silentInstall2015-04-21_12-09-17PM.log' for more details.

 

As a root user, execute the following script(s):

        1. /u02/app/oracle/product/11.2.0/dbhome_1/root.sh

 

 

Successfully Setup Software.

 

[oracle@ORCLTEST database]$

 

 

安裝時後臺程式

[root@ORCLTEST dbhome_1]# ps -ef|grep install

oracle   45527     1 48 12:09 pts/5    00:00:46 /tmp/OraInstall2015-04-21_12-09-17PM/jdk/jre/bin/java -Doracle.installer.library_loc=/tmp/OraInstall2015-04-21_12-09-17PM/oui/lib/linux64 -Doracle.installer.oui_loc=/tmp/OraInstall2015-04-21_12-09-17PM/oui -Doracle.installer.bootstrap=TRUE -Doracle.installer.startup_location=/tmp/database/install -Doracle.installer.jre_loc=/tmp/OraInstall2015-04-21_12-09-17PM/jdk/jre -Doracle.installer.nlsEnabled="TRUE" -Doracle.installer.prereqConfigLoc=  -Doracle.installer.unixVersion=2.6.32-431.el6.x86_64 -mx150m -cp /tmp/OraInstall2015-04-21_12-09-17PM::/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/prov_fixup.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/log4j-core.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/instcommon.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/instdb.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/orai18n-utility.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/emConfigInstall.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/orai18n-mapping.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/cvu.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/remoteinterfaces.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/OraPrereqChecks.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/ojdbc5.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/emagentSDK.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/installcommons_1.0.0b.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/ssh.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/jsch.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/OraPrereq.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraInstaller.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/oneclick.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/xmlparserv2.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/share.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraInstallerNet.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/emCfg.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/emocmutl.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraPrereq.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/jsch.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/ssh.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/remoteinterfaces.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/http_client.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraSuiteInstaller.jar:../stage/Components/oracle.swd.opatch/11.2.0.3.0/1/DataFiles/jlib/opatch.jar:../stage/Components/oracle.swd.opatch/11.2.0.3.0/1/DataFiles/jlib/opatchactions.jar:../stage/Components/oracle.swd.opatch/11.2.0.3.0/1/DataFiles/jlib/opatchprereq.jar:../stage/Components/oracle.swd.opatch/11.2.0.3.0/1/DataFiles/jlib/opatchutil.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraCheckPoint.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstImages.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_de.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_es.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_fr.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_it.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_ja.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_ko.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_pt_BR.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_zh_CN.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_zh_TW.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/oracle_ice.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/help4.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/help4-nls.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/ewt3.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/ewt3-swingaccess.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/ewt3-nls.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/swingaccess.jar::/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/jewt4.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/jewt4-nls.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/orai18n-collation.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/orai18n-mapping.jar:/tmp/OraInstall2015-04-21_12-09

root     46585 45299  0 12:10 pts/12   00:00:00 grep install

[root@ORCLTEST dbhome_1]#

 

檔案大小:

[root@ORCLTEST dbhome_1]# du . -sh

4.1G    .

[root@ORCLTEST dbhome_1]#

 

 

Root指令碼:

[root@ORCLTEST ~]# /u02/app/oracle/product/11.2.0/dbhome_1/root.sh

Check /u02/app/oracle/product/11.2.0/dbhome_1/install/root_ORCLTEST_2015-04-21_12-16-26.log for the output of root script

[root@ORCLTEST ~]# more  /u02/app/oracle/product/11.2.0/dbhome_1/install/root_ORCLTEST_2015-04-21_12-16-26.log

 

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u02/app/oracle/product/11.2.0/dbhome_1

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@ORCLTEST ~]#

 

至此,資料庫軟體靜默安裝完成。

如果安裝錯誤,可以刪除目錄(rm -rf /u02)然後重新建立目錄再執行命令建立。

 

rm -rf /u02

mkdir  -p  /u02/app/oracle/product/11.2.0/dbhome_1

chown -R  oracle:oinstall  /u02

chmod  -R  775  /u02

 

 

3、 Dbca靜默方式建庫

 

 

[oracle@orcltest database]$ strings $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc | grep -i arch

         <archiveLogMode>true</archiveLogMode>

[oracle@orcltest database]$

[oracle@ORCLTEST oracle]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname orcltest -sid orcltest -sysPassword lhr -systemPassword lhr -responseFile NO_VALUE -datafileDestination /u02/app/oracle/oradata/ -redoLogFileSize 50 -recoveryAreaDestination /u02/app/oracle/flash_recovery_area -storageType FS -characterSet ZHS16GBK -nationalCharacterSet AL16UTF16 -sampleSchema true -memoryPercentage 20 -totalMemory 200 -databaseType OLTP -emConfiguration NONE

1% complete

3% complete

11% complete

18% complete

26% complete

37% complete

Creating and starting Oracle instance

40% complete

45% complete

50% complete

55% complete

56% complete

57% complete

60% complete

62% complete

Completing Database Creation

66% complete

70% complete

73% complete

85% complete

96% complete

100% complete

Look at the log file "/u02/app/oracle/cfgtoollogs/dbca/orcltest/orcltest.log" for further details.

[oracle@orcltest database]$ more /u02/app/oracle/cfgtoollogs/dbca/orcltest/orcltest.log

Copying database files

DBCA_PROGRESS : 1%

DBCA_PROGRESS : 3%

DBCA_PROGRESS : 11%

DBCA_PROGRESS : 18%

DBCA_PROGRESS : 26%

DBCA_PROGRESS : 37%

Creating and starting Oracle instance

DBCA_PROGRESS : 40%

DBCA_PROGRESS : 45%

DBCA_PROGRESS : 50%

DBCA_PROGRESS : 55%

DBCA_PROGRESS : 56%

DBCA_PROGRESS : 57%

DBCA_PROGRESS : 60%

DBCA_PROGRESS : 62%

Completing Database Creation

DBCA_PROGRESS : 66%

DBCA_PROGRESS : 70%

DBCA_PROGRESS : 73%

DBCA_PROGRESS : 85%

DBCA_PROGRESS : 96%

DBCA_PROGRESS : 100%

Database creation complete. For details check the logfiles at:

/u02/app/oracle/cfgtoollogs/dbca/orcltest.

Database Information:

Global Database Name:orcltest

System Identifier(SID):orcltest

 

[oracle@ORCLTEST oracle]$ ORACLE_SID=orcltest

[oracle@orcltest database]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 21 15:41:57 2015

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> show parameter name

 

NAME                                 TYPE        VALUE

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

db_file_name_convert                 string

db_name                              string      orcltest

db_unique_name                       string      orcltest

global_names                         boolean     FALSE

instance_name                        string      orcltest

lock_name_space                      string

log_file_name_convert                string

processor_group_name                 string

service_names                        string      orcltest

SQL> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     4

Next log sequence to archive   6

Current log sequence           6

SQL>

 

三、 靜默配置監聽

透過response檔案執行netca, 生成sqlnet.oralistener.ora檔案, 位於$ORACLE_HOME/network/admin目錄下:

# su - oracle

$ $ORACLE_HOME/bin/netca /silent /responsefile /u01/database/netca.rsp

$ ll $ORACLE_HOME/network/admin/*.ora

$ lsnrctl status

 

 

[oracle@orcltest admin]$ netca -silent -responsefile $ORACLE_HOME/assistants/netca/netca.rsp

 

Parsing command line arguments:

    Parameter "silent" = true

    Parameter "responsefile" = /u02/app/oracle/product/11.2.0/dbhome_1/assistants/netca/netca.rsp

Done parsing command line arguments.

Oracle Net Services Configuration:

Warning: Oracle Restart is not running.

Listener configuration will not be registered/unregistered with Oracle Restart.

Profile configuration complete.

Oracle Net Listener Startup:

    Running Listener Control:

      /u02/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER

    Listener Control complete.

    Listener started successfully.

Listener configuration complete.

Oracle Net Services configuration successful. The exit code is 0

[oracle@orcltest admin]$

[oracle@orcltest admin]$ cd $ORACLE_HOME/network/admin

[oracle@orcltest admin]$ ll

total 20

-rw-r--r-- 1 oracle oinstall  379 Apr 21 16:33 listener.ora

drwxr-xr-x 2 oracle oinstall 4096 Apr 21 16:02 samples

-rw-r--r-- 1 oracle oinstall  205 May 11  2011 shrept.lst

-rw-r--r-- 1 oracle oinstall  223 Apr 21 16:33 sqlnet1504214PM3315.bak

-rwxr-xr-x 1 oracle oinstall  223 Apr 21 16:33 sqlnet.ora

[oracle@orcltest admin]$

 

 

成功執行後在$ORACLE_HOME/network/admin目錄下生成sqlnet.oralistener.ora兩個檔案

 

 

 

 

...........................................................................................................................................................................................

本文作者:小麥苗,只專注於資料庫的技術,更注重技術的運用

ITPUB BLOG:http://blog.itpub.net/26736162

本文地址:http://blog.itpub.net/26736162/viewspace-1589769/

本文pdf版: 提取碼:af2d

QQ:642808185 註明:ITPUB的文章標題

<版權所有,文章允許轉載,但須以連結方式註明源地址,否則追究法律責任!>

...........................................................................................................................................................................................

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28628435/viewspace-1984461/,如需轉載,請註明出處,否則將追究法律責任。

相關文章