6 Troubleshooting Global Data Services
The following topics provide information about tools and solutions for troubleshooting the GDS issues you might encounter.
6.1 Obtaining the Running Status of Global Data Services Components
The status
command can be used to obtain the running status of the GDS components.
GDSCTL>status gsm GDSCTL>status service GDSCTL>status database
6.2 Viewing Static Configuration Information for Global Data Services Components
The gdsctl config
command can be used to obtain the static configuration information of various GDS components.
GDSCTL>config GDSCTL>config gsm GDSCTL>config region GDSCTL>config gdspool GDSCTL>config database GDSCTL>config service GDSCTL>config invitednode
6.3 Networking Issues
This topic includes the following issues:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
ORA-12516: TNS:listener could not find available handler with matching protocol stack
ORA-12541: TNS:no listener
GSM-40167: VNCR entry "<hostname>" is not resolvable on GSM host
6.3.1 ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
The global service may be down. Verify that the pool databases are up and the service is started.
The global service may be disabled. Ensure that the pool databases are up and the service is enabled and started.
The GDS pool database may be down. Ensure that the GDS pool databases are up and the service is enabled and started.
6.3.2 ORA-12516: TNS:listener could not find available handler with matching protocol stack
The GDS pool database's local listener may be down. Ensure that the GDS pool database local listener is running.
6.3.3 ORA-12541: TNS:no listener
All global service managers may be down. Verify that the global service managers are running.
6.3.4 GSM-40167: VNCR entry "<hostname>" is not resolvable on GSM host
GSM restart after GSM-upgrade fails with error: GSM-40167: VNCR entry
"<hostname>" is not resolvable on GSM
host
This issue is most likely due to the presence of short hostnames in the VNCR list causing an issue during GSM start in 23ai. If this issue is encountered, remove invitednode of the two short shard hostname entries and then try to start the GSM.
6.4 add brokerconfig
Related
Issues
A common issue that could happen during configuration of GDS environment is absence of
database registration on GSM listeners. To detect this customers typically use GDSCTL
status database
command. The output of this command will show:
status database
Database: "test" Registered: N State: Ok ONS: Y. Role: N/A Instances: 0 Region: region1
Service: "test_failover" Globally started: Y Started: N
Scan: Y Enabled: Y Preferred: Y
The noteworthy part of this output is Registered
property that shows the
value N
, indicating No registration.
Remember that database registration on a GDS listener requires a region to be assigned to
the database. If the add brokerconfig
command was used to add databases
to GDS pool in presence of two or more regions and the status database command shows No
registration, assign the region manually using the modify database
command:
modify database … -region <region_name>
If you are adding more than one standby database to the GDS configuration
simultaneously, you might receive an ORA-45539: Database db_name has
already been added to another pool
. The solution is to add and sync them
one at a time.
6.5 Invalid Objects Related Issues
After installing a Database Release Update (DBRU) or individual patches, some
objects in the GSMADMIN_INTERNAL
schema may become invalid in the
database as a whole or in individual containers (PDBs). For example, assume the query
below is issued after a DBRU:
select owner, object_name, object_type, status from dba_objects
where status='INVALID' and owner='GSMADMIN_INTERNAL' order by owner, object_name, object_type;
OWNER OBJECT_NAME OBJECT_TYPE STATUS CON_ID
----------------- ---------------------- ------------- ------- ------
GSMADMIN_INTERNAL DBMS_GSM_POOLADMIN PACKAGE BODY INVALID 3
GSMADMIN_INTERNAL CAT_ROLLBACK_TRIGGER TRIGGER INVALID 3
GSMADMIN_INTERNAL REQUEST_DELETE_TRIGGER TRIGGER INVALID 3
GSMADMIN_INTERNAL DONE_TRIGGER TRIGGER INVALID 3
...
The datapatch script execution failed due to Invalid Objects on GSMADMIN_INTERNAL schema. In order to resolve the invalid object issues, re-running Oracle-provided scripts is necessary by following these steps:
1. Ensure that the GSMADMIN_INTERNAL schema does not contain any user data.
If the Global Data Services (GDS) or Oracle Sharding features are in use, the GSMADMIN_INTERNAL schema may contain important configuration data.
Run the following query as SYS to verify that the schema is empty. For container databases (CDBs), this query MUST be run in CDB$ROOT and in all pluggable databases (PDBs).
select count(*) from gsmadmin_internal.cloud;
If this query returns 0 (zero), then move on to the next step. If it returns non-zero, contact Oracle Customer Support for further guidance.
2. Connect to the database as SYS using SQL*Plus. If the database is a CDB, connect to CDB$ROOT, not to any individual PDB.
3. Run the following commands:
SQL> spool /tmp/invalids.out
SQL> alter session set “_ORACLE_SCRIPT” = true;
SQL> drop user gsmadmin_internal cascade;
SQL> alter session set “_ORACLE_SCRIPT” = false;
SQL> @?/rdbms/admin/catgwm.sql
SQL> @?/rdbms/admin/dbmsgwm.sql
SQL> @?/rdbms/admin/catgwmcat.sql
SQL> @?/rdbms/admin/prvtgwm.sql
SQL> @?/rdbms/admin/utlrp.sql
SQL> spool off
4. Validate that there are no invalid objects owned by GSMADMIN_INTERNAL by running the
following query: select owner, object_name, object_type, status from
dba_objects where status='INVALID' and owner='GSMADMIN_INTERNAL' order by owner,
object_name, object_type;
If no rows are returned, then the GSMADMIN_INTERNAL schema is now correct.
If there are still invalid objects, then contact Oracle Customer Support for further guidance and provide the output from the scripts as found in /tmp/invalids.out.
5. Finally, in certain instances, it is possible that some GSMADMIN_INTERNAL objects have been incorrectly created in the SYS schema.
These objects should therefore be dropped since they are duplicates of the correct objects in the GSMADMIN_INTERNAL schema.
To identify objects owned by SYS which should be dropped, run the following query as
SYS: select object_name, object_type from dba_objects where owner = ‘SYS’
and (object_name, object_type) in (select object_name, object_type from dba_objects
where owner = ‘GSMADMIN_INTERNAL’) order by object_name, object_type;
This will generate a list of all objects owned by SYS that are also in GSMADMIN_INTERNAL.
Since these objects were created in the wrong schema, they should all be dropped using the appropriate DROP commands from SQL*Plus.
Re-running this query should return 0 (zero) rows when all listed objects have been dropped.
6.6 User and Password Management Issues
This section contains information for troubleshooting user and password issues, such as:
- ORA-01045
6.6.1 ORA-01045: user GSMADMIN_INTERNAL lacks CREATE SESSION privilege; logon denied
The user GSMADMIN_INTERNAL
is an internal only user, it should never be unlocked or used for any database login. No direct modifications should be made on the Global Data Services schema objects unless directed by Oracle Technical Support.
6.7 Troubleshooting GDS Issues
GSM-45034: Connection to GDS catalog is not established
- Connecting to GDS Configuration Databases When No Global Service Managers Are Running
- Connecting to Catalog Databases When No Global Service Managers Are Running
- Using
SYS_CONTEXT
Parameters in a GDS Environment
6.7.1 GSM-45034: Connection to GDS catalog is not established
The GDS catalog database or its listener may be down. Verify that the GDS catalog database and its local listener are running.
6.7.2 Connecting to GDS Configuration Databases When No Global Service Managers Are Running
You need multiple address lists; the first list should be exclusively regional global service manager listeners, the second list contains global service manager listeners of the buddy region and the third list contains local listeners.
You can always connect through a global service manager while it is up, and only fail over to local listeners when all global service manager listeners are down.
Template:
(DESCRIPTION= (FAILOVER=on) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(global_protocol_address_information)) (ADDRESS=(global_protocol_address_information)) (ADDRESS=(global_protocol_address_information)) ) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(global_protocol_address_information)) (ADDRESS=(global_protocol_address_information)) (ADDRESS=(global_protocol_address_information)) ) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(local_protocol_address_information)) (ADDRESS=(local_protocol_address_information)) ) (CONNECT_DATA= (SERVICE_NAME=global_service_name) (REGION=region_name)))
Example:
(DESCRIPTION= (FAILOVER=on) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(HOST=gsmhost1)(PORT=1523)(PROTOCOL=TCP)) (ADDRESS=(HOST=gsmhost2)(PORT=1523)(PROTOCOL=TCP)) (ADDRESS=(HOST=gsmhost3)(PORT=1523)(PROTOCOL=TCP)) ) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(HOST=gsmhost4)(PORT=1523)(PROTOCOL=TCP)) (ADDRESS=(HOST=gsmhost5)(PORT=1523)(PROTOCOL=TCP)) (ADDRESS=(HOST=gsmhost6)(PORT=1523)(PROTOCOL=TCP)) ) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(HOST=server1)(PORT=1521)(PROTOCOL=TCP)) ) (CONNECT_DATA= (SERVICE_NAME=sales_read_service.dbpoolora.oradbcloud) (REGION=WEST)))
Note:
In the case of an Oracle RAC enabled GDS database, the third address list contains the local Oracle RAC database's SCAN listeners.
6.7.3 Connecting to Catalog Databases When No Global Service Managers Are Running
Local listener enables access to the GDS catalog database even when global service managers are down.
This access may be needed for any DB Administration/maintenance activities on the catalog database when global service managers are not running.
6.7.4 Using SYS_CONTEXT
Parameters
in a GDS Environment
For a session established using a connection to a global service, some parameters of
namespace USERENV
have values that are different from
values set when connecting to a local service on the same database. The
different values for a global service are set to make the database pool
appear to clients as a single database with many instances.
When a client connects to a global service, GDS sets the following in the session context differently.
-
DB_UNIQUE_NAME
andDB_DOMAIN
are set to<gdspool_name>.<config_name>
-
INSTANCE
is set to a system generated number<inst_num>
which is unique within a GDS configuration -
INSTANCE_NAME
is set to <gdspool_name
>%<virtual_instance_num
> -
SERVICE_NAME
is set to <region_name
>%<service_name
>
6.8 Troubleshooting GSM Issues
This topic includes the following issues:
GSM-45054: GSM
errorNET-40006: unable to start GSM
error
6.9 GDS Logs and Tracing
This section contains information for locating log files and enabling tracing of GDS components:
- Using Global Service Manager Log and Trace Files
- Enabling and Disabling Tracing on a Global Service Manager
6.9.1 Using Global Data Services Log and Trace Files
If logging and tracing has been enabled for GDS components, you can find the exact
location of a given global service manager's log and trace files using the
status gsm
command as shown in the following example.
GDSCTL>status gsm Alias MYGSM Version 19.1.0.0.1 Start Date 22-OCT-2022 14:05:11 Trace Level support Listener Log File /scratch/oracle/diag/gsm/myhost/mygsm/alert/log.xml Listener Trace File /scratch/oracle/diag/gsm/myhost/mygsm/trace/ora_1829_ 47542149303936.trc Endpoint summary (ADDRESS=(HOST=myhost.com)(PORT=1571)(PROTOCOL=tcp)) GSMOCI Version 0.1.7 Mastership N Connected to GDS catalog Y Process Id 1833 Number of reconnections 0 Pending tasks. Total 0 Tasks in process. Total 0 Regional Mastership TRUE Total messages published 34261 Time Zone -07:00 Orphaned Buddy Regions: None GDS region east Network metrics: Region: euro RTT:34 Bandwidth:40
In this example myhost
is the global service manager host name and mygsm
is the name of the global service manager.
Although not strictly a GDS component, the LISTENER log file can be helpful
resolving some issues. The text based LISTENER log can be found in
/scratch/oracle/diag/gsm/
hostname
/
gsm_name
/trace
directory. The file is called alert_gsm*.log
(for example,
alert_gsm1.log
)
If logging and tracing have not been enabled for GDS components, follow the steps below to do so:
-
Enable logging for GDSCTL. On the GSM host, edit the
$ORACLE_HOME/network/admin/gsm.ora
file and add the following:_GDSCTL=(log=ALL)
This will log any commands run using GDSCTL in the following log file on the GSM host.
$ORACLE_HOME/network/admin/GDSCTL.log
-
Enable tracing for GSM processes.
GDSCTL> set trace_level -gsm <gsm_name> SUPPORT
This will generate trace files in
DIAGNOSTICS_DEST
for GSM. For example,$ORACLE_BASE/diag/gsm/<hostname>/<gsm-name>/trace
-
Enable tracing on the catalog database.
SQL> alter system set events '10798 trace name context forever, level 7';
-
Enable tracing on the GDS pool databases.
SQL> alter system set events '10798 trace name context forever, level 7';
To disable logging and tracing, follow the steps below:
-
Turn off GSM tracing.
GDSCTL> set trace_level -gsm <gsm-name> OFF
-
Turn off GDSCTL command logging by editing the gsm.ora file and removing the following line:
_GDSCTL=(log=ALL)
-
Turn off tracing on the catalog database and GDS pool databases.
SQL> alter system set events '10798 trace name context forever, level 0';
6.9.2 Advanced Global Data Services Troubleshooting
To effectively troubleshoot Global Data Services, it is important to collect adequate data from GDS and related components. Following the steps below will provide a good data pool for troubleshooting issues:
-
Collecting patch information can be useful for code version-related issues:
$ cd $ORACLE_HOME/OPatch $ ./opatch lsinventory -detail > lsinventory_info.txt
-
Collect all GDS configuration data. Save the following commands in a script and execute it:
#!/bin/bash # Stop script if any command fails set -e # Check if gdsctl is available in PATH if ! command -v gdsctl &> /dev/null then echo "gdsctl could not be found. Please make sure it is installed and available in PATH." exit 1 fi echo "Starting gdsctl session..." # Start the gdsctl session gdsctl << EOF # List GSMs, GSM status echo "GDSCTL COMAND: config" config echo "GDSCTL COMAND: config gsm -gsm <gsm name>" #config gsm -gsm <gsm name> echo "GDSCTL COMAND: gsm status" gsm status # List services echo "GDSCTL COMAND: services" services echo "GDSCTL COMAND: config service -service <service name>" #config service -service <service name> # List databases echo "GDSCTL COMAND: databases" databases # Network echo "GDSCTL COMAND: config vncr" config vncr # Validate config echo "GDSCTL COMAND: validate" validate # End of gdsctl commands EOF echo "gdsctl session completed successfully." # Exit the script exit 0
-
Collect GSM listener status.
$ lsnrctl status <gsm-name>
If it is necessary to contact Oracle Support, the above data will prove useful. In addition, the following files would also be helpful:
From GSM Host: $ORACLE_HOME/network/admin
From GSM Host: GSM alert log file
From GSM Host: GDSCTL.log
From GSM Host: GSM trace files located in
<DIAGNOSTIC_DEST>
From GSM Host: lsinventory
, lsinventory_info.txt
From GDS Catalog Host: lsinventory
,
lsinventory_info.txt