update : 25-06-2017

DBA Script : rac_instances.sql

-- | FILE : rac_instances.sql |
-- +----------------------------------------------------------------------------+
-- | |
-- | |
-- | www.high-oracle.com |
-- |----------------------------------------------------------------------------|
-- | www.high-oracle.com |
-- |----------------------------------------------------------------------------|
-- | DATABASE : Oracle |
-- | FILE : rac_instances.sql |
-- | CLASS : Real Application Clusters |
-- | PURPOSE : Provide a summary report of all configured instances for the |
-- | current clustered database. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
SET TERMOUT OFF;
COLUMN current_instance NEW_VALUE current_instance NOPRINT;
SELECT rpad(sys_context('USERENV', 'INSTANCE_NAME'), 17) current_instance
FROM dual;
SET TERMOUT ON;
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | Report : Oracle RAC Instances |
PROMPT | Instance : ¤t_instance |
PROMPT +------------------------------------------------------------------------+
SET ECHO OFF
SET FEEDBACK 6
SET HEADING ON
SET LINESIZE 180
SET PAGESIZE 50000
SET TERMOUT ON
SET TIMING OFF
SET TRIMOUT ON
SET TRIMSPOOL ON
SET VERIFY OFF
CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES
COLUMN instance_name FORMAT a13 HEAD 'Instance|Name / Number'
COLUMN thread# FORMAT 99999999 HEAD 'Thread #'
COLUMN host_name FORMAT a28 HEAD 'Host|Name'
COLUMN status FORMAT a6 HEAD 'Status'
COLUMN startup_time FORMAT a20 HEAD 'Startup|Time'
COLUMN database_status FORMAT a8 HEAD 'Database|Status'
COLUMN archiver FORMAT a8 HEAD 'Archiver'
COLUMN logins FORMAT a10 HEAD 'Logins?'
COLUMN shutdown_pending FORMAT a8 HEAD 'Shutdown|Pending?'
COLUMN active_state FORMAT a6 HEAD 'Active|State'
COLUMN version HEAD 'Version'
SELECT
instance_name || ' (' || instance_number || ')' instance_name
, thread#
, host_name
, status
, TO_CHAR(startup_time, 'DD-MON-YYYY HH:MI:SS') startup_time
, database_status
, archiver
, logins
, shutdown_pending
, active_state
, version
FROM
gv$instance
ORDER BY
instance_number;

End Script

Oracle Database Error Messages



Oracle Database High Availability Any organization evaluating a database solution for enterprise data must also evaluate the High Availability (HA) capabilities of the database. Data is one of the most critical business assets of an organization. If this data is not available and/or not protected, companies may stand to lose millions of dollars in business downtime as well as negative publicity. Building a highly available data infrastructure is critical to the success of all organizations in today's fast moving economy.

Well, the reason for above error is that i have taken the above script from a 11g database and running it on 10g database. 11g has bring some changes in password management. Below code is executed on 11g and user created successfully, which is expected result.