About Vincent

Oracle DBA OCP 10g, 9i, 8 Electronic music producer

PeopleTools overview

PeopleTools is proprietary software development environment that is used to develop and manage PeopleSoft applications. PeopleTools consist of Application Designer, Application Engine, Data Mover and various other development tools.

PeopleSoft Application Designer

Application Designer is used to create and customize PeopleSoft applications. It can be invoked from PeopleSoft File server using utility pside.exe. Developers use application designer to develop, customize and maintain PS application. They can create fields, records, pages, components & other PS objects and insert these objects in a PeopleSoft project which can be migrated to other PS environments.

As a PeopleSoft Administrator, you can use application designer for the following:

  • During installation of PeopleSoft database
  • Compare PS objects between different databases using PS projects
  • Copy projects from one database to another
  • Take export of PeopleSoft projects
  • During upgrade to set upgrade flags
  • Administer Change control locking
  • Generate and execute scripts for record build
  • Change access id password

 

Data Mover

Data mover as the name suggest is the tool that is used to migrate data between PeopleSoft databases. You can export tables from one PeopleSoft database and then import those into another PeopleSoft database. Data mover can be invoked using psdmt.exe utility.

As a PeopleSoft Administration, you can use Data Mover for the following:

  • Migrate data between PeopleSoft databases
  • Run DMS to update/delete/insert data in PeopleSoft tables
  • Change password for PeopleSoft users
  • Change access ID password
  • Encrypt user passwords
  • During installation of PeopleSoft database
  • During PeopleSoft upgrades
  • During PeopleSoft refreshes

 

Configuration Manager

PeopleSoft configuration manager utility is used to set the configuration for PeopleTools client machines which are used to access PeopleTools such as Application Designer, Data Mover. PS configuration manager can be invoked using pscfg.exe.

As a PeopleSoft Admin, you will use configuration manager for the following:

  • During installation of PeopleSoft database
  • Setup PeopleTools client on developer’s machine
  • During PeopleSoft upgrades
  • Setup configuration for crystals, SQRs
  • Setup parameters required to connect to PeopleSoft database in 2-tier and 3-tier mode

 

How to extract DDL for scheduler jobs owned by SYS?

We can’t export scheduler jobs which are owned by SYS user. If you try to get DDL for scheduler jobs owned by SYS you’ll hit ORA-31603 error
The solution of this problem is to copy the scheduler job to another user (e.g. vfenoll) and then extract the DDL with dbms_metadata.

 

Here is the steps with an example:

— create the temporary user
create user vfenoll identified by tempuser1234;

— build the copy statement
set head off lines 130
select ‘exec dbms_scheduler.copy_job(”SYS.’ || job_name || ”’, ”VFENOLL.’ || job_name || ”’);’ from dba_scheduler_jobs where owner=’SYS’;

— select the jobs you want to copy (probably at the end of the list) and execute the copy_job for your selection
[…]
exec dbms_scheduler.copy_job(‘SYS.PURGE_FGA_TRAILS’, ‘VFENOLL.PURGE_FGA_TRAILS’);
[…]

# Build the DDL statements
SET ECHO OFF NEWP 0 SPA 0 PAGES 0 FEED OFF HEAD OFF TRIMS ON TAB OFF SERVEROUT OFF VER OFF

exec DBMS_METADATA.set_transform_param (DBMS_METADATA.session_transform, ‘SQLTERMINATOR’, true);

exec DBMS_METADATA.set_transform_param (DBMS_METADATA.session_transform, ‘PRETTY’, true);

spool gen_sys_scheduler_jobs.sql
select ‘select dbms_metadata.get_ddl(”PROCOBJ”,”’ || job_name || ”’,”VFENOLL”) from dual;’ from dba_scheduler_jobs where owner=’VFENOLL’;
spool off

# extract the DDL
set long 2000 head off
spool sys_scheduler_jobs.sql
@gen_sys_scheduler_jobs.sql
spool off
[…]

BEGIN
dbms_scheduler.create_job(‘”PURGE_FGA_TRAILS”‘,
job_type=>’PLSQL_BLOCK’, job_action=>
‘BEGIN DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL(2, TRUE); END;’
, number_of_arguments=>0,
start_date=>NULL, repeat_interval=>
‘FREQ=HOURLY;INTERVAL=24’
, end_date=>NULL,
job_class=>'”DEFAULT_JOB_CLASS”‘, enabled=>FALSE, auto_drop=>TRUE,comments=>
‘Audit clean job = ”PURGE_FGA_TRAILS”’
);

COMMIT;
END;
/

[…]
spool off

 

— Format the output, change enabled=>FALSE   to TRUE, remove the COMMITs.

You can also recreate the jobs in Cloud Control with the all the informations you gathered.

 

— drop the temporary user with the jobs
drop user vfenoll cascade;

 

It’s never a good idea to create jobs (or other objects) in SYS, prefer another schema :)

Author: V. Fenoll Oracle DBA Montreal

Activation of dgbroker in a Oracle 12c r2 RAC

Activation of dgbroker in a Oracle 12.2 configuration

- Primary RAC 2 nodes:
servers: PRIMARY-HOST-NODE1 and PRIMARY-HOST-NODE2
database: PRIMARY-DB-UNIQ-NAME1 and PRIMARY-DB-UNIQ-NAME2
- Standby: RAC 1 node
server: STANDBY-HOST-NODE1
database: STANDBY-DB-UNIQ-NAME1 (here SID has the same name as primary)

Pre-requisites for the dgbroker configuration

Network configuration

Prepare a dedicated local listener on each node

All Data Guard Broker configurations must have a specific static listener entry configured in the local listener of each instance in the Data Guard configuration for the Primary database and all standby databases. A static entry is needed for the Broker to be able to connect remotely to a database that has been shut down by the Broker during certain operations.

listener.ora
Example for node PRIMARY-HOST-NODE1. Has also to be done for PRIMARY-HOST-NODE2 and STANDBY-HOST-NODE1.

LISTENERDG =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = PRIMARY-HOST-NODE1)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
)

SID_LIST_LISTENERDG =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = PRIMARY-DB-UNIQ-NAME1)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/dbhome_1)
(SID_NAME = PRIMARY-DB-UNIQ-NAME1)
)
(SID_DESC =
(GLOBAL_DBNAME = PRIMARY-DB-UNIQ-NAME_DGB)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/dbhome_1)
(SID_NAME = PRIMARY-DB-UNIQ-NAME1)
)
)

USE_SID_AS_SERVICE_listenerDG=ON
ADR_BASE_LISTENERDG = /u01/app/oracle


Add alias in the tnsnames.ora

On each node (2 primary/ 1standby) we create an alias on the dedicated listener LISTENERDG (1522 port).

 

Primary nodes

 

# Primary alias(for node 2, modify for PRIMARY-HOST-NODE2 and PRIMARY-DB-UNIQ-NAME2
PRIMARY-DB-UNIQ-NAME =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = PRIMARY-HOST-NODE1)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PRIMARY-DB-UNIQ-NAME1)
(INSTANCE_NAME = PRIMARY-DB-UNIQ-NAME1)
)
)

# Standby alias STANDBY-DB-UNIQ-NAME1
STANDBY-DB-UNIQ-NAME1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = STANDBY-HOST-NODE1)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID =PRIMARY-DB-UNIQ-NAME1)
)
)

Standby node

# Primary alias (use of: scan host and PRIMARY-DB-UNIQ-NAME_DGB service)

PRIMARY-DB-UNIQ-NAME =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = PRIMARY-SCAN)(PORT = 1522))
(CONNECT_DATA =
(SERVICE_NAME =PRIMARY-DB-UNIQ-NAME_DGB)
)
)

# Standby alias
STANDBY-DB-UNIQ-NAME1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = STANDBY-HOST-NODE1)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID =PRIMARY-DB-UNIQ-NAME1)
)
)

Database configuration parameters

Dgbroker config files

On the Primary host

Create DGBROKER directory on ASM: +DATA/PRIMARY-DB-UNIQ-NAME/DGBROKER
Set dg_broker_config_file1 and dg_broker_config_file2:

alter system set dg_broker_config_file1 = '+DATA/PRIMARY-DB-UNIQ-NAME/DGBROKER/dr1PRIMARY-DB-UNIQ-NAME.dat' scope=both sid='*';
alter system set dg_broker_config_file2 = '+DATA/PRIMARY-DB-UNIQ-NAME/DGBROKER/dr2PRIMARY-DB-UNIQ-NAME.dat' scope=both sid='*';

(dg_broker_start parameter has to be=false before modifying dg_broker_config_file)

On the standby

Create DGBROKER directory on ASM: +DATA/STANDBY-DB-UNIQ-NAME1 /DGBROKER

alter system set dg_broker_config_file1 = '+DATA/STANDBY-DB-UNIQ-NAME1/DGBROKER/dr1PRIMARY-DB-UNIQ-NAME.dat' scope=both sid='*';
alter system set dg_broker_config_file2 = '+DATA/STANDBY-DB-UNIQ-NAME1/DGBROKER/dr2PRIMARY-DB-UNIQ-NAME.dat' scope=both sid='*';

 

Change of 2 parameters

On primary and standby:

alter system set dg_broker_start=true scope=both sid='*';
alter system set LOG_ARCHIVE_DEST_2='' scope=both sid='*';

 

Dataguard configuration

On primary or standby;
dgmgrl (in the database Oracle_home)

connect /
— Optional: in case a configuration already exists, we drop it.
disable database STANDBY-DB-UNIQ-NAME1
remove configuration;

-- Configuration creation
CREATE CONFIGURATION dgb_prod AS PRIMARY DATABASE IS PRIMARY-DB-UNIQ-NAME CONNECT IDENTIFIER IS PRIMARY-DB-UNIQ-NAME;

-- Add 1 standby db
ADD DATABASE STANDBY-DB-UNIQ-NAME1 AS CONNECT IDENTIFIER IS STANDBY-DB-UNIQ-NAME1 MAINTAINED AS PHYSICAL;

-- Enable
enable configuration;

-- see config
show configuration
(Result:)
Configuration - dgb_prod
Protection Mode: MaxPerformance
Members:
PRIMARY-DB-UNIQ-NAME - Primary database
STANDBY-DB-UNIQ-NAME1 - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 36 seconds ago)

 

Verification of the configuration

show configuration

show database verbose STANDBY-DB-UNIQ-NAME1

validate database ‘STANDBY-DB-UNIQ-NAME1’

validate database ‘PRIMARY-DB-UNIQ-NAME’

 

Switchover

— Always connect with password for switchover/Failover
connect sys/my-sys-password@PRIMARY-DB-UNIQ-NAME

switchover to STANDBY-DB-UNIQ-NAME1

show configuration verbose

— Return to primary
connect sys/my-sys-password@PRIMARY-DB-UNIQ-NAME

switchover to STANDBY-DB-UNIQ-NAME1 PRIMARY-DB-UNIQ-NAME

show configuration verbose

 

Failover

FAILOVER TO STANDBY-DB-UNIQ-NAME1

— If flashback enabled, the original primary database can now be configured as a standby.
REINSTATE DATABASE PRIMARY-DB-UNIQ-NAME

 

Snapshot Standby

— If flashback database is enabled on primary (not mandatory for standby)
dgmgrl
connect sys/my-sys-password@PRIMARY-DB-UNIQ-NAME
CONVERT DATABASE cdb1_stby TO SNAPSHOT STANDBY;
[Work read/write on STANDBY-DB-UNIQ-NAME1]
— When finished working, convert it back to a standby database
CONVERT DATABASE cdb1_stby TO PHYSICAL STANDBY;

 

Disable/Enable the log transport on the primary

OFF

dgmgrl /
DGMGRL> edit database ‘cbuerpp’ set state=TRANSPORT-OFF;
DGMGRL> show database verbose ‘cbuerpp’
Database – cbuerpp
Role: PRIMARY
Intended State: TRANSPORT-OFF
Instance(s):
…..

If we look at the db parameter:
SQL> show parameter log_archive_dest_state_2

NAME TYPE VALUE
———————————— ———– ——————————
log_archive_dest_state_2 string RESET

 

ON

DGMGRL> edit database ‘cbuerpp’ set state=TRANSPORT-ON;

 

Disable/Enable the log apply in the standby database

APPLY-OFF

EDIT DATABASE ‘cbuerps’ SET STATE=’APPLY-OFF’;

APPLY-ON

EDIT DATABASE ‘cbuerps’ SET STATE=’APPLY-ON’;

 

Other commands

— Change Protection mode
EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability;

— Change property of a member (see properties with “show database verbose STANDBY-DB-UNIQ-NAME1”)
edit database STANDBY-DB-UNIQ-NAME1 set property LogXptMode=’SYNC’;
edit database STANDBY-DB-UNIQ-NAME1 set property StandbyFileManagement=’AUTO’;

— Change a parameter (e.g. database verbose)
EDIT DATABASE ‘STNDBY’ SET PROPERTY ‘Enterprise Manager Name’ = ‘STNDBY.MY_DB_DOMAIN’;

EDIT DATABASE ‘MYDB’ SET PROPERTY ‘Enterprise Manager Name’ = ‘MYDB.MY_DB_DOMAIN’;

 

Author: Vincent Fenoll – Oracle DBA Montréal

Resource is in UNKNOWN state and srvctl Cannot Start/Stop the Resource

An Oracle RAC Service is in UNKNOWN state on instance 1 and it is impossible to stop or start it with srvctl.

crs_stat -u ora.DBName.My-ServiceName.DBName1.srv

NAME=ora.DBName.My-ServiceName.DBName1.srv
TYPE=application
TARGET=ONLINE
STATE=UNKNOWN on Host1

 

Solution:

The UNKNOWN state can often be resolved by bringing the resource offline using crs_stop.

If the resource is not in Unknown state: Use srvctl to stop it and do not use crs_stop (as mentionned in note Oracle support note 845709.1 there’s a risk of corruption of the OCR).

Make sure that you have a recent backup of your OCR:
ocrconfig -showbackup

Restore the instance resource to OFFLINE with this command:
crs_stop ora.DBName.My-ServiceName.DBName1.srv

Verify the status is now OFFLINE:
crs_stat -u ora.DBName.My-ServiceName.DBName1.srv

NAME=ora.DBName.My-ServiceName.DBName1.srv
TYPE=application
TARGET=OFFLINE
STATE=OFFLINE

Bring the service online with srvctl:
srvctl start service -d DBName -i DBName1 -s My-ServiceName

Verify that the service is ONLINE:
crs_stat -u ora.DBName.My-ServiceName.DBName1.srv

NAME=ora.DBName.My-ServiceName.DBName1.srv
TYPE=application
TARGET=ONLINE
STATE=ONLINE on Host1

Source : CRS: Resource in UNKNOWN state and srvctl Cannot Start/Stop the Resource (Doc ID 845709.1)

 

 

Useful Oracle RAC Commands

Oracle RAC useful commands for DBA

Here is a FAQ of useful Oracle RAC Commands I use for Oracle 11g and 12c.

Shutdown and Start sequence of Oracle RAC components
Manage low level cluster resources: CRS, HAS, cluster
Manage Network components
Manage the Oracle Cluster Registry (OCR)
Manage database components

Main command:
Clusterware Resource Status Check : crsctl status resource -t (or shorter: crsctl stat res -t)

 

Shutdown and Start sequence of Oracle RAC components

Stop Oracle RAC (11g, 12c)

1. emctl stop dbconsole (11c only. In 12c DB Express replaces dbconsole and doesn’t have to be stopped )
2. srvctl stop listener [-listener listener_name] [-node node_name] [-force] (stops all listener services)
3. srvctl stop database -db db_unique_name [-stopoption stop_options] [-eval(12c only)] [-force] [-verbose]
4. srvctl stop asm [-proxy] [-node node_name] [-stopoption stop_options] [-force]
5. srvctl stop nodeapps [-node node_name] [-gsdonly] [-adminhelper] [-force] [-relocate] [-verbose]
6. crsctl stop crs

 

Start Oracle RAC (11g, 12c)

1. crsctl start crs
2. crsctl start res ora.crsd -init
3. srvctl start nodeapps [-node node_name] [-gsdonly] [-adminhelper] [-verbose]
4. srvctl start asm [-proxy] [-node node_name [-startoption start_options]]
5. srvctl start database -db db_unique_name [-eval(12c only)]] [-startoption start_options] [-node node_name]
6. srvctl start listener [-node node_name] [-listener listener_name] (start all listener services)
7. emctl start dbconsole (11c only)

 
To start resources if that are still down(e.g. ora.ons, Listener):
crsctl start resource -all
 

DEBUG:
Starting with Oracle 12c, the log and trace files of the clusterware files are stored in the Automatic Diagnostic Repository (ADR) under the ADR_HOME location $ADR_BASE/diag/crs/`hostname`/crs.

$ adrci
adrci> show homes

 

Manage low level cluster resources: CRS, HAS, cluster

How to display the status of resources in RAC?

Clusterware Resource Status Check : crsctl status resource -t (or shorter: crsctl stat res -t)

Find offline resources: crs_stat -t | grep -i offline

 

How to check the current status of a cluster?

crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

To know the cluster name: olsnodes -c

 

How to check the current status of CRS?

crsctl check crs
CRS-4638: Oracle High Availability Services is online (has)
CRS-4537: Cluster Ready Services is online (crs)
CRS-4529: Cluster Synchronization Services is online (css)
CRS-4533: Event Manager is online

 

How to Stop/Start the local node?

crsctl stop has
This command will also abort the database and CRS. Local Listeners will stop and VIP listeners will migrate elsewhere.

crsctl start has
This command will start all the CRS components, listeners and the database.

 

How to Stop/Start the whole cluster?

crsctl stop cluster -all
crsctl start cluster -all

 

How to To start and stop oracle clusterware (CRS)?

crsctl stop crs
crsctl start crs

 

Manage Network components


How to display global public and global cluster_interconnect?

C:\Windows\system32>oifcfg ge34f
Heartbeat 194.56.67.0 global cluster_interconnect,asm
Production 10.356.3.0 global public

 

How to check if nodeapps running on a node?

srvctl status nodeapps [-n my-node]
For each VIP address: network enabled/disabled, running on node host1 or not running.

Nodeapps are standard set of oracle application services which are started automatically for RAC.
Node apps Include:
1) VIP
2) Oracle Net listeners
3) Global Service Daemon
4) Oracle Notification Service (ONS).

Nodeapp Services run on each node of the cluster. They switch over to other nodes through VIP during a failover.

 

How to check the SCAN Configuration?

The SCAN makes it possible to add or remove nodes from the cluster without needing to reconfigure clients.

Using CLUVFY to Confirm DNS is Correctly Associating the SCAN addresses.

cluvfy comp scan
Verifying Single Client Access Name (SCAN) …PASSED
Verification of SCAN was successful.
CVU operation performed: SCAN
Date: Oct 19, 2017 1:17:59 PM
CVU home: C:\…\grid_home\bin\..\
User: .\VFENOLL

 

How to display the current configuration of the SCAN VIPs?

srvctl config scan
SCAN name: MY-CLUSTER-SCAN, Network: 1
Subnet IPv4: 10.104.2.0/255.255.255.0/Production, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 10.404.2.677
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 2 IPv4 VIP: 10.404.2.618
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 3 IPv4 VIP: 10.404.2.619
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:

 

How to display the status of SCAN VIPs and SCAN listeners?

srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node my-node1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node my-node2
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node my-node1

If you want to add or modify a scan VIP: srvctl add | modify scan -n my-scan
To delete it: srvctl remove scan

 

How to display the status of SCAN listeners?

srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node my-node1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node my-node2
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node my-node1

If you want to add or remove a scan_listener: srvctl add | remove scan_listener
To change the port: srvctl modify scan_listener -p

 

Manage the Oracle Cluster Registry (OCR)


How to verify the integrity of OCR?

cluvfy comp ocr -n all -verbose
Verifying OCR Integrity …PASSED
Verification of OCR integrity was successful.
CVU operation performed: OCR integrity
Date: Oct 11, 2017 4:56:01 PM
CVU home: C:\…grid_home\bin\..\
User: \VFENOLL

 

How to backup the OCR?

Oracle takes physical backup of OCR automatically every 3 hours. Default location is CRS_home/cdata/my_cluster_name/OCRBackup.
The ocrconfig tool is used to make daily copies of the automatically generated backup files.

Show backups:
ocrconfig -showbackup

Change default location of physical OCR copies:
ocrconfig -backuploc

After that, you have to copy these files on tape or in another backup location (cp -p -R CRS_home/cdata/my_cluster_name /u03/backups )

To do a manual backup:
ocrconfig -export /u03/backups/exports/OCR_exportBackup.dmp

 

How to recover OCR from physical or export backup?

Pre-requisite: All RAC components shutdow

Recover OCR from automatic physical backups:
crconfig -restore CRS_home/cdata/my_cluster_name/OCRBackup/backup00.ocr

Recover OCR from export backup:
ocrconfig -import /u03/backups/exports/OCR_exportBackup.dmp

 

How to backup the Voting disks?

In older versions of Oracle Clusterware you have to backup voting disks with the dd command.
Starting with Oracle Clusterware 11g Release 2 you no longer need to backup them. Voting disks are automatically backed up as a part of the OCR.

 

Manage database components


How to find the name of the database?

This name is useful as it is used in RAC commands with -d parameter.
With SQL*Plus:
connect / as sysdba
show parameter db_unique_name
With crsctl:
crsctl status resource -t | grep db

 

How to inspect the database configuration?

srvctl config database -d my-db-name
Database unique name: my-db-name
Database name: my-db-name
Oracle home: D:\oracle\db\product\12.2.0\dbhome_1
Oracle user: nt authority\system
Spfile: +DATA/my-db-name/PARAMETERFILE/spfile.272.9460543263
Password file: +DATA/my-db-name/PASSWORD/pwdmy-db-name.256.998734039
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,FRA
Mount point paths:
Services: my-db-name1,my-db-name2,srv1,srv2, srv3
Type: RAC
Start concurrency:
Stop concurrency:
Database instances: my-db-name1,my-db-name2
Configured nodes: node1,node2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed

 

How to display the name and the status of the instances in the RAC?

srvctl status database -d my-db-name
Instance my-db-name1 is running on node node1
Instance my-db-name2 is not running on node node2

To list just active nodes: olsnodes -s –t

 

How to start|stop the database?

srvctl stop database -d my-db-name -o immediate
srvctl start database -d my-db-name

 

How to start|stop one instance of the RAC?

srvctl start instance -d my-db-name -i my-db-name1
srvctl stop instance -d my-db-name -i my-db-name1
Use -force if the instance to stop is not on the local server

 

How to start and stop a PDB in Oracle RAC?

Stop a PDB

On the current node [or on all the nodes]:
ALTER PLUGGABLE DATABASE my-PDB-name CLOSE IMMEDIATE [Instances=all];
This will stop the associated service too.
Manually stopping the associated service will not close the PDB. You have to use this SQL command.

 

Start a PDB

On the current node [or on all the nodes]:
ALTER PLUGGABLE DATABASE my-PDB-name OPEN [Instances=all;]
You can also start the PDB with the associated service
This will NOT start the service(s) associated with this PDB.

 

How to stop and start a Listener?

srvctl stop listener -l LISTENER_NAME
srvctl start listener -l LISTENER_NAME

 

Author: Vincent Fenoll Oracle DBA Montreal

Posted in RAC