2009年3月26日星期四

DB - Oracle reconfig database control

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\Administrator>cd C:\app\Administrator\product\11.1.0\d
b_1

C:\app\Administrator\product\11.1.0\db_1>cd bin

C:\app\Administrator\product\11.1.0\db_1\BIN>emca
C:\app\Administrator\product\11.1.0\db_1\bin\emca.bat [operation] [mode] [dbType
] [flags] [parameters]

-h | --h | -help | --help: prints this help message
-version: prints the version

-config dbcontrol db [-repos (create | recreate)] [-cluster] [-silent] [-backup]
[parameters]: configure Database Control for a database
-config centralAgent (db | asm) [-cluster] [-silent] [parameters]: configure cen
tral agent management
-config all db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [para
meters]: configure both Database Control and central agent management

-deconfig dbcontrol db [-repos drop] [-cluster] [-silent] [parameters]: de-confi
gure Database Control
-deconfig centralAgent (db | asm) [-cluster] [ -silent] [parameters]: de-configu
re central agent management
-deconfig all db [-repos drop] [-cluster] [-silent] [parameters]: de-configure b
oth Database Control and central agent management

-addInst (db | asm) [-silent] [parameters]: configure EM for a new RAC instance
-deleteInst (db | asm) [-silent] [parameters]: de-configure EM for a specified R
AC instance

-reconfig ports [-cluster] [parameters]: explicitly reassign Database Control po
rts
-reconfig dbcontrol -cluster [-silent] [parameters]: reconfigures RAC Database C
ontrol deployment

-displayConfig dbcontrol -cluster [-silent] [parameters]: displays information a
bout the RAC Database Control configuration

-migrate -from dbcontrol -to centralAgent [-repos drop] [-cluster] [-silent] [p
arameters]: migrates EM configuration from Database Control to central agent

-upgrade (db | asm | db_asm) [-cluster] [-silent] [parameters]: upgrades an earl
ier version of the EM configuration to the current version

-restore (db | asm | db_asm) [-cluster] [-silent] [parameters]: restores the cur
rent version of the EM configuration to an earlier version

Parameters and Options:
[parameters]: [ -respFile fileName ] [ -paramName paramValue ]*
db: perform configuration operation for a database (including databases that use
ASM)
asm: perform configuration operation for an ASM-only instance
db_asm: perform upgrade/restore operation for a database and an ASM instance
-repos create: create a new Database Control repository
-repos drop: drop the current Database Control repository
-repos recreate: drop the current Database Control repository and recreate a new
one
-cluster: perform configuration operation for a RAC database
-silent: perform configuration operation without prompting for parameters
-backup: configure automatic backup for a database

Parameters for single instance databases
ORACLE_HOSTNAME: Local hostname
SID: Database SID
PORT: Listener port number
ORACLE_HOME: Database ORACLE_HOME
HOST_USER: Host username for automatic backup
HOST_USER_PWD: Host user password for automatic backup
BACKUP_SCHEDULE: Automatic backup schedule (HH:MM)
EMAIL_ADDRESS: Email address for notifications
MAIL_SERVER_NAME: Outgoing Mail (SMTP) server for notifications
ASM_OH: ASM ORACLE_HOME
ASM_SID: ASM SID
ASM_PORT: ASM port
ASM_USER_ROLE: ASM user role
ASM_USER_NAME: ASM username
ASM_USER_PWD: ASM user password
SRC_OH: ORACLE_HOME for the database to be upgraded
DBSNMP_PWD: Password for DBSNMP user
SYSMAN_PWD: Password for SYSMAN user
SYS_PWD: Password for SYS user
DBCONTROL_HTTP_PORT: Database Control HTTP port
AGENT_PORT: EM agent port
RMI_PORT: RMI port for Database Control
JMS_PORT: JMS port for Database Control
EM_SWLIB_STAGE_LOC: Software library location
PORTS_FILE: Path to a static file specifying the ports to use (Default v
alue : ${ORACLE_HOME}/install/staticports.ini).

Additional Parameters for cluster databases
CLUSTER_NAME: Cluster name
DB_UNIQUE_NAME: Database unique name
SERVICE_NAME: Service name
EM_NODE: Database Control node name
EM_SID_LIST: Agent SID list [comma separated]

C:\app\Administrator\product\11.1.0\db_1\BIN>emca -config dbcontrol db

STARTED EMCA at Mar 27, 2009 4:21:55 PM
EM Configuration Assistant, Version 11.1.0.5.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform
a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: y
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Password for SYSMAN user: Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ C:\app\Administrator\product\11.1.0\db_1

Local hostname ................ cdcjp70
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Mar 27, 2009 4:23:28 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at C:\app\Administrator\cfgtoollogs\emca\or
cl\emca_2009_03_27_16_21_55.log.
Mar 27, 2009 4:23:35 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Mar 27, 2009 4:23:43 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepos
itory
INFO: Uploading configuration data to EM repository (this may take a while) ...
Mar 27, 2009 4:24:52 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Mar 27, 2009 4:24:55 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Cannot start Database Control. The following ports are already in use: [
Database Control HTTP port:1158 RMI port for Database Control:5520].
Refer to the log file at C:\app\Administrator\cfgtoollogs\emca\orcl\emca_2009_03
_27_16_21_55.log for more details.
Could not complete the configuration. Refer to the log file at C:\app\Administra
tor\cfgtoollogs\emca\orcl\emca_2009_03_27_16_21_55.log for more details.

C:\app\Administrator\product\11.1.0\db_1\BIN>

HW - Memory Limits for Windows

Ref: MSDN
http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx#physical_memory_limits_windows_server_2003

Physical Memory Limits: Windows Server 2003

The following table specifies the limits on physical memory for Windows Server 2003. Limits over 4 GB for 32-bit Windows assume that PAE is enabled.

VersionLimit in 32-bit WindowsLimit in 64-bit Windows
Windows Server 2003 with Service Pack 2 (SP2), Datacenter Edition

128 GB

64 GB with 4GT

2 TB

Windows Server 2003 with Service Pack 2 (SP2), Enterprise Edition

64 GB

2 TB

Windows Storage Server 2003, Enterprise Edition

8 GB

Not applicable

Windows Storage Server 2003

4 GB

Not applicable

Windows Server 2003 R2 Datacenter Edition

Windows Server 2003 with Service Pack 1 (SP1), Datacenter Edition

128 GB

16 GB with 4GT

1 TB

Windows Server 2003 R2 Enterprise Edition

Windows Server 2003 with Service Pack 1 (SP1), Enterprise Edition

64 GB

16 GB with 4GT

1 TB

Windows Server 2003 R2 Standard Edition

Windows Server 2003, Standard Edition SP1

Windows Server 2003, Standard Edition SP2

4 GB

32 GB

Windows Server 2003, Datacenter Edition

128 GB

16 GB with 4GT

512 GB

Windows Server 2003, Enterprise Edition

32 GB

16 GB with 4GT

64 GB

Windows Server 2003, Standard Edition

4 GB

16 GB

Windows Server 2003, Web Edition

2 GB

Not applicable

Windows Small Business Server 2003

4 GB

Not applicable

Windows Compute Cluster Server 2003

Not applicable

32 GB

HW - Windows Server 2003支持多大内存

2009年01月09日 星期五 05:11 P.M.

Windows Server 2003 Enterprise Edition(企业版)
* 支持8节点集群、NUMA;支持8路SMP
* 内存支持: (i386)32位版支持32GB内存
(X64) 64位版支持64GB内存

windows 2003 默认只支持小内存模式(最大3G)大于3G需要编辑Boot.ini加 /pae 参数开启大内存模式才能支持3G以上内存,按以上操作编辑Boot.ini重新启动仍有问题就是你内存兼容有问题.下面给出一个2003 boot.ini 的例子:

[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect /usepmtimer /NoExecute=OptIn /PAE





Windows Server 2003 Web版:为快速开发、部署Web服务与应用程序,提供Web托管与服务平台。支持2路SMP(对称多处理)系统、2GB内存。
Windows Server 2003标准版:面向中小型企业和部门级应用。支持4路SMP、4GB内存。
Windows Server 2003企业版:适合中心与大型组织使用,有32位和64位两个版本。支持8节点集群、NUMA;支持8路SMP,其中32位版支持32GB内存,64位版支持64GB内存。
Windows Server 2003数据中心版:面向要求强伸缩性和高可用性的企业,有32位和64位两个版本。32位版支持32路SMP、64GB内存;64位版支持64路SMP、512GB内存;两个版本均支持8节点集群、NUMA

要启用 Windows 2003 支持大于4GB的物理内存,必须将参数 /pae 添加到 boot.ini 文件中

服务器刚刚购回来时就发觉这个问题,为什么好好的4G内存主板剧只识别成3G呢,三返四次修改BIOS也只能让主板识别成3.3G及3.5G左右,真烦人。。。
原来是有的服务器都有内存空洞,所以3.3G-3.8G都是正常的,这部分空洞的内存作为硬件的消耗了,差的太多就要升级主板的BIOS和阵列卡的firmware就可以了。
如果是XP或2003系列的话还要在BOOS.INI里加上/PAE参数才能正常访问扩展内存。超过1G的话还要加上/USERVA=3030参数才能最优化配置虚似内存。

由win2003 SP1中一个重要的安全功能-“数据执行保护功能(简称:DEP)”产生的。
你可以在“控制面板→系统→高级→设置→数据执行保护”中找到它。
当你在这两项中进行切换时,“/NoExecute=OptIn”也会变成“/NoExecute=Optout”。
注意:此功能需要硬件支持:包括AMD Athlon 64、AMD Opteron、Intel的安腾和安腾2,据说nVIDIA、VIA、全美达等公司也计划在其芯片中加入该技术。建议普通用户不要去修改它,否则会引起系统运行不稳定。

/NoExecute=alwaysoff 就是关闭数据执行保护功能
/NoExecute=OptIn 表示选择的是第一项,就是“只为……”那项
/NoExecute=Optout 表示选择的是第二项


/noexecute=AlwaysOff时,相当于关闭了DEP和EVP功能,凡是被其阻止的程序都能正常运行

/NoExecute=OptOut --DEP被打开,且一切服务都使用dep


v如果你的服务器内存大于3G以上,系统是Win2003不支持3G以上时可以看看此文

概要
本文介绍物理地址扩展 (PAE) 和地址窗口化扩展 (AWE) 并解释它们如何协同工作。本文还将讨论超出 32 位操作系统所固有的 4 GB 范围的内存使用限制。
更多信息
PAE 提高了 IA32 处理器处理大于 4 GB 的物理内存的能力。Microsoft Windows 2000 Advanced Server、Microsoft Windows 2000 Datacenter Server、Microsoft Windows Server 2003 Enterprise Edition 和 Microsoft Windows Server 2003 Datacenter Edition 可以使用 PAE 来利用超出 4GB 的物理内存。若要启用 PAE,需要在 Boot.ini 文件中使用 /PAE 参数。

注意:只有在服务器使用热添加内存设备时,Windows Server 2003 Enterprise Edition 和 Windows Server 2003 Datacenter Edition 才自动启用 PAE。在这种情况下,不需要在配置为使用热添加内存设备的系统上使用 /PAE 开关。在其他情况下,必须在 Boot.ini 文件中使用 /PAE 开关来利用大于 4GB 的内存。

典型情况是,在 Windows 2000 或 Windows Server 2003 下运行的进程最多可以访问 2 GB 的内存地址空间(假设未使用 /3GB 参数),其中一些内存是物理内存,另一些是虚拟内存。运行的程序越多(因而进程也越多),占用的内存地址空间也就越接近 2 GB 这一最大值。

当出现这种情况时,分页进程将显著增加并且会对性能产生负面影响。Windows 2000 和 Windows Server 2003 内存管理器使用 PAE 向程序提供更多的物理内存。这会降低对交换页面文件内存的需要,从而提高了性能。程序本身并不知道实际的内存大小。所有的内存管理和 PAE 内存分配都由内存管理器处理,与运行的程序无关。

当使用 /3GB 参数时,上述信息对于运行的程序有效。要求 3 GB 内存的程序更有可能让其所需的内存有更多部分在物理内存中,而不是在分页的虚拟内存中。这将增强那些能够使用 /3GB 参数的程序的性能。但例外情况是当 /3GB 参数与 /PAE 参数一起使用时。在这种情况下,操作系统将不使用任何超过 16 GB 的内存。此行为是由内核虚拟内存空间考虑导致的。因此,如果系统使用 Boot.ini 文件中的 /3GB 项重新启动,并且系统的物理内存超过 16 GB,则操作系统不使用额外的物理随机存取内存 (RAM)。重新启动计算机时如果不使用 /3GB 开关,将能够使用所有的物理内存。

AWE 是内存管理器功能的一套应用程序编程接口 (API),它使程序能够寻址更多内存 — 超过标准 32 位寻址的 4 GB 内存空间。AWE 使程序能够将物理内存保留为非分页内存,然后将非分页内存部分动态映射到程序的内存工作集。此过程使内存密集型程序(如大型数据库系统)能够为数据保留大 量的物理内存,而不必交换分页文件以供使用。相反,数据在工作集中进行交换,并且保留的内存超过 4 GB 范围。此外,超出 4 GB 的内存范围对内存管理器是公开的,并且 AWE 通过 PAE 发挥作用。没有 PAE,AWE 就无法保留超出 4 GB 的内存。

以下是一个 Boot.ini 文件的示例,其中已添加了 PAE 开关:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect /PAE


警告:Boot.ini 文件的内容根据您的配置而异。 有关更多信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
317526 (http://support.microsoft.com/kb/317526/) 如何在 Windows Server 2003 中编辑 Boot.ini 文件
总之,PAE 是 Windows 2000 和 Windows Server 2003 内存管理器的一项功能,它为请求内存的程序提供了更多物理内存。程序并不知道它正使用的内存中有些在大于 4 GB 的范围内,正如程序不知道它请求的内存实际上是在页面文件中一样。

AWE 是一个 API 集,它使程序能够保留大内存块。保留的内存是非分页的,并且只可以由该程序来使用。 有关 AWE 和 PAE 的更多信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
268363 (http://support.microsoft.com/kb/268363/) Windows 2000 中的 Intel 物理地址扩展 (PAE)
有关更多信息,请访问下面的 Microsoft 网站:
http://msdn.microsoft.com/library/psdk/sql/ad_1_server_1fnd.htm (http://msdn.microsoft.com/library/psdk/sql/ad_1_server_1fnd.htm)
http://msdn.microsoft.com/librar ... html/awewindata.asp (http://msdn.microsoft.com/librar ... tml/awewindata.asp)

如果向系统添加更多内存,BIOS 可能会认出安装在服务器中的全部物理 RAM,而 Windows 将只能认出部分 RAM。如果服务器具有启用的冗余内存功能或内存镜像功能,则全部剩余内存可能对 Windows 都不可见。冗余内存在某个内存块故障时为系统提供一个故障转移的内存块。内存镜像将内存块拆分为一个镜像集。两种功能都在 BIOS 中启用或禁用,而无法通过 Windows 访问。要修改这些功能的设置,您可能必须参考系统用户手册或 OEM 网站。另外,您可能必须联系硬件供应商。

例如,如果正在运行的系统安装了 4GB 的 RAM,随后又添加了另外 4GB 的 RAM,Windows 可能只识别出 4GB 或 6GB 的物理内存,而不是全部的 8GB。冗余内存功能或内存镜像功能可能在您未知的情况下就在新内存块上启用。这些症状类似于未将 /PAE 开关添加到 Boot.ini 文件时的症状。

 
标准版
企业版
 
支持最大内存数量
4GB
32GB
(32bit)
 
64GB
1TB
(64bit)
支持最大CPU数量
4
8
(32bit)
 
4
8
(64bit)
服务器群集
 
网络负载平衡群集
 
内容索引
 
磁盘碎片整理工具
 
远程管理桌面
 
.NET Framework
 
Internet Information Services (IIS) 6.0
 
Microsoft Identity Integration Server 2003 (MIIS) 支持