Oracle Instant Client 11.1.06.20
可以免费分发的Oracle精简客户端 By ZhaHost in 2010.06.18
【居然有人说有病毒,估计你们是用360的白痴,不解释,爱用不用。。。】
2012.05.18 重新打包,采取原生的odac xcopy方式:
需要可以下载:http://115.com/file/e78w64wz
下面是安装的脚本,nsis的,省得某些人说病毒!有需要的自己改。
; 该脚本使用 HM VNISEdit 脚本编辑器向导产生 ;用户自定义常量 !define KEY_HOME "odac" ; 安装程序初始定义常量 !define PRODUCT_NAME "ODAC_Client" !define PRODUCT_VERSION "112021" !define PRODUCT_PUBLISHER "ZhaHost" !define PRODUCT_WEB_SITE "http://www.RV.com.cn" !define STARTMENUDIR "Oracle - ${PRODUCT_NAME} by ZhaHost" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" SetCompressor lzma RequestExecutionLevel admin ;字符串处理函数库引用 !include "WordFunc.nsh" ; ------ MUI 现代界面定义 (1.67 版本以上兼容) ------ !include "MUI.nsh" ; MUI 预定义常量 !define MUI_ABORTWARNING !define MUI_COMPONENTSPAGE_NODESC ;不需描述区域 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\setup.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\setup.ico" !define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\WixUI.bmp" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_RIGHT !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\header\oracle2.bmp" ; 欢迎页面 !insertmacro MUI_PAGE_WELCOME ; 许可协议页面 !insertmacro MUI_PAGE_LICENSE "license.rtf" ; 组件选择页面 ;!insertmacro MUI_PAGE_COMPONENTS ; 安装目录选择页面 !insertmacro MUI_PAGE_DIRECTORY ; 安装过程页面 !insertmacro MUI_PAGE_INSTFILES ; 安装完成页面 !insertmacro MUI_PAGE_FINISH ; 安装卸载过程页面 !insertmacro MUI_UNPAGE_INSTFILES ; 安装界面包含的语言设置 !insertmacro MUI_LANGUAGE "English" ; 安装预释放文件 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ; ------ MUI 现代界面定义结束 ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "${PRODUCT_NAME}_${PRODUCT_VERSION}.exe" InstallDir "$PROGRAMFILES\Oracle\odac_client" ShowInstDetails show ShowUnInstDetails show BrandingText "${STARTMENUDIR}" Section "基本Oracle客户端组件" SEC_MAIN ;SectionIn RO ;该选项设置该区段默认必选状态 ;如果安装目录不为空,不允许安装 IfFileExists '$INSTDIR\*.*' 0 +3 MessageBox MB_OK "您所选择的安装目录不为空,不允许覆盖安装,请先卸载或者删除文件!" Abort ;处理tnsnames.ora文件 SetOutPath "$INSTDIR" File /r "tnsnames.ora" WriteRegStr HKLM "SOFTWARE\Oracle\KEY_${KEY_HOME}" "TNS_ADMIN" "$INSTDIR" ;开始安装(必须在此之前写一次注册表 x64bug) SetOutPath "$TEMP\odac_temp" File /r "ODAC112021Xcopy_32bit\*.*" nsExec::Exec /timeout=50000 'c:\windows\system32\cmd.exe /c "install.bat all "$INSTDIR" ${KEY_HOME}"' WriteRegStr HKLM "SOFTWARE\Oracle\KEY_${KEY_HOME}" "NLS_LANG" "SIMPLIFIED CHINESE_CHINA.ZHS16GBK" WriteRegStr HKLM "SOFTWARE\Oracle\KEY_${KEY_HOME}" "NLS_TIMESTAMP_FORMAT" "YYYY-MM-DD HH24:MI:SS" nsExec::Exec "sc start msdtc" nsExec::Exec "sc start OracleMTSRecoveryService" ;--------------------------------------------------------------------------------------------------------------------- ;设置oracle的环境变量到PATH路径(sqlplus,tnsping需要) ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$0;$INSTDIR;$INSTDIR\bin" SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" ;刷新环境变量 ;--------------------------------------------------------------------------------------------------------------------- ;添加ODP.NET的vs_studio引用 WriteRegStr HKLM "SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net" "" "$INSTDIR\odp.net\bin\2.x" WriteRegStr HKLM "SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.Net" "" "$INSTDIR\odp.net\bin\4" SectionEnd Section -AdditionalIcons SetShellVarContext all ;默认所有用户组创建菜单 CreateDirectory "$SMPROGRAMS\${STARTMENUDIR}" CreateShortCut "$SMPROGRAMS\${STARTMENUDIR}\Uninstall_${PRODUCT_NAME}.lnk" "$INSTDIR\uninst.exe" CreateShortCut "$SMPROGRAMS\${STARTMENUDIR}\tnsnames.ora.lnk" "Notepad.exe" "$INSTDIR\tnsnames.ora" SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" SectionEnd ;------------------------------------------------------------------------------------------------------------- ;以下是安装程序的卸载部分 Section Uninstall SetShellVarContext all ;防止开始菜单及菜单文件夹无法删除 ;----------------------------------------------------------------------------------------------------------- ;禁用及卸载服务 nsExec::Exec "sc stop msdtc" nsExec::Exec "sc config msdtc start= disabled" nsExec::Exec "sc stop OracleMTSRecoveryService" nsExec::Exec "sc delete OracleMTSRecoveryService" ;卸载ODAC客户端 nsExec::Exec /timeout=50000 'c:\windows\system32\cmd.exe /c "uninstall.bat all ${KEY_HOME}"' Delete "$SMPROGRAMS\${STARTMENUDIR}\Uninstall_${PRODUCT_NAME}.lnk" Delete "$SMPROGRAMS\${STARTMENUDIR}\tnsnames.ora.lnk" RMDir /r "$SMPROGRAMS\${STARTMENUDIR}" Delete "$INSTDIR\uninst.exe" RMDir /r "$INSTDIR" ;----------------------------------------------------------------------------------------------------------- ;利用WordReplace函数从PATH中删除设置oracle的环境变量 ;需要在文件头引入相应的头文件:!include "WordFunc.nsh" ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" ${WordReplace} $R0 ";$INSTDIR;$INSTDIR\bin" "" "+" $R1 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$R1" ;----------------------------------------------------------------------------------------------------------- ;卸载ODP.NET的vs_studio引用 DeleteRegKey HKLM "SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net" DeleteRegKey HKLM "SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.Net" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" SetAutoClose true SectionEnd ;----------------------------------------------------------------------------------------------------------- ;根据 NSIS 脚本编辑规则,所有 Function 区段必须放置在 Section 区段之后编写,以避免安装程序出现未可预知的问题。 Function .onInit FunctionEnd Function un.onInit MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "您确实要完全移除 $(^Name) ,及其所有的组件?" IDYES +2 Abort FunctionEnd Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) 已成功地从您的计算机移除。" FunctionEnd
可连接8.1.7以上的Oracle数据库
内容来源: 用于Windows 的Oracle 数据访问组件(ODAC)
本安装包仅供NSIS交流与学习使用。
本安装包主要考虑到Oracle分布式事务Oramts而制作的,因为CSLA.NET要使用到分布式事务,本安装包包含以下内容:
1. Oracle精简客户端
2. Oracle Oledb组件
3. Oracle odp.net2.x组件
4. Oracle Oramts组件(需要启用MSDTC服务)
Instant Client allows you to run your applications without installing the standard Oracle client or having an ORACLE_HOME. OCI, OCCI, Pro*C, ODBC, and JDBC applications work without modification, while using significantly less disk space than before. Even SQL*Plus can be used with Instant Client. No recompile, no hassle.
ISVs and Partners benefit greatly from packaging Instant Client along with their applications, saving customers the extra step of installing and configuring an Oracle client. Free. The same fully-featured, high-performance applications that Oracle ISVs and partners have always delivered will continue to work, untouched.
Customers can try new packaged applications and Oracle client features quickly without worrying about other installations. Larger enterprises can automate setup and configuration of Instant Client by using installation scripts accessing a central IT repository. Finally, everyone can benefit from the smaller footprint.
Especially for production use. Especially for free.
安装内容:
1. 复制文件
2. 将安装目录加入PATH
3. 生成Oracle所有注册表信息
可安装于从未安装过Oracle的机器,可以支持PL/SQL Developer
Instantclient2.0 (2010-12)
下载地址:http://u.115.com/file/f6d1f32737
使用ODAC1110620Xcopy.zip的客户端和ODAC112012.zip的分布式事务合成
ODAC112012.zip客户端会造成pl/sql的nvarchar2类型看不到最后一位,无解....很郁闷....
OraInsClient 1.1 (2010-06-28)
下载地址:null
主要增加TNS_TIMESTAMP_FORMAT变量定义以及安装界面的调整
OraInsClient 1.2 (2010-08-31)
下载地址:http://u.115.com/file/f61a1308eb
主要修正ODP.NET不能使用的问题,错误:The provider is not compatible with the version of Oracle client - Google 搜索
打包过程(1.0版):
1.使用原版的ODAC1110620Xcopy.zip
2.取得你所需要的安装文件及注册表信息,注册表是可以导出的!
3.安装以下代码修改把,就得到你自己的Oracle 精简客户端啦!
NSIS源代码: https://files.cnblogs.com/zhahost/OraInsClient.7z
安装过程图片: