Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

ORACLE GUI-free environment

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Download oracle 11g

Download address: wget http://v.yingsun.net/cobra/download/linux.x64_11gR2_database_1of2.zip

Download address: wget http://v.yingsun.net/cobra/download/linux.x64_11gR2_database_2of2.zip

One installation of java

Check to see if the CentOS native JDK is installed. Yum list installed | grep java

Check the Java installation package command in the yum library: yum-y list java to see if there is java-1.8.0-openjdk in the installable package

Check and install the required rpm

Yum-y install binutils compat-libstdc++ compat-libstdc++-33 elfutils-libelf-devel gcc gcc-c++ glibc-devel glibc-headers ksh libaio-devel libstdc++-devel make sysstat unixODBC-devel binutils-* compat-libstdc++* elfutils-libelf* glibc* gcc-* libaio* libgcc* libstdc++* make* sysstat* unixODBC* wget unzip

3. Create user groups and users

Userdel-r oracle

Groupadd-g 700 oinstall

Groupadd-g 701 dba

Useradd-g oinstall-G dba-u 700 oracle

Passwd oracle

Id oracle

Fourth, set ORACLE environment variables

Su-oracle

Vi / .bash_profile

Export ORACLE_BASE=/u02/oracle

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

Export ORACLE_SID=orcl

Export NLS_LANG= "american_america.AL32UTF8"

Export NLS_DATE_FORMAT= "YYYY-MM-DD HH24:Mi:SS"

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export PATH=$ORACLE_HOME/bin:$PATH

/ / script mode

New_export = "export ORACLE_BASE=/u02/oracle"

Echo "export ORACLE_BASE=/u02/oracle" > > ~ / .bash_profile

Echo "export ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1" > > ~ / .bash_profile

Echo "export ORACLE_SID=orcl" > > ~ / .bash_profile

Bash shell: sample http://blog.csdn.net/10km/article/details/51953721 for updating LD_LIBRARY_PATH by modifying the profile file in the script

Source / .bash_profile

Check to see if the environment variable is complete

Env | grep ORA

5. Create an installation directory

Su-root

Mkdir-p / u02/oracle

Mkdir-p / u02/oracle/product/11.2.0/dbhome_1

Chown-R oracle:oinstall / u02/oracle

Chmod-R 775 / u02/oracle

Vi / etc/oraInst.loc

Inventory_loc==/home/oracle/oralnventory

Inst_group=oinstall

Source / etc/oralnst.loc

Chown oracle:oinstall / etc/oraInst.loc

Chmod 664 / etc/oraInst.loc

Five decompression

Unzip p10404530_112030_Linux-x86-64 percent 1 of 7.zip; unzip p10404530_112030_Linux-x86-64_2of7.zip

Six copy response file template

Copy with oracle user

Su-oracle

Mkdir / home/oracle/etc

Mkdir / home/oracle/oralnventory

Cp / u02 / home/oracle/etc/ oracle database * / responseCue

Seven settings response file

Su-root

Chmod 700 / home/oracle/etc/*.rsp (note owner, oinstall)

Eight silently install Oracle software

Su-oracle

Modify the response file / home/oracle/etc/db_install.rsp for installing Oracle software

# Delete the comment line in the answer file (starting with #)

$sed-I's / ^ #. * $/ / g'* .rsp

Delete blank lines without content (^ $)

$sed-I'/ ^ $/ d'* .rsp

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

Oracle.install.option=INSTALL_DB_SWONLY / / 29 installation type

ORACLE_HOSTNAME=oracle / / 37 Host name (hostname query)

UNIX_GROUP_NAME=oinstall / / 42 installation group

INVENTORY_LOCATION=/home/oracle/oraInventory / / 47 INVENTORY directory (left empty is the default) Note: it is best not to enter a directory consistent with the oracle installation path in the inventory directory here, as an error will be reported.

SELECTED_LANGUAGES=en,zh_CN,zh_TW / / 78 Select language

ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1 / / 83 oracle_home

ORACLE_BASE=/u02/oracle / / 88 oracle_base

Oracle.install.db.InstallEdition=EE / / 99 oracle version

Oracle.install.db.isCustomInstall=false / / Custom installation, No, use default components

Oracle.install.db.DBA_GROUP=dba / / 143dba user group

Oracle.install.db.OPER_GROUP=oinstall / / 147oper user group

Oracle.install.db.config.starterdb.type=GENERAL_PURPOSE / / 160database type

Oracle.install.db.config.starterdb.globalDBName=orcl / / 165 globalDBName

Oracle.install.db.config.starterdb.SID=orcl / / 170 SID

Oracle.install.db.config.starterdb.memoryLimit=81920 / 200automatically manages the memory of memory (M)

Oracle.install.db.config.starterdb.password.ALL=oracle / / 233 sets all database users to use the same password

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false / / 376 (false was written manually)

DECLINE_SECURITY_UPDATES=true / / 385 set security update (there seems to be bug, this must be selected true, otherwise it will infinitely remind you that there is a problem with the email address and terminate the installation. PS: no matter whether the address is correct or not)

Execute the command to start the default installation

Cd / u02/oracle/database

. / runInstaller-ignorePrereq-silent-force-responseFile / home/oracle/etc/db_install.rsp

An wizard executes two files

/ home/oracle/oraInventory/orainstRoot.sh

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

Nine silently configure the network

Edit the netca.rsp file

$more / u02/oracle/database/response/netca.rsp

[GENERAL]

RESPONSEFILE_VERSION= "11.2"

CREATE_TYPE= "CUSTOM"

[oracle.net.ca]

INSTALLED_COMPONENTS= {"server", "net8", "javavm"}

INSTALL_TYPE= "" typical ""

LISTENER_NUMBER=1

LISTENER_NAMES= {"LISTENER"}

LISTENER_PROTOCOLS= {"TCP;1521"}

LISTENER_START= "" LISTENER ""

NAMING_METHODS= {"TNSNAMES", "ONAMES", "HOSTNAME"}

NSN_NUMBER=1

NSN_NAMES= {"EXTPROC_CONNECTION_DATA"}

NSN_SERVICE= {"PLSExtProc"}

NSN_PROTOCOLS= {"TCP;HOSTNAME;1521"}

Under oracle users

$ORACLE_HOME/bin/netca / silent / responsefile / u02/oracle/database/response/netca.rsp

Ten silently install the database

Installed by oracle users. You need to configure the template file for silent installation database response, and also extract the dbca_rsp file in the response directory under database in the installation package. The specific configuration is as follows

Vim dbca.rsp

/ / $more / u02/soft/database/response/dbca.rsp

Cp / u02/oracle/database/response/dbca.rsp / u02/oracle/database/response/dbca.rsp.bak

Vi / u02/oracle/database/response/dbca.rsp

[GENERAL]

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "lanmao" # name of the global database

SID = "orcl" # Database instance, according to the above you wrote the same SID, feel free to write.

TEMPLATENAME = "General_Purpose.dbc" # this can be the default template, will not write the default, preferably default

It was written by our dba, so we used it.

SYSPASSWORD = "2011@oracle"

SYSTEMPASSWORD = "2011@oracle"

SYSMANPASSWORD = "2011@oracle"

DBSNMPPASSWORD = "2011@oracle" # the first four can be ignored, and the default is fine

CHARACTERSET = "ZHS16GBK" # Encoding

NATIONALCHARACTERSET= "UTF8" # coding

[createTemplateFromDB]

SOURCEDB = "iZ2zehy7gff0kpg1swp1czZ:1521:orcl"

SYSDBAUSERNAME = "system"

TEMPLATENAME = "My Copy TEMPLATE"

[createCloneTemplate]

SOURCEDB = "orcl"

TEMPLATENAME = "My Clone TEMPLATE"

[DELETEDATABASE]

SOURCEDB = "orcl"

[generateScripts]

TEMPLATENAME = "New Database"

GDBNAME = "orcl11.us.oracle.com"

[CONFIGUREDATABASE]

[ADDINSTANCE]

DB_UNIQUE_NAME = "orcl11g.us.oracle.com"

NODELIST=

SYSDBAUSERNAME = "sys"

[DELETEINSTANCE]

DB_UNIQUE_NAME = "orcl11g.us.oracle.com"

INSTANCENAME = "orcl11g"

SYSDBAUSERNAME = "sys"

$ORACLE_HOME/bin/dbca-silent-responseFile / db/soft/database/response/dbca.rsp

$ORACLE_HOME/bin/dbca-silent-responseFile / u02/oracle/database/response/dbca.rsp

Tracking error sqlplus method

Strace sqlplus / as sysdba

See why ORA-12547: TNS:lost contact appears

Refer to using Shell script to realize automatic silent installation of Oracle software https://github.com/yoshinorim/mha4mysql-manager.git

A table or index or other object uses BUFFER CACHE, and which CBC LATCH is ultimately used, according to its file number and block number, and uses the specified CBC LATCH after HASH.

Use Shell script to automate silent installation of Oracle software

The first complete guide to silent installation of oracle 11g

Download oracle 11g

Download address: wget http://v.yingsun.net/cobra/download/linux.x64_11gR2_database_1of2.zip

Download address: wget http://v.yingsun.net/cobra/download/linux.x64_11gR2_database_2of2.zip

One installation of java

Check to see if the CentOS native JDK is installed. Yum list installed | grep java

Check the Java installation package command in the yum library: yum-y list java to see if there is java-1.8.0-openjdk in the installable package

Check and install the required rpm

Check packages and versions of each version can be found in the official documentation

Https://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#BHCFACHG

Check whether all installation packages have been installed

Rpm-Q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel

Check if there are 31.

You can also check it in the following ways, including centos6,centos7 's package

Rpm-Q-- qf'% {NAME} -% {VERSION} -% {RELEASE} (% {ARCH})\ n 'binutils\

Compat-libcap1\

Compat-libstdc++-33\

Elfutils-libelf\

Elfutils-libelf-devel\

Gcc\

Gcc-c++\

Glibc\

Glibc-common\

Glibc-devel\

Glibc-headers\

Ksh\

Libaio\

Libaio-devel\

Libgcc\

Libstdc++\

Libstdc++-devel\

LibXi\

LibXtst\

Make\

Sysstat\

UnixODBC\

UnixODBC-devel

If the corresponding package is missing, you can install it with yum-y install, or you can install all the required dependent packages directly as follows

Yum-y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.devel compat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686 glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devel libaio-devel*.devel libgcc libgcc*.i686 libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.devel libXi libXi*.i686 libXtst libXtst*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686

The method of online search can also be referred to as follows

Yum-y install binutils compat-libstdc++ compat-libstdc++-33 elfutils-libelf-devel gcc gcc-c++ glibc-devel glibc-headers ksh libaio-devel libstdc++-devel make sysstat unixODBC-devel binutils-* compat-libstdc++* elfutils-libelf* glibc* gcc-* libaio* libgcc* libstdc++* make* sysstat* unixODBC* wget unzip unixODBC-devel

There are also packages that must be downloaded.

Wget ftp://ftp.pbone.net/mirror/www.whiteboxlinux.org/whitebox/4/en/updates/i686/glibc-2.3.4-2.43.i686.rpm

3. Create user groups and users

Userdel-r oracle

Groupadd-g 700 oinstall

Groupadd-g 701 dba

Useradd-g oinstall-G dba-u 700 oracle

Passwd oracle

Id oracle

Fourth, set ORACLE environment variables

Su-oracle

Vi / .bash_profile

Export ORACLE_BASE=/u02/oracle

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

Export ORACLE_SID=orcl

Export NLS_LANG= "american_america.AL32UTF8"

Export NLS_DATE_FORMAT= "YYYY-MM-DD HH24:Mi:SS"

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export PATH=$ORACLE_HOME/bin:$PATH

/ / reference method for initializing environment variables by script

New_export = "export ORACLE_BASE=/u02/oracle"

Echo "export ORACLE_BASE=/u02/oracle" > > ~ / .bash_profile

Echo "export ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1" > > ~ / .bash_profile

Echo "export ORACLE_SID=orcl" > > ~ / .bash_profile

Bash shell: sample http://blog.csdn.net/10km/article/details/51953721 for updating LD_LIBRARY_PATH by modifying the profile file in the script

Source / .bash_profile

Check to see if the environment variable is complete

Env | grep ORA

5. Create an installation directory

Su-root

Mkdir-p / u02/oracle

Mkdir-p / u02/oracle/product/11.2.0/dbhome_1

Chown-R oracle:oinstall / u02/oracle

Chmod-R 775 / u02/oracle

Vi / etc/oraInst.loc

Inventory_loc==/home/oracle/oraInventory

Inst_group=oinstall

Source / etc/oraInst.loc

Chown oracle:oinstall / etc/oraInst.loc

Chmod 664 / etc/oraInst.loc

5. Decompress the installation file

Unzip p10404530_112030_Linux-x86-64_1of7.zip

Unzip p10404530_112030_Linux-x86-64_2of7.zip

Six copy response file template

Copy with oracle user

Su-oracle

Mkdir / home/oracle/etc-- put configuration files such as response files

Mkdir / home/oracle/oraInventory-put the files related to the product catalog

Cp / u02 / home/oracle/etc/ oracle database * / responseCue

7. Set response file permissions

Su-root

Chmod 700 / home/oracle/etc/*.rsp (note owner, oinstall)

Eight silently install Oracle software

Su-oracle

Modify the response file / home/oracle/etc/db_install.rsp for installing Oracle software

# Delete the comment line in the answer file (starting with #)

$sed-I's / ^ #. * $/ / g'* .rsp

Delete blank lines without content (^ $)

$sed-I'/ ^ $/ d'* .rsp

Detailed description of the contents of the file

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

Oracle.install.option=INSTALL_DB_SWONLY / / 29 installation type

ORACLE_HOSTNAME=oracle / / 37 Host name (hostname query)

UNIX_GROUP_NAME=oinstall / / 42 installation group

INVENTORY_LOCATION=/home/oracle/oraInventory / / 47 INVENTORY directory (left empty is the default) Note: it is best not to enter a directory consistent with the oracle installation path in the inventory directory here, as an error will be reported.

SELECTED_LANGUAGES=en,zh_CN,zh_TW / / 78 Select language

ORACLE_HOME=/u02/oracle/product/11.2.0/dbhome_1 / / 83 oracle_home

ORACLE_BASE=/u02/oracle / / 88 oracle_base

Oracle.install.db.InstallEdition=EE / / 99 oracle version

Oracle.install.db.isCustomInstall=false / / Custom installation, No, use default components

Oracle.install.db.DBA_GROUP=dba / / 143dba user group

Oracle.install.db.OPER_GROUP=oinstall / / 147oper user group

Oracle.install.db.config.starterdb.type=GENERAL_PURPOSE / / 160database type

Oracle.install.db.config.starterdb.globalDBName=orcl / / 165 globalDBName

Oracle.install.db.config.starterdb.SID=orcl / / 170 SID

Oracle.install.db.config.starterdb.memoryLimit=81920 / 200automatically manages the memory of memory (M)

Oracle.install.db.config.starterdb.password.ALL=oracle / / 233 sets all database users to use the same password

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false / / 376 (false was written manually)

DECLINE_SECURITY_UPDATES=true / / 385 set security update (there seems to be bug, this must be selected true, otherwise it will infinitely remind you that there is a problem with the email address and terminate the installation. PS: no matter whether the address is correct or not)

The detailed list of the actual product library refers to the content of db_install.rsp.

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

Oracle.install.option=

ORACLE_HOSTNAME=iZ2zehy7gff0kpg1swp1czZ

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/home/oracle/oraInventory

SELECTED_LANGUAGES=en

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

ORACLE_BASE=/u02/oracle

Oracle.install.db.InstallEdition=EE

Oracle.install.db.EEOptionsSelection=false

Oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0

Oracle.install.db.DBA_GROUP=dba

Oracle.install.db.OPER_GROUP=dba

Oracle.install.db.CLUSTER_NODES=

"/ home/oracle/etc/db_install.rsp" 53L, 2500C

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

Oracle.install.option=

ORACLE_HOSTNAME=iZ2zehy7gff0kpg1swp1czZ

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/home/oracle/oraInventory

SELECTED_LANGUAGES=en

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

ORACLE_BASE=/u02/oracle

Oracle.install.db.InstallEdition=EE

Oracle.install.db.EEOptionsSelection=false

Oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0

Oracle.install.db.DBA_GROUP=dba

Oracle.install.db.OPER_GROUP=dba

Oracle.install.db.CLUSTER_NODES=

Oracle.install.db.isRACOneInstall=

Oracle.install.db.racOneServiceName=

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

Oracle.install.db.config.starterdb.globalDBName=orcl11g

Oracle.install.db.config.starterdb.SID=orcl11g

Oracle.install.db.config.starterdb.characterSet=AL32UTF8

Oracle.install.db.config.starterdb.memoryOption=true

Oracle.install.db.config.starterdb.memoryLimit=400

Oracle.install.db.config.starterdb.installExampleSchemas=false

Oracle.install.db.config.starterdb.enableSecuritySettings=true

Oracle.install.db.config.starterdb.password.ALL=oracle

Oracle.install.db.config.starterdb.password.SYS=

Oracle.install.db.config.starterdb.password.SYSTEM=

Oracle.install.db.config.starterdb.password.SYSMAN=

Oracle.install.db.config.starterdb.password.DBSNMP=

Oracle.install.db.config.starterdb.control=DB_CONTROL

Oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=

Oracle.install.db.config.starterdb.automatedBackup.enable=false

Oracle.install.db.config.starterdb.automatedBackup.osuid=

Oracle.install.db.config.starterdb.automatedBackup.ospwd=

Oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE

Oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u02/oracle/oradata/

Oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/u02/oracle/flash_recovery_area/

Oracle.install.db.config.asm.diskGroup=

Oracle.install.db.config.asm.ASMSNMPPassword=

MYORACLESUPPORT_USERNAME=

MYORACLESUPPORT_PASSWORD=

SECURITY_UPDATES_VIA_MYORACLESUPPORT=

DECLINE_SECURITY_UPDATES=true

PROXY_HOST=

PROXY_PORT=

PROXY_USER=

PROXY_PWD=

PROXY_REALM=

COLLECTOR_SUPPORTHUB_URL=

Oracle.installer.autoupdates.option=

Oracle.installer.autoupdates.downloadUpdatesLoc=

AUTOUPDATES_MYORACLESUPPORT_USERNAME=

AUTOUPDATES_MYORACLESUPPORT_PASSWORD=

Execute the command to start the default installation

Cd / u02/oracle/database

. / runInstaller-ignorePrereq-showProgress-silent-responseFile / home/oracle/etc/db_install.rsp this method does not display logs

. / runInstaller-ignorePrereq-showProgress-silent-force-responseFile / home/oracle/etc/db_install.rsp

. / runInstaller-silent-force-responseFile / home/oracle/etc/db_install.rsp

You can look at the installation log at this time.

INFO: Number of threads for fast copy: 1

Pay attention to the problem.

Here, when you install oracle11g on centos7, either 11.1.0.1 or 11.2.0.4 will report an error.

String: Error in invoking target 'agent nmhs' of makefile' / u02 apprenticespact product 11.2.0 Universe dbhomehammer 1 Universe SysmanAccording to SysmanAccords.

This error is equivalent to the error encountered during the installation of the graphical interface, but the installation of the graphical interface will stop when it encounters an error, and a button to retry will be provided. Silent installation is not enough. Please refer to the specific solution.

Http://www.jb51.net/article/129719.htm "method of installing Oracle 11.2.0.4 database under CentOS 7.4" here you need to edit the installation file.

Follow the wizard to execute two files

/ home/oracle/oraInventory/orainstRoot.sh

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

Nine silently configure the network

Edit the netca.rsp file

$more / home/oracle/etc/netca.rsp

[GENERAL]

RESPONSEFILE_VERSION= "11.2"

CREATE_TYPE= "CUSTOM"

[oracle.net.ca]

INSTALLED_COMPONENTS= {"server", "net8", "javavm"}

INSTALL_TYPE= "" typical ""

LISTENER_NUMBER=1

LISTENER_NAMES= {"LISTENER"}

LISTENER_PROTOCOLS= {"TCP;1521"}

LISTENER_START= "" LISTENER ""

NAMING_METHODS= {"TNSNAMES", "ONAMES", "HOSTNAME"}

NSN_NUMBER=1

NSN_NAMES= {"EXTPROC_CONNECTION_DATA"}

NSN_SERVICE= {"PLSExtProc"}

NSN_PROTOCOLS= {"TCP;HOSTNAME;1521"}

Under oracle users

$ORACLE_HOME/bin/netca / silent / responsefile / home/oracle/database/response/netca.rsp

Ten silently install the database

Installed by oracle users. You need to configure the template file for silent installation database response, and also extract the dbca_rsp file in the response directory under database in the installation package. The specific configuration is as follows

/ / $more / u02/soft/database/response/dbca.rsp

Vi / home/oracle/etc/dbca.rsp

[GENERAL]

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "orcl11g.localdomain"

SID = "orcl11g"

TEMPLATENAME = "General_Purpose.dbc"

DATAFILEDESTINATION=/u02/oracle/oradata

RECOVERYAREADESTINATION=/u02/oracle/flash_recovery_area

CHARACTERSET = "AL32UTF8"

NATIONALCHARACTERSET= "AL16UTF16"

DB_UNIQUE_NAME = "orcl11g"

LISTENERS=LISTENER

TOTALMEMORY = "700"

SYSPASSWORD = "oracle"

SYSTEMPASSWORD = "oracle"

Perform installation

$ORACLE_HOME/bin/dbca-silent-responseFile / home/oracle/etc/dbca.rsp

-/ u02/oracle/database/response/dbca.rsp

National Day holiday deletion method

After the database is installed successfully, delete the executed command

Delete the database first

/ home/oracle/database/dbca-silent-deleteDatabase-sourcedb orcl11g-sid orcl11g-sysDBAUserName system-sysDBAPassword oracle

Delete the database and software method if the installation is not successful

Delete the corresponding database folder under the / u02/oracle/oradata directory

Delete the corresponding database folder under the / u02/oracle/flash_recovery_area directory

Most important / etc/oratab deletes the record of the last corresponding database

-- Delete vi / home/oracle/oraInventory/ContentsXML/inventory.xml

Root user

Clear the swap space and delete the data files and oracle directories

Swapoff-a & & swapon-a

Rm-fr / u02/oracle/oradata

Rm-fr / u02/oracle/flash_recovery_area

Rm-fr / home/oracle/oraInventory

Rm-fr / u02/oracle/product/11.2.0/dbhome_1

Delete profile contents

Vi / etc/oratab

-- vi / home/oracle/oraInventory/ContentsXML/inventory.xml

-- sed-I'/ ^ select process, sequence#, status, delay_mins from v$managed_standby

PROCESS SEQUENCE# STATUS

-

DELAY_MINS

-

ARCH 56 CLOSING

0

ARCH 0 CONNECTED

0

ARCH 0 CONNECTED

0

PROCESS SEQUENCE# STATUS

-

DELAY_MINS

-

ARCH 55 CLOSING

0

RFS 0 IDLE

0

RFS 0 IDLE

0

PROCESS SEQUENCE# STATUS

-

DELAY_MINS

-

RFS 0 IDLE

0

RFS 60 IDLE

0

MRP0 24 WAIT_FOR_GAP

0

Log_ArchiveMinSucceedDest

Warning: VKTM detected a time drift.

Sat Feb 24 14:37:09 2018

Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.

Show database verbose physical

In physical

Edit database physical set property ArchiveLagTarget='0'

Edit database physical set property LogArchiveMaxProcesses='4'

Edit database physical set property LogArchiveMinSucceedDest='1'

Edit database primary set property ArchiveLagTarget='0'

Edit database primary set property LogArchiveMaxProcesses='4'

Edit database primary set property LogArchiveMinSucceedDest='1'

In primary

Edit database primary set property DbFileNameConvert='/u03_clone/oracle/oradata/orcl11g/,/u02/oracle/oradata/orcl11g/'

Edit database primary set property LogFileNameConvert='/u03_clone/oracle/oradata/orcl11g/,/u02/oracle/oradata/orcl11g/'

Alter system set DG_BROKER_START=false scope=both

Alter system set DG_BROKER_START=true scope=both

Alter system set log_file_name_convert='/u03_clone/oracle/oradata/orcl11g/,/u02/oracle/oradata/orcl11g/' scope=both

Show database verbose physical

Select database_role from v$database

Question 3 focus on

An error Fatal NI connect error 12514 was reported during startup, connecting to:

(DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=iZ2zehy7gff0kpg1swp1czZ) (PORT=1522) (CONNECT_DATA= (SERVICE_NAME=physical_DGB.localdomain) (CID= (PROGRAM=oracle) (HOST=iz2zehy7gff0kpg1swp1czz) (USER=oracle)

VERSION INFORMATION:

TNS for Linux: Version 11.2.0.4.0-Production

TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production

Time: 06-MAR-2018 08:35:17

Tracing not turned on.

Tns error struct:

Ns main err code: 12564

TNS-12564: TNS:connection refused

Ns secondary err code: 0

Nt main err code: 0

Nt secondary err code: 0

Nt OS err code: 0

It turns out that the listening port on the standby database is not 1521 but 1522, so it can't connect to the remote standby database.

Edit database physical set property StaticConnectIdentifier ='(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=iz2zehy7gff0kpg1swp1czz) (PORT=1522)) (CONNECT_DATA= (SERVICE_NAME=PHYSICAL_DGMGRL.localdomain) (INSTANCE_NAME=sorcl11g) (SERVER=DEDICATED)'

I re-copied the password file of the main library to the standby database. Now the startup of the main library will not report the problem of being unable to connect before. I found that all the logs can also be applied successfully in the query log of the standby database.

But as long as you use dgbroker to display database information, the database will be very slow, stuck in Apply Lag for a long time, and finally the result of SUCCESS will appear.

But the operation of the remote connection is very slow, read the log, do not understand very well, but also ask the hero to help the above problem should be the port number should be right (1522), the system memory is not enough

[oracle@iz2zehy7gff0kpg1swp1czz ~] $dgmgrl sys/oracle

DGMGRL for Linux: Version 11.2.0.4.0-64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.

Connected.

DGMGRL > show database physical

Database-physical

Role: PHYSICAL STANDBY

Intended State: APPLY-ON

Transport Lag: 5 minutes 9 seconds (computed 24 seconds ago)

Apply Lag: 5 minutes 9 seconds (computed 53 seconds ago)

Apply Rate: (unknown)

Real Time Query: OFF

Instance (s):

Sorcl11g

Database Status:

SUCCESS

Alert log error reported after the database starts the main database

Log after startup

ALTER DATABASE OPEN

Data Guard Broker initializing...

Data Guard Broker initialization complete

Data Guard: verifying database primary role...

Starting Data Guard Broker (DMON)

Wed Mar 14 14:31:59 2018

INSV started with pid=21, OS id=11910

Wed Mar 14 14:32:02 2018

NSV1 started with pid=22, OS id=11918

Wed Mar 14 14:32:10 2018

RSM0 started with pid=23, OS id=11926

Wed Mar 14 14:32:10 2018

Data Guard: version check completed

Beginning crash recovery of 1 threads

Started redo scan

Completed redo scan

Read 230 KB redo, 84 data blocks need recovery

Started redo application at

Thread 1: logseq 140, block 596

Recovery of Online Redo Log: Thread 1 Group 2 Seq 140 Reading mem 0

Mem# 0: / u02/oracle/oradata/orcl11g/redo02.log

Completed redo application of 0.15MB

Completed crash recovery at

Thread 1: logseq 140, block 1057, scn 3787549

84 data blocks read, 84 data blocks written, 230 redo k-bytes read

Wed Mar 14 14:32:11 2018

LGWR: STARTING ARCH PROCESSES

Wed Mar 14 14:32:11 2018

ARC0 started with pid=24, OS id=11928

ARC0: Archival started

LGWR: STARTING ARCH PROCESSES COMPLETE

ARC0: STARTING ARCH PROCESSES

Wed Mar 14 14:32:12 2018

ARC1 started with pid=25, OS id=11930

Thread 1 advanced to log sequence 141 (thread open)

Wed Mar 14 14:32:12 2018

ARC2 started with pid=26, OS id=11932

Thread 1 opened at log sequence 141

Current log# 3 seq# 141 mem# 0: / u02/oracle/oradata/orcl11g/redo03.log

Successful open of redo thread 1

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

Wed Mar 14 14:32:12 2018

SMON: enabling cache recovery

Wed Mar 14 14:32:12 2018

ARC3 started with pid=27, OS id=11934

ARC1: Archival started

ARC2: Archival started

ARC3: Archival started

ARC0: STARTING ARCH PROCESSES COMPLETE

ARC0: Becoming the'no FAL' ARCH

ARC0: Becoming the'no SRL' ARCH

ARC1: Becoming the heartbeat ARCH

Wed Mar 14 14:32:12 2018

NSA2 started with pid=28, OS id=11936

Archived Log entry 245 added for thread 1 sequence 140 ID 0x3fc66f1b dest 1:

ARC2: Standby redo logfile selected for thread 1 sequence 140 for destination LOG_ARCHIVE_DEST_2

ALTER SYSTEM SET log_archive_trace=0 SCOPE=BOTH SID='orcl11g'

ALTER SYSTEM SET log_archive_format='%t_%s_%r.dbf' SCOPE=SPFILE SID='orcl11g'

[11908] Successfully onlined Undo Tablespace 2.

Undo initialization finished serial:0 start:614426438 end:614428038 diff:1600 (16 seconds)

Verifying file header compatibility for 11g tablespace encryption..

Verifying 11g file header compatibility for tablespace encryption completed

SMON: enabling tx recovery

Database Characterset is ZHS16GBK

ARC1: Archive log rejected (thread 1 sequence 140) at host 'physical'

FAL [server, ARC1]: FAL archive failed, see trace file.

ARCH: FAL archive failed. Archiver continuing

ORACLE Instance orcl11g-Archival Error. Archiver continuing.

No Resource Manager plan active

Replication_dependency_tracking turned off (no async multimaster replication found)

Thread 1 advanced to log sequence 142 (LGWR switch)

Current log# 1 seq# 142 mem# 0: / u02/oracle/oradata/orcl11g/redo01.log

*

LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2

*

Archived Log entry 247 added for thread 1 sequence 141 ID 0x3fc66f1b dest 1:

Starting background process QMNC

Wed Mar 14 14:32:19 2018

QMNC started with pid=29, OS id=11947

ARC3: Standby redo logfile selected for thread 1 sequence 141 for destination LOG_ARCHIVE_DEST_2

Wed Mar 14 14:32:22 2018

Completed: ALTER DATABASE OPEN

Wed Mar 14 14:32:23 2018

Warning: Automated System Maintenance Tasks disabled.

Wed Mar 14 14:32:24 2018

Db_recovery_file_dest_size of 4182 MB is 0.005% used. This is a

User-specified limit on the amount of space that will be used by this

Database for recovery-related files, and does not reflect the amount of

Space available in the underlying filesystem or ASM diskgroup.

Wed Mar 14 14:37:21 2018

Starting background process SMCO

Wed Mar 14 14:37:22 2018

SMCO started with pid=33, OS id=12005

Wed Mar 14 14:41:23 2018

Thread 1 advanced to log sequence 143 (LGWR switch)

Current log# 2 seq# 143 mem# 0: / u02/oracle/oradata/orcl11g/redo02.log

Wed Mar 14 14:41:25 2018

Archived Log entry 249 added for thread 1 sequence 142 ID 0x3fc66f1b dest 1:

Wed Mar 14 14:50:10 2018

Warning: VKTM detected a time drift.

Wed Mar 14 14:50:24 2018

Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.

Wed Mar 14 14:54:53 2018

WARN: ARC0: Terminating pid 11930 hung on an I/O operation

Wed Mar 14 14:58:32 2018

WARN: ARC3: Terminating pid 11930 hung on an I/O operation

Wed Mar 14 15:02:28 2018

WARN: ARC2: Terminating pid 11930 hung on an I/O operation

Wed Mar 14 15:02:28 2018

Killing 1 processes with pids 11930 (Process by index) in order to remove hung processes. Requested by OS process 11934

Wed Mar 14 15:05:59 2018

ARC3: Error 16198 due to hung I/O operation to LOG_ARCHIVE_DEST_2

Wed Mar 14 15:05:59 2018

ARC2: Error 16198 due to hung I/O operation to LOG_ARCHIVE_DEST_2

Wed Mar 14 15:05:56 2018

Killing 1 processes with pids 11930 (Process by index) in order to remove hung processes. Requested by OS process 11928

Wed Mar 14 15:06:25 2018

Process 0x0x7f4c6eb0 appears to be hung while dumping

Wed Mar 14 15:06:55 2018

Current time = 920632941, process death time = 920564582 interval = 60000

Wed Mar 14 15:07:39 2018

Attempting to kill process 0x0x7f4c6eb0 with OS pid = 12005

Wed Mar 14 15:08:17 2018

OSD kill succeeded for process 0x7f4c6eb0

Wed Mar 14 15:11:34 2018

ARC2: Detected ARCH process failure

Wed Mar 14 15:11:36 2018

Restarting dead background process SMCO

ARC2: STARTING ARCH PROCESSES

Wed Mar 14 15:12:12 2018

ARC3: Becoming the heartbeat ARCH

Wed Mar 14 15:12:35 2018

ARC1 started with pid=30, OS id=12166

Wed Mar 14 15:12:37 2018

ARC1: Archival started

ARC2: STARTING ARCH PROCESSES COMPLETE

Wed Mar 14 15:12:50 2018

Starting background process SMCO

Wed Mar 14 15:13:30 2018

SMCO started with pid=34, OS id=12182

Wed Mar 14 15:16:44 2018

Process RSM0, PID = 11926, will be killed

Wed Mar 14 15:18:33 2018

WARN: ARC0: Terminating pid 11934 hung on an I/O operation

Wed Mar 14 15:19:30 2018

Killing 1 processes with pids 11934 (Process by index) in order to remove hung processes. Requested by OS process 11928

Wed Mar 14 15:19:55 2018

ARC0: Detected ARCH process failure

ARC0: STARTING ARCH PROCESSES

Wed Mar 14 15:19:59 2018

RSM0 started with pid=23, OS id=12224

Wed Mar 14 15:20:15 2018

ARC3 started with pid=25, OS id=12238

Wed Mar 14 15:20:16 2018

ARC3: Archival started

ARC0: STARTING ARCH PROCESSES COMPLETE

ARC3: Becoming the heartbeat ARCH

Wed Mar 14 15:21:42 2018

Process RSM0, PID = 12224, will be killed

Wed Mar 14 15:22:53 2018

RSM0 started with pid=23, OS id=12260

Wed Mar 14 15:25:54 2018

Errors in file / u02/oracle/diag/rdbms/primary/orcl11g/trace/orcl11g_mmon_11894.trc (incident=64454):

ORA-00445: background process "M001" did not start after 120 seconds

Incident details in: / u02/oracle/diag/rdbms/primary/orcl11g/incident/incdir_64454/orcl11g_mmon_11894_i64454.trc

Wed Mar 14 15:26:33 2018

WARN: ARC0: Terminating pid 12238 hung on an I/O operation

Wed Mar 14 15:27:16 2018

Killing 1 processes with pids 12238 (Process by index) in order to remove hung processes. Requested by OS process 11928

Wed Mar 14 15:27:46 2018

WARN: ARC2: Terminating pid 12238 hung on an I/O operation

Wed Mar 14 15:28:38 2018

WARN: ARC1: Terminating pid 12238 hung on an I/O operation

Wed Mar 14 15:28:38 2018

Killing 1 processes with pids 12238 (Process by index) in order to remove hung processes. Requested by OS process 11932

Wed Mar 14 15:29:13 2018

Dumping diagnostic data in directory= [CDMP _ 20180314152912], requested by (instance=1, osid=11894 (MMON)), summary= [incident=64454].

Wed Mar 14 15:29:34 2018

ARC1: Detected ARCH process failure

ARC1: STARTING ARCH PROCESSES

Wed Mar 14 15:30:38 2018

ARC3 started with pid=20, OS id=12328

Wed Mar 14 15:30:40 2018

ARC3: Archival started

ARC1: STARTING ARCH PROCESSES COMPLETE

Wed Mar 14 15:30:41 2018

ARC2: Becoming the heartbeat ARCH

Wed Mar 14 15:31:02 2018

Sweep [inc] [64454]: completed

Sweep [inc2] [64454]: completed

Wed Mar 14 15:32:37 2018

Thread 1 advanced to log sequence 144 (LGWR switch)

Current log# 3 seq# 144 mem# 0: / u02/oracle/oradata/orcl11g/redo03.log

Wed Mar 14 15:32:58 2018

Archived Log entry 251 added for thread 1 sequence 143 ID 0x3fc66f1b dest 1:

Wed Mar 14 15:33:29 2018

*

LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2

*

Wed Mar 14 16:01:57 2018

Process RSM0, PID = 12260, will be killed

Wed Mar 14 16:13:55 2018

Errors in file / u02/oracle/diag/rdbms/primary/orcl11g/trace/orcl11g_mmon_11894.trc (incident=64455):

ORA-00445: background process "M001" did not start after 120 seconds

Wed Mar 14 16:16:44 2018

Errors in file / u02/oracle/diag/rdbms/primary/orcl11g/trace/orcl11g_dmon_11902.trc (incident=64486):

ORA-00445: background process "RSM0" did not start after 120 seconds

Wed Mar 14 16:17:09 2018

Incident details in: / u02/oracle/diag/rdbms/primary/orcl11g/incident/incdir_64455/orcl11g_mmon_11894_i64455.trc

Wed Mar 14 16:17:58 2018

Incident details in: / u02/oracle/diag/rdbms/primary/orcl11g/incident/incdir_64486/orcl11g_dmon_11902_i64486.trc

Wed Mar 14 16:26:36 2018

Dumping diagnostic data in directory= [CDMP _ 20180314162635], requested by (instance=1, osid=11902 (DMON)), summary= [incident=64486].

Wed Mar 14 16:27:52 2018

Sweep [inc] [64486]: completed

Sweep [inc] [64455]: completed

Sweep [inc2] [64486]: completed

Sweep [inc2] [64455]: completed

Prepare the log alert.log on the database

RFS [8]: Assigned to RFS process 11974

Wed Mar 14 15:05:40 2018

RFS [8]: Possible network disconnect with primary database

Wed Mar 14 15:09:51 2018

Process 0x0x7f4bd838 appears to be hung while dumping

Wed Mar 14 15:10:05 2018

Current time = 920661152, process death time = 920599871 interval = 60000

Wed Mar 14 15:10:23 2018

Attempting to kill process 0x0x7f4bd838 with OS pid = 11478

Wed Mar 14 15:10:48 2018

OSD kill succeeded for process 0x7f4bd838

Wed Mar 14 15:12:43 2018

Completed: Data Guard Broker cleanup

Restarting Data Guard Broker (DMON)

Wed Mar 14 15:13:43 2018

DMON started with pid=15, OS id=12175

Wed Mar 14 15:14:31 2018

Starting Data Guard Broker (DMON)

Wed Mar 14 15:16:17 2018

INSV started with pid=24, OS id=12189

Wed Mar 14 15:17:07 2018

*

Fatal NI connect error 12170.

VERSION INFORMATION:

TNS for Linux: Version 11.2.0.4.0-Production

Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production

TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production

Time: 14-MAR-2018 15:17:21

Tracing not turned on.

Tns error struct:

Ns main err code: 12535

TNS-12535: TNS:operation timed out

Ns secondary err code: 12606

Nt main err code: 0

Nt secondary err code: 0

Nt OS err code: 0

Client address: (ADDRESS= (PROTOCOL=tcp) (HOST=172.17.225.197) (PORT=34787))

Wed Mar 14 15:17:23 2018

WARNING: inbound connection timed out (ORA-3136)

Wed Mar 14 15:19:41 2018

NSV0 started with pid=19, OS id=12209

Wed Mar 14 15:20:44 2018

*

Fatal NI connect error 12537, connecting to:

(LOCAL=NO)

VERSION INFORMATION:

TNS for Linux: Version 11.2.0.4.0-Production

Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production

TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production

Time: 14-MAR-2018 15:20:44

Tracing not turned on.

Tns error struct:

Ns main err code: 12537

TNS-12537: TNS:connection closed

Ns secondary err code: 12560

Nt main err code: 0

Nt secondary err code: 0

Nt OS err code: 0

Opiodr aborting process unknown ospid (12240) as a result of ORA-609

Monitoring status on the main library

Services Summary...

Service "PRIMARY.localdomain" has 2 instance (s).

Instance "orcl11g", status UNKNOWN, has 1 handler (s) for this service...

Instance "orcl11g", status READY, has 1 handler (s) for this service...

Service "PRIMARY_DGB.localdomain" has 1 instance (s).

Instance "orcl11g", status READY, has 1 handler (s) for this service...

Service "PRIMARY_DGMGRL" has 1 instance (s).

Instance "orcl11g", status UNKNOWN, has 1 handler (s) for this service...

Service "orcl11gXDB.localdomain" has 1 instance (s).

Instance "orcl11g", status READY, has 1 handler (s) for this service...

The command completed successfully

Listening status on standby database

Services Summary...

Service "PHYSICAL.localdomain" has 2 instance (s).

Instance "sorcl11g", status UNKNOWN, has 1 handler (s) for this service...

Instance "sorcl11g", status READY, has 1 handler (s) for this service...

Service "PHYSICAL_DGB.localdomain" has 1 instance (s).

Instance "sorcl11g", status READY, has 1 handler (s) for this service...

Service "PHYSICAL_DGMGRL" has 1 instance (s).

Instance "sorcl11g", status UNKNOWN, has 1 handler (s) for this service...

The command completed successfully

Log dgorcl.log of dgbroker on the main library

> > Starting Data Guard Broker bootstrap show configuration verbose

Configuration-dgc

Protection Mode: MaxPerformance

Databases:

Primary-Primary database

Error: ORA-16797: database is not using a server parameter file

Physical-Physical standby database

Error: ORA-16525: the Data Guard broker is not yet available

Verify whether spfile is used in the main library, do not use it to start, and restart the database instance

SQL > show parameter spfile

NAME TYPE

VALUE

-

Spfile string

SQL > create spfile from pfile

Referenc

Http://blog.itpub.net/23718752/viewspace-1735714/

Tue Mar 06 11:16:10 2018

ARC2: Archive log rejected (thread 1 sequence 101) at host 'physical'

FAL [server, ARC2]: FAL archive failed, see trace file.

ARCH: FAL archive failed. Archiver continuing

ORACLE Instance orcl11g-Archival Error. Archiver continuing.

Service "PHYSICAL.localdomain" has 1 instance (s).

Instance "sorcl11g", status READY, has 1 handler (s) for this service...

Service "PRIMARY" has 1 instance (s).

Instance "orcl11g", status UNKNOWN, has 1 handler (s) for this service...

Service "PRIMARY_DGMGRL" has 1 instance (s).

Instance "orcl11g", status UNKNOWN, has 1 handler (s) for this service...

Service "orcl11g.localdomain" has 1 instance (s).

Instance "orcl11g", status UNKNOWN, has 1 handler (s) for this service...

Service "orcl11gXDB.localdomain" has 1 instance (s).

Instance "sorcl11g", status READY, has 1 handler (s) for this service...

Service "PHYSICAL" has 1 instance (s).

Instance "sorcl11g", status UNKNOWN, has 1 handler (s) for this service...

Service "PHYSICAL_DGMGRL" has 1 instance (s).

Instance "sorcl11g", status UNKNOWN, has 1 handler (s) for this service...

Service "orcl11g.localdomain" has 1 instance (s).

Instance "sorcl11g", status UNKNOWN, has 1 handler (s) for this service...

60.100.87.121 8801/18801/28801

109.101.108.30 8801/18801/28801

10.40.70.194 3002/3003

166.79.59.42 1528

60.100.87.120 1521

203.244.224.85 1524/12521/13521

109.101.108.30 1521

71.52.3.51 1521

90.3.5.11 1521

90.3.5.11 1522

Pan Agent of PI

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report