Oracle
 sql >> Cơ Sở Dữ Liệu >  >> RDS >> Oracle

Cài đặt Oracle Client từ dòng lệnh mà không cần người dùng tương tác

Sau một số điều tra, tôi đã tìm ra cách để có được các tùy chọn dòng lệnh đầy đủ:

setup.exe -help

Điều này hoạt động cho phiên bản 11.2, 12.1 và 12.2. Trong phiên bản 18c và 19c, điều này không hoạt động nữa, thay vào đó bạn phải thực thi:

setup.exe -help -silent

Đây là đầu ra ví dụ của thiết lập 18c:

Usage:  setup.exe [<flag>] [<option>]
Following are the possible flags:
    -help - display help.
    -silent - run in silent mode. The inputs can be a response file or a list of command line variable value pairs.
            [-ignorePrereqFailure - ignore all prerequisite checks failures.]
            [-lenientInstallMode - perform the best effort installation by automatically ignoring invalid data in input parameters.]
            [-showProgress - show the installation progress on the console. This option is supported for silent mode installation only.]
    -responseFile - specify the complete path of the response file to use.
    -invPtrLoc - point to a different inventory location. The orainst.loc file contains the location of the central inventory (inventory_loc) and the inventory group (inst_group).
    -jreLoc - specify the location for the jre used in the installation.
    -logLevel - enable the log of messages up to the priority level provided in this argument. Valid options are: severe, warning, info, config, fine, finer, finest.
    -paramFile - specify the location of the oraparam.ini file to be used in the installation.
    -executePrereqs | -executeConfigTools | -deinstall
    -executePrereqs - execute the prerequisite checks only.
    -executeConfigTools - execute the config tools for an installed home.
            [-all - execute all the config tools for an installed home, including the config tools that have already succeeded.]
    -deinstall - uninstall the specified home.
    -debug - run in debug mode.
    -executeSysPrereqs - execute the system prerequisite checks and exit.
    -ignoreSysPrereqs - ignore the results of the system prerequisite checks.
    -printdiskusage - log the debug information for the disk usage.
    -printmemory - log the debug information for the memory usage.
    -printtime - log the debug information for the time usage.
    -waitForCompletion - wait for the completion of the installation, instead of spawning the installer and returning the console prompt.
    -suppressPreCopyScript - suppress the execution of the precopy script.
    -acceptUntrustedCertificates - accept untrusted certificates from a secure site.
    -suppressPostCopyScript - suppress the execution of the postcopy script.
    -noconfig - do not execute the config tools.
    -noconsole - suppress the display of messages in the console. The console is not allocated.
    -ignoreInternalDriverError - ignore any internal driver errors.
    -promptForPassword - provide the passwords on the console during a silent installation of an Oracle database.
    -remotecp - specify the path to the remote copy program on the local cluster node. Used only for cluster installs.
    -remoteshell - specify the path to the remote shell program on the local cluster node. Used only for cluster installs.

Cuối cùng, tôi đã quản lý để chạy thiết lập đầy đủ với một lệnh duy nhất ngay cả khi không có tệp Phản hồi có thể được thực thi bởi hệ thống triển khai phần mềm. Dưới đây là một số ví dụ (cần nằm trong một dòng):

setup.exe -silent -nowait -ignoreSysPrereqs -ignorePrereq -waitforcompletion -force \
   "INVENTORY_LOCATION=C:\Program Files\Oracle\Inventory" \
   "ORACLE_BASE=c:\oracle\product" \
   "ORACLE_HOME=c:\oracle\product\12.1\Client_x64" \
   "SELECTED_LANGUAGES=de,en,fr,it" \
   "oracle.install.IsBuiltInAccount=true" \
   "oracle.install.client.installType=Custom" \
   "oracle.install.client.customComponents=oracle.rdbms.util:12.1.0.2.0,oracle.sqlplus:12.1.0.2.0,oracle.odbc:12.1.0.2.0"


setup.exe -silent -nowait -ignoreSysPrereqs -ignorePrereqFailure -skipPrereqs -waitForCompletion -force \
   "INVENTORY_LOCATION=C:\Program Files\Oracle\Inventory" \
   "ORACLE_BASE=c:\oracle\product" \
   "ORACLE_HOME=c:\oracle\product\12.2\Client_x64" \
   "oracle.install.IsBuiltInAccount=true" \
   "oracle.install.client.installType=Custom" \
   "oracle.install.client.customComponents=oracle.rdbms.util:12.2.0.1.0,oracle.sqlplus:12.2.0.1.0,oracle.odbc:12.2.0.1.0"


setup.exe -silent -nowait -ignoreSysPrereqs -ignorePrereqFailure -waitForCompletion -force \
   "ORACLE_BASE=c:\oracle\product" \
   "ORACLE_HOME=c:\oracle\product\18c\Client_x86" \
   "oracle.install.IsBuiltInAccount=true" \
   "oracle.install.client.installType=Custom" \
   "oracle.install.client.customComponents=oracle.rdbms.util:18.0.0.0.0,oracle.sqlplus:18.0.0.0.0,oracle.odbc:18.0.0.0.0"

Lưu ý, tùy chọn -nowait không được đề cập trong trợ giúp nhưng được yêu cầu để loại bỏ lời nhắc "Nhấn ENTER để đóng chương trình".

Tùy chọn -force không được đề cập trong trợ giúp của phiên bản 12.2 và mới hơn nhưng dường như vẫn hợp lệ để buộc cài đặt trong thư mục không trống

Rõ ràng trình cài đặt 32-bit 18c không thích tùy chọn "INVENTORY_LOCATION=C:\Program Files (x86)\Oracle\Inventory" , bỏ qua mục này. Sử dụng "INVENTORY_LOCATION=C:\PROGRA~2\Oracle\Inventory" gây ra một ngoại lệ cho các tệp khóa trong c:\Program Files (x86)\Oracle\Inventory\locks\



  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. EF và TransactionScope cho cả SQL Server và Oracle mà không cần chuyển sang DTC?

  2. vấn đề trong việc tìm kiếm danh sách các tệp trong thư mục

  3. Đặt lại tổng tích lũy?

  4. Làm cách nào để thay thế các giá trị cụ thể trong cột cơ sở dữ liệu oracle?

  5. Trình tối ưu hóa trong Cơ sở dữ liệu Oracle 19c