Windows Server 2008 R2 安装 Oracle 10g方法

2018年1月26日 | 分类: 学习笔记 | 标签:

A.需要修改两个文件绕过安装程序检测
1.database\installoraparam.ini
[Oracle]
DISTRIBUTION=TRUE
SOURCE=../stage/products.xml
LICENSE_LOCATION=
JRE_LOCATION=../stage/Components/oracle.swd.jre/1.5.0.11.0/1/DataFiles
JRE_MEMORY_OPTIONS=” -mx192m”
DEFAULT_HOME_LOCATION=oracle\product\10.2.0\db
DEFAULT_HOME_NAME=OraDb10g_home
NO_BROWSE=/net
NLS_ENABLED=TRUE
BOOTSTRAP=TRUE
OUI_VERSION=10.2.0.4.0
ADDITIONAL_COMPONENTS={“oracle.sysman.ccr:ALWAYS”,”oracle.rdbms.rat:ALWAYS”,”oracle.jdk:UPGRADE”,”oracle.swd.jre:UPGRADE”}
## JRE_VERSION is only for Windows. This is to copy accessbridge dlls
JRE_VERSION=1.5.0
#SHOW_HOSTNAME=ALWAYS_SHOW shows the hostname panel always
#SHOW_HOSTNAME=NEVER_SHOW does not the hostname panel
#SHOW_HOSTNAME=CONDITION_SHOW shows the hostname panel on condition
SHOW_HOSTNAME=NEVER_SHOW
#THIN_JDBC_FILENAME is optional and defaults to classes12.jar
#The value specified for this should be packaged with OUI, and should
#be relative to /jlib/
THIN_JDBC_FILENAME=classes12.jar
#RUN_OUICA specifies the batch script name that needs to be run
#The script is ouica.bat for win32, and ouica.sh for solaris.
#If the value is not specified, then the OUICA script is not run
RUN_OUICA=ouica.bat
CLUSTERWARE={“oracle.crs”,”10.1.0.2.0″}
SILENT_VARIABLE_VALIDATION=TRUE
[Certified Versions]
#You can customise error message shown for failure, provide value for CERTIFIED_VERSION_FAILURE_MESSAGE
Windows=5.0,5.1,5.2,6.0,6.1
#Windows 2000 use winver.exe to find version
[Windows-5.0-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-5.0-optional]
#Windows XP use winver.exe to find version
[Windows-5.1-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-5.1-optional]
#Windows .net use winver.exe to find version
[Windows-5.2-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-5.2-optional]
[Windows-6.0-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-6.0-optional]
[Windows-6.1-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-6.1-optional]
[IMAGES]
FILE1=images/rdbms_1.gif
FILE2=images/rdbms_2.gif
FILE3=images/rdbms_3.gif
FILE4=images/rdbms_4.gif
FILE5=images/rdbms_5.gif
FILE6=images/rdbms_6.gif
FILE7=images/rdbms_7.gif
FILE8=images/rdbms_8.gif
LICENSE_LOCATION=license.txt
2.database\stage\prereq\db\refhost.xml
<?xml version='1.0' encoding='windows-1252'?>
<!-- Copyright (c) 2004, Oracle. All Rights Reserved. -->
<!-- ref host for Windows -->
<HOST PLATID="233">
<SYSTEM>
<MEMORY>
<PHYSICAL_MEMORY VALUE="256" UNIT="MB"/>
<!--AVAILABLE_MEMORY VALUE="512" UNIT="MB"/-->
<SWAP_SIZE>
<STEP NAME="PHYSICAL_MEMORY" ATLEAST="0" ATMOST="256" UNIT="MB" MULTIPLE="3"/>
<STEP NAME="PHYSICAL_MEMORY" GREATER_THAN="256" ATMOST="512" UNIT="MB" MULTIPLE="2"/>
<STEP NAME="PHYSICAL_MEMORY" GREATER_THAN="512" ATMOST="2048" UNIT="MB" MULTIPLE="1.5"/>
<STEP NAME="PHYSICAL_MEMORY" GREATER_THAN="2048" ATMOST="8192" UNIT="MB" MULTIPLE="1"/>
<STEP NAME="PHYSICAL_MEMORY" GREATER_THAN="8192" UNIT="MB" MULTIPLE="0.75"/>
</SWAP_SIZE>
</MEMORY>
</SYSTEM>
<CERTIFIED_SYSTEMS>
<OPERATING_SYSTEM>
<VERSION VALUE="5.0"/>
<SERVICE_PACK VALUE="1"/>
</OPERATING_SYSTEM>
<OPERATING_SYSTEM>
<VERSION VALUE="5.1"/>
<SERVICE_PACK VALUE="1"/>
</OPERATING_SYSTEM>
<OPERATING_SYSTEM>
<VERSION VALUE="5.2"/>
</OPERATING_SYSTEM>
<!--Microsoft Windows Vista-->
<OPERATING_SYSTEM>
<VERSION VALUE="6.0"/>
</OPERATING_SYSTEM>
<!--Microsoft Windows Server2008 R2-->
<OPERATING_SYSTEM>
<VERSION VALUE="6.1"/>
</OPERATING_SYSTEM>
</CERTIFIED_SYSTEMS>
<ORACLE_HOME>
<COMPATIBILITY_MATRIX>
<ALLOW>
<NEW_HOME/>
</ALLOW>
<DISALLOW>
<COMP NAME="oracle.server" ATLEAST="8.1.0.0.0" ATMOST="9.2.0.9.0"/>
<COMP NAME="oracle.server" ATLEAST="10.1.0.0.0" ATMOST="10.1.0.9.0"/>
<COMP NAME="oracle.client" ATLEAST="8.1.0.0.0" ATMOST="9.2.0.9.0"/>
<COMP NAME="oracle.iappserver.iapptop" ATLEAST="9.0.2.0.0" ATMOST="99.9.9.9.9"/>
<COMP NAME="oracle.iappserver.infrastructure" ATLEAST="9.0.2.0.0" ATMOST="99.9.9.9.9"/>
<COMP NAME="oracle.iappserver.devcorner " ATLEAST="9.0.2.0.0" ATMOST="99.9.9.9.9"/>
<COMP NAME="oracle.ids.toplevel.development" ATLEAST="9.0.0.0.0" ATMOST="99.9.9.9.9"/>
<COMP NAME="oracle.networking.netclt" ATLEAST="8.1.3.0.0" ATMOST="9.2.0.9.0"/>
<COMP NAME="oracle.install.instcommon" ATLEAST="8.1.3.0.0" ATMOST="9.2.9.9.9"/>
<COMP NAME="oracle.client" ATLEAST="10.1.0.0.0" />
<COMP NAME="oracle.crs" ATLEAST="10.1.0.0.0" />
<ORCA_HOME/>
</DISALLOW>
</COMPATIBILITY_MATRIX>
</ORACLE_HOME>
</HOST>
3.安装的时候选高级安装→企业版→先单独安装软件不要安装数据库→一直安装完成→再运行Net Manager配置监听和服务。
a、配置监听和服务的时候不要忘记配置数据库服务,监听位置主机填写本机IP,数据库服务名自定义。
b、服务配置主机名填写本机IP,服务名填写第一步中自定义的数据库名。
4.如果服务里面没有监听(OracleOraDb10g_home1TNSListener):运行“cmd”,在命令行里输入”lsnrctl”,回车,进入lsnrctl中,在“LSNRCTL>”后输入”start”,回车。就会启动了,现在去服务里刷新一下就会有监听器的启动项了。
5.配置好监听和服务后,就算安装完成了。
B.数据导入遇到的问题
1.创建用户以及表空间
–1.创建自动增长的表空间:–存储地址 初始大小1G –每次扩展10M,无限制扩展
create tablespace 表空间名 datafile ‘C:/oracle/product/10.2.0/oradata/orcl/表空间名.dbf’ size 1024M autoextend on next 10M maxsize unlimited EXTENT MANAGEMENT local autoallocate segment space management auto;
–2.建用户
create user 用户名 identified by 密码 default tablespace 表空间名;
–3.赋权
grant dba to 用户名; –授权dba
grant unlimited tablespace to 用户名;
2.导出数据:exp 用户名/密码@IP:1521/orcl owner=用户名 file=C:\XXXX.dmp log=C:\expXXXX.log
3.从服务器本机导入数据:imp 用户名/密码 fromuser=用户名 touser=用户名 file=C:\XXXX.dmp ignore=y log=C:\impXXXX.log buffer=819200
4.如果发现导入的时候控制台出现????这样的乱码,并且导入的数据,也存在很多???这样的乱码,那就是NLS_LANG变量没有设置,最根本的方法,就是到注册表修改。
把注册表中的NLS_LANG设置为:SIMPLIFIED CHINESE_CHINA.ZHS16GBK就可以了
路径1:HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1
路径2:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\KEY_OraDb10g_home1
5.删除用户以及表空间,重新导出生产库,然后再次导入,就不会出现乱码了

目前还没有任何评论.