Oracle 视图 DBA_CONNECTION_TESTS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图 DBA_CONNECTION_TESTS 用于描述网络连接的测试情况,主要用于支撑 Oracle网络设置,DBA_CONNECTION_TESTS 视图可以使DBA在检查和修复网络设置时,针对具体的错误的细节进行快速的定位处理。

DBA_CONNECTION_TESTS 视图的使用步骤如下:

1.使用 SQL*Plus 工具登录 Oracle数据库,使用 SYS DBA用户身份登录 Oracle数据库。例如:SQL > conn sys/password@db_name as sysdba;

2.执行修复网络测试语句;例如:SQL > alter system set test_connections = true scope = both;

3.使用DBA_CONNECTION_TESTS 视图查看测试结果;例如:SQL > Select test_type, message From dba_connection_tests;

4.根据测试结果进行网络设置修复;

5.执行关闭测试语句;例如:SQL > alter system set test_connections = false scope = both;

以上就是Oracle视图 DBA_CONNECTION_TESTS 的使用方法。

官方英文解释

DBA_CONNECTION_TESTS provides information about connection tests in use for CDBs and PDBs.

This view shows SQL and non-SQL connection tests.

Column Datatype NULL Description

PREDEFINED

VARCHAR2(1)

Indicates whether the test is predefined or custom. Possible values:

  • Y: The test is predefined.

  • N: The test is added by the user.

Predefined tests can be disabled, but not deleted.

CONNECTION_TEST_TYPE

VARCHAR2(15)

Indicates the test type. Possible values include:

  • SQL_TEST: Application servers and applications use SQL tests to check the validity of a connection. Use this value for SQL based connection tests, for example (SELECT 1 FROM DUAL😉

  • PING_TEST: Used when you are using tests that use the ping function to test the connection, including the OCIPing, isValid, isUsable, connection.status, and PING_DATABASE connection tests.

  • ENDREQUEST_TEST: Used when request boundaries are received at the RDBMS. Oracle Connection Pools and all application servers using JDK9 send request boundaries to the RDBMS starting in Oracle Database 12c Release 2 (12.2.0.1).

The test type values are the CONNECTION_TEST_TYPE parameter values that can be specified for the ENABLE_CONNECTION_TEST and DISABLE_CONNECTION_TEST procedures for the DBMS_APP_CONT_ADMIN PL/SQL package.

SQL_CONNECTION_TEST

VARCHAR2(64)

SQL test. This column is null for non-SQL tests.

SERVICE_NAME

VARCHAR2(128)

Optional service name qualifier

ENABLED

VARCHAR2(1)

Indicates whether the SQL test is enabled. Possible values:

  • Y: The test is enabled.

  • N: The test is not enabled.

See Also:

Oracle Database PL/SQL
Packages and Types Reference
for additional information about the ENABLE_CONNECTION_TEST procedure for the DBMS_APP_CONT_ADMIN PL/SQL package


数据运维技术 » Oracle 视图 DBA_CONNECTION_TESTS 官方解释,作用,如何使用详细说明