Solaris8上迁移oracle8i---上

本文详细介绍了如何在Solaris8系统上迁移Oracle8i数据库,包括全备份、归档日志备份、数据库迁移、环境配置等关键步骤。涵盖了从251服务器到81服务器的迁移流程,并提供了脚本示例和故障排除建议。

Solaris8上迁移oracle8i---上

从251服务器上备份数据库,迁移到81服务器上。
两个服务器系统都是Solaris 8系统。oracle是8i 的。
root@mem #cat /etc/release
                       Solaris 8 2/04 s28s_hw4wos_05a SPARC
           Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
                            Assembled 08 January 2004
root@mem # uname -a
SunOS mem 5.8 Generic_117350-28 sun4u sparc SUNW,Sun-Fire-V890

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
PL/SQL Release 8.1.7.4.0 - Production
CORE    8.1.7.0.0       Production
TNS for Solaris: Version 8.1.7.4.0 - Production
NLSRTL Version 3.4.1.0.0 - Production


1、全备份251服务器的数据库,脚本:
bash-2.03$ cat rmanbak.sh
rman target / nocatalog <<EOF
run {
   allocate channel c1 type disk   format '/u2/oracle/rman/df_%d_%s_%p';
   allocate channel c2 type disk   format '/u2/oracle/rman/df_%d_%s_%p';
   allocate channel c3 type disk   format '/u2/oracle/rman/df_%d_%s_%p';
   allocate channel c4 type disk   format '/u2/oracle/rman/df_%d_%s_%p';
   allocate channel c5 type disk   format '/u2/oracle/rman/df_%d_%s_%p';
   allocate channel c6 type disk   format '/u2/oracle/rman/df_%d_%s_%p';
         backup database;
         sql 'alter system archive log current';
   release channel c1;
   release channel c2;
  release channel c3;
   release channel c4;
   release channel c5;
   release channel c6;
   
   # backup all archive logs
   allocate channel c1 type disk   format '/u2/oracle/rman/al_%d_%s_%p';
   allocate channel c2 type disk   format '/u2/oracle/rman/al_%d_%s_%p';
   allocate channel c3 type disk   format '/u2/oracle/rman/al_%d_%s_%p';
   allocate channel c4 type disk   format '/u2/oracle/rman/al_%d_%s_%p';
        BACKUP ARCHIVELOG ALL DELETE INPUT;
   release channel c1;
   release channel c2;
   release channel c3;
   release channel c4;
   
   # backup CONTROLFILE
   allocate channel c1 type disk   format '/u2/oracle/rman/cntrl_%d_%s_%p';
        BACKUP CURRENT CONTROLFILE;
   release channel c1;
}
EOF
bash-2.03$
bash-2.03$ cat rr.log

Recovery Manager: Release 8.1.7.4.0 - Production

RMAN-06005: connected to target database: PROD (DBID=4167122059)
RMAN-06009: using target database controlfile instead of recovery catalog

RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32>
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c1
RMAN-08500: channel c1: sid=24 devtype=DISK

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c2
RMAN-08500: channel c2: sid=33 devtype=DISK

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c3
RMAN-08500: channel c3: sid=21 devtype=DISK

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c4
RMAN-08500: channel c4: sid=35 devtype=DISK

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c5
RMAN-08500: channel c5: sid=29 devtype=DISK

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c6
RMAN-08500: channel c6: sid=34 devtype=DISK

RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08008: channel c1: starting full datafile backupset
RMAN-08502: set_count=117 set_stamp=784474080 creation_time=28-MAY-12
RMAN-08010: channel c1: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00404 name=/u5/testdata/invd05.dbf
RMAN-08522: input datafile fno=00395 name=/u5/testdata/invd03.dbf
.......................省略线..........................
RMAN-08522: input datafile fno=00375 name=/u5/testdata/pax02.dbf
RMAN-08008: channel c2: starting full datafile backupset
RMAN-08502: set_count=118 set_stamp=784474081 creation_time=28-MAY-12
RMAN-08010: channel c2: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00355 name=/u5/testdata/dxtd_db.dbf
RMAN-08522: input datafile fno=00384 name=/u5/testdata/invx03.dbf
.......................省略线..........................
RMAN-08522: input datafile fno=00377 name=/u5/testdata/benx02.dbf
RMAN-08008: channel c3: starting full datafile backupset
RMAN-08502: set_count=119 set_stamp=784474082 creation_time=28-MAY-12
RMAN-08010: channel c3: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00402 name=/u5/testdata/dxtd_db01.dbf
RMAN-08522: input datafile fno=00394 name=/u5/testdata/dxtx_db1.dbf
.......................省略线..........................
RMAN-08522: input datafile fno=00347 name=/u5/testdata/imcx01.dbf
RMAN-08522: input datafile fno=00369 name=/u5/testdata/iecx02.dbf
RMAN-08008: channel c4: starting full datafile backupset
RMAN-08502: set_count=120 set_stamp=784474087 creation_time=28-MAY-12
RMAN-08010: channel c4: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00008 name=/u5/testdata/applsysd01.dbf
RMAN-08522: input datafile fno=00356 name=/u5/testdata/dxtx_db.dbf
.......................省略线..........................
RMAN-08522: input datafile fno=00348 name=/u5/testdata/okbd01.dbf
RMAN-08522: input datafile fno=00370 name=/u5/testdata/oex02.dbf
RMAN-08522: input datafile fno=00385 name=/u5/testdata/oed02.dbf
RMAN-08008: channel c5: starting full datafile backupset
RMAN-08502: set_count=121 set_stamp=784474095 creation_time=28-MAY-12
RMAN-08010: channel c5: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00073 name=/u5/testdata/invd01.dbf
RMAN-08522: input datafile fno=00361 name=/u5/testdata/dxt_datainvx02.dbf
RMAN-08522: input datafile fno=00397 name=/u5/testdata/applsysd05.dbf
RMAN-08522: input datafile fno=00411 name=/u5/testdata/dxtd_db04.dbf
RMAN-08522: input datafile fno=00001 name=/u5/testdata/system01.dbf
RMAN-08011: including current controlfile in backupset
RMAN-08522: input datafile fno=00002 name=/u5/testdata/system02.dbf
RMAN-08522: input datafile fno=00037 name=/u5/testdata/pod01.dbf
.......................省略线..........................
RMAN-08522: input datafile fno=00352 name=/u5/testdata/cuxd01.dbf
RMAN-08522: input datafile fno=00383 name=/u5/testdata/oem_01.dbf
RMAN-08008: channel c6: starting full datafile backupset
RMAN-08502: set_count=122 set_stamp=784474105 creation_time=28-MAY-12
RMAN-08010: channel c6: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00074 name=/u5/testdata/invx01.dbf
RMAN-08522: input datafile fno=00365 name=/u5/testdata/invd02.dbf
RMAN-08522: input datafile fno=00399 name=/u5/testdata/dxtx_db2.dbf
.......................省略线..........................
RMAN-08522: input datafile fno=00351 name=/u5/testdata/xnix01.dbf
RMAN-08522: input datafile fno=00380 name=/u5/testdata/ecd02.dbf
RMAN-08013: channel c3: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/df_PROD_119_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:43:12
RMAN-08008: channel c3: starting full datafile backupset
RMAN-08502: set_count=123 set_stamp=784476674 creation_time=28-MAY-12
RMAN-08010: channel c3: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00290 name=/u5/testdata/applsysd02.dbf
RMAN-08522: input datafile fno=00368 name=/u5/testdata/applsysd03.dbf
.......................省略线..........................
RMAN-08522: input datafile fno=00349 name=/u5/testdata/okbx01.dbf
RMAN-08522: input datafile fno=00372 name=/u5/testdata/jtfx02.dbf
RMAN-08013: channel c4: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/df_PROD_120_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:50:54
RMAN-08013: channel c5: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/df_PROD_121_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:54:11
RMAN-08013: channel c1: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/df_PROD_117_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:55:11
RMAN-08013: channel c6: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/df_PROD_122_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:58:11
RMAN-08013: channel c2: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/df_PROD_118_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:59:10
RMAN-08013: channel c3: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/df_PROD_123_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:24:22

RMAN-03022: compiling command: sql
RMAN-06162: sql statement: alter system archive log current
RMAN-03023: executing command: sql

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c1

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c2

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c3

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c4

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c5

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c6

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c1
RMAN-08500: channel c1: sid=24 devtype=DISK

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c2
RMAN-08500: channel c2: sid=33 devtype=DISK

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c3
RMAN-08500: channel c3: sid=21 devtype=DISK

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c4
RMAN-08500: channel c4: sid=35 devtype=DISK

RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08009: channel c1: starting archivelog backupset
RMAN-08502: set_count=124 set_stamp=784478145 creation_time=28-MAY-12
RMAN-08014: channel c1: specifying archivelog(s) in backup set
RMAN-08504: input archivelog thread=1 sequence=2316 recid=2214 stamp=772535543
RMAN-08504: input archivelog thread=1 sequence=2317 recid=2215 stamp=772584904
.......................省略线..........................
RMAN-08504: input archivelog thread=1 sequence=2374 recid=2272 stamp=775525248
RMAN-08504: input archivelog thread=1 sequence=2375 recid=2273 stamp=775574247
RMAN-08009: channel c2: starting archivelog backupset
RMAN-08502: set_count=125 set_stamp=784478145 creation_time=28-MAY-12
RMAN-08014: channel c2: specifying archivelog(s) in backup set
RMAN-08504: input archivelog thread=1 sequence=2376 recid=2274 stamp=775623181
RMAN-08504: input archivelog thread=1 sequence=2377 recid=2275 stamp=775671986
.......................省略线..........................
RMAN-08504: input archivelog thread=1 sequence=2435 recid=2333 stamp=778678756
RMAN-08009: channel c3: starting archivelog backupset
RMAN-08502: set_count=126 set_stamp=784478145 creation_time=28-MAY-12
RMAN-08014: channel c3: specifying archivelog(s) in backup set
RMAN-08504: input archivelog thread=1 sequence=2436 recid=2334 stamp=778727885
.......................省略线..........................
RMAN-08504: input archivelog thread=1 sequence=2494 recid=2392 stamp=781495638
RMAN-08504: input archivelog thread=1 sequence=2495 recid=2393 stamp=781544539
RMAN-08009: channel c4: starting archivelog backupset
RMAN-08502: set_count=127 set_stamp=784478145 creation_time=28-MAY-12
RMAN-08014: channel c4: specifying archivelog(s) in backup set
RMAN-08504: input archivelog thread=1 sequence=2496 recid=2394 stamp=781593220
RMAN-08504: input archivelog thread=1 sequence=2497 recid=2395 stamp=781641969
.......................省略线..........................
RMAN-08504: input archivelog thread=1 sequence=2553 recid=2451 stamp=784464359
RMAN-08504: input archivelog thread=1 sequence=2554 recid=2452 stamp=784478138
RMAN-08013: channel c1: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/al_PROD_124_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:34:02
RMAN-08071: channel c1: deleting archivelog(s)
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2316.arc recid=2214 stamp=772535543
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2317.arc recid=2215 stamp=772584904
.......................省略线..........................
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2374.arc recid=2272 stamp=775525248
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2375.arc recid=2273 stamp=775574247
RMAN-08013: channel c4: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/al_PROD_127_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:34:24
RMAN-08071: channel c4: deleting archivelog(s)
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2496.arc recid=2394 stamp=781593220
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2497.arc recid=2395 stamp=781641969
.......................省略线..........................
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2553.arc recid=2451 stamp=784464359
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2554.arc recid=2452 stamp=784478138
RMAN-08013: channel c2: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/al_PROD_125_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:34:39
RMAN-08071: channel c2: deleting archivelog(s)
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2376.arc recid=2274 stamp=775623181
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2377.arc recid=2275 stamp=775671986
.......................省略线..........................
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2434.arc recid=2332 stamp=778630008
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2435.arc recid=2333 stamp=778678756
RMAN-08013: channel c3: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/al_PROD_126_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:34:45
RMAN-08071: channel c3: deleting archivelog(s)
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2436.arc recid=2334 stamp=778727885
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2437.arc recid=2335 stamp=778776599
.......................省略线..........................
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2494.arc recid=2392 stamp=781495638
RMAN-08514: archivelog filename=/u2/oracle/rman/arch/arch_1_2495.arc recid=2393 stamp=781544539

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c1

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c2

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c3

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c4

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c1
RMAN-08500: channel c1: sid=24 devtype=DISK

RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08008: channel c1: starting full datafile backupset
RMAN-08502: set_count=128 set_stamp=784480245 creation_time=28-MAY-12
RMAN-08010: channel c1: specifying datafile(s) in backupset
RMAN-08011: including current controlfile in backupset
RMAN-08013: channel c1: piece 1 created
RMAN-08503: piece handle=/u2/oracle/rman/cntrl_PROD_128_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:00:02

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c1

RMAN>

Recovery Manager complete.
bash-2.03$
bash-2.03$

2、将备份集全部rcp到81服务器上。

3、将数据库HOME打包,拷贝到81。
解压,配置环境变量ORACLE_HOME、ORACLE_SID、pfile等,首先确保能使用sqlplus连上。



更多参

Solaris8上迁移oracle8i---下




更多参考:


the specified nodes are not clusterable

根据rowid删除表中重复的行

Agent process exited abnormally during initialization

一次字符乱码的解决过程

rman实验(一)

rman实验(二)

ORA-00600: internal error code, arguments: [keltnf

ORA-00600: ORA-12012 ORA-08102解决

linux下完全删除oracle

INFO: /usr/bin/ld: crt1.o: No such file: No such file or directory

centos4.8_64上安装oracle10201建库报ORA-12547

EM乱码解决

ORA-31613 Master process DM00 failed during startup

ORA-00600: internal error code, arguments: [4194], [29], [27], [], [], [], [], []

ORA-24324 ORA-01041 ORA-03113

centos5.3升级oracle

pdksh-5.2.14-36.el5.i386.rpm

使用rman进行数据库迁移

oracle10.2.0.1升级到10.2.0.4报错

Upgrade Oracle 10g from 10.2.0.1 to 10.2.0.4 (Single Instance)

改oracle的name和dbid

修改oracle实例名

Solaris8上迁移oracle8i---上

Solaris8上迁移oracle8i---下

未备份归档日志导致数据丢失的实验

使用NBU进行数据库迁移

catalog备份数据库

RMAN FORMAT字符串格式化

Error: can not register my instance state - -1

not all alterations performed

The ASM instance configured on the local node is a single-instance ASM

/u01/crs102/bin/crsctl.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared

Initializing the Oracle ASMLib driver: [FAILED]

ORA-00245: control file backup operation failed

WARNING: failed to read mirror side 1 of virtual extent 229 logical extent

模拟恢复参数文件

Interface eth0 checked failed

import server uses ZHS16GBK character set (possible charset conversion)





<think>我们正在处理一个关于在Solaris系统上启动Oracle数据库时遇到ORA-27125错误的问题。根据引用[1]中提到的类似问题(虽然引用中是关于ORA-12560和ORA-12537的),我们可以知道查看跟踪文件(trace文件)是一种有效的诊断方法。因此,我们可以建议用户检查相关的跟踪文件以获取更多错误信息。 然而,ORA-27125错误通常与操作系统资源限制有关,特别是在Solaris系统上,它可能与共享内存段(shared memory)或信号量(semaphores)的创建有关。具体来说,ORA-27125错误表示“无法创建共享内存段”。这可能是由于操作系统内核参数设置不当,如共享内存段的最大大小(shmmax)或共享内存段的总大小(shmall)等。 解决方案通常包括以下步骤: 1. 检查当前的内核参数设置,特别是与共享内存和信号量相关的参数。 2. 调整这些参数以满足Oracle数据库的需求。 3. 重新应用内核参数设置并重启系统(如果需要)。 4. 重新启动Oracle数据库。 具体到Solaris系统,我们可以通过以下步骤进行: ### 步骤1:检查当前内核参数 使用命令`sysdef -i`来查看当前的内核参数设置。我们需要关注以下参数: - shmmax:单个共享内存段的最大大小(字节) - shmmin:单个共享内存段的最小大小(字节) - shmmni:系统范围内共享内存段的最大数量 - shmseg:每个进程可以附加的共享内存段的最大数量 - semmni:信号量集的最大数量 - semmns:系统中信号量的最大数量 - semmsl:每个信号量集中的信号量的最大数量 ### 步骤2:调整内核参数 根据Oracle的安装文档(针对特定版本),调整这些参数。例如,对于Oracle 11g,建议的shmmax至少为物理内存的一半,但不超过物理内存大小。而shmall通常设置为物理内存除以页大小(使用`pagesize`命令查看,通常为4096字节)。 编辑`/etc/system`文件(需要root权限),添加或修改类似以下的行: ``` set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=256 set shmsys:shminfo_shmseg=256 set semsys:seminfo_semmni=256 set semsys:seminfo_semmns=1024 set semsys:seminfo_semmsl=256 ``` 注意:具体的数值需要根据系统的物理内存和Oracle的要求进行调整。 ### 步骤3:重新应用内核参数 修改`/etc/system`文件后,需要重启系统以使更改生效。 ### 步骤4:重启后检查参数并启动数据库 重启后,再次运行`sysdef -i`确认参数已经生效。然后尝试启动Oracle数据库。 如果问题仍然存在,需要检查Oracle的alert日志和跟踪文件以获取更多信息。根据引用[1]中的方法,我们可以查看Oracle生成的跟踪文件(在user_dump_dest或diag目录下)来定位问题。 ### 引用说明 在解决Oracle数据库启动问题时,查看跟踪文件是常用的诊断手段[^1]。此外,调整操作系统内核参数是解决共享内存相关问题的常见方法。 §§相关问题§§ 1. 如何查看Solaris系统的当前内核参数? 2. 在调整内核参数时,如何确定Oracle数据库所需的具体数值? 3. 除了内核参数,还有哪些原因可能导致ORA-27125错误?</think>### Solaris系统启动Oracle报错ORA-27125解决方案 **错误原因分析** ORA-27125表示无法创建共享内存段("unable to create shared memory segment"),通常由以下原因导致: 1. **内核参数配置不足**:共享内存(shmmax/shmall)或信号量(semmni/semmns)参数过小 2. **内存资源不足**:物理内存或交换空间不足 3. **权限问题**:Oracle用户无权限访问`/dev/shm`目录 4. **SGA配置过大**:分配的SGA超过操作系统限制 --- ### 解决步骤 #### 步骤1:检查内核参数 使用`sysdef -i`命令检查当前值,重点关注以下参数: ```bash # 查看共享内存配置 sysdef -i | grep shm # 查看信号量配置 sysdef -i | grep sem ``` **关键参数要求**(以Oracle 11g为例): - `shmmax` ≥ SGA_MAX_SIZE(建议物理内存的50%-80%) - `shmmni` ≥ 128 - `semmni` ≥ 128 - `semmns` ≥ `semmni * semmsl`(通常≥200) #### 步骤2:修改内核参数 编辑`/etc/system`文件(需root权限): ```bash set shmsys:shminfo_shmmax=4294967295 # 4GB示例值 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=256 set shmsys:shminfo_shmseg=256 set semsys:seminfo_semmni=256 set semsys:seminfo_semmsl=256 set semsys:seminfo_semmns=4096 ``` **保存后重启系统生效**: ```bash reboot ``` #### 步骤3:检查资源限制 ```bash # 确认物理内存和交换空间 prtconf | grep Memory swap -s # 检查Oracle用户资源限制 ulimit -a ``` **要求**: - 物理内存 > SGA + PGA - 交换空间 ≥ 物理内存的1.5倍 - `max memory size`(ulimit -m)和`virtual memory`(ulimit -v)设置为unlimited #### 步骤4:验证/dev/shm权限 ```bash ls -ld /dev/shm chmod 1777 /dev/shm # 权限应为drwxrwxrwt chown root:sys /dev/shm ``` #### 步骤5:调整SGA配置 如果参数配置正确仍报错,临时减小SGA: ```sql ALTER SYSTEM SET sga_max_size=1G SCOPE=spfile; ALTER SYSTEM SET sga_target=1G SCOPE=spfile; ``` 重启实例后逐步调整到合适值。 --- ### 诊断辅助方法 1. **查看alert日志**: ```bash tail -f $ORACLE_BASE/diag/rdbms/*/*/trace/alert_*.log ``` 2. **检查操作系统错误**: ```bash dmesg | grep -i shm ``` 3. **使用truss跟踪**: ```bash truss -o oracle_truss.out sqlplus / as sysdba ``` --- ### 引用说明 在解决共享内存问题时,需综合考虑操作系统内核参数和物理资源限制[^1]。跨平台迁移时也需注意文件路径转换的配置[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值