Relocate MGMTDB Database To Another Node

Hello, today I would like to show how to move the MGMTDB database within the nodes of a cluster. This database (optional until version 12.1 if I remember correctly) is used mainly to store the telemetry that Oracle collects on the operation of the cluster on which it is executed.

In my case, I’m going to move it because I need to launch the cluster monitor (oclumon) from node 1. The main benefit of running the oclumon and that the database MGMTDB are in the same node is to reduce network traffic in the Interconnect (or private network).

 
First, check where the database is running;

griduser@node-1 $ srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node node-2

Now execute the relocate to node one;

griduser@node-1 $ srvctl relocate mgmtdb -node node-1
griduser@node-1 $

Check again;

griduser@node-1 $ srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node node-1
griduser@node-1 $

You can also check the presence of the pmon with the world famous command “ps -ef | grep pmon” as shown below;

griduser@node-1 $ ps -ef | grep pmon
    grid 10311     1   0   Nov 14 ?           6:12 asm_pmon_+ASM1
    grid  7723     1   0   Nov 14 ?           5:52 apx_pmon_+APX1
  oracle 10582     1   0   Nov 14 ?           9:59 ora_pmon_CLOUD1
    grid 29146     1   0 15:40:09 ?           0:00 mdb_pmon_-MGMTDB

 

HTH – Antonio NAVARRO

 

Advertisements

ORA-15056, ORA-15221 Errors

Today creating a password file into a ASM I get the next error;

 
oracle@lince-1:...e/prod/server/product/12.1/dbs$
oracle@lince-1:...e/prod/server/product/12.1/dbs$ orapwd file='+data' password=secret dbuniquename=oradb entries=10

OPW-00010: Could not create the password file.
ORA-15056: additional error message
ORA-15221: ASM operation requires compatible.asm of 12.1.0.0.0 or higher
ORA-06512: at line 4

The issue is enough clear, compatible asm requieres a higer value. If check the compatibility like show below;

 
SQL> select name, COMPATIBILITY, DATABASE_COMPATIBILITY from v$asm_diskgroup

NAME                           COMPATIBILITY                                                DATABASE_COMPATIBILITY
------------------------------ ------------------------------------------------------------ ------------------------------------------------------------
REDCONT_1                      10.1.0.0.0                                                   10.1.0.0.0
REDCONT_2                      10.1.0.0.0                                                   10.1.0.0.0
ARCHIVE_1                      10.1.0.0.0                                                   10.1.0.0.0
OCRVTD_DG                      12.1.0.0.0                                                   10.1.0.0.0
ACFS_LOADS                     12.1.0.0.0                                                   10.1.0.0.0
ACFS_UTILITIES                 12.1.0.0.0                                                   10.1.0.0.0
DATA                           10.1.0.0.0                                                   10.1.0.0.0
FRA                            10.1.0.0.0                                                   10.1.0.0.0
ACFS_DIAG                      12.1.0.0.0                                                   10.1.0.0.0

With grid infrastructure user we can change the compatible with the next command;

 
SQL> alter diskgroup DATA set attribute 'compatible.asm'='12.1.0.0.0';

Diskgroup altered.

If check the compatibility again

 

 
SQL> select name, COMPATIBILITY, DATABASE_COMPATIBILITY from v$asm_diskgroup

NAME                           COMPATIBILITY                                                DATABASE_COMPATIBILITY
------------------------------ ------------------------------------------------------------ ------------------------------------------------------------
REDCONT_1                      10.1.0.0.0                                                   10.1.0.0.0
REDCONT_2                      10.1.0.0.0                                                   10.1.0.0.0
ARCHIVE_1                      10.1.0.0.0                                                   10.1.0.0.0
OCRVTD_DG                      12.1.0.0.0                                                   10.1.0.0.0
ACFS_LOADS                     12.1.0.0.0                                                   10.1.0.0.0
ACFS_UTILITIES                 12.1.0.0.0                                                   10.1.0.0.0
DATA                           12.1.0.0.0                                                   10.1.0.0.0
FRA                            10.1.0.0.0                                                   10.1.0.0.0
ACFS_DIAG                      12.1.0.0.0                                                   10.1.0.0.0

Try the create passwd file again;

 
oracle@lince-1:...e/prod/server/product/12.1/dbs$ orapwd file='+data' password=secret dbuniquename=oradb entries=10
oracle@lince-1:...e/prod/server/product/12.1/dbs$

HTH – Antonio NAVARRO

 

It Is Necessary To Relink Grid Infrastructure After Applying OS Patch

The question of the title of this post I have heard many times, but today I will answer for the part of Clusterware. The database engine I leave for another post ;). According to the Oracle documentation: “You must relink the Oracle Clusterware and Oracle ASM binaries every time you apply an operating system patch or after an operating system upgrade.”

Of course, and this is the procedure;

As root:

 
# cd Grid_home/crs/install
# rootcrs.sh -unlock

As theGrid Infrastructure owner:

 
$ export ORACLE_HOME=Grid_home
$ Grid_home/bin/relink

As root:

 
# cd Grid_home/rdbms/install/
# ./rootadd_rdbms.sh
# cd Grid_home/crs/install
# rootcrs.sh -patch

HTH – Antonio NAVARRO.

Update The Project Is Not Reflected In The Installer

I’m installing a grid infrastructure, the issue is that give an error by the limit of open files, as shown in the screenshot below.

foto_installer_fail_reading_projects_v2

The error itself is quite simple and easy to fix. The problem is that by saying to the installer that it returns to perform the check, it will fail with the same error. Basically when we login with the our user to the operating system, the project is read and these values ​​are fixed (as hardcode) to the session.

I have been researching (Google, MOS / ML,  Stackoverflow,) to see if there is any way to force the user to read the permissions again, but I have not found anything. If someone knows how their help is always welcome.

In my case I have solved it by closing the installer, logout the session and reconnecting to the machine, logically returned to execute the installer from the beginning.

HTH – Antonio NAVARRO

 

Using SSH with Jumped Host (With MobaXterm)

It may be strange to want to open an SSH connection using an SSH server to make a jump. The logical thing would be to connect directly to the destination server with SSH.

Everything has a because, in the case that I expose is because a provider has to connect from outside the local network to a server, but this provider only have access to a single machine from outside, can not go directly to the destination ( limitations of the communications department through firewalls and ACLs). So far what it does is connect to the input computer from the internet with ssh and from the open session run an ssh to the target machine.

Open MobaXterm

moba_ssh1

Choose the SSH conection

 

moba_ssh2

Set up the target host

 

moba_ssh3

Now;

Select Network settings tab.

Check Connect through SSH gateway (jump host), in my case is the  entry server to the local network.

moba_ssh4GIF

Push OK button. That’s all, so easy

 

HTH – Antonio NAVARRO

Using SSH from SQL Developer

Last week I showed a how to for use tunnels ssh by using Putty, today I like show how connect to Oracle database using ssh directly from SQL Developer.

Click en View menu and select SSH

setup_ssh_in_sqldeveloper_1

Right buttom and New SSH Host

setup_ssh_in_sqldeveloper_2

Now,

Set up NAME for the connection (in this case NEW_SSH_CONNECTION)
Set up HOST (The jumper host or ssh gateway) This is a tunnel finisher, from this machiene we jump to the machine where is the database
Set up USERNAME (later we are request the pass)

Click on “Add a Local Port Forward”
Set up HOST (host where is the database)
Set up Port, port of listener

Click on “Use specific local port” I prefer to define a port instead of SQL Developer choose one randomly. I use in this case 7777

setup_ssh_in_sqldeveloper_3

Add new connection to database.

Username and pass for database

Select SSH in Connection Type

Choose the name (created before) in Port Forward

Service name for you database

Click on Test or Connect

setup_ssh_in_sqldeveloper_4

Now a pop up request the pass for the user in the SSH Gateway

setup_ssh_in_sqldeveloper_5

 

HTH – Antonio NAVARRO

SSH Tunneling Using MobaXterm

In this post I will show  how to create a SSH Tunnel for connections to Oracle database. I will use a jumper host to get the database host. Remember that the information between your computer and the jump server is encrypted, but from the server to the database server it does not.

 

moba_tunneling_1

Push on New SSH Tunnel

moba_tunneling_2

You see a window like this

moba_tunneling_3

Check Local port forwarding

moba_tunneling_4

Now push Save buttom, you have a tunnel. Now you only need to activate the tunnel every time you use it. MobaXterm in its free version only allows a maximum of three tunnels. When there will be a tunnel, it will ask us for the user password of the jump server.

Now every time you connect to an Oracle database, you must specify in the connect string, the HOST must be your localhost or 127.0.0.1. and in the port of connection to the listener, the port that we have put before as forwarded port. In this example the 7777.

 

HTH – Antonio NAVARRO