Erros CRS-2730 and CRS-4000 When Drop Resource

This morning deleting a diskgroup, which is still a cluster resource, has given me the following error;

 
grid$ crsctl delete resource ora.PROD_ARC2_DG.dg
CRS-2730: Resource 'ora.mydb.db' depends on resource 'ora.PROD_ARC2_DG.dg'
CRS-4000: Command Delete failed, or completed with errors.

The error and problem itself is relatively straightforward. This resource is in the dependency list of another resource. Make sure that it is not used before removing it, so that you do not have problems later.
In this case this deleting a second copy of files that has its own diskgroup. What we are going to do is confirm that it is a database dependency, for this from the user who owns the database engine we execute the following command

 
oracle$ srvctl config database -d mydb
Database unique name: mydb
Database name:
Oracle home: /xxxxxx/xxxxxx/xxxxxx/xxxxxx
Oracle user: oracle
Spfile:
Domain: xxxxxx.com
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: xxxxx
Database instances: mydb1,mydb2
Disk Groups: PROD_DAT_DG,PROD_ARC1_DG,PROD_ARC2_DG,PROD_FRA_DG
Mount point paths:
Services:
Type: RAC
Database is administrator managed

If we look at the disk groups field we see that is where the problem is, we remove the file group 2 with the following command

 
oracle$ srvctl modify database -d mydb -a "PROD_DAT_DG,PROD_ARC1_DG,PROD_FRA_DG"

We check the configuration again

 
oracle$ srvctl config database -d mydb
Database unique name: mydb
Database name:
Oracle home: /xxxxxx/xxxxxx/xxxxxx/xxxxxx
Oracle user: oracle
Spfile:
Domain: xxxxxx.com
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: xxxxx
Database instances: mydb1,mydb2
Disk Groups: PROD_DAT_DG,PROD_ARC1_DG,PROD_FRA_DG
Mount point paths:
Services:
Type: RAC
Database is administrator managed

We try to delete the resource again (with grid user)

 
grid$ crsctl delete resource ora.PROD_ARC2_DG.dg
grid$ 

HTH – Antonio NAVARRO

 

Install Oracle Linux 7 (Update 8)

In the last post I put how to perform a minimum configuration of update 2 of Linux 8. I have seen that an Update 8 of version 7 has also come out. There is still a lot of software that is not certified to work on Linux 8, such as for example Oracle Cloud Control. Let’s see a complete installation of 7.8;

Set up the machine

FOTO_1

Memory

FOTO_2

Set the HDD

FOTO_3

I prefer VDI but VHD work fine and you can export to other system like VMWARE

FOTO_4

Dynamic allocationg to save space however slow where the space used grow

FOTO_5

For this test 20-30 gigas is okay

FOTO_6

Boot order, first time Optical to boot from ISO to install

FOTO_7

Video memory set it up all you can, specially if you use graphical enviroment

FOTO_8

ISO path

FOTO_9

For this case NAT is enough

FOTO_10

Start the machine and select installation language

FOTO_11

Anaconda menu

FOTO_12

Set timezone

FOTO_13

Packages to install, it depents on the purpose you want to give the system

FOTO_14

 

FOTO_15

Disk management automatically, I prefer it personally managed, but for a basic administration it is enough in automatic

FOTO_18

Begin installation, during installation define the root password and create at least one user. As a rule, avoid working with the root user. This user, being a very powerful user, leaves it for the tasks that need to be done with the

FOTO_19

 

FOTO_20

Reboot

FOTO_21

Accept license

FOTO_22

Check agreement

FOTO_23

Finish

FOTO_25

The system is now ready to use with minimal configuration.

HTH – Antonio NAVARRO

Install Oracle Linux 8 (Update 2)

A few days ago, update 2 of Oracle Linux 8 was released. In this post I am going to put the basic steps to perform a simple installation in VirtualBOX.

Start creating the machine;

Annotation 2020-05-16 175750

Set memory

photo_2

Set HDD

photo_3

photo_4

I prefer dynamic allocation, it is slow the first time.

photo_5

Set the size for HDD;

photo_6

Set start order;

photo_7

It is good idea assign all memory for display;

photo_8

In this case NAT is enough;

photo_9

Select the ISO to install;

photo_10

Start the machine and the installation begin;

photo_11

Select yout language;

photo_13

Since some versions Anaconda is the installation software, it is very esay to use and configure;

photo_17

Select timezone, the rest you can setting on defaults, of course, this is not for production enviroment but in this case is an installation the most easy possible;

photo_18

Set root password;

photo_20

I have created a second user, it is not good idea work with root user;

photo_21

After of reboot and accept license it is ready for use.

photo_22

Carrying out this installation on my laptop will have taken me about 25-30 minutes.

HTH – Antonio NAVARRO

Oracle Linux 8, Update 2 Release

Oracle has announced a few days the release of the latest revision of Oracle Linux 8, update 2. It fixes many of the bugs that the previous version has. It will still take a while, I usually recommend a minimum of about six months before putting it in production environments. If it would be an ideal version or candidate if we have in the near horizon make some kind of migration within those deadlines.

On the other hand, it must be seen which systems (Oracle) are supported, since for now only this Oracle Database 19c is available.

For more information on the novelties that are enough I leave you the following link.

Oracle Linux 8 update 2

HTH – Antonio NAVARRO

Security at Collaboration Services for Telework

Today I am going to talk more about a security issue, but not with a direct relationship with databases. In these days where in many countries containment measures have exploded, teleworking is being used more than ever and with it the main tools associated with it.

Also the ways of relating to our family and friends have been affected, making more use of video calling and messaging applications.

A few days ago the NSA (National Security Agency of the United States) has published a report that makes an evaluation of the strengths and weaknesses of the most widespread tools. The most interesting is on page 5. I leave the link below;

NSA Report

In my case I usually use the following Google Meet, Cisco Webbex, Microsoft Teams for collaborative environments. Recently, major bugs have been detected in Zoom, but the rest are not without security flaws. A few days ago, an already corrected Teams was published, in which the connection data was compiled just by viewing a gif.

Teams vulnerability

Regarding messaging, I usually use WhatsApp, Signal and Telegram. An important difference that the report between Whatsapp and Signal does not mention is that the latter does not collect metadata, which the former does in a very important way. About Telegram, indicate that by default the encryption is not peer-to-peer by default, only for secret chat and use its own MTPROTO algorithm, more information about it in the following link;

Telegram Protocol

Okay, so far so good, it is assumed that since I started a video call with a co-worker, family member or friend, and depending on the tool I use, everything will be encrypted, from the moment it leaves my laptop / phone to the recipient, but between the camera that takes the image and the microphone that collects the sound and reaches the app there is a whole world.

# 1 The camera / microphone driver or software
# 2 The operating system
# 3 On Android phones is the customization of the terminal manufacturer
# 4 Third applications, which can have access to the microphone

How sure is what we say? It is a question, which depending on the cause may be difficult to answer. We must pay attention to all the details.

HTH – Antonio NAVARRO

Dbms_output Embedded in Stored Procedures

A few days ago I was reported an incident in a bacth process that had failed due to the following error.

ORA-20000: ORU-10027: buffer overflow, limit of 100000 bytes
ORA-06512: en “SYS.DBMS_OUTPUT”, l√Ěnea 32

The error itself is nonsense, but in this case it was a problem because the process takes about five or six hours and must be available at a specific time so that there is no impact on the business.

To solve this problem, like solution, we can set size in the dbms_output to unlinmited like this example;

SET SERVEROUTPUT ON SIZE UNLIMITED

Personally I consider this to be an error, because a batch process should not launch anything against an output, but rather use a table or have a logging system.

To try to identify where there are DBMS_OUTPUTS in the code, as first solution I made this select;

 
SELECT 
  OWNER, 
  NAME, 
  TEXT 
FROM 
  DBA_SOURCE 
WHERE 
  UPPER (TEXT)  LIKE '%DBMS_OUTPUT%'    AND 
  OWNER NOT IN ('SYS','SYSTEM')         AND 
  UPPER (TEXT) NOT LIKE '%--%'

This solution is a first approach to the problem, and it finds many things, although it has a problem with comments, it does not validate that the monoline comment is ahead of the dbms_output command, so it should be excluded since it would be commented.

In the case of multiline comments it does not work either since it only looks at the current line and does not have “memory” to know if there is an / * open on lines before the current one.

To try to fix all of the above at the end I have made a small plsql that takes into account all of the above, being more exact and allows us to focus on the lines where there is a potential potential problem.

I have left the script on my github. You can take a look if you are interested in the following link.

Script to find DBMS_OUTPUT into store plsql

HTH – Antonio NAVARRO