<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Oracle on EvBackup</title>
    <link>https://forzw.com/tags/oracle/</link>
    <description>Recent content in Oracle on EvBackup</description>
    <image>
      <title>EvBackup</title>
      <url>https://forzw.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://forzw.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 11 Feb 2015 08:48:47 +0000</lastBuildDate>
    <atom:link href="https://forzw.com/tags/oracle/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Oracle启用归档</title>
      <link>https://forzw.com/archives/749/</link>
      <pubDate>Wed, 11 Feb 2015 08:48:47 +0000</pubDate>
      <guid>https://forzw.com/archives/749/</guid>
      <description>&lt;p&gt;1、单实例&lt;/p&gt;
&lt;p&gt;Oracle 9i&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ALTER SYSTEM SET log_archive_start=TRUE SCOPE=spfile;
ALTER SYSTEM SET log_archive_dest_1=&amp;#39;location=/u01/oradata/MYSID/archive/&amp;#39; SCOPE=spfile;
ALTER SYSTEM SET log_archive_format=&amp;#39;arch_%t_%s.arc&amp;#39; SCOPE=spfile;

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ARCHIVE LOG START;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Oracle 10g&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ALTER SYSTEM SET log_archive_dest_1=&amp;#39;location=/u01/oradata/MYSID/archive/&amp;#39; SCOPE=spfile;
ALTER SYSTEM SET log_archive_format=&amp;#39;arch_%t_%s_%r.arc&amp;#39; SCOPE=spfile;

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2、Oracle RAC&lt;/p&gt;
&lt;p&gt;Oracle 9i&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ALTER SYSTEM SET log_archive_start=TRUE SCOPE=spfile;
ALTER SYSTEM SET log_archive_dest_1=&amp;#39;location=/u01/oradata/MYDB/archive/&amp;#39; SCOPE=spfile;
ALTER SYSTEM SET log_archive_format=&amp;#39;arch_%t_%s.arc&amp;#39; SCOPE=spfile;

# 禁用集群模式

ALTER SYSTEM SET cluster_database=FALSE SCOPE=spfile;

# 停止数据库

srvctl stop database -d MYDB

# 配置归档

STARTUP MOUNT;
ARCHIVE LOG START;
ALTER DATABASE ARCHIVELOG;
ALTER SYSTEM SET cluster_database=TRUE SCOPE=spfile;
SHUTDOWN IMMEDIATE;

# 启动数据库

srvctl start database -d MYDB
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Oracle 10gR1&lt;/p&gt;</description>
    </item>
    <item>
      <title>命令创建ACFS</title>
      <link>https://forzw.com/archives/748/</link>
      <pubDate>Sun, 11 Jan 2015 07:41:24 +0000</pubDate>
      <guid>https://forzw.com/archives/748/</guid>
      <description>&lt;p&gt;创建挂载点&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mkdir -p /u01/app/oracle/acfsmounts/data_acfsvol3
chown oracle:oinstall /u01/app/oracle/acfsmounts/data_acfsvol3
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;连接到ASM创建Volume&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su - oracle
[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [RAC1] ? +ASM1
The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/oracle
[oracle@rac1 ~]$ dbhome
/u01/app/11.2.0/grid
[oracle@rac1 ~]$ sqlplus / as sysasm
Issue to the following command to create a new volume.

SQL&amp;gt; ALTER DISKGROUP DATA ADD VOLUME ACFSVOL3 SIZE 10G;

Diskgroup altered.

SQL&amp;gt;
Exit the SQL*Plus session, then create a file system on the volume.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;格式化Volume&lt;/p&gt;</description>
    </item>
    <item>
      <title>在11gR2中使用RMAN复制数据库</title>
      <link>https://forzw.com/archives/747/</link>
      <pubDate>Thu, 11 Dec 2014 07:19:41 +0000</pubDate>
      <guid>https://forzw.com/archives/747/</guid>
      <description>&lt;p&gt;RMAN 可以通过复制或者克隆，从一个运行的库中复制一个备份。可以用来在远程站点上复制数据库，下面示例中源库和复制库使用同样的SID：DB11G&lt;/p&gt;
&lt;p&gt;在源库中创建备份。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ rman target=/

RMAN&amp;gt; CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN&amp;gt; BACKUP DATABASE PLUS ARCHIVELOG
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;为目标库创建password文件&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/orapwDB11G password=password entries=10
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;在&amp;quot;$ORACLE_HOME/network/admin&amp;quot; 中增加&amp;quot;tnsnames.ora&amp;quot; 允许目标库访问源库。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Added to the tnsnames.ora
DB11G-SOURCE =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ol5-112-dup1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (ORACLE_SID = DB11G)
    )
  )
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;创建pfile文件&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Minimum Requirement.
DB_NAME=DB11G

# 修改目录位置.
#DB_FILE_NAME_CONVERT=&amp;#39;/u01/app/oracle/oradata/DB11G/&amp;#39;,&amp;#39;/u01/app/oracle/oradata/NEWSID/&amp;#39;
#LOG_FILE_NAME_CONVERT=&amp;#39;/u01/app/oracle/oradata/DB11G/&amp;#39;,&amp;#39;/u02/app/oracle/oradata/NEWSID/&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;创建数据库启动所需的目录&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ mkdir -p /u01/app/oracle/oradata/DB11G
$ mkdir -p /u01/app/oracle/fast_recovery_area/DB11G
$ mkdir -p /u01/app/oracle/admin/DB11G/adump
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;拷贝归档和备份文件到目标库&lt;/p&gt;</description>
    </item>
    <item>
      <title>关于VIP的奇怪故障一例</title>
      <link>https://forzw.com/archives/707/</link>
      <pubDate>Sun, 17 Nov 2013 15:00:44 +0000</pubDate>
      <guid>https://forzw.com/archives/707/</guid>
      <description>&lt;p&gt;OS：HP-UX 11.31 DB:Oracle 10.0.2.5 RAC （2nodes）&lt;/p&gt;
&lt;p&gt;问题描述：节点二在服务启动后，经过1分钟至3分钟会发生VIP导致的服务切换，切换后节点二VIP在节点一上启动，检查日志主要报错为：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Invalid parameters, or failed to bring up VIP (host=essrzc2)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;经过检查，系统网关配置正常，响应速度正常，系统日志无异常。开启服务debug后收获如下日志：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: Mon Dec 16 14:57:03 EAT 2013 [ 21730 ] Checking interface existance
Mon Dec 16 14:57:03 EAT 2013 [ 21730 ] Calling getifbyip
Mon Dec 16 14:57:03 EAT 2013 [ 21730 ] getifbyip:  started for 132.42.37.144

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: Mon Dec 16 14:57:03 EAT 2013 [ 21730 ] Completed getifbyip lan900:801
Mon Dec 16 14:57:03 EAT 2013 [ 21730 ] Completed with initial interface test
Mon Dec 16 14:57:03 EAT 2013 [ 21730 ] Broadcast = 132.42.37.255

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: Mon Dec 16 14:57:03 EAT 2013 [ 21730 ] checkIf: start for if=lan900
Mon Dec 16 14:57:07 EAT 2013 [ 21730 ] checkIf: RX packets checked if=lan900 ok
Mon Dec 16 14:57:07 EAT 2013 [ 21730 ] checkIf: end for if=lan900

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: Mon Dec 16 14:57:07 EAT 2013 [ 21730 ] main: interface is okay, exit success

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcexecut: env ORACLE_CONFIG_HOME=/oracle/product/10.2/crs

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcexecut: cmd = /oracle/product/10.2/crs/bin/racgeut -e _USR_ORA_DEBUG=5 54 /oracle/product/10.2/crs/bin/racgvip check essrzc2

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcexecut: rc = 0, time = 4.624s

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcaction: restyp=0 act_typ=2 stat=0

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcaction: return CLSR_CAA_SUCCESS

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcaction:  init 0.000s

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcaction:  action ok, 4.653s

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcaction:  post 0.000s

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcaction: all 4.653s

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: end for resource = ora.essrzc2.vip, action = check, status = 0, time = 4.692s

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrccln: exiting ora.essrzc2.vip refcount=1

2013-12-16 14:57:08.192: [    RACG][1] [21721][1][ora.essrzc2.vip]: clsrcprsrgter: gctx-&amp;gt;prsrcfgref_clsrcgctx = 0
2013-12-16 14:57:38.420: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcprsrgini: gctx-&amp;gt;prsrcfgref_clsrcgctx = 0
2013-12-16 14:57:38.420: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcini_ext: starting ora.essrzc2.vip refcount=1 global

2013-12-16 14:57:38.421: [    RACG][1] [21974][1][ora.essrzc2.vip]: begin for resource = ora.essrzc2.vip, action = check

2013-12-16 14:57:38.428: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrccssgetctx: all 0.007s

2013-12-16 14:57:38.436: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcgetprsrctx: all 0.015s

2013-12-16 14:57:38.448: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcnodeapp: prsr num_env = 0

2013-12-16 14:57:38.449: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcnodeapp: setting ORACLE_CONFIG_HOME=/oracle/product/10.2/crs

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: Unable to get IPv6 interface information.
Permission denied to 127.0.0.1
cmviewcl: Cannot view the cluster configuration: Permission denied.
This user doesn&amp;#39;t have access to view the cluster configuration.

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: Mon Dec 16 14:57:38 EAT 2013 [ 21979 ] Checking interface existance
Mon Dec 16 14:57:38 EAT 2013 [ 21979 ] Calling getifbyip
Mon Dec 16 14:57:38 EAT 2013 [ 21979 ] getifbyip:  started for 132.42.37.144

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: Mon Dec 16 14:57:38 EAT 2013 [ 21979 ] Completed getifbyip lan900:801
Mon Dec 16 14:57:38 EAT 2013 [ 21979 ] Completed with initial interface test
Mon Dec 16 14:57:38 EAT 2013 [ 21979 ] Broadcast = 132.42.37.255

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: Mon Dec 16 14:57:38 EAT 2013 [ 21979 ] checkIf: start for if=lan900
Mon Dec 16 14:57:42 EAT 2013 [ 21979 ] checkIf: RX packets checked if=lan900 failed
Interface lan900 checked failed (host=essrzc2)

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: Mon Dec 16 14:57:42 EAT 2013 [ 21979 ] checkIf: end for if=lan900
Mon Dec 16 14:57:42 EAT 2013 [ 21979 ] Performing CRS_STAT testing
Mon Dec 16 14:57:42 EAT 2013 [ 21979 ] Completed CRS_STAT testing

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: Mon Dec 16 14:57:43 EAT 2013 [ 21979 ] Completed second gateway test
Mon Dec 16 14:57:43 EAT 2013 [ 21979 ] Interface tests
Mon Dec 16 14:57:43 EAT 2013 [ 21979 ] DEBUG: FAIL_WHEN_ALL_LINK_DOWN = 1 and IF_USING = lan900

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: Invalid parameters, or failed to bring up VIP (host=essrzc2)

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcexecut: env ORACLE_CONFIG_HOME=/oracle/product/10.2/crs

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcexecut: cmd = /oracle/product/10.2/crs/bin/racgeut -e _USR_ORA_DEBUG=5 54 /oracle/product/10.2/crs/bin/racgvip check essrzc2

2013-12-16 14:57:43.181: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcexecut: rc = 1, time = 4.731s

2013-12-16 14:57:43.182: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcaction: restyp=0 act_typ=2 stat=1

2013-12-16 14:57:43.182: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcaction:  init 0.000s

2013-12-16 14:57:43.182: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcaction:  action failed, 4.761s

2013-12-16 14:57:43.182: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcaction:  post 0.000s

2013-12-16 14:57:43.182: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcaction: all 4.761s

2013-12-16 14:57:43.182: [    RACG][1] [21974][1][ora.essrzc2.vip]: end for resource = ora.essrzc2.vip, action = check, status = 1, time = 4.801s

2013-12-16 14:57:43.182: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrccln: exiting ora.essrzc2.vip refcount=1

2013-12-16 14:57:43.182: [    RACG][1] [21974][1][ora.essrzc2.vip]: clsrcprsrgter: gctx-&amp;gt;prsrcfgref_clsrcgctx = 0
2013-12-16 14:57:43.434: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrcprsrgini: gctx-&amp;gt;prsrcfgref_clsrcgctx = 0
2013-12-16 14:57:43.434: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrcini_ext: starting ora.essrzc2.vip refcount=1 global

2013-12-16 14:57:43.435: [    RACG][1] [22058][1][ora.essrzc2.vip]: begin for resource = ora.essrzc2.vip, action = stop

2013-12-16 14:57:43.466: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrccssgetnodename: all 0.030s

2013-12-16 14:57:43.466: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrcnodeapps: calling FAILSRVSA
2013-12-16 14:57:43.483: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrcrundetach: cmd = /oracle/product/10.2/crs/bin/racgmain ora.essrzc2.vip rundetach  1 failsrvsa essrzc2, rc = 0, time = 0.016s

2013-12-16 14:57:43.483: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrcnodeapps: Posting PNWDOWN_EVENT

2013-12-16 14:57:43.484: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrccssgetnodename: all 0.000s

2013-12-16 14:57:43.484: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrccssgetnodename: all 0.000s

2013-12-16 14:57:43.484: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrcssgetrhost: using cached local host name

2013-12-16 14:57:43.486: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrccssgetlhost: all 0.002s

2013-12-16 14:57:43.493: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrcpostevt: EvmEventPost 1 0.001s

2013-12-16 14:57:43.493: [    RACG][1] [22058][1][ora.essrzc2.vip]: clsrcposthaevt: forward to EVM
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;从日志基本看出，出现问题是从“checkIf: RX packets checked if=lan900 failed”开始，从而导致资源切换，执行检测的命令为“racgvip”，此命令在完成2次“Completed second gateway test”后如果失败就进行切换，因此要解决问题，需要增加test次数，修改racgvip如下参数。&lt;/p&gt;</description>
    </item>
    <item>
      <title>ORA-65086: cannot open/close the pluggable database</title>
      <link>https://forzw.com/archives/705/</link>
      <pubDate>Thu, 12 Sep 2013 07:09:48 +0000</pubDate>
      <guid>https://forzw.com/archives/705/</guid>
      <description>&lt;p&gt;在Oracle 12C中执行卸载命令后，如果执行PDB的OPEN操作，将会提示错误，如下：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SQL&amp;gt; alter pluggable database pdb01 unplug into &amp;#39;/opt/oracle/pdb01.xml&amp;#39;;

Pluggable database altered.

SQL&amp;gt; ALTER PLUGGABLE DATABASE pdb01 OPEN;
*
ERROR at line 1:
ORA-65086: cannot open/close the pluggable database
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;处理办法是先drop掉，然后插入此PDB。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SQL&amp;gt; drop pluggable database pdb01;

Pluggable database dropped.

SQL&amp;gt; show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
SQL&amp;gt; create pluggable database pdb01 using &amp;#39;/opt/oracle/pdb01.xml&amp;#39; nocopy;

Pluggable database created.

SQL&amp;gt; show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB01                          MOUNTED
SQL&amp;gt; alter pluggable database pdb01 open;

Pluggable database altered.
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>crs_stop 错误一列</title>
      <link>https://forzw.com/archives/703/</link>
      <pubDate>Sat, 31 Aug 2013 09:24:17 +0000</pubDate>
      <guid>https://forzw.com/archives/703/</guid>
      <description>&lt;p&gt;grid 与 oracle 版本为11.2.0.4，为两节点RAC，在通过crs_stop -all命令关闭oracle服务时出现下面问题：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[oracle@rac01 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type OFFLINE   OFFLINE               
ora.FRA.dg     ora....up.type OFFLINE   OFFLINE               
ora....ER.lsnr ora....er.type OFFLINE   OFFLINE               
ora....N1.lsnr ora....er.type OFFLINE   OFFLINE               
ora.OCR.dg     ora....up.type OFFLINE   OFFLINE               
ora.asm        ora.asm.type   OFFLINE   ONLINE    rac02       
ora.cvu        ora.cvu.type   OFFLINE   OFFLINE               
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               
ora....network ora....rk.type OFFLINE   OFFLINE               
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE               
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora.rac.db     ora....se.type OFFLINE   OFFLINE               
ora....SM1.asm application    OFFLINE   ONLINE    rac01       
ora....01.lsnr application    OFFLINE   OFFLINE               
ora.rac01.gsd  application    OFFLINE   OFFLINE               
ora.rac01.ons  application    OFFLINE   OFFLINE               
ora.rac01.vip  ora....t1.type OFFLINE   OFFLINE               
ora....SM2.asm application    OFFLINE   ONLINE    rac02       
ora....02.lsnr application    OFFLINE   OFFLINE               
ora.rac02.gsd  application    OFFLINE   OFFLINE               
ora.rac02.ons  application    OFFLINE   OFFLINE               
ora.rac02.vip  ora....t1.type OFFLINE   OFFLINE               
ora....ry.acfs ora....fs.type OFFLINE   OFFLINE               
ora.scan1.vip  ora....ip.type OFFLINE   OFFLINE
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;从状态可以看出ASM进程无法关闭，通过srvctl或者crs_stop关闭提示如下内容：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle Database 12C 体验</title>
      <link>https://forzw.com/archives/701/</link>
      <pubDate>Thu, 27 Jun 2013 05:58:35 +0000</pubDate>
      <guid>https://forzw.com/archives/701/</guid>
      <description>&lt;p&gt;oracle版本：12.1.0.1.0 redhat版本：RedHat EL5.6 x64&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，过程详解 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
groupadd dba
useradd -g dba oracle
mkdir /home/oracle
chown oracle:dba /home/oracle
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;
&lt;p&gt;编辑 /etc/security/limits.conf 并添加下行参数：&lt;/p&gt;</description>
    </item>
    <item>
      <title>ORA-00445错误一则</title>
      <link>https://forzw.com/archives/698/</link>
      <pubDate>Thu, 18 Apr 2013 07:31:07 +0000</pubDate>
      <guid>https://forzw.com/archives/698/</guid>
      <description>&lt;p&gt;数据库在运行中突然出现如下错误，导致服务不可用。 ORA-00445: background process &amp;ldquo;m000&amp;rdquo; did not start after 120 seconds ORA-32701: Possible hangs up to hang ID=0 detected DIA0 terminating blocker (ospid: 14288486 sid: 4370 ser#: 7549) of hang with ID = 129 requested by master DIA0 process on instance 1 Hang Resolution Reason: Automatic hang resolution was performed to free a critical database process. by terminating session sid: 4370 ospid: 14288486 DIA0 successfully terminated session sid:4370 ospid:14288486 with status 31. ORA-00445: background process &amp;ldquo;J000&amp;rdquo; did not start after 120 seconds ORA-00445: background process &amp;ldquo;W005&amp;rdquo; did not start after 120 seconds ORA-00445: background process &amp;ldquo;J000&amp;rdquo; did not start after 120 seconds ERROR: Unable to normalize symbol name for the following short stack (at offset 311):  初步判断由于相应资源分配不足，导致进程无法启动，进一步分析日志，share_pool内存资源不足造成。&lt;/p&gt;</description>
    </item>
    <item>
      <title>GoldenGate 11g 简要配置步骤</title>
      <link>https://forzw.com/archives/694/</link>
      <pubDate>Tue, 19 Mar 2013 08:15:58 +0000</pubDate>
      <guid>https://forzw.com/archives/694/</guid>
      <description>&lt;p&gt;描述：源端和目标端为Oracle 10gR2数据库，将scott数据库导出，在源端与目标端新增test用户，并导入scott的逻辑备份，来实现两个数据库之间test下数据同步。两个数据库的实例均为db01。&lt;/p&gt;
&lt;p&gt;-- scott 资源导入导出命令 expdp scott/tiger schemas=scott dumpfile=scott.dmp directory=backup; impdp scott/tiger schemas=scott dumpfile=scott.dmp directory=backup;&lt;/p&gt;
&lt;p&gt;-- 创建GoldenGate用户并授权（S&amp;amp;T） CREATE USER ogg IDENTIFIED BY ogg DEFAULT TABLESPACE &amp;ldquo;USERS&amp;rdquo; TEMPORARY TABLESPACE &amp;ldquo;TEMP&amp;rdquo;;&lt;/p&gt;
&lt;p&gt;GRANT &amp;ldquo;DBA&amp;rdquo; TO ogg ;&lt;/p&gt;
&lt;p&gt;-- 创建数据库用户并授权（S&amp;amp;T） CREATE USER test IDENTIFIED BY welcome DEFAULT TABLESPACE &amp;ldquo;EXAMPLE&amp;rdquo; TEMPORARY TABLESPACE &amp;ldquo;TEMP&amp;rdquo;;  GRANT &amp;ldquo;DBA&amp;rdquo; TO test ;&lt;/p&gt;
&lt;p&gt;-- 导入scott到test中（S&amp;amp;T） impdp test/welcome remap_schema=scott:test dumpfile=scott.dmp directory=backup;&lt;/p&gt;
&lt;p&gt;-- 检查附加日志并打开（S&amp;amp;T）&lt;/p&gt;
&lt;p&gt;SQL&amp;gt; archive log list; SQL&amp;gt; alter database add supplemental log data; SQL&amp;gt; alter system archive log current; SQL&amp;gt; alter database force logging; SQL&amp;gt; select log_mode,supplemental_log_data_min,force_logging from v$database;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle 11gR2 RAC On AIX 6.1故障一例</title>
      <link>https://forzw.com/archives/693/</link>
      <pubDate>Thu, 14 Feb 2013 03:49:21 +0000</pubDate>
      <guid>https://forzw.com/archives/693/</guid>
      <description>&lt;p&gt;系统环境：AIX 6.1（6100-04-11-1140） 数据库：Oracle 11.2.0.3 RAC with ASM 问题描述：数据库安装完毕后，节点而系统重启后数据库集群服务无法自动启动，同时SSH服务也无法自动启动。&lt;/p&gt;
&lt;p&gt;由此想到是不是系统的自动服务有问题，首先检查了/etc/inittab下的启动级别，都是默认设置，为2，之后到/etc/rc.d/rc2.d目录检查，相关文件和权限正确。&lt;/p&gt;
&lt;p&gt;之后比较两台机器的/etc/inittab，发现节点二多了一行配置：&lt;/p&gt;
&lt;p&gt;install_assist:2:wait:/usr/sbin/install_assist /dev/console 2&amp;gt;&amp;amp;1&lt;/p&gt;
&lt;p&gt;Google下发现这是系统的安装助手，而且是交互式的，即如果没有响应，则会一直等待，那么在该行后面的命令将不会被执行。也就是说rc2.d下的服务将不会被启动，于是手动注视（在行开头添加冒号）了下，保存后重启系统，一切正常了。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle学习总结</title>
      <link>https://forzw.com/archives/688/</link>
      <pubDate>Tue, 15 Jan 2013 15:42:04 +0000</pubDate>
      <guid>https://forzw.com/archives/688/</guid>
      <description>&lt;p&gt;2012年通过项目实施、自学、培训，在Oracle技能方面有所进展。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;培训方面&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1、Oracle Exalogic 培训&lt;/li&gt;
&lt;li&gt;2、Oracle Exadata 培训&lt;/li&gt;
&lt;li&gt;3、Oracle Bigdata 培训&lt;/li&gt;
&lt;li&gt;4、Oracle GoldenGate 培训&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;项目方面&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1、17套左右Oracle 10g &amp;amp; 11g 规划实施。&lt;/li&gt;
&lt;li&gt;2、Oracle GoldenGate 配置及维护。&lt;/li&gt;
&lt;li&gt;3、10次左右的排障。&lt;/li&gt;
&lt;li&gt;4、Oracle Exalogic一体机实施及维护。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;自学方面&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1、Oracle GoldenGate。&lt;/li&gt;
&lt;li&gt;2、Oracle Exalogic。&lt;/li&gt;
&lt;li&gt;3、Oracle Rman。&lt;/li&gt;
&lt;li&gt;4、Oracle 11g &amp;amp; RAC。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;下一步计划准备加强Oracle性能优化方面的学习和经验，同时兼顾数据容灾方面的积累，适时考取OCM。 之后希望能够达到下面目标：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1、Strong Expertise in RAC,Dataguard,RMAN,ASM,Partitioning, Migration/Upgrades etc.&lt;/li&gt;
&lt;li&gt;2、Extensive experience in Troubleshooting and Performance Tuning of Oracle Databases.&lt;/li&gt;
&lt;li&gt;3、Expert in Troubleshooting performance tuning,RAC inplementing and managing,backup and recovery.&lt;/li&gt;
&lt;li&gt;4、Good skills in IBM AIX,HP-UX,Linux System Administration and Shell Scripting.&lt;/li&gt;
&lt;li&gt;5、Strong Unix knowledge (Linux, IBM AIX, HP-UX, Sun Solaris), including scripting (shell, awk, sed, etc).&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>EXPDP and IMPDP</title>
      <link>https://forzw.com/archives/686/</link>
      <pubDate>Sun, 09 Dec 2012 13:37:26 +0000</pubDate>
      <guid>https://forzw.com/archives/686/</guid>
      <description>&lt;p&gt;一、EXPDP导出&lt;/p&gt;
&lt;p&gt;建立DIRECTORY对象.并且需要为数据库用户授予使用DIRECTORY对象权限. CREATE DIRECTORY dump dir AS ‘/tmp/dumpfile’; GRANT READ, WIRTE ON DIRECTORY dump_dir TO scott;&lt;/p&gt;
&lt;p&gt;1,导出表 Expdp scott/tiger DIRECTORY=dump_dir DUMPFILE=tab.dmp TABLES=dept,emp&lt;/p&gt;
&lt;p&gt;2,导出方案 Expdp scott/tiger DIRECTORY=dump_dir DUMPFILE=schema.dmp SCHEMAS=system,scott&lt;/p&gt;
&lt;p&gt;3.导出表空间 Expdp system/manager DIRECTORY=dump_dir DUMPFILE=tablespace.dmp TABLESPACES=user01,user02&lt;/p&gt;
&lt;p&gt;4,导出数据库 Expdp system/manager DIRECTORY=dump_dir DUMPFILE=full.dmp FULL=Y  二、IMPDP导入&lt;/p&gt;
&lt;p&gt;1, 导入表 Impdp scott/tiger DIRECTORY=dump_dir DUMPFILE=tab.dmp TABLES=dept,emp Impdp system/manage DIRECTORY=dump_dir DUMPFILE=tab.dmp TABLES=scott.dept,scott.emp REMAP_SCHEMA=SCOTT:SYSTEM 第一种方法表示将DEPT和EMP表导入到SCOTT方案中,第二种方法表示将DEPT和EMP表导入的SYSTEM方案中.注意,如果要将表导入到其他方案中,必须指定REMAP SCHEMA选项.&lt;/p&gt;
&lt;p&gt;2,导入方案 Impdp scott/tiger DIRECTORY=dump_dir DUMPFILE=schema.dmp SCHEMAS=scott Impdp system/manager DIRECTORY=dump_dir DUMPFILE=schema.dmp SCHEMAS=scott REMAP_SCHEMA=scott:system&lt;/p&gt;
&lt;p&gt;3,导入表空间 Impdp system/manager DIRECTORY=dump_dir DUMPFILE=tablespace.dmp TABLESPACES=user01&lt;/p&gt;</description>
    </item>
    <item>
      <title>OGG-00446处理方法</title>
      <link>https://forzw.com/archives/685/</link>
      <pubDate>Thu, 06 Dec 2012 14:36:23 +0000</pubDate>
      <guid>https://forzw.com/archives/685/</guid>
      <description>&lt;p&gt;Goldengate 在同步过程中抽取进程出现OGG-00446错误的原因一般是：&lt;/p&gt;
&lt;p&gt;由于抽取进程异常关闭或者机器重启后未启动，抽取进程所需的archived log已经被清走，不在log_archive_dest指定的目录下。&lt;/p&gt;
&lt;p&gt;解决办法：&lt;/p&gt;
&lt;p&gt;1、拷贝需要的archived log到指定目录。 2、指定时间点重新抽取数据。&lt;/p&gt;
&lt;p&gt;其中第二点步骤是： 关闭抽取进程，这里以进程名extdb1为例。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ggsci&amp;gt; stop extdb1
ggsci&amp;gt; alter extract extdb1,tranlog begin now
ggsci&amp;gt; start extdb1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;其中now可以替换为实际时间，比如从2012年12月6日22点34开始，例如。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;alter extract extdb1,tranlog begin 2012-12-06 22:34:00
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Error 45 initializing SQL*Plus</title>
      <link>https://forzw.com/archives/674/</link>
      <pubDate>Fri, 03 Aug 2012 06:40:42 +0000</pubDate>
      <guid>https://forzw.com/archives/674/</guid>
      <description>&lt;p&gt;环境：HPUX 11.31；Oracle 10gR2 with RAC 在执行SQL时提示如下错误：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SQL&amp;gt; @/crm1/trade.sql;
Error 45 initializing SQL*Plus
Internal error
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;经尝试，原来SQL脚本存放在集群文件系统上，将SQL存放到本地文件系统即解决。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle Exalogic Elastic Cloud</title>
      <link>https://forzw.com/archives/667/</link>
      <pubDate>Mon, 16 Jul 2012 07:00:31 +0000</pubDate>
      <guid>https://forzw.com/archives/667/</guid>
      <description>&lt;p&gt;前段时间参加了一个Oracle Exalogic Elastic Cloud培训，并考取了一个认证。对Oracle Exalogic Elastic Cloud有了初步的了解。最近项目中又上了一台Exalogic一体机，现在简要介绍下。&lt;/p&gt;
&lt;p&gt;项目中Exalogic一体机为四分之一配，外观如下：&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;exalogic&#34; loading=&#34;lazy&#34; src=&#34;https://media.forzw.com/blog/2016/exalogic.jpg&#34; title=&#34;exalogic&#34;&gt;&lt;/p&gt;
&lt;p&gt;机柜中包含了一套存储和8台PCServer、两台Infiniband的交换机、一台思科交换机，在机器背面有两个大的PDU，可以通过网络查看电源输出。 Exalogic通过Infiniband的高速连接提高IO访问速度，PCServer本地使用2块32G SSD用来安装操作系统，操作系统为OEL，中间件应用程序安装在存储上，同时日志和应用也保存在存储上，推荐的访问存储方式为NFS，同时也支持ISCSI等其他方式。&lt;/p&gt;
&lt;p&gt;Exalogic应用部署非常简单，在单个几点部署后，可以横向复制，而且自带有OneCommand脚本可以一键配置包括IP地址等基础信息。&lt;/p&gt;</description>
    </item>
    <item>
      <title>在RedHat上安装Oracle 11gR2 RAC</title>
      <link>https://forzw.com/archives/664/</link>
      <pubDate>Sun, 15 Jul 2012 17:29:42 +0000</pubDate>
      <guid>https://forzw.com/archives/664/</guid>
      <description>&lt;p&gt;oracle版本：11.2.0.1.0 grid版本：11.2.0.1.0 redhat版本：RedHat EL5 x86_64 存储方式：iscsi + asm&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，配置安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#ORACLE SETTING
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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 = 1048586
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑 /etc/pam.d/login 文件，并添加下行参数：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle RAC查询主节点</title>
      <link>https://forzw.com/archives/660/</link>
      <pubDate>Wed, 30 May 2012 07:52:56 +0000</pubDate>
      <guid>https://forzw.com/archives/660/</guid>
      <description>&lt;p&gt;Oracle RAC Master节点识别方法有如下四个：&lt;/p&gt;
&lt;p&gt;1、查询occsd日志 2、查询crsd日志 3、查询V$GES_RESOURCE视图 4、执行“ocrconfig -showbackup”命令&lt;/p&gt;
&lt;p&gt;查询结果一般会提示如下信息，即能识别到主节点。 [CSSD]CLSS-3001: local node number 0, master node number 0&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle监控账户权限的推荐配置</title>
      <link>https://forzw.com/archives/653/</link>
      <pubDate>Tue, 21 Feb 2012 16:42:27 +0000</pubDate>
      <guid>https://forzw.com/archives/653/</guid>
      <description>&lt;p&gt;建立用户：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;create user monadm identified by monadm;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;赋权：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;grant resource,connect,select_catalog_role to monadm;
grant select on v_$DATABASE to monadm;
grant select on v_$INSTANCE to monadm;
grant select on sys.props$ to monadm;
grant select on v_$sysstat to monadm;
grant select on v_$parameter to monadm;
grant select on v_$sga to monadm;
grant select on v_$rowcache to monadm;
grant select on v_$librarycache to monadm;
grant select on dba_data_files to monadm;
grant select on v_$log to monadm;
grant select on dba_tablespaces to monadm;
grant select on dba_free_space to monadm;
grant select on dba_segments to monadm;
grant select on v_$resource_limit to monadm;
grant select on v_$bgprocess to monadm;
grant select on v_$session to monadm;
grant select on v_$lock to monadm;
grant select on v_$sqltext to monadm;
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>using backup controlfile 和 until cancel区别</title>
      <link>https://forzw.com/archives/648/</link>
      <pubDate>Thu, 15 Dec 2011 09:53:01 +0000</pubDate>
      <guid>https://forzw.com/archives/648/</guid>
      <description>&lt;p&gt;1. recover database using backup controlfile 2. recover database until cancel 3. recover database using backup controlfile until cancel; 4. recover database until cancel using backup controlfile;&lt;/p&gt;
&lt;p&gt;区别：&lt;/p&gt;
&lt;p&gt;1. 如果丢失丢失当前控制文件，用冷备份的控制文件恢复的时候。用来告诉oracle，不要以controlfile中的scn作为恢复的终点； 2. 如果丢失current/active redo的时候。手动指定终点。 3. 如果 丢失当前controlfile并且current/active redo都丢失，会先去 自动 应用归档日志,可以实现最大的恢复； 4. 如果 丢失当前controlfile并且current/active redo都丢失，以旧的redo中的scn为恢复终点。因为没有应用归档日志，所有会丢失数据。  要理解recover database using backup controlfile，先理解 recover database，也就是说，不加using backup controlfile的情况。在普通的recover database 或者 recover tablespace, recover datafile时， Oracle会以当前controlfile所纪录的SCN为准，利用archive log和 redo log的redo entry, 把相关的datafile 的 block恢复到“当前controlfile所纪录的SCN”而某些情况下，Oracle需要把数据恢复到比当前controlfile所纪录的SCN还要靠后的位置（比如说，control file是backup controlfile , 或者 controlfile是根据trace create的。）,这时候，就需要用using backup controlfile. 恢复就不会受“当前controlfile所纪录的SCN”的限制。这时候的限制就来自于你的语句(until time , until scn)，或者可用的archive log(until cancel)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle连接数相关</title>
      <link>https://forzw.com/archives/637/</link>
      <pubDate>Tue, 22 Nov 2011 16:05:45 +0000</pubDate>
      <guid>https://forzw.com/archives/637/</guid>
      <description>&lt;p&gt;修改Oracle最大连接数的方法：&lt;/p&gt;
&lt;p&gt;以sysdba身份登陆PL/SQL 或者 Worksheet&lt;br&gt;
查询目前连接数&lt;br&gt;
show parameter processes;&lt;br&gt;
更改系统连接数&lt;br&gt;
alter system set processes=1000 scope=spfile;&lt;br&gt;
创建pfile&lt;br&gt;
create pfile from spfile;&lt;br&gt;
重启Oracle服务或重启Oracle服务器&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;查询Oracle游标使用情况的方法：  
select * from v$open\_cursor where user\_name = &amp;amp;#8216;TRAFFIC&amp;amp;#8217;；

查询Oracle会话的方法：  
select * from v$session

当前的连接数 ：  
select count(*) from v$process; 

查看当前激活的连接数：  
select count(*) from v$session where status=&amp;amp;#8217;ACTIVE&amp;amp;#8217;;

查看连接用户不为空的用户：  
select count(*) from v$session where username is not null;
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>EMCA常用命令</title>
      <link>https://forzw.com/archives/628/</link>
      <pubDate>Wed, 03 Aug 2011 11:16:31 +0000</pubDate>
      <guid>https://forzw.com/archives/628/</guid>
      <description>&lt;p&gt;创建一个EM资料库 emca -repos create 重建一个EM资料库 emca -repos recreate 删除一个EM资料库 emca -repos drop 配置数据库的 Database Control emca -config dbcontrol db 删除数据库的 Database Control配置 emca -deconfig dbcontrol db 重新配置db control的端口，默认端口在1158 emca -reconfig ports emca -reconfig ports -dbcontrol_http_port 1160 emca -reconfig ports -agent_port 3940  先设置ORACLE_SID环境变量后,启动EM console服务 emctl start dbconsole emctl stop dbconsole emctl status dbconsole 重新配置dbconsole的步骤 emca -repos drop 删除DBConsole emca -repos create 重建 emca -config dbcontrol db 配置 emctl start dbconsole 启动&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle 10gR2在RedHat 5上EM中文乱码的解决方法</title>
      <link>https://forzw.com/archives/610/</link>
      <pubDate>Sun, 19 Jun 2011 12:43:22 +0000</pubDate>
      <guid>https://forzw.com/archives/610/</guid>
      <description>&lt;p&gt;1、配置字体并清除缓存&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#切换到Oracle用户
su - oracle
#停止EM
emctl stop dbconsole
#拷贝font配置文件
cd $ORACLE_HOME/jdk/jre/lib/
cp font.properties.zh_CN.Redhat font.properties 
#删除已经生成的gif图标
rm $ORACLE_HOME/oc4j/j2ee/oc4j_applications/\
applications/em/em/cabo/images/cache/zhs/*.gif
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，下载字体&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#切换到root
su - root
#下载字体
wget http://blogimg.chinaunix.net/blog/upfile2/090331105520.rar
#解压文件，也可解压后上传到系统中
unrar 090331105520.rar
#创建目录
mkdir -p /usr/share/fonts/zh_CN/TrueType/
#拷贝字体到目录
cp zysong.ttf /usr/share/fonts/zh_CN/TrueType/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3，启动EM&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#切换到oracle
su - oracle
#启动EM
emctl start dbconsole
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>在SuSE上安装Oracle 9i</title>
      <link>https://forzw.com/archives/583/</link>
      <pubDate>Thu, 30 Dec 2010 03:47:46 +0000</pubDate>
      <guid>https://forzw.com/archives/583/</guid>
      <description>&lt;p&gt;系统环境：SuSE 9.1，9.2，9.3，10.1 oracle版本：9i（R2）&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;
&lt;p&gt;编辑 /etc/security/limits.conf 并添加下行参数：&lt;/p&gt;</description>
    </item>
    <item>
      <title>在Fedora上安装Oracle 9i</title>
      <link>https://forzw.com/archives/582/</link>
      <pubDate>Thu, 30 Dec 2010 03:47:07 +0000</pubDate>
      <guid>https://forzw.com/archives/582/</guid>
      <description>&lt;p&gt;系统环境：Fedora Core 2,3,4,5,6 oracle版本：9i（R2）&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.msgmnb = 65536
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;
&lt;p&gt;编辑 /etc/security/limits.conf 并添加下行参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;* - nproc 16384
* - nofile 16384   
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3，创建oracle目录&lt;/p&gt;</description>
    </item>
    <item>
      <title>在RedHat及其衍生系统上安装Oracle 9i</title>
      <link>https://forzw.com/archives/581/</link>
      <pubDate>Thu, 30 Dec 2010 03:46:25 +0000</pubDate>
      <guid>https://forzw.com/archives/581/</guid>
      <description>&lt;p&gt;系统环境：RedHat (Oracle) Enterprise 4 x86 and x86_64 oracle版本：9i(R2)&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.msgmnb = 65536
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;
&lt;p&gt;编辑 /etc/security/limits.conf 并添加下行参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;* - nproc 16384
* - nofile 16384   
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3，创建oracle目录&lt;/p&gt;</description>
    </item>
    <item>
      <title>在Solaris上安装Oracle 10g</title>
      <link>https://forzw.com/archives/580/</link>
      <pubDate>Thu, 30 Dec 2010 03:45:33 +0000</pubDate>
      <guid>https://forzw.com/archives/580/</guid>
      <description>&lt;p&gt;系统环境：Solaris 10 x86 oracle版本：oracle 10gR2&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，创建oracle用户以及其所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -G dba -m -d /export/home/oracle -s /usr/bin/bash oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，设置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/system 文件添加下行&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;set noexec_user_stack=1 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;执行下面命令&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# projadd -U oracle -K &amp;#34;project.max-shm-memory=(priv,4g,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-sem-nsems=(priv,256,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-sem-ids=(priv,100,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-shm-ids=(priv,100,deny)&amp;#34; user.oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;可以通过&amp;quot;prctl -i project user.oracle&amp;quot; 命令对配置进行检查&lt;/p&gt;
&lt;p&gt;3，创建oracle目录&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mkdir /opt/oracle
# mkdir /opt/oracle/102
# chown -R oracle:dba /opt/oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;4，设置oracle环境变量&lt;/p&gt;</description>
    </item>
    <item>
      <title>在 Solaris 11上安装Oracle 11g</title>
      <link>https://forzw.com/archives/579/</link>
      <pubDate>Thu, 30 Dec 2010 03:44:30 +0000</pubDate>
      <guid>https://forzw.com/archives/579/</guid>
      <description>&lt;p&gt;系统环境： Solaris 11 Express x86 and SPARC oracle版本：Oracle 11g Release 2&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，创建oracle用户以及其所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# groupadd oinstall
# groupadd asmdba
# groupadd asmadmin
# useradd -g oinstall -G dba,asmdba,asmadmin -m -d /export/home/oracle -s /usr/bin/bash oracle
# passwd oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，设置系统参数&lt;/p&gt;
&lt;p&gt;执行下面命令&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# projadd -U oracle -K &amp;#34;project.max-shm-memory=(priv,5g,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-sem-nsems=(priv,512,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-sem-ids=(priv,128,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-shm-ids=(priv,128,deny)&amp;#34; user.oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;可以通过&amp;quot;prctl -i project user.oracle&amp;quot; 命令对配置进行检查&lt;/p&gt;</description>
    </item>
    <item>
      <title>在Solaris 10上安装Oracle 11g</title>
      <link>https://forzw.com/archives/578/</link>
      <pubDate>Thu, 30 Dec 2010 03:43:20 +0000</pubDate>
      <guid>https://forzw.com/archives/578/</guid>
      <description>&lt;p&gt;系统环境：Solaris 10 X86_64 oracle版本：Oracle 11g Release 2&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，创建oracle用户以及其所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# groupadd oinstall
# groupadd asmdba
# groupadd asmadmin
# useradd -g oinstall -G dba,asmdba,asmadmin -m -d /export/home/oracle -s /usr/bin/bash oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，设置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/system 文件添加下行&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;set noexec_user_stack=1 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;执行下面命令&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# projadd -U oracle -K &amp;#34;project.max-shm-memory=(priv,4g,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-sem-nsems=(priv,512,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-sem-ids=(priv,128,deny)&amp;#34; user.oracle
# projmod -sK &amp;#34;project.max-shm-ids=(priv,128,deny)&amp;#34; user.oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;可以通过&amp;quot;prctl -i project user.oracle&amp;quot; 命令对配置进行检查&lt;/p&gt;</description>
    </item>
    <item>
      <title>在SUSE上安装oracle 11gR1</title>
      <link>https://forzw.com/archives/577/</link>
      <pubDate>Wed, 29 Dec 2010 14:45:17 +0000</pubDate>
      <guid>https://forzw.com/archives/577/</guid>
      <description>&lt;p&gt;系统环境：SUSE 10.3 X86_64 OpenSUSE 10.3 X86_64 oracle版本：11.1.0.6.0&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;</description>
    </item>
    <item>
      <title>在RedHat及其衍生系统上安装Oracle 11gR1</title>
      <link>https://forzw.com/archives/576/</link>
      <pubDate>Wed, 29 Dec 2010 14:39:29 +0000</pubDate>
      <guid>https://forzw.com/archives/576/</guid>
      <description>&lt;p&gt;oracle版本：11.1.0.6.0 redhat版本：RedHat EL4,5 Oracle EL 4,5 CentOS 4,5&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;</description>
    </item>
    <item>
      <title>在SUSE上安装Oracle 10g</title>
      <link>https://forzw.com/archives/575/</link>
      <pubDate>Wed, 29 Dec 2010 14:34:55 +0000</pubDate>
      <guid>https://forzw.com/archives/575/</guid>
      <description>&lt;p&gt;系统环境：SUSE ES9，SUSE Profesional 9.1 9.2 9.3 oracle版本：10.2.0.1.0&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;</description>
    </item>
    <item>
      <title>在Fedora上安装Oracle 10g</title>
      <link>https://forzw.com/archives/574/</link>
      <pubDate>Wed, 29 Dec 2010 14:30:20 +0000</pubDate>
      <guid>https://forzw.com/archives/574/</guid>
      <description>&lt;p&gt;系统环境：Fedora 2、3、4、5、6、7 Oracle版本：10.2.0.1.0&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，创建oracle用户以及其所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，设置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;
&lt;p&gt;编辑 /etc/pam.d/login 文件，并添加下行参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;session required /lib/security/pam_limits.so 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑 /etc/security/limits.conf 并添加下行参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;oracle    soft  nproc  2047
oracle    hard  nproc  16384
oracle    soft  nofile  1024
oracle    hard  nofile  65536  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;禁用selinux，这个只是在Fedora 4版本中进行 编辑 /etc/selinux/config 改变SELINUX值为”disabled“&lt;/p&gt;</description>
    </item>
    <item>
      <title>在RedHat系统以及衍生系统生安装Oracle 10g</title>
      <link>https://forzw.com/archives/564/</link>
      <pubDate>Tue, 21 Dec 2010 10:19:36 +0000</pubDate>
      <guid>https://forzw.com/archives/564/</guid>
      <description>&lt;p&gt;版本：v1.0 创建时间：2010-12-21 修改时间：2010-12-22 文档描述： 在RedHat EL 3,4,5或者CentOS 3,4,5或者Oracle Enterprise Linux 4,5上安装Oracle 10g Release 2&lt;/p&gt;
&lt;p&gt;这篇文章描述Oracle 10g R2在红帽企业版 3,4,5和Oracle企业版 4,5系统上的安装步骤，由于centos和redhat的关系，这篇文章同样适用于centos 3,4,5版本。 文中并不涉及数据库建立具体过程以及ASM存储的设置步骤。 安装过程分下面几个步骤： 一、安装环境的准备 二、下载软件并安装 三、安装后的配置 四、常见安装错误&lt;/p&gt;
&lt;p&gt;一、安装环境的准备 1，创建oracle用户 以root用户登录系统创建oracle用户以及其所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，系统参数设置 编辑/etc/sysctl.conf并添加下面内容&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;注意：编辑完成后你需要重启系统，或者执行 ”sysctl -p“ 命令使配置生效。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle,MySQL数据库自动备份实例</title>
      <link>https://forzw.com/archives/560/</link>
      <pubDate>Fri, 10 Dec 2010 08:48:04 +0000</pubDate>
      <guid>https://forzw.com/archives/560/</guid>
      <description>&lt;p&gt;1，关于Oracle，由于我需要备份的Oracle数据库较小，所以采用exp方式，脚本如下&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#环境变量
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
export ORACLE_SID=test1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib32
export LD_LIBRARY_PATH_64=$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib 
#进行备份
exp test/test@test1 file=/data/bakup/test_15day.dmp direct=y
#由于exp未主动覆盖备份文件，这里就采用mv重命名
mv -f test_15day.dmp test.dmp
#将备份进行压缩存档
gzip -c /data/bakup/test.dmp &amp;gt; /data/bakup/test_`date +%y%m%d%H%M`.gz
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;若是oracle备份，在远端主机，可以用scp拖回本地，这里采用expect工具自动登录&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/usr/bin/expect -f
#定义密码
set password oracle
#下载过程
spawn scp oracle@10.0.0.1:/data/backup/test.dmp /data/oracle_backup_test/
set timeout 200
expect &amp;#34;oracle@10.0.0.1&amp;#39;s password:&amp;#34;
set timeout 200
send &amp;#34;$password\r&amp;#34;
set timeout 200
send &amp;#34;exit\r&amp;#34;
expect eof
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，关于MySQL，这里采用mysqldump工具进行导出，命令较为简单&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#命令中包含地址，用户名密码，数据库名称，其中数据库名称可以为多个
mysqldump -h 10.0.0.9 -ubackup -p123456 test &amp;gt; /data/mysql_backup/test.sql
#这里通过拷贝进行归档
cp /data/mysql_backup/test.sql /data/mysql_backup/backup-`date +%y%m%d%H%M`.sql
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3，备份的压缩归档，通过压缩可以减少存储空间的占用&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle用户权限表的管理方法</title>
      <link>https://forzw.com/archives/558/</link>
      <pubDate>Fri, 03 Dec 2010 09:01:16 +0000</pubDate>
      <guid>https://forzw.com/archives/558/</guid>
      <description>&lt;p&gt;我们将从创建Oracle用户权限表 开始谈起，然后讲解登陆等一般性动作，使大家对Oracle用户权限表有个深入的了解。&lt;/p&gt;
&lt;p&gt;一、创建 sys;//系统管理员，拥有最高权限 system;//本地管理员，次高权限 scott;//普通用户，密码默认为tiger,默认未解锁 sys;//系统管理员，拥有最高权限 system;//本地管理员，次高权限 scott;//普通用户，密码默认为tiger,默认未解锁&lt;/p&gt;
&lt;p&gt;二、 登陆 sqlplus / as sysdba;//登陆sys帐户 sqlplus sys as sysdba;//同上 sqlplus scott/tiger;//登陆普通用户scott sqlplus / as sysdba;//登陆sys帐户 sqlplus sys as sysdba;//同上 sqlplus scott/tiger;//登陆普通用户scott  三、管理用户 create user zhangsan;//在管理员帐户下，创建用户zhangsan alert user scott identified by tiger;//修改密码 create user zhangsan;//在管理员帐户下，创建用户zhangsan alert user scott identified by tiger;//修改密码&lt;/p&gt;
&lt;p&gt;四，授予权限&lt;/p&gt;
&lt;p&gt;1、默认的普通用户scott默认未 解锁，不能进行那个使用，新建的用户也没有任何权限，必须授予权限 /*管理员授权*/ grant create session to zhangsan;//授予zhangsan用户创建session的权限，即登陆权限 grant unlimited session to zhangsan;//授予zhangsan用户使用表空间的权限 grant create table to zhangsan;//授予创建表的权限 grante drop table to zhangsan;//授予删除表的权限 grant insert table to zhangsan;//插入表的权限 grant update table to zhangsan;//修改表的权限 grant all to public;//这条比较重要，授予所有权限（all）给所有用户（public） /*管理员授权*/ grant create session to zhangsan;//授予zhangsan用户创建session的权限，即登陆权限 grant unlimited session to zhangsan;//授予zhangsan用户使用表空间的权限 grant create table to zhangsan;//授予创建表的权限 grante drop table to zhangsan;//授予删除表的权限 grant insert table to zhangsan;//插入表的权限 grant update table to zhangsan;//修改表的权限 grant all to public;//这条比较重要，授予所有权限（all）给所有用户（public）&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle 用户、表空间、授权的删除及创建</title>
      <link>https://forzw.com/archives/557/</link>
      <pubDate>Fri, 03 Dec 2010 08:56:37 +0000</pubDate>
      <guid>https://forzw.com/archives/557/</guid>
      <description>&lt;p&gt;#删除用户下所有内容&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;drop user XXXX cascade;
drop tablespace XXXX INCLUDING CONTENTS;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;#创建表空间&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;create tablespace test_data    
logging    
datafile &amp;#39;/app/u01/oradata/test_data.dbf&amp;#39;    
size 32m    
autoextend on    
next 32m maxsize 2048m    
extent management local; 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;#创建临时表空间&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;create temporary tablespace test_temp    
tempfile &amp;#39;/app/u01/oradata/test_temp.dbf&amp;#39;    
size 32m    
autoextend on    
next 32m maxsize 2048m    
extent management local;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;#创建用户并指定表空间&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;create user username identified by password    
default tablespace test_data    
temporary tablespace test_temp; 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;#授权&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;grant connect,resource to username;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;#之后就可以用imp导入数据，用上面创建的用户登录后的创建的数据会默认指定表空间&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle 11g OCA与OCP认证考试途径</title>
      <link>https://forzw.com/archives/555/</link>
      <pubDate>Wed, 24 Nov 2010 02:26:38 +0000</pubDate>
      <guid>https://forzw.com/archives/555/</guid>
      <description>&lt;p&gt;11g OCA认证考试途径：（两门考试、无需培训）&lt;/p&gt;
&lt;p&gt;途径一：1z0-007 + 1z0-052 途径二：1z0-051 + 1z0-052 途径三：1z0-047 + 1z0-052&lt;/p&gt;
&lt;p&gt;11g OCP认证考试途径：（叁门考试 + 一门原厂培训）&lt;/p&gt;
&lt;p&gt;途径一：OCA（1z0-007 + 1z0-052） + 1z0-053 + 一门原厂培训&lt;/p&gt;
&lt;p&gt;1z0-007 Introduction to Oracle9i: SQL 1z0-052 Oracle Database 11g: Administration I 1z0-053 Oracle Database 11g: Administration II&lt;/p&gt;
&lt;p&gt;途径二：OCA（1z0-051 + 1z0-052） + 1z0-053 + 一门原厂培训  1z0-051 Oracle Database 11g: SQL Fundamentals I 1z0-052 Oracle Database 11g: Administration I 1z0-053 Oracle Database 11g: Administration II&lt;/p&gt;
&lt;p&gt;途径三：OCA（1z0-047 + 1z0-052） + 1z0-053 + 一门原厂培训&lt;/p&gt;</description>
    </item>
    <item>
      <title>使用Oracle Sql Developer连接mysql、sqlserver</title>
      <link>https://forzw.com/archives/551/</link>
      <pubDate>Wed, 17 Nov 2010 09:22:02 +0000</pubDate>
      <guid>https://forzw.com/archives/551/</guid>
      <description>&lt;p&gt;1,下载mysql和sqlserver驱动包 #mysql 下载时候选择台湾大学的镜像，比较快 &lt;a href=&#34;http://dev.mysql.com/downloads/connector/j/&#34;&gt;http://dev.mysql.com/downloads/connector/j/&lt;/a&gt; #sqlserver 用开源的，比官方的稳定 &lt;a href=&#34;http://sourceforge.net/projects/jtds/files/&#34;&gt;http://sourceforge.net/projects/jtds/files/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2,配置 解压包中的jar文件到特定目录，自己选择一般放在sqldeveloper下的jdbc中。 打开打开sql developer，依次点击菜单：工具-首选项-数据库-第三方JDBC驱动程序，点击添加条目按钮。 将两个数据库的jar包添加过来。&lt;/p&gt;
&lt;p&gt;3,连接 点击新建连接，就可以看到mysql，sqlserver和sybase选项卡，相应连接即可。 这里我测试到mysql一次只能打开一个表的选项卡。&lt;/p&gt;</description>
    </item>
    <item>
      <title>oracle 10g rac 安装图解</title>
      <link>https://forzw.com/archives/472/</link>
      <pubDate>Thu, 27 May 2010 07:36:08 +0000</pubDate>
      <guid>https://forzw.com/archives/472/</guid>
      <description>&lt;p&gt;规划：所用linux系统以虚拟化方式安装在esx上，配置有内网的yum源，各分配有16G存储，下面为简单拓扑图&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://media.forzw.com/blog/2016/rac.jpg&#34;&gt;&lt;/p&gt;
&lt;p&gt;一，下载软件 1,地址：http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linx8664soft.html 10201_database_linux_x86_64.cpio.gz 10201_clusterware_linux_x86_64.cpio.gz&lt;/p&gt;
&lt;p&gt;2,地址：http://www.oracle.com/technology/software/tech/linux/asmlib/rhel5.html oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm oracleasmlib-2.0.4-1.el5.x86_64.rpm oracleasm-support-2.1.3-1.el5.x86_64.rpm&lt;/p&gt;
&lt;p&gt;二，安装环境 1，系统：centos 5.4 x86_64 2，外部存储：linux下的iscsi 3, iscsi服务器配置&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#下载iSCSI Enterprise Target
wget http://nchc.dl.sourceforge.net/sourceforge/iscsitarget/iscsitarget-0.4.17.tar.gz

#解压缩
tar -zxvf iscsitarget-0.4.17.tar.gz
cd iscsitarget-0.4.17

#编译、安装
make
make install

#配置服务
chkconfig --level 2345 iscsi-target on
service iscsi-target start

#配置第一个iSCSI设备
#在/opt/下生成64G大的空洞设备文件
#请将opt修改为实际的目录，并根据实际情况设置设备文件大小
#生成空洞文件速度很快的，且在真正使用之前不占用磁盘实际空间
dd if=/dev/zero of=/opt/iscsi.[配置文件中Target的名称].img bs=1G count=64 seek=64

#cout是从什么开始，一般设置为0
#生成256G的例子
dd if=/dev/zero of=/opt/iscsi/iqn.2009-04.com.haoyuan-inc:storage.disk.oracle.01.img bs=1G count=0 seek=256

vim /etc/ietd.conf
#编辑Target名称，例如：iqn.2009-04.com.haoyuan-inc:storage.disk.share.01
#编辑LUN段内容，例如：Lun 0 Path=/opt/iscsi.iqn.2009-04.com.haoyuan-inc:storage.disk.share.01.image,Type=fileio
#不要设置XXXUser，允许任何人访问

#重启iscsi-target
service iscsi-target restart
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;三，安装准备&lt;/p&gt;</description>
    </item>
    <item>
      <title>linux 中oracle 10g rac 关闭crs开机自启动</title>
      <link>https://forzw.com/archives/426/</link>
      <pubDate>Wed, 24 Feb 2010 06:06:14 +0000</pubDate>
      <guid>https://forzw.com/archives/426/</guid>
      <description>&lt;p&gt;linux 中在没有对init.crs作修改的时候,在开机时总是会自动把的cluster 软件和一起和系统起来.数据库raclinux&lt;/p&gt;
&lt;p&gt;另外，也可以通过crs-stat -t查看，把没有启动的服务手工启动&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.....CRM.cs application    OFFLINE   OFFLINE              
ora....db1.srv application    OFFLINE   OFFLINE              
ora.devdb.db   application    ONLINE    ONLINE    rac1       
ora....b1.inst application    ONLINE    ONLINE    rac1       
ora....b2.inst application    ONLINE    OFFLINE              
ora....SM1.asm application    ONLINE    ONLINE    rac1       
ora....C1.lsnr application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    ONLINE    ONLINE    rac1       
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   application    ONLINE    ONLINE    rac1       
ora....SM2.asm application    ONLINE    OFFLINE              
ora....C2.lsnr application    ONLINE    OFFLINE              
ora.rac2.gsd   application    ONLINE    OFFLINE              
ora.rac2.ons   application    ONLINE    OFFLINE              
ora.rac2.vip   application    ONLINE    ONLINE    rac1 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;禁止Clusterware在系统重启后自动启动：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle数据库常用基本命令</title>
      <link>https://forzw.com/archives/416/</link>
      <pubDate>Tue, 26 Jan 2010 11:57:20 +0000</pubDate>
      <guid>https://forzw.com/archives/416/</guid>
      <description>&lt;p&gt;1、得到数据库名和创建日期&lt;/p&gt;
&lt;p&gt;SELECT name, created, log_mode, open_mode FROM v$database;&lt;/p&gt;
&lt;p&gt;2、ORACLE数据库的计算机的主机名，ORACLE数据库的实例名及ORACLE数据库管理系统的版本信息&lt;/p&gt;
&lt;p&gt;SELECT host_name, instance_name, version FROM v$instance;&lt;/p&gt;
&lt;p&gt;3、为了知道oracle数据库版本的一些特殊信息&lt;/p&gt;
&lt;p&gt;select * from v$version;&lt;/p&gt;
&lt;p&gt;4、获取控制文件名字&lt;/p&gt;
&lt;p&gt;select * from v$controlfile;&lt;/p&gt;
&lt;p&gt;5、得到Oracle数据库的重做日志配置信息&lt;/p&gt;
&lt;p&gt;SELECT group#, members, bytes, status, archived FROM v$log;&lt;/p&gt;
&lt;p&gt;select GROUP#,MEMBER from v$logfile;&lt;/p&gt;
&lt;p&gt;6、获取oracle的每个重做日志（成员）文件所存放的具体位置&lt;/p&gt;
&lt;p&gt;select * from v$logfile;&lt;/p&gt;
&lt;p&gt;7、知道ORACLE数据库的备份和恢复策略和归档文件的具体位置&lt;/p&gt;
&lt;p&gt;archive log list&lt;/p&gt;
&lt;p&gt;8、知道ORACLE数据库中到底有多少表空间以及每个表空间的状态&lt;/p&gt;
&lt;p&gt;select tablespace_name, block_size, status, contents, logging from dba_tablespaces;&lt;/p&gt;
&lt;p&gt;select tablespace_name, status from dba_tablespaces;&lt;/p&gt;
&lt;p&gt;9、知道每个表空间存在哪个磁盘上以及文件的名字等信息&lt;/p&gt;
&lt;p&gt;SELECT file_id, file_name, tablespace_name, status, bytes from dba_data_files;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle 11g Software Installation on Linux—CentOS-5</title>
      <link>https://forzw.com/archives/395/</link>
      <pubDate>Mon, 07 Dec 2009 18:02:25 +0000</pubDate>
      <guid>https://forzw.com/archives/395/</guid>
      <description>&lt;p&gt;Introduction 　　This paper takes a look at installing oracle 11g (11.1) on Linux (CentOS-5).You can read about CentOS at &lt;a href=&#34;https://www.centos.org&#34;&gt;www.centos.org&lt;/a&gt; and be assured of its&amp;rsquo; Enterprise-class quality. This paper will use oracle&amp;rsquo;s Quick Installation Guide for Linux x86 as its&amp;rsquo; guide—noting where additional information may be obtained but getting oracle installed on Linux as fast as possible. We at thecheapdba.com have years of experience installing oracle—starting back with oracle 7. We will point out best practices so that you end up with a reliable database that provides exceptional performance. We will occasionally re-visit, edit, and post additions to this paper as we find further configuration best practices. 　　This paper will not cover the installation of CentOS-5 as that can be acquired through the CentOS website and additional Linux guides. We will however point out those alterations to the Linux environment that pertains to getting oracle installed. 　　Our goal is to provide you with the steps to properly install the oracle 11g software without having to read oracle&amp;rsquo;s installation guide from front to back cover. We will provide you the commands to execute (just cut-n-paste) and the desired outcome of those commands. If you get something other than what is expected it would be time for you to re-visit earlier steps in this process. So hold on, here we go. 　　It is assumed that the installer of oracle software has access and is running on an X Window System workstation. Please consult X Server documentation if you need help. We at thecheapdba.com typically will use cygwin ( &lt;a href=&#34;https://www.cygwin.com&#34;&gt;www.cygwin.com&lt;/a&gt; ) for all interfacing with our Linux distribution. It has an X Window System that works quite well—and as we always like is free. 　　Checking Hardware Requirements 　　Log into the CentOS-5 system as the root user. 　　For setting up the system to be used by oracle there are a few prerequisites that must be checked and possibly changed by the root user. Log in as the root user and this document will tell you when it is time to switch from the root user to someone else. 　　How much memory 　　command: grep -i memtotal /proc/meminfo 　　results: should be at least 1GB 　　How much swap 　　command: grep -i swaptotal /proc/meminfo 　　results: should be 1.5 the size of memtotal if memtotal &amp;lt; 2GB 　　should be equal to memtotal if memtotal is between 2GB and 8GB 　　should be .75 the size of memtotal if memtotal &amp;gt; 8GB 　　What processor type 　　command: grep &amp;ldquo;model name&amp;rdquo; /proc/cpuinfo 　　results: informational 　　How much available RAM and swap 　　command: free 　　results: informational 　　How much shared memory available 　　command: df -k /dev/shm 　　results: informational 　　purpose: The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each oracle instance on the computer. 　　How much disk space in /tmp 　　command: df -k /tmp 　　results: should have at least 400MB available 　　How much disk space for oracle binaries 　　command: df -k 　　results: Depending on installation type you should have between 1.5GB and 3.5GB 　　Checking Software Requirements 　　What distribution and version of Linux is installed 　　command: cat /proc/version 　　results: Linux version 2.6.18-8.1.15.el5 (&lt;a href=&#34;mailto:mockbuild@builder6.centos.org&#34;&gt;mockbuild@builder6.centos.org&lt;/a&gt;) 　　(gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) 　　#1 SMP Mon Oct 22 08:32:04 EDT 2007 　　What version of the kernel is installed 　　command: uname -r 　　results: 2.6.18-8.1.15.el5 　　Are the following packages installed (assumes CentOS-5 and above distribution) 　　command:rpm -q binutils \ 　　compat-libstdc++ \ 　　elfutils-libelf \ 　　elfutils-libelf-devel \ 　　glibc \ 　　glibc-common \ 　　glibc-devel \ 　　glibc-headers \ 　　gcc \ 　　gcc-c++ \ 　　libaio-devel \ 　　libaio \ 　　libgcc \ 　　libstdc++ \ 　　libstdc++ \ 　　make \ 　　sysstat \ 　　unixODBC \ 　　unixODBC-devel 　　results: you will probably get quite a few packages that are not installed with a typical installation. You can investigate missing packages with the following command making sure you add/subtract from this list if necessary. 　　yum list available &amp;ldquo;compat*&amp;rdquo; \ 　　&amp;ldquo;elfutils*&amp;rdquo; \ 　　&amp;ldquo;glibc*&amp;rdquo; \ 　　&amp;ldquo;gcc*&amp;rdquo; \ 　　&amp;ldquo;libaio*&amp;rdquo; \ 　　&amp;ldquo;sysstat*&amp;rdquo; \ 　　&amp;ldquo;unixODBC*&amp;rdquo; 　　action : Our base installation left us needing to issue the following command to install missing packages. 　　yum -y install compat-libstdc++-296.i386 \ 　　compat-libstdc++-33.i386 \ 　　elfutils-libelf-devel.i386 \ 　　glibc-devel.i386 \ 　　glibc-headers.i386 \ 　　gcc.i386 \ 　　gcc-c++.i386 \ 　　libaio-devel.i386 \ 　　sysstat.i386 \ 　　unixODBC.i386 \ 　　unixODBC-devel.i386 　　Create oracle user and group 　　Create groups oinstall &amp;amp; dba 　　command: /usr/sbin/groupadd oinstall 　　/usr/sbin/groupadd dba 　　Create the oracle and change password 　　command: /usr/sbin/useradd -g oinstall -G dba -s /bin/bash oracle 　　/usr/bin/passwd oracle 　　Validate the nobody user exists 　　command: /usr/bin/id nobody 　　results: this user is almost always created on a base CentOS installation 　　action : if this user is not created use the following command to create 　　/usr/sbin/useradd nobody 　　Configuring kernel parameters 　　The following kernel parameters must be validated and possibly changed. Use the commands given below to view a particular kernel setting and then change if the setting is lower than the recommendation given in the following table. 　　You can make the changes by editing the /etc/sysctl.conf file and then rebooting the server. The following results are what we observed on our server and should not be expected on yours. 　　shmmni 　　4096 　　shmall 　　2097152 　　shmmax 　　2147483648 　　semmsl 　　250 　　semmns 　　32000 　　semopm 　　100 　　semmni 　　128 　　file-max 　　65536 　　ip_local_port_range 　　1024 - 65000 　　rmem_default 　　1048576 　　rmem_max 　　1048576 　　wmem_default 　　262144 　　wmem_max 　　262144 　　command: /sbin/sysctl -a | grep kernel.sem 　　results: kernel.sem = 250 32000 100 128 　　command: /sbin/sysctl -a | grep kernel.shm 　　results: kernel.shmmni = 4096 　　kernel.shmall = 268435456 　　kernel.shmmax = 4294967295 　　command: /sbin/sysctl -a | grep file-max 　　results: fs.file-max = 102440 　　command: /sbin/sysctl -a | grep ip_local_port_range 　　results: net.ipv4.ip_local_port_range = 32768 61000 　　command: /sbin/sysctl -a | grep rmem_default 　　results: net.core.rmem_default = 109568 　　command: /sbin/sysctl -a | grep rmem_max 　　results: net.core.rmem_max = 131071 　　command: /sbin/sysctl -a | grep wmem_default 　　results: net.core.wmem_default = 109568 　　command: /sbin/sysctl -a | grep wmem_max 　　results: net.core.wmem_max = 131071 　　sample /etc/sysctl.conf file. This is given as an example only and does not reflect the results obtained above by the /sbin/sysctl commands. Only add lines that are needed and do not change any values to be lower than the base installation might have assigned. 　　kernel.shmall = 2097152 　　kernel.shmmax = 2147483648 　　kernel.shmmni = 4096 　　kernel.sem = 250 32000 100 128 　　fs.file-max = 65536 　　net.ipv4.ip_local_port_range = 1024 65000 　　net.core.rmem_default = 4194304 　　net.core.rmem_max = 4194304 　　net.core.wmem_default = 262144 　　net.core.wmem_max = 262144 　　Setting shell limits for the oracle user 　　Add the following lines to /etc/security/limits.conf 　　oracle soft nproc 2047 　　oracle hard nproc 16384 　　oracle soft nofile 1024 　　oracle hard nofile 65536 　　Add the following lines to /etc/pam.d/login 　　session required /lib/security/pam_limits.so 　　session required pam_limits.so 　　Add the following lines to /etc/profile 　　if [ $USER = &amp;ldquo;oracle&amp;rdquo; ]; then 　　if [ $SHELL = &amp;ldquo;/bin/ksh&amp;rdquo; ]; then 　　ulimit -p 16384 　　ulimit -n 65536 　　else 　　ulimit -u 16384 -n 65536 　　fi 　　fi 　　Creating Directories to Install the oracle Software 　　Validate you have enough space on disk and choose a directory to install 　　command: df -k 　　results: pick a mount point that has enough space—we have chosen /opt for the our. 　　Create subdirectories and give permissions to the oracle user 　　The following directory used is common for oracle installations. Note that we are creating all directories under /opt and that there are no other applications using /opt/app and below. This is very important as we are changing permissions with the following commands. 　　command: mkdir -p /opt/app/oracle/product/11.1.0 　　chown -R oracle:oinstall /opt/app 　　chmod -R 775 /opt/app 　　Switch to the oracle user 　　Up to know we have been doing everything as the root user. It is now time to switch to the oracle user to actually install the oracle software. 　　command: su – oracle 　　Add the following line to $HOME/.bash_profile 　　umask 022 　　Execute oracle&amp;rsquo;s bash_profile to use new setting 　　command: . ./.bash_profile 　　Make sure the oracle user is using an X Windows System 　　It is assumed you know how to set up an X Windows System as stated earlier in the document. Please verify it is working by issuing the xterm command and validating an X Terminal comes up. You may close the X Terminal if you wish. 　　Set oracle environment for the installation 　　Issue the following commands to set/unset particular oracle environments in preparation for the installation. 　　command: export orACLE_BASE=/opt/app/oracle 　　export orACLE_SID=orcl 　　unset orACLE_HOME 　　unset TNS_ADMIN 　　Start oracle Installer 　　This paper assumes you have downloaded the oracle software from the net and have unzipped the files. We have unzipped our software into /opt and the following commands will take you through starting the oracle installer form that mount point. 　　command: cd /opt/database 　　./runInstaller 　　From this point, oracle will do a few minor checks on the operating system and then put up the oracle Installation screen. Our particular configuration did not throw any errors at this point but it should be noted, as it can be helpful, that sometimes the oracle installer will complain at this very early stage about various Linux system configurations. If this is the case you might be able to bypass them by adding an additional argument to the runInstaller command. Please only use this as a last resort to the normal installation path. 　　command: ./runInstaller -ignoreSysPrereqs 　　From this point on we will walk through each of the prompts one at a time to give you a simple feel for a full installation of the oracle software. 　　Select installation method 　　This screen is very busy to say the least. We are not going to create any databases at this point as it is not required nor is it suggested to do at this point. We like to create databases separately through the Database Creation Assistant (DBCA) and not confuse the software installation process. 　　1. Choose basic installation 　　1. verify oracle Base of &amp;lsquo;/opt/app/oracle&amp;rsquo; 　　2. verify oracle Home of &amp;lsquo;/opt/app/oracle/product/11.1.0/db_1&amp;rsquo; 　　3. verify installation type of &amp;lsquo;Enterprise Edition&amp;rsquo; 　　4. verify dba group of &amp;lsquo;dba&amp;rsquo; 　　2. Un-check “Create Starter Database” 　　3. Un-check “Advanced Installation” 　　4. Click 　　Specify Inventory directory and credentials 　　1. verify path of inventory directory of &amp;lsquo;/opt/app/oraInventory&amp;rsquo; 　　2. verify group name for install of &amp;lsquo;oinstall&amp;rsquo; 　　3. Click 　　Product-Specific Prerequisite Checks 　　This screen, the installer will verify the system environment and report on any issues it may find. If all goes well you will get the status of &amp;lsquo;Succeeded&amp;rsquo; for every check. Scroll through and make sure nothing has failed or look at the status box at the bottom of the screen and verify you get the following: 　　&amp;lsquo;Check complete. The overall result of this check is: Passed&amp;rsquo; 　　1. verify all statuses 　　2. Click 　　Summary 　　This screen give a summary of the installation you are about to perform. It can be interesting to click and expand the products being installed to give you an idea of the what product and version is going to be installed. 　　1. validate &amp;lsquo;Global Settings&amp;rsquo; for directories 　　2. validate &amp;lsquo;Space Requirements&amp;rsquo; 　　3. Click 　　Install 　　This screen gives a status of what is being installed. If all system settings have been properly set and all packages been installed properly then this should proceed without error. The status bar gives some indication of what is being installed at a particular point and the amount of work to be performed. But as all status bars you never really know how long in the process it is. 　　1. Note the time it takes for specific products. If you notice one hanging or taking a long amount of time (greater than 10 minutes) you could have a condition that requires a pre-installation patch. Don&amp;rsquo;t stop the installer yet but instead start looking for a bug / patch for the oracle 11g installation process and the actual product being installed. 　　2. Execute Configuration scripts 　　1. open up a different terminal window 　　2. login as the root user 　　3. run /opt/app/oraInventory/orainstRoot.sh 　　4. run /opt/app/oracle/product/11.1.0/db_1/root.sh 　　1. accept default of /usr/local/bin 　　5. Click 　　3. Click 　　4. Click 　　Cleanup 　　1. If you downloaded the software from the net you can now remove .zip file and the complete directory structure you unzipped it to. That particular command is not given here as it can be quite disastrous if executed from the wrong directory. 　　2. Add the following lines to oracle&amp;rsquo;s $HOME/.bash_profile file. This will allow you to execute various oracle binaries to create databases, configure network settings, and generally manage the oracle database environment. 　　export orACLE_HOME=/opt/app/oracle/product/11.1.0/db_1 　　export PATH=$ORACLE_HOME/bin:$PATH 　　Installation is complete 　　Congratulations on a successful installation of the oracle software. This paper hopefully was also successful in its attempt to guide you down a more simplistic path—giving you the commands to execute and working past the minor hurdles encountered during installation. Obviously this paper can not predict all the issues that you may encounter but if you have a relatively current system with ample memory and disk space there is no reason not to believe your installation wouldn&amp;rsquo;t run smoothly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ORA-27101 Shared memory realm does not exist 之解決</title>
      <link>https://forzw.com/archives/396/</link>
      <pubDate>Fri, 04 Dec 2009 18:49:23 +0000</pubDate>
      <guid>https://forzw.com/archives/396/</guid>
      <description>&lt;p&gt;在试图登录pl/sql时,输入用户名（system/pwd)后，Oracle报告下列错误： ERROR: orA-27101 Shared memory realm does not exist orA-01034 orACLE not available&lt;/p&gt;
&lt;p&gt;或者在em登录的时候报告下列错误： 错误: NMO 未 setuid-root (只适用于 Unix)&lt;/p&gt;
&lt;p&gt;查阅了相关 orA-27101 Shared memory realm does not exist orA-01034 orACLE not available 的说明，解释为ORACLE_HOME或者ORACLE_SID设置不正确。 但检查bash_profile以后没有发现错误; 錯誤點，沒有開啟oracle服務； 解決辦法，直接開啟oracle相關數據庫的服務； 或按照下面的步驟操作: lsnrctl start sqlplus &amp;lsquo;/as sysdba&amp;rsquo; sql&amp;gt; startup emctl start dbconsole isqlplusctl start&lt;/p&gt;</description>
    </item>
    <item>
      <title>oracle 10g 乱码解决</title>
      <link>https://forzw.com/archives/393/</link>
      <pubDate>Tue, 01 Dec 2009 17:57:57 +0000</pubDate>
      <guid>https://forzw.com/archives/393/</guid>
      <description>&lt;p&gt;操作系统：Red Hat Enterprise Linux AS release 4 语言安装的为英文，安装完数据库后，通过企业管理器登陆，点击的按钮显示乱码。&lt;/p&gt;
&lt;p&gt;1，重新安装中文支持 [root@tonykorn97 ~]# rpm -ivh ttfonts-zh_CN-2.14-6.noarch.rpm warning: ttfonts-zh_CN-2.14-6.noarch.rpm: V3 DSA signature: NOKEY, key ID db42a60e Preparing&amp;hellip; ########################################### [100%] 1:ttfonts-zh_CN ########################################### [100%] [root@tonykorn97 ~]# 2，安装如下步骤操作： 企业管理器已经关闭了 [root@tonykorn97 ~]# su - oracle [oracle@tonykorn97 ~]$ cd $ORACLE_HOME/jdk/jre/lib [oracle@tonykorn97 lib]$ ls -al font*zh_CN* -rwxr-xr-x 1 oracle oinstall 6854 Apr 20 2005 font.properties.zh_CN.Redhat -rwxr-xr-x 1 oracle oinstall 7410 Apr 20 2005 font.properties.zh_CN.Redhat2.1 -rwxr-xr-x 1 oracle oinstall 6845 Apr 20 2005 font.properties.zh_CN.Sun -rwxr-xr-x 1 oracle oinstall 7137 Apr 20 2005 font.properties.zh_CN_UTF8.Sun [oracle@tonykorn97 lib]$ cp font.properties.zh_CN.Redhat font.properties [oracle@tonykorn97 lib]$ cd $ORACLE_HOME/jre/1.4.2/lib/ [oracle@tonykorn97 lib]$ ls -al font*.zh_CN* -rwxr-xr-x 1 oracle oinstall 6854 Apr 6 2005 font.properties.zh_CN.Redhat -rwxr-xr-x 1 oracle oinstall 7410 Apr 6 2005 font.properties.zh_CN.Redhat2.1 -rwxr-xr-x 1 oracle oinstall 6845 Apr 6 2005 font.properties.zh_CN.Sun -rwxr-xr-x 1 oracle oinstall 7137 Apr 6 2005 font.properties.zh_CN_UTF8.Sun [oracle@tonykorn97 lib]$ cp font.properties.zh_CN.Redhat font.properties [oracle@tonykorn97 lib]$ cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs [oracle@tonykorn97 zhs]$ rm -rf *.gif [oracle@tonykorn97 zhs]$ emctl start dbconsole TZ set to PRC oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 oracle Corporation. All rights reserved. http://tonykorn97:1158/em/console/aboutApplication Starting oracle Enterprise Manager 10g Database Control &amp;hellip;&amp;hellip;.. started. &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; Logs are generated in directory /oracle/app/oracle/product/10.2.0/Database/tonykorn97_szrrlcw/sysman/log [oracle@tonykorn97 zhs]$ 参考： &lt;a href=&#34;http://www.eygle.com/archives/2006/03/oracle10g&#34;&gt;http://www.eygle.com/archives/2006/03/oracle10g&lt;/a&gt;_em_font_change.html 我当时操作的时候如果是先覆盖font.properties文件，然后关闭em,再启动em。好像不行。不知道是不是当时操作的问题。 当时先安装了中文字体，然后发现了eygle的文章，最后发现应该是不需要安装中文字体的。 后来发现如果不安装中文字体的时候，显示还是不正常，重新安装中文字体后重新操作正常。应该是需要安装中文字体的。&lt;/p&gt;</description>
    </item>
    <item>
      <title>修改oracle默认编码</title>
      <link>https://forzw.com/archives/337/</link>
      <pubDate>Fri, 09 Oct 2009 10:42:17 +0000</pubDate>
      <guid>https://forzw.com/archives/337/</guid>
      <description>&lt;p&gt;查看oracle数据库字符集： select userenv(&amp;rsquo;language&amp;rsquo;) from dual;&lt;/p&gt;
&lt;p&gt;修改过程： SQL&amp;gt; shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL&amp;gt; startup mount ORACLE instance started. Total System Global Area 135337420 bytes Fixed Size 452044 bytes Variable Size 109051904 bytes Database Buffers 25165824 bytes Redo Buffers 667648 bytes Database mounted. SQL&amp;gt; Alter SYSTEM ENABLE RESTRICTED SESSION; System altered. SQL&amp;gt; Alter SYSTEM SET JOB_QUEUE_PROCESSES=0; System altered. SQL&amp;gt; Alter SYSTEM SET AQ_TM_PROCESSES=0; System altered. SQL&amp;gt; Alter DATABASE OPEN; Database altered. SQL&amp;gt;alter database character set INTERNAL_USE UTF8 或者修改成zhs16gbk编码格式 SQL&amp;gt; alter database character set zhs16gbk&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
