In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1.1 Environment Description The operating system is Red Hat 6.6 Enterprise Edition and Oracle RAC version 11.2.0.4 is installed and deployed. Due to performance issues, you need to add physical memory to the PC server, and then adjust database memory parameters to improve database performance. The following is the test environment for simulation operation, the operation process according to the single machine single instance operation, RAC environment operation steps are similar, you can test by yourself. 1.2 System Information Collection 1. Check operating system version [root@roidb1 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.6 (Santiago)[root@roidb1 ~]# 2. Check file system size [root@roidb1 ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda5 16G 11G 4.1G 73% /tmpfs 2.0G 115M 1.9G 6% /dev/shm/dev/sda1 190M 33M 148M 19% /boot/dev/sda2 20G 11G 7.9G 58% /u01 Description: tmpfs defaults to half of physical memory 3. View physical memory size [root@roidb1 ~]# free -m total used free shared buffers cachedMem: 3959 1527 2432 117 25 524-/+ buffers/cache: 977 2982Swap: 4095 0 4095[root@roidb1 ~]# 4. View file system configuration file, which is actually a text file [root@roidb1 ~]# cat /etc/fstab## /etc/fstab# Created by anaconda on Fri Sep 15 14:41:14 2017## Accessible filesystems, by reference, are maintained under '/dev/disk'#See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info#UUID= a72a526 e-2bda-4e4c-9a2f-4a85872b0581 / ext4 defaults 1 1UUID=73b36698-1a84-4464-a01a-768a92a20961 /boot ext4 defaults 1 2UUID=4ffbe187-d953-4b03-a335-576fc2c6602a /u01 ext4 defaults 1 2UUID=4eb35865-a899-4d15-a896-8298ea411da9 swap swap defaults 0 0tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0[root@roidb1 ~]# 1.3 Modify/etc/fstab file contents 1. Use vi editor to modify tmpfs file system size [root@roidb1 ~]# vi /etc/fstabtmpfs /dev/shm tmpfs defaults,size=3G 0 02. Make file system changes effective [root@roidb1 ~]# mount -o remount /dev/shm3. Verify changes take effect [root@roidb1 ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda5 16G 11G 4.1G 73% /tmpfs 3.0G 468M 2.6G 16% /dev/shm #Confirm Effective/dev/sda1 190M 33M 148M 19% /boot/dev/sda2 20G 11G 7.9G 58% /u01[root@roidb1 ~]# 1.4 Modify database memory parameters 1. Administrator user login database [root@roidb1 ~]# su - oracle$sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 13 10:43:47 2018Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing options2. Backup Parameter File SQL> show parameter spfile;NAME TYPE VALUE-------------------------- ----------- ------------------------------spfile string +DATADG/orcl/spfileorcl.oraSQL> create pfile='/tmp/pfile_20180413' from spfile;File created.SQL> ! ls -l /tmp/pfile*-rw-r--r-- 1 oracle asadmin 2381 Apr 13 10:59 /tmp/pfile_20180413SQL> 3. View database memory parameters SQL> show parameter targetNAME TYPE VALUE------------------------------------ ----------- ------------------------------archive_lag_target integer 0db_flashback_retention_target integer 1440fast_start_io_target integer 0fast_start_mttr_target integer 0memory_max_target big integer 1584Mmemory_target big integer 1584Mparallel_servers_target integer 16pga_aggregate_target big integer 0sga_target big integer 04. Static parameter, need to write spfile, specify sidSQL> alter system set memory_max_target=2048M scope=spfile sid='orcl1';System altered.SQL> alter system set memory_target=2048M scope=spfile sid='orcl1';System altered.5. Restart database, make parameter take effect SQL> shutdown immediate; Database closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 2137886720 bytesFixed Size 2254952 bytesVariable Size 1291847576 bytesDatabase Buffers 838860800 bytesRedo Buffers 4923392 bytesDatabase mounted.Database opened.6. Verify that memory parameters take effect SQL> show parameter target;NAME TYPE VALUE------------------------------------ ----------- ------------------------------archive_lag_target integer 0db_flashback_retention_target integer 1440fast_start_io_target integer 0fast_start_mttr_target integer 0memory_max_target big integer 2Gmemory_target big integer 2Gparallel_servers_target integer 16pga_aggregate_target big integer 0sga_target big integer 0SQL> 1.5 General idea 1. Stop related business, middleware, etc. 2. Backup database, physical backup and logical backup can be done according to actual situation. 3. Close the database normally. 4. Replace physical host memory and power up servers. 5. Modify file system parameters to take effect. 6. Modify the database parameters, restart the database, and verify whether the parameters take effect. 7. Start the application and verify the service availability. Chapter 2 Problem Handling 2.1 After the server is restarted, the application cannot connect to the database. The server can connect to the database locally, but the remote connection cannot be made. It is found that the connection cannot be made through telnet ip 1521. Therefore, it is determined that the firewall may be turned on on by the server. Use root user service iptables status to find the trend. Turn on the firewall. After the firewall is turned off, the business can access the database.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.