Открываем первое окно с cmd и выполняем: C:\>set ORACLE_HOME=C:\\oracle\\product\\12.1.0 C:\>set PATH=C:\\oracle\\product\\12.1.0\\OPatch;C:\\oracle\\product\\12.1.0\\bin;%PATH% C:\>opatch version C:\>opatch lsinventory
Открываем второе окно с командной строкой: D:\>set PERL5LIB=D:\\oracle\\product\\12.1.0\\perl\\lib D:\>set PATH=D:\\oracle\\product\\12.1.0\\perl\\5.8.3\\bin\\MSWin32-x86-multi-thread;%PATH%
Убеждаемся, что: The cloning of OraDB11gR1_home was successful.
Проверяем что inventory аналогично первому окну: D:\\>set ORACLE_HOME=D:\\oracle\\product\\12.1.0 D:\\>set PATH=D:\\oracle\\product\\12.1.0\\OPatch;D:\\oracle\\product\\12.1.0\\bin;%PATH% D:\\>opatch version D:\\>opatch lsinventory
Останавливаем службы «Listener» и «OracleServiceDBAX».
В первом окне запускаем netca удаляем слушателя : C:\\>C:\\oracle\\product\\12.1.0\\bin\\netca.bat
, а после и экземпляр: C:\\>ORADIM -DELETE -SID DBAX
Проверяем что службы «Oracle DBAX VSS Writer Service2 и «OracleJobSchedulerDBAX» тоже «удалились».
Создаем слушателя и экземпляр во втором окне: C:\\>D:\\oracle\\product\\12.1.0\\bin\\netca.bat
NB. Возможно сначала придется удалить имеющийся tnsnames.ora или хотя бы переименовать его (уже не помню, какая ошибка была.)
C:\\>ORADIM -NEW -SID DBAX -SYSPWD dbax -STARTMODE auto -SPFILE
Проверяем, что необходимые службы БД созданы и при необходимости запущены. OracleOraDB11gR1_homeTNSListener OracleServiceDBAX Oracle DBAX VSS Writer Service OracleJobSchedulerDBAX
NB. Дополнительно: добавить в реестре в папке нового HOMEа параметр ORACLE_SID, п оменять каталог для диагностической информации: ALTER SYSTEM SET DIAGNOSTIC_DEST=»D:\ORACLE\DIAG»
, проверить и пересоздать «штатные директории»: select directory_name from dba_directories where directory_path like ‘C:%’;
ORACLE_HOME in Windows
Oracle Database Tips by Donald BurlesonJanuary 1, 2015
If multiple releases of Oracle are being run on the same server, it will be necessary to set the ORACLE_HOME local environment variable to use the command line or in your scripts. Setting ORACLE_HOME will ensure that the correct Oracle Software version is accessed when running against the database. This is super critical when multiple versions of Oracle are running on the same Windows Server.
It is also necessary to set ORACLE_HOME at the command prompt when installing patches with the OPatch Utility , even if there is only one release of Oracle on the server.
Here is an example from the command prompt:
However, in regards to the System Environment Variable that is set in the Advanced tab, the situation changes.
The ORACLE_HOME system environment variable will not get reset by an upgrade. More likely, it will be blank, since the Oracle Installer clears it out by default. This can cause TNS Protocol Adapter errors when trying to start the listener, cause ODBC datasources to fail, as well as other problems. Therefore, it is a good practice to check the value following any upgrades or installs.
Oracle recommends that you not set ORACLE_HOME at all, especially if you have multiple Oracle installations on the same machine.
Checking for ORACLE_HOME
It is important to note that the process for checking ORACLE_HOME on a Windows machine is slightly different.
On a Windows Server, the Oracle home information can be found in the system registry. To look at the homes, use this workflow:
Click Start Run
In the Run dialog box, type «regedit» and press Return
The registry will now be displayed
Expand the folder called
Burleson is the American Team
Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals. Feel free to ask questions on our Oracle forum .
Verifyexperience!Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.
Errata? Oracle technology is changing and we strive to update our BC Oracle support information. If you find an error or have a suggestion for improving our content, we would appreciate your feedback. Just e-mail:
Oracle ® is the registered trademark of Oracle Corporation.
3 Supporting Oracle Home User on Windows
Starting with Oracle Database 12 c Release 1 (12.1), Oracle Database supports the use of Oracle Home User, specified at the time of Oracle Database installation. Oracle Home User is used to run the Windows services for the Oracle home. Oracle Home User can be Windows built-in account or a standard Windows User Account (not an Administrator account). Oracle Home User cannot be changed post installation.
If a Windows built-in account is used, then no user name or password is required during installation and administration. However, if a Windows User Account is used as Oracle Home User, then you must provide the user name and password during installation and some of the administration tasks.
Oracle Home User is different from Oracle Installation User. Oracle Installation User is the user who requires administrative privileges to install Oracle products. Oracle Home User is used to run the Windows services. You must not log into the Oracle Home User to perform administrative tasks.
Note that the Windows administrator privilege is still required to perform Oracle administrative functions such as installation, upgrade, patching, and other functions.
A Windows User Account used as Oracle Home User cannot have administrator privileges as it causes the Oracle Universal Installer to display an error message.
See the Microsoft documentation for more information on different types of Windows user accounts.
Oracle Database Installation Guide for Microsoft Windows
See the following sections for more information:
Managing Oracle Home User
If you use a Windows User Account as the Oracle Home User, then you must ensure that this user account is present in the Windows system and its password is managed securely to ensure the proper operation and security of the database.
You must secure the password of this Windows User Account and ensure that only database administrators have access to this password as one can log on to the database as the database administrator from this Windows User Account. You must also change the password for this Windows User Account at regular intervals as a part of security. You can change the password using Windows tools. However, when you change the password for this Windows User Account, you must also update the password for all Oracle services running under the Windows User Account.
This release has introduced a new Windows utility called the Oracle Home User Control. This is a command-line tool that displays the Oracle Home User name associated with the current Oracle home and updates the password for all Oracle services running under a specific Windows User Account (used as Oracle Home User). See section «Using the Oracle Home User Control Tool» for more information.
Using Oracle Home User for Oracle Single-Instance Database and Oracle Database Client
For single-instance Oracle Database and Oracle Database Client installations, you can use Windows built-in account or a standard Windows User Account as Oracle Home User.
The Windows User Account can be an existing Windows Local User, Windows Domain User or Managed Services Account (MSA) with no administration privileges. For a Windows Local User Account or a Windows Domain User Account, you must provide both the user name and password during installation. For a Managed Services Account, you must provide the user name only.
For a Windows Local User, you also have the option of creating a new Windows user during installation. You must provide the user name and password for the user account and Oracle Universal Installer creates the Windows user during installation. The newly created Windows account is denied interactive logon privileges to the Windows computer. However, a Windows administrator can still manage this account like any other Windows account.
Note that if a Windows Local User Account is chosen as the Oracle Home User during single-instance Oracle Database installation, Windows NT Native Authentication (NTS) cannot be used for authenticating Windows domain users or users from remote computers.
For single-instance Oracle Database installations, Oracle recommends that you use a standard Windows User Account (instead of Windows built-in account) as Oracle Home User for enhanced security. For Oracle Database Client installations, it is not necessary to use a Windows User Account as Oracle Home User for reasons of security. Even when the Windows built-in account is chosen as the Oracle Home User, Oracle services for a client home are run using the built-in low-privileged LocalService account.
Using Oracle Home User for Oracle RAC Database
See Oracle Grid Infrastructure Installation Guide for Microsoft Windows x64 (64-Bit) for information about using Oracle Home User for Oracle RAC Installation.
2 Managing Oracle Homes
This chapter contains the following sections:
Introduction to Oracle Homes
The Oracle Universal Installer supports the installation of several active Oracle homes on the same host. An Oracle home is a directory into which all Oracle software is installed. This is pointed to by an environment variable. The Oracle home consists of the following:
Directory location where the products are installed
Corresponding system path setup
Program groups associated with the products installed in the home (where applicable)
Services running from the home
Introduction to Oracle Base
The Oracle base location is the location where Oracle Database binaries are stored. During installation, you are prompted for the Oracle base path. Typically, an Oracle base path for the database is created during Oracle Grid Infrastructure installation.
To prepare for installation, Oracle recommends that you only set the ORACLE_BASE environment variable to define paths for Oracle binaries and configuration files. Oracle Universal Installer (OUI) creates other necessary paths and environment variables in accordance with the Optimal Flexible Architecture (OFA) rules for well-structured Oracle software environments.
For example, with Oracle Database 11g, Oracle recommends that you do not set an Oracle home environment variable allow OUI to create it instead. If the Oracle base path is /u01/app/oracle, then by default, OUI creates the following Oracle home path:
Ensure that the paths you select for Oracle software, such as Oracle home paths and the Oracle base path, use only ASCII characters. Because installation owner names are used by default for some paths, this ASCII character restriction applies to user names, file names, and directory names.
Installing an Oracle Product
When you install an Oracle product, an Oracle home is created.
To install the product and create the Oracle home, perform the following steps:
Run Oracle Universal Installer.
In the Specify Home Details page, enter the Oracle home settings for the installation session. See Table 2-1 for a description of the fields in this section of the screen.
Continue with your installation. See Chapter 4, «Installing Products» for detailed information.
Table 2-1 Oracle Installation Settings for Specify Home Details page
Settings
Functions
Enter a name for the Oracle home. This name identifies the program group associated with a particular home and the Oracle services installed on this home. The Oracle home name must be between 1 to 127 characters long, and can include only alphanumeric characters and underscores.
Enter the full path to an Oracle home, or select an Oracle home from the drop-down list of existing Oracle homes. The Oracle home location is the directory where products are installed.
Data files may or may not be installed within an Oracle home. You can use the Browse button to choose a directory to install your product.
For Windows platforms, you must provide a valid path that is not in the Windows directory. Different homes cannot share the same location.
Oracle recommends that you designate an Oracle home location that is an empty or non-existing directory. If you select a directory for the Oracle home location that is not empty or already exists, you will be warned and asked if you want to proceed.
For silent installations, if a non-empty, existing directory is specified, an error is logged in the console and in the installActions .log file. Also, the Oracle Universal Installer aborts. To override this condition, use the -force flag on the command line. The effect of using the -force flag is the same as selecting Yes while installing in interactive mode. You receive a warning message, but the installation continues.
Removing Oracle Homes
To remove or deinstall Oracle homes, you can either use the Deinstall tool included with the Shiphome, or use the Deinstall utility available as part of the Oracle home.
To use the Deinstall tool, do the following to remove the Oracle home:
cd to DeinstallTool.
Run deinstall -home .
To use the Deinstall utility, do the following to remove the Oracle home:
cd to $Oracle_Home/deinstall.
Determining the Default Oracle Home
By default, when you start Oracle Universal Installer, the software searches your system to determine the default Oracle home where Oracle software should be installed.
In all cases, the ORACLE_HOME name is taken first from the command line if it is specified, or else from the response file if specified. If not specified, the value of DEFAULT_ORACLE_HOME_NAME in oraparam.ini is examined. Typically, the following convention is used for the name:
Where is the short product marketing name as specified in the oraparam.ini file; for example, «Db11g», and is a counter derived from the Central Inventory. For example, the ORACLE_HOME name could be OraDb11g_1 .
The ORACLE_HOME path is taken first from the command line if specified, or else from the response file if specified. If not, the ORACLE_HOME environment variable is used. If neither is specified, the following conventions are used for the path:
If ORACLE_BASE has been specified in the environment:
For example: $ORACLE_BASE/product/11.2.0/Db_1 .
If ORACLE_BASE has not been specified in the environment:
Where is the short product name; for example, «Db», and is picked up based on the existence of the files. For example, the ORACLE_HOME path could be $HOME/product/11.2.0/Db_1 .
The instance-related directory location is accepted first from the response file, if specified. If not, the oradata , flash_recovery_area , admin , and doc directories are created under ORACLE_BASE . If ORACLE_BASE has not been specified, the default is the $ORACLE_HOME/oradata directory. If the parent directory of the Oracle home is writable, these directories are created in the parent directory of the Oracle home.
Multiple Oracle Homes
Oracle Universal Installer supports the installation of several active Oracle homes on the same host as long as the products support this at run-time. Multiple versions of the same product or different products can run from different Oracle homes concurrently. Products installed in one home do not conflict or interact with products installed on another home. You can update software in any home at any time, assuming all Oracle applications, services, and processes installed on the target home are shut down. Processes from other homes may still be running.
Target Home
The Oracle home currently accessed by Oracle Universal Installer for installation or deinstallation is the target home. To upgrade or remove products from the target homes, these products must be shut down or stopped.
Oracle Universal Installer Inventory
The Oracle Universal Installer inventory stores information about all Oracle software products installed in all Oracle homes on a host, provided the product was installed using Oracle Universal Installer.
Inventory information is stored in Extensible Markup Language (XML) format. The XML format enables easier diagnosis of problems and faster loading of data. Any secure information is not stored directly in the inventory. As a result, during removal of some products, you may be prompted to enter the required credentials for validation.
Oracle recommends placing the central inventory on a local file system that is not shared by other systems, since the central inventory is a system-specific inventory of the installations on this system. It is strongly recommended that you place the central inventory on a local disk so that installations from other systems do not corrupt the inventory. You should not place the central inventory in the Oracle Base.
Structure of the Oracle Universal Installer Inventory
The Oracle Universal Installer inventory has the following hierarchical structure:
Central Inventory Pointer File
Every Oracle software installation has an associated Central Inventory where the details of all the Oracle products installed on a host are registered. The Central Inventory is located in the directory that the inventory pointer file specifies. Each Oracle software installation has its own Central Inventory pointer file that is unknown to another Oracle software installation.
For Oracle homes sharing the same Central Inventory, the Oracle Universal Installer components perform all read and write operations on the inventory. The operations on the Central Inventory are performed through a locking mechanism. This implies that when an operation such as installation, upgrade, or patching occurs on an Oracle home, these operations become blocked on other Oracle homes that share the same Central Inventory.
Table 2–2 shows the location of the default inventory pointer file for various platforms:
The following string shows an example of the path for the oraInst.loc file:
In UNIX, if you do not want to use the Central Inventory located in the directory specified by the inventory pointer file, you can use the -invPtrLoc flag to specify another inventory pointer file. The syntax is as follows:
If the contents of the oraInst.loc file is empty, Oracle Universal Installer prompts you to create a new inventory.
Central Inventory
The Central Inventory contains the information relating to all Oracle products installed on a host. It contains the following files and folders:
Inventory File
This file lists all the Oracle homes installed on the node. For each Oracle home, it also lists the Oracle home name, home index, and nodes on which the home is installed. It also mentions if the home is an Oracle Clusterware home or a removed Oracle home. It can only detect removed Oracle homes created using Oracle Universal Installer version 11.2 and later. This file is present in the following location:
The following code shows a sample inventory.xml file:
Oracle recommends that you do not remove or manually edit this file as it could affect installation and patching.
Logs Directory
The Central Inventory contains installation logs in the following location:
The logs directory contains the logs corresponding to all installations performed on a particular node. You can also find a copy of the installation log in the $ORACLE_HOME/cfgtoollogs directory.The installation logs for an installation are identified by the timestamp associated with the log files. These files are generally saved in the following format:
For example, consider an attachHome operation performed on 17th, May, 2009 at 6.45AM. The associated log file would be created as follows:
Oracle Home Inventory
Oracle home inventory or local inventory is present inside each Oracle home. It only contains information relevant to a particular Oracle home. This file is located in the following location:
It contains the following files and folders:
Components File
This file contains the details about third-party applications like Java Runtime Environment (JRE) required by different Java-based Oracle tools and components. In addition, it also contains details of all the components as well as patchsets or interim patches installed in the Oracle home. This file is located here:
For an example of the components file, see «Sample Components File».
Home Properties File
This file contains the details about the node list, the local node name, and the Oracle Clusterware flag for the Oracle home. In a shared Oracle home, the local node information is not present. This file also contains the following information:
GUID — Unique global ID for the Oracle home
ARU ID — Unique platform ID. The patching and patchset application depends on this ID.
ARU ID DESCRIPTION — Platform description
The information in oraclehomeproperties.xml overrides the information in inventory.xml . This file is located here:
The following example shows the Oracle home property file: