Oracle

Configuring HugePages for Oracle Database on Linux/Unix

Prepare:

Finally as per default the parameter use_large_pages should be enabled:

SQL> select value from v$parameter where name = 'use_large_pages';

VALUE
---------------------------
TRUE

if not:

sql>alter system set use_large_pages=true scope=spfile;

MEMORY_MAX_TARGET should be set to 0:

SQL> select value from v$parameter where name = 'memory_target';

VALUE
---------------------------
0 

if not:
SQL> alter system set memory_target=0;
SQL> alter system set memory_max_target=0;

 grep Huge /proc/meminfo
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
$

How big is our SGA? In this example about 40 GB. Important: In the following query we directly convert into kB (value/1024). With that we can continue to calculate directly:

SQL> select value/1024 from v$parameter where name = 'sga_target';

VALUE
---------------------------
41943040 ->>40 GB.

Verify that the soft and hard values in kilobytes of memlock that are configured in /etc/security/limits.conf. For example, if the system has 40GB of RAM, the values shown here would be appropriate:

Calculate:
#(sga_ram_size*1024*1024)-1 =41943040

if you have grid user.

oracle soft memlock 41943040
oracle hard memlock 41943040
grid soft memlock 41943040
grid hard memlock 41943040

Note:

If you run more than one database on your server, you should include the SGA of all of your instances into the calculation:
1. Instance + SGA 2. Instance + … etc. ) / Hugepagesize = Number Hugepages

Correctly inserted, following result should show up:
for oracle and grid users:
su- oracle
#vi /etc/security/limits.conf
for grid user:
su – grid
#vi /etc/security/limits.conf

vi /etc/security/limits.conf

oracle soft memlock 41943040
oracle hard memlock 41943040
grid soft memlock 41943040
grid hard memlock 41943040

Check Hugepagesize

Default hugepagesize should be set to 2048 KB:

grep Hugepagesize /proc/meminfo

Hugepagesize:       2048 kB

Calculate Hugepages:

For the calculation of the number of hugepages there is a easy way:

SGA / Hugepagesize = Number Hugepages

Following our example:

41943040 / 2048 = 20480

Change Server Configuration

The next step is to enter the number of hugepages in the server config file. For that you need root permissions.

vi /etc/sysctl.conf

vm.nr_hugepages=20480

Server Reboot

If all parameter are set, make a complete reboot your server
alternative you can reload the parameters with sysctl -p command.

Check Configuration

Memlock correct?

ulimit -l

41943040 

You can see the HugePages are now being used.

Br.Erman.

huge_page_png

 

Advertisements
Standard
Oracle

Oracle Client Install on linux

 

Install Oracle Client 12.2.0.2.0 software on Linux machine (RHEL)

Ensure oracle account and oinstall and dba groups exists if not.

As root, run the following commands to create the Oracle user and groups:

# groupadd dba
# groupadd oinstall
# useradd -m -g oinstall -G dba oracle

The oracle user is now set up and belongs to both the oinstall group and the dba group.  To set the password for the oracle user, invoke the passwd commandas root passing the username as an argument.

# passwd oracle

Changing password for user oracle.

demo:

[root@demo-web-t ~]# groupadd dba
[root@demo-web-t ~]# groupadd oinstall
[root@demo-web-t ~]# useradd -m -g oinstall -G dba oracle
[root@demo-web-t ~]# id oracle
uid=1003(oracle) gid=1005(oinstall) groups=1005(oinstall),1004(dba)
[root@demo-web-t ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password contains the user name in some form
Retype new password:
passwd: all authentication tokens updated successfully.
[root@demo-web-t ~]#Create and run .bash_profile_client.

ORACLE_BASE =/u01/app/client; export ORACLE_HOME
ORACLE_HOME=/u01/app/client/product/11.2.0/db; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
  1. Ensure the database file systems have been created with correct permissions and have been sized appropriately for the application.
  2. Download the latest oracle binaries from OTN to directory under /software/ORACLE/DATABASE/12.2 For example:
    • Enterprise/Standard Edition for Linux x86
    • 12201_client_linux64.zip : 478,343,213 bytes; cksum – 579193942
  3. Unzip the downloaded files using the following commands:
    • unzip <filename>
      unzip 12201_client_linux64.zip
      Configure the DISPLAY variable.
  4. Start x-server.
  5. Run runInstaller and follow the instructions as demonstrated in the example section below.
  6. Confirm connections via SQL*Netare working using the following commands:
    • sqlplus system/<password>@<SID>

thats all. Br Erman.

Standard
Oracle

Creating the Oracle Software Owner and Group

As root, run the following commands to create the Oracle user and groups:

# groupadd dba
# groupadd oinstall
# useradd -m -g oinstall -G dba oracle

The oracle user is now set up and belongs to both the oinstall group and the dba group.  To set the password for the oracle user, invoke the passwd commandas root passing the username as an argument.

# passwd oracle

Changing password for user oracle.

demo:

[root@demo-web-t ~]# groupadd dba
[root@demo-web-t ~]# groupadd oinstall
[root@demo-web-t ~]# useradd -m -g oinstall -G dba oracle
[root@demo-web-t ~]#
[root@demo-web-t ~]#
[root@demo-web-t ~]# id oracle
uid=1003(oracle) gid=1005(oinstall) groups=1005(oinstall),1004(dba)
[root@demo-web-t ~]# chown -R oracle:oinstall /u01/app
[root@demo-web-t ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password contains the user name in some form
Retype new password:
passwd: all authentication tokens updated successfully.
[root@demo-web-t ~]#

Standard
Linux, Microsoft

Microsoft Outlook has stopped working. A problem caused the program to stop working correctly

Hello,

My Office 2016 crashes randomly, mostly my Outlook. I have gotten this error since I installed Office (2-3 months ago). My device is brand new.

This is the error I get : Microsoft Outlook has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

solution:

Control Panel\All Control Panel Items\Programs and Features

remove least microsoft outlook updates.

Standard
Windows

How do I change my username in Windows using cmd?

Steps:
  1. Open Command prompt (Win key + R -> type “cmd” )
  2. Enter netplwiz.
  3. Select the account and click the Properties button.
  4. Enter the new name for the account.
  5. Save and restart your computer.

 

Standard
Oracle

How to Uninstall Oracle Client?

Hello, Oracle database client deinstall so basic on windows pc.

steps:

go to oracle home directory.  run this command on your terminal.

$ORACLE_HOME/deinstall/deinstall

Br. erman.

Standard
Oracle

Toad – SQLNET Editor & TNS Names Editor are Disabled

hello, After successfully Installed the toad, while trying to connect to a Database using Toad with TNS, Even the TNS entry is created in tnsnames.ora file under Oracle Home\NETWORK\ADMIN Not able to connect the due to TNS Editor and SQLNET editors are disabled.

Solution : Go to environmental variables and create a new variable Name as “TNS_ADMIN” and set the value as  Oracle Home\NETWORK\ADMIN.

Capture

toad

 

Br. Erman

Standard