oracle 连接超时问题 ora
场景:服务器双网卡 一个外网访问 一个内网访问 现象:tnsping 服务 通 ping 端口 通 sqlplus 出现ORA-12535: TNS:operation timed out。 解决: init.ora文件的最后加上一条参数: *.dispatchers=(address=(protocol=tcp)(port=5000))(dispatchers=3) 原因
场景:服务器双网卡 一个外网访问 一个内网访问
现象:tnsping 服务 通 ping 端口 通 sqlplus 出现ORA-12535: TNS:operation timed out。
解决:
init.ora文件的最后加上一条参数:
*.dispatchers="(address=(protocol=tcp)(port=5000))(dispatchers=3)"
原因:
需要在MTS模式下(共享模式)Oracle默认是专用模式。 经试验发现,如果不在init文件中设参数的话,Oracle仍然会要求一个随机端口和 1521端口来共同通讯,只是这个随机端口,并不随客户端会话和登录的变化而变化,在 没有重启服务器时,是固定的。 (试验发现,在专用模式下,每次连接,oracle服务器会按+1方式,提供一个非 1521的端口。)
如果Oracle资料库和client端连线有经过firewall,在MTS模式下连线的设定可能需要特别注意,因为就算你防火墙开通了1521 port,但是在MTS下listener会把连线要求redirect给dispatcher,而dispatcher的port又是random port,这时候你可以选择client端改用Dedicated 连线,或者修改dispatcher设定来达成正常连结,而不会出现ORA-12535: TNS:operation timed out。
基本命令:
netstat -an 查看本机通信情况
lsnrctl status 查看监听器情况
ping 查看本地网络
tnsping *** 查看TNS解析
sqlplus 查看客户端应用
# SQL> select name,network from v$dispatcher
NAME NETWORK
---- --------------------------------------------------
D000 (ADDRESS=(PROTOCOL=tcp)(HOST=ora1)(PORT=5000))
D001 (address=(protocol=tcp)(port=5000))
D002 (address=(protocol=tcp)(port=5000))

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Yesterday during the interview, I was asked whether I had done any long-tail related questions, so I thought I would give a brief summary. The long-tail problem of autonomous driving refers to edge cases in autonomous vehicles, that is, possible scenarios with a low probability of occurrence. The perceived long-tail problem is one of the main reasons currently limiting the operational design domain of single-vehicle intelligent autonomous vehicles. The underlying architecture and most technical issues of autonomous driving have been solved, and the remaining 5% of long-tail problems have gradually become the key to restricting the development of autonomous driving. These problems include a variety of fragmented scenarios, extreme situations, and unpredictable human behavior. The "long tail" of edge scenarios in autonomous driving refers to edge cases in autonomous vehicles (AVs). Edge cases are possible scenarios with a low probability of occurrence. these rare events

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

The INTERVAL data type in Oracle is used to represent time intervals. The syntax is INTERVAL <precision> <unit>. You can use addition, subtraction, multiplication and division operations to operate INTERVAL, which is suitable for scenarios such as storing time data and calculating date differences.

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

Oracle can read dbf files through the following steps: create an external table and reference the dbf file; query the external table to retrieve data; import the data into the Oracle table.
