High Availbility

OS & Virtualization

Wednesday, December 16, 2015

export from db where sysaux needs recovery

Whenever sysaux goes to recovery state, you won’t be able to do the exp or expdp. You will get error like ‘not able to read/write sysaux’ datafiles. If you don’t have the archivelog to recover the sysaux, then you can follow below steps to atleast get the exp work. expdp doesn’t work still.


Shutdown immediate;
startup upgrade
@?/rdbms/admin/catnoqm.sql
shutdown immediate
startup


There you go, your export will work. Pls note, you may have to rebuild to have perfect system.

Thursday, October 29, 2015

Importing oracle trusted certificate into oracle wallets

Importing oracle trusted certificate into oracle wallets

 
I am assuming user is created trusted certificate and hand over to you. As a oracle dba
 you have to import the trusted certificate in the oracle database server.
 
How to import user trusted certificate into oracle wallets
  1. Create wallet
    1. Syntax: orapki wallet create -wallet
  2. $orapki wallet create -wallet ‘/home/oracle/admin/WALLETS’
    1. Enter password:
    2.  Enter password again:
  3. copy/ftp the user trusted certificate to database server temp location
    1. /tmp/testwallet_ssl.cer
  4. To add a trusted certificate to an Oracle wallet:
    1. Syntax:  orapki wallet add -wallet -trusted_cert -cert
    2. $orapki wallet add -wallet ‘/home/oracle/admin/WALLETS’ -trusted_cert -cert ‘/tmp/testwallet_ssl.cer’
  5. To view an Oracle wallet:
    1.  Syntax:  orapki wallet display -wallet
    2. $orapki wallet display -wallet ‘/home/oracle/product/WALLETS/oracle’
 

Monday, October 26, 2015

some useful link

https://apexapps.oracle.com/pls/apex/f?p=44785:1:6886471140158490

Wednesday, July 01, 2015

Getting Started with Docker on Oracle Linux

Learn how to customize a Docker container image and use it to instantiate application instances across different Linux servers. This article describes how to create a Dockerfile, how to allocate runtime resources to containers, and how to establish a communication channel between two containers (for example, between web server and database containers).

Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries 

 

Common Docker commands





Commands
 Purpose
 docker info
 information
 docker images
 images
 docker ps -a
List all containers
 docker rm $(docker ps -a -q)
 Remove containers
 docker rmi $(docker images)
 Remove images
docker save mynewimage > /tmp/mynewimage.tar
Export images
docker load < /tmp/mynewimage.tar
Import images


docker pull oracle/nosql




Monday, February 16, 2015

Linux Containers

Linux Containers


Linux Containers (LXC) allow running multiple isolated Linux instances (containers) on the same host.

  • Lightweight and resource-friendly
  • Run multiple versions of an operating system on a single server
  • Rapid and Easy deployment

Installing Oracle Linux containers


https://blogs.oracle.com/OTNGarage/entry/linux_container_lxc_part_2

Installing Oracle on Linux containers

https://bdrouvot.wordpress.com/2014/04/25/reduce-resource-consumption-and-clone-in-seconds-your-oracle-virtual-environment-on-your-laptop-using-linux-containers-and-btrfs/

Wednesday, February 04, 2015

Oracle Migration (Windows 10g to Linux 11g ) Using storage move

Oracle Migration (Windows 10g to Linux 11g ) Using storage move.


Describes steps for migration Opera Databases 10.2.0.4 on Windows to 11.2.0.3  on Linux Red Hat Enterprise Linux using Storage Disk copy

Steps in Windows side


1) Check disks and ASM Diskgroups in Windows environment.

select disk_number,name, parth for v$asm_disk;

Check for invalid objects

select owner, count(*) from dba_objects where status='INVALID'
2) Run the 11g pre upgrade script
@%oracle_home%\rdbms\admin\utlu112s.sql

3) Shutdown database
shutdown immediate

4) Dismount ASM diskgroup
alter diskgroup dismount all;


DC STORAGE ASM DISK MOVE FROM WINDOWS TO LINUX

Steps in Linux side


1) as grid user
oracleasm scandisks
oracleasm listdisks

sqlplus / as sysasm
alter diskgroup DATADG mount;

2) as oracle user
startup mount pfile='/home/oracle/initopera_pre.ora'
alter database open upgrade
@?/rdbms/admin/catupgrd
@?/rdbms/admin/utlu112s.sql
@?/rdbms/admin/utlrp.sql

Monday, September 08, 2014

Deinstalling Oracle 11gr2 software on Windows 2003/2008

Issue


Unable to uninstall Oracle 11g software on Windows 2003/2008
D:\oracle\1120\client_1\deinstall>deinstall.bat
Checking for required files and bootstrapping ...
Please wait ...
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
'C:\DOCUME~1\vng\Local' is not recognized as an internal or external command,
operable program or batch file.

 

Solution


Check your Temp and TMP environment variables. They might indicate a path which contains spaces so, just reset them temporarily to c:\temp and then try the deinstall.bat script

Monday, August 25, 2014

Monitor the progress of Oracle session

Monitor the progress of Oracle session


Some of my fun tools I have created during my free time. :)

Progress Monitor a monitoring tool for monitor long running processes like RMAN backup, export, statistics gathering.
  • bakstatus.exe is the main executable file
  • bakstatus.exe.config – configuration file. Key1 is the sys password, Key2 is the connection string
  • Oracle.DataAccess.dll – the required oracle ddl file
  • Inprt : program : Enter the name of the program (eg RMAN for RMAN backup, EXP for export, GATHER for statistics)
  • 2 progress bar indicating the amount of percentage to be complete.
 
 
Download Files
bakstatus.exe
bakstatus.exe.config

    Dataguard Monitor (tool)


    Dataguard Monitor


    Some of my fun tools I have created during my free time. :)

    Dataguard Monitor a monitoring tool for monitor the log shipping to dataguard server. It will auto upgrade every minute. The status show the current status of the recovery process and the archive log number/instance node currently applied. The log not apply show the number of archive log waiting to be apply.

    • DGcheck.exe is the main executable file
    • Dgcheck.exe.config – configuration file. Key1 is the sys password, Key2 is the connection string
    • Oracle.DataAccess.dll – the required oracle ddl file



    Setup
    1. Download oracle odp.net ODAC1120320Xcopy_32bit from Oracle website
    2. Extract the zip file to c:\temp
    3. Install using the command
      1.  install.bat odp.net20 c:\oracle\odp odp
      2. (to uninstall uninstall all c:\oracle\odp)
    4. Unzip to the dataguard_status.zip
    5. Execute the DGcheck.exe
    Download Files



    Thursday, April 17, 2014

    Unable to execute asmcmd due to wrong Perl home

    Problem

    You may encounter this error while executing asmcmd if you have multiple Oracle_home.

    Perl lib version (v5.6.1) doesn't match executable version (v5..8.3) dt d:\oracle.......

    This is due to the perl library is using the wrong ORACLE_HOME

    Solution

    set PERL5LIB=D:\oracle\1020\asm\perl\5.8.3\lib\MSWin32-X64-multi-thread


     

    Monday, February 24, 2014

    MYSQL space management

    Finding Database size


    SELECT table_schema "Data Base Name", SUM( data_length + index_length) / 1024 / 1024
    "Data Base Size in MB"

    FROM information_schema.TABLES
    GROUP BY table_schema ;

    Finding all table size in the database


    SELECT table_name AS "Tables", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
    FROM information_schema.TABLES
    WHERE table_schema = "$DB_NAME"
    ORDER BY (data_length + index_length) DESC;

    Monday, February 17, 2014

    Diagnose Oracle RAC



    Goal

    To document the logs that should be uploaded for diagnosing Oracle Clusterware issue.
    For more information about diagcollection, check out "diagcollection.sh -help"

    This note will be obsolete in future, it's strongly recommended to use TFA to prune and collect files from all nodes:
    note 1513912.1 - TFA Collector - Tool for Enhanced Diagnostic Gathering

    Solution


    Linux/UNIX 11gR2/12cR1

    1. Execute the following as root user:
    # script /tmp/diag.log
    # id
    # env
    # cd
    # $GRID_HOME/bin/diagcollection.sh
    # exit
    The following .gz files will be generated in the current directory and need to be uploaded along with /tmp/diag.log:

    crsData_.tar.gz,
    ocrData_.tar.gz,
    oraData_.tar.gz,
    coreData_.tar.gz (only --core option specified)
    os_.tar.gz
    Please ensure all above information are provided from all the nodes.

    Linux/UNIX 10gR2/11gR1

    1. Execute the following as root user:
    # script /tmp/diag.log
    # id
    # env
    # cd
    # export OCH=
    # export ORACLE_HOME=
    # export HOSTNAME=
    # $OCH/bin/diagcollection.pl -crshome=$OCH --collect

    # exit


    The following .gz files will be generated in the current directory and need to be uploaded along with /tmp/diag.log:
    crsData_.tar.gz,
    ocrData_.tar.gz,
    oraData_.tar.gz,
    coreData_.tar.gz (only --core option specified)

    2. For 10gR2 and 11gR1, if getting an error while running root.sh, please collect /tmp/crsctl.*
    Please ensure all above information are provided from all the nodes.

    Windows 11gR2/12cR1:

    set GRID_HOME=
    %GRID_HOME%\perl\bin\perl %GRID_HOME%\bin\diagcollection.pl --collect

    The following .zip files will be generated in the current directory and need to be uploaded:
    crsData_.zip,
    ocrData_.zip,
    oraData_.zip,
    coreData_.zip (only --core option specified)


    Windows 10gR2/11gR1

    set ORACLE_HOME=
    set OCH=
    set ORACLE_BASE=
    $OCH%\perl\bin\perl %OCH%\bin\diagcollection.pl --collect

    Thursday, January 16, 2014

    Oracle Created (Default) Database Users Overview

    Overview
    During database creation, Oracle creates several default database users or schemas. This article attempts to provide some insight and explain each of these default database users/schemas.
    Oracle User Account Details
    Default Users
    Username Default Password Account Description
    SYS change_on_install All of the base tables and views for the database's data dictionary are stored in the schema SYS. These base tables and views are critical for the operation of Oracle. To maintain the integrity of the data dictionary, tables in the SYS schema are manipulated only by Oracle; they should never be modified by any user or database administrator, and no one should create any tables in the schema of the user SYS. The DBA should change the password for SYS immediately after database creation!!!
    SYSTEM manager The SYSTEM username creates additional tables and views that display administrative information, and internal tables and views used by Oracle tools. Never create in the SYSTEM schema tables of interest to individual users. SYSTEM is a little bit "weaker" user than SYS, for example, it has no access to so called X$ tables (the very internal structure tables of Oracle). Although in real life you may be in a situation when some product or whatever you want to create objects in above mentioned user's schemas. Be flexible, don't sacriface a product only because it will create some objects in SYS or SYSTEM schema The DBA should change the password for SYSTEM immediately after database creation!!!
    DBSNMP dbsnmp Supports Oracle SNMP (Simple Network Management Protocol). The Oracle Intelligent Agent requires a database logon for each SID that it manages. By default this account is called "DBSNMP" and the password is "DBSNMP". The account name and/or password SHOULD be changed from the default but you will need to make a few additional modifications. In the examples below, you will need to replace any information with brackets < > with the information from your system.
    1. Remove all Jobs and Events currently registered against this database.
    2. Stop the Intelligent Agent Oracle7 - Oracle8i
      % lsnrctl dbsnmp_stop Oracle9i
      % agentctl stop
    3. Edit the $ORACLE_HOME/network/admin/snmp_rw.ora file. Add the following parameter: SNMP.CONNECT..NAME=
      SNMP.CONNECT..PASSWORD= The variable is the exact listing of the database name as it appears in the snmp_ro.ora file. If is the default (DBSNMP), there is no need to specify the user here. Only the password is required. On UNIX, set the following permission on the "SNMP_RW.ORA" file: % chmod 600 snmp_rw.ora
    4. Change the DBSNMP password on the database. You can use either Security Manager, Sqlplus, or Server Manager. If you use SQLPlus or Server Manager, you can issue the following command: SQL> alter user "dbsnmp" identified by "";
    5. Stop and restart the Intelligent Agent.
    OUTLN outln Oracle8i adds the OUTLN user schema to support Plan Stability. The OUTLN user acts as a place to centrally manage metadata associated with stored outlines. This user has DBA role. It is used for plan stability ie. to keep the same execution plans for the same queries even if your system configuration or statistics changes. Execution plans will be the same in different Oracle releases with different optimizers. The DBA should either lock the user account or change the password for the OUTLN user immediately after database creation!!!
    MDSYS mdsys Supports Oracle Spatial. Oracle Spatial is an integrated set of functions and procedures that enables spatial data to be stored, accessed, and analyzed quickly and efficiently in an Oracle8i database. [..] The spatial attribute of a spatial feature is the geometric representation of its shape in some coordinate space. This is referred to as its geometry. The DBA should either lock the user account or change the password for the MDSYS user immediately after database creation!!!
    ORDSYS ordsys Supports Oracle8i Time Series. Oracle8i Time Series (in previous releases called the Oracle8 Time Series Cartridge) is an extension to Oracle8i that provides storage and retrieval of timestamped data through object types. Oracle8i Time Series is a building block for applications rather than being an end-user application in itself. It consists of data types along with related functions for managing and processing time series data. The DBA should either lock the user account or change the password for the ORDSYS user immediately after database creation!!!
    ORDPLUGINS ordplugins Supports Oracle interMedia. Oracle interMedia is a single product that enables Oracle8i to store, manage, and retrieve text, documents, geographic location information, images, audio, and video in an integrated fashion with other enterprise information. Oracle interMedia extends Oracle8i reliability, availability, and data management to text and multimedia content in Internet, electronic commerce, and media-rich applications as well as online Internet-based geocoding services for locator applications. The DBA should either lock the user account or change the password for the ORDPLUGINS user immediately after database creation!!!
    CTXSYS ctxsys Supports Oracle ConText Cartridge. Oracle8 ConText Cartridge provides powerful search, retrieval, and viewing capabilities for text stored in an Oracle8 database. In addition, ConText provides advanced linguistic processing of English-language text. The DBA should either lock the user account or change the password for the CTXSYS user immediately after database creation!!!
    DSSYS dssys Dynamic Services Secured Web Service. Dynamic Services Engine (DS Engine) allows creation, aggregation and deployment of services from a variety of content sources. At the moment, Dynamic Services supports content access from databases (SQL/PLSQL) as well as Internet applications (HTTP/HTTPS). DS Engine can interpret XML and HTML content along with the result sets returned from database access. DS Engine is integrated with Oracle Portal via a Web Provider mechanism. This integration allows all the services registered with DS Engine to be accessible as portlets. The DBA should either lock the user account or change the password for the DSSYS user immediately after database creation!!!
    PERFSTAT perfstat Oracle Statistics Package (STATSPACK) user that supersedes UTLBSTAT/UTLESTAT. The PERFSTAT user will hold all of the tables and packages for the performance diagnostic tool STATSPACK. Created By: $ORACLE_HOME/rdbms/admin/spcusr.sql
    WKPROXY change_on_install Used to support Oracle's Ultrasearch option. This feature (and user) was introduced in Oracle9i. The user account IS NOT locked by default is only assigned the "CREATE SESSION" privilege. None the less, this account is not locked by default and Oracle highly recommends that this default password be changed. Created By: $ORACLE_HOME/ultrasearch/admin/wk0csys.sql
    WKSYS change_on_install Used to support Oracle's Ultrasearch option. This feature (and user) was introduced in Oracle9i. The user account IS NOT locked by default and as you can see below, is granted the highly privileged role of DBA. Given that this user is granted the DBA role and is not locked by default, Oracle highly recommends that this default password be changed. This support account is assigned the following privileges in Oracle9i:
    • CONNECT
    • RESOURCE
    • DBA
    • ALL PRIVILEGES
    • CTXAPP
    • CREATE PUBLIC SYNONYM
    • DROP PUBLIC SYNONYM
    • CREATE ANY VIEW
    • DROP ANY VIEW
    • CREATE ANY TABLE
    • DROP ANY TABLE
    • CREATE ANY INDEX
    • DROP ANY INDEX
    • CREATE ANY SEQUENCE
    • DROP ANY SEQUENCE
    • CREATE ANY TRIGGER
    • DROP ANY TRIGGER
    • JAVAUSERPRIV
    • JAVASYSPRIV
    • SELECT ON SYS.USER$
    • SELECT ON SYS.V_$PARAMETER
    • SELECT ON SYS.GV_$INSTANCE
    • SELECT ON SYS.V_$DATABASE
    • SELECT ON SYS.DBA_CONSTRAINTS
    • SELECT ON SYS.DBA_JOBS
    • SELECT ON SYS.DBA_DB_LINKS
    • SELECT ON SYS.DBA_ROLE_PRIVS
    • SELECT ON SYS.DBA_LOCK
    • SELECT ON SYS.DBMS_LOCK_ALLOCATED
    • SELECT ON SYS.PROCEDURE$
    • SELECT ON SYS.DBA_TABLES
    • SELECT ON SYS.DBA_VIEWS
    • SELECT ON SYS.DBA_TAB_COLUMNS
    • EXECUTE ON SYS.DBMS_LOCK
    • EXECUTE ON SYS.DBMS_PIPE
    • EXECUTE ON SYS.DBMS_REGISTRY
    The default tablespace for this user will be "DRSYS" while its temporary tablespace will be "TEMP". Created By: $ORACLE_HOME/ultrasearch/admin/wk0install.sql

    WMSYS wmsys Used to store all the metadata information for Oracle Workspace Manager. This user was introduced in Oracle9i and (like most Oracle9i supporting accounts) is locked by default. The user account is locked because we want the password to be public but restrict access to the account to the SYS schema. So, to unlock the account, DBA privileges are required. Created By: $ORACLE_HOME/rdbms/admin/owmctab.plb
    XDB change_on_install Used to support SQL XML management: XML DB. This user is granted two roles: "RESOURCE" and "JAVAUSERPRIV". Oracle recommends changing the password for this user after creation. This user is configured with a default tablespace of "XDB" and a temporary tablespace of "TEMP". Created By: $ORACLE_HOME/rdbms/admin/catqm.sql
    ANONYMOUS ...IDENTIFIED BY VALUES 'anonymous' Used to support SQL XML management: XML DB. Allows HTTP access to Oracle XML DB. This user should only be used for HTTP logins. The account is locked near the end of the catqm.sql script. Created By: $ORACLE_HOME/rdbms/admin/catqm.sql
    ODM odm Used to support Oracle Data Mining. In Oracle9i, this user is granted the roles: "SELECT_CATALOG_ROLE", "HS_ADMIN_ROLE", "AQ_USER_ROLE". Oracle recommends changing the default password as the account IS NOT locked after creation. The default tablespace for this user is "ODM" with temporary tablespace "TEMP". The "ODM" tablespace is populated with segments from users ODM and ODM_MTR. Created By: $ORACLE_HOME/dm/admin/dmcrt.sql
    ODM_MTR mtrpw Used to support Oracle Data Mining. In Oracle9i, this user is granted "SELECT_CATALOG_ROLE" and "HS_ADMIN_ROLE". Oracle recommends changing the default password as the account IS NOT locked after creation. The default tablespace for this user is "ODM" with temporary tablespace "TEMP". The "ODM" tablespace is populated with segments from users ODM and ODM_MTR. Created By: $ORACLE_HOME/dm/admin/dmcrt.sql
    OLAPSYS mtrpw This user is create if OLAP option is installed and is used to create OLAP metadata structures. In Oracle9i, this user is granted "SELECT_CATALOG_ROLE" and "HS_ADMIN_ROLE". Oracle recommends changing the default password. The default tablespace for this user is "ODM" with temporary tablespace "TEMP". The "ODM" tablespace is populated with segments from users ODM and ODM_MTR. Created By: $ORACLE_HOME/dm/admin/dmcrt.sql
    TRACESVR trace Oracle Trace server. Supports Oracle Trace for OEM in Oracle7. Oracle Trace is used to collect a wide variety of data, such as performance statistics, diagnostic data, system resource usage, and business transaction details. This user was last used in Oracle7 and can be dropped from databases using Oracle8 and higher.
    REPADMIN Managed by DBA when user is created. Replication user. This user is manually created by the DBA using CREATE USER... This user is also created in the scripts: $ORACLE_HOME/ldap/admin/oidrsrms.sql and $ORACLE_HOME/ldap/admin/oidrsms.sql. Oracle recommends changing the default password if automatically created.

     

    Tuesday, October 22, 2013

    Accessing SSL encrypted websites using UTL_HTTP and Oracle Wallet Manager

    If you have used the UTL_HTTP package in PL/SQL to call upon external web pages or services, you might have seen following error message come by:

    SELECT utl_http.request(' https://localhost/Opera.cfg') FROM dual;
     ORA-29273: HTTP request failed
     ORA-06512: at “SYS.UTL_HTTP”, line 1130
     ORA-29024: Certificate validation failure


    From Opera SQL run the following to determine the location where the Database is looking for the wallet

    select o_http_client.get_wallet_directory from dual

    Begin
      utl_http.set_wallet('file:'||o_http_client.get_wallet_directory);
    end;

    Tuesday, October 01, 2013

    SQLServer commands 2

    Querying dynamic management views:
    • You can query sys.dm_exec_requests to find blocking queries.
    • You can query sys.dm_os_memory_cache_counters to check the health of the system memory cache.
    • You can query sys.dm_exec_sessions for information about active sessions.
    • You can use sys.dm_db_index_physical_stats  to check index fragmentation
    Running basic DBCC commands:
    • You can use DBCC FREEPROCCACHE to remove all elements from the procedure cache.
    • You can use DBCC FREESYSTEMCACHE to remove all unused entries from all caches.
    • You can use DBCC DROPCLEANBUFFERS to remove all clean buffers from the buffer pool.
    • You can use DBCC SQLPERF to retrieve statistics about how the transaction log spaceis used in all databases.
    • DBCC SHOWCONTIG to show index fragmentation
    Using the KILL command to end an errant session






    Identifying and Rectifying the Cause of a Block
    SELECT session_id, status, blocking_session_id
     FROM sys.dm_exec_requests
     WHERE blocking_session_id >
     
    Finding Last Backup Time for All Database
    SELECT sdb.Name AS DatabaseName,
    COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),'-') AS LastBackUpTime
    FROM sys.sysdatabases sdb
    LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name
    GROUP BY sdb.Name
     
    Duration of backup
    DECLARE @dbname sysname
    SET @dbname = NULL --set this to be whatever dbname you want
    SELECT bup.user_name AS [User],
     bup.database_name AS [Database],
     bup.server_name AS [Server],
     bup.backup_start_date AS [Backup Started],
     bup.backup_finish_date AS [Backup Finished]
     ,CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))/3600 AS varchar) + ' hours, '
     + CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))/60 AS varchar)+ ' minutes, '
     + CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))%60 AS varchar)+ ' seconds'
     AS [Total Time]
    FROM msdb.dbo.backupset bup
    WHERE bup.backup_set_id IN
      (SELECT MAX(backup_set_id) FROM msdb.dbo.backupset
      WHERE database_name = ISNULL(@dbname, database_name) --if no dbname, then return all
      AND type = 'D' --only interested in the time of last full backup
      GROUP BY database_name)
    /* COMMENT THE NEXT LINE IF YOU WANT ALL BACKUP HISTORY */
    AND bup.database_name IN (SELECT name FROM master.dbo.sysdatabases)
    ORDER BY bup.database_name


      

    Thursday, August 15, 2013

    How to relocate Oracle RAC Service

    Starting/Stopping Database instance

    The database (all instances) can be shut down / started by running the below command from a command prompt window of the database servers.




     srvctl stop database –d opera –o immediate

    srvctl start database –d opera

    srvctl start database –d opera –o mount
    srvctl stop instance –d opera –i opera3 –o immediate
    or
    srvctl stop instance –d opera –i "opera1,opera2 –o immediate 
     





    Starting/Stopping Services






     srvctl start service –s "volors,oxihub" –d opera



    How to set auto start resources in 11G RAC

    https://oracleracdba1.wordpress.com/2013/01/29/how-to-set-auto-start-resources-in-11g-rac/ 
     

    How to relocate Oracle RAC Service

    All cluster services related to node 1 will be in OFFLINE state.

    Take note on the slhors service. This service will failover to node 3 when either node 1 or 2 is down.

    When we check using the srvctl command, you will this:





     d:\oracle\1020\crs\bin> srvctl status service -d opera -s slhorsservice slhors is running on instance opera2,opera3



    It is now handled by opera2 and opera3 instances because node1 is down.

    However, even after node 1 is up, instance opera3 won’t move the service back to opera1, therefore, we have to manually relocate the slhors service handled by opera3 back to opera using the following statement:






     
    d:\oracle\1020\crs\bin> srvctl relocate service -d opera -s slhors -i opera3 -t opera1





    Note that the slhors is now handled by opera1, opera2 again as it should be.