(一)ORACLE连接超限修改我们需要调整oracle数据库的最大链接数,而这个链接数的调整是在oacle下的dbs目录下init.ora文件中调整的。ORACLE的连接数(sessions)与
(一)ORACLE连接超限修改
我们需要调整oracle数据库的最大链接数,而这个链接数的调整是在oacle下的dbs目录下init.ora文件中调整的。
ORACLE的连接数(sessions)与其参数文件中的进程数(process)有关,它们的关系如下:
sessions=(1.1*process+5)
但是我们增加process数时,往往数据库不能启动了。这因为我们还漏调了一个unix系统参数:它是核心参数中的semmns,这是unix系统的信号量参数。每个process会占用一个信号量。semmns调整后,需要重新启动unix操作系统,参数才能生效。不过它的大小会受制于硬件的内存或ORACLE SGA。范围可从200——2000不等。
但是,Processes的修改不仅应该调整init
1.数据库连接超限时,新的连接会失败,查看数据库允许连接数
SQL> show parameter processes
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
aq_tm_processes integer
1
db_writer_processes integer
1
job_queue_processes integer
10
log_archive_max_processes integer
2
processes integer
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
150
#--------------数据库连接数是150,修改连接数
SQL>
SQL> alter system set processes=5000 scope=spfile;
系统已更改。
SQL> alter system set sessions=5000 scope=spfile;
系统已更改。
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORA-00064: object is too large to allocate on this O/S (1,4800000)
SQL> startup
ORA-00064: object is too large to allocate on this O/S (1,4800000)
#-----------------------------以上修改最大连接数失败,最大连接数与OS有关、
#-----------------------------不考虑OS是最大连接数可能修改失败
例如以下的Unix实例(引自)
核心主要相关的参数的调整如下:
SHMMAX 1000000000
SHMMIN 1
SHMMNI 200
SHMSEG 15
SEMMNI 1000
SEMMSL 300
SEMMNS 230
SEMOPM 20
其中semmni,semmns,semmsl要加大,至少要比processes大18 ;
SEMMNI(10,10000;150):指定在核心中信号识别的数量。这是可以在任意给定时间被激活的唯一信号设置数量。缺省值是150。最大值由系统自动调整产生。
SEMMSL(25,300;150):指定每个信号识别中信号量的最大值。缺省值是25。
SEMMNS 除最大db外的所有db 的PROCESSES之和+2*最大db的PROCESSES+10*
实例数。如3个实例进程数分别为100、100、200,则=(100+100)+2*200+10*3=630
SEMOPM(10,20;10):指定在每个系统调用semop中能够被执行的信号操作量的最大值。缺省值是10。
SHMMAX(131072,1073741824;524288):指定了共享内存部分大小的最大值。等于0.5
× 物理内存字节数
SHMMNI(10,1000;100):指定了系统范围内共享内存标识的最大值。
SHMSEG(6,香港虚拟主机,15;6):指定了与每个进程相关连的共享内存块(或标识)的数量。缺省值是6。与每个进程相关连的共享内存块的最大值与进程拥有的未使用空间有关。因此,尽管一个进程拥有少于SHMSEG数值的共享内存块,它也有可能因为其有限的空间而不能与其它进程相联系。
init.ora中调整为:
processes = 50 # SMALL
#processes = 100 # MEDIUM
# processes = 200 # LARGE
SQL> startup
---------------在services.msc将orcl重启,导致错误ORA-00064
ORA-12571: TNS: 包写入程序失败
SQL> startup
ORA-24324: 未初始化服务句柄
ORA-01041: 内部错误,hostdef 扩展名不存在
SQL> startup
ORA-24324: 未初始化服务句柄
ORA-01041: 内部错误,hostdef 扩展名不存在
------------------------------------------------
2.修改最大连接数错误ORA-00064,数据库启动不了
#----------------------(1)ORACLE SYS DBA连接,香港虚拟主机,此时因为ORA-12571错误,其他用户无法连接
SQL> conn sys/oracle@orcl as sysdba
已连接到空闲例程。
#----------------------(2)以pfile 启动数据库
SQL> startup pfile='D:\oracle\admin\orcl\pfile\init.ora.105201216493' open
ORACLE 例程已经启动。

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)


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

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),