Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

2016-09-28

ASM: Queries Hanging (v$asm_disk)

Solved Problem When ASM Queries on v$asm_disk Hang / Block 

Wenn trying to display ASM information, Oracle Cloud Control (Enterprise Manager) displays nothing.
Also when trying to perform some queries on ASM, they "hang" and no answer is returned.
(For example: SELECT * FROM v$asm_disk; hangs)

Commands with the ASM tool asmcmdh still work:

oracle@<Host>:~/ [+ASM] asmcmdh
ASMCMD> lsdsk -p
Group_Num  Disk_Num      Incarn  Mount_Stat  Header_Stat  Mode_Stat  State   Path
        1         0  2526484498  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/grid
        2         6  2526484516  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u01_07
        2         7  2526484517  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u01_08
        2         8  2526484518  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u01_09
        2         9  2526484519  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u01_10
        3         0  2526484503  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u02_01
        3         1  2526484505  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u02_02
        3         2  2526484504  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u02_03
        3         3  2526484507  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u02_04
        3         4  2526484506  CACHED      MEMBER       ONLINE     NORMAL  /dev/ASM/u02_05


The Metalink Doc ID 8786114.8 suggests to verify / correct the ASM discovery string in order to exclude "invalid devices"
like /dev/kmem or other devices that should not be scanned by the ASM disk discovery.
For example it suggests not to use /dev/* as an ASM disk discovery string.

Querying the DB for the ASM disk discovery string, returns:

SQL> show parameter asm_diskstring
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring                       string      /dev/ASM

Listing the mount points using the result from above, shows that still some mount points exits (highlighted)
that are not valid any more. (i.e. no storage is mounted on these mount points any more)
(These are not listed be the asmcmdh command from above.)
(This is not directly apparent from the result below. But I knew, that nothing was mounted at these mount points any more.)
oracle@<Host>:~/ [+ASM] ll /dev/ASM*
total 0
drwxr-xr-x  2 root root  360 Jan 24 10:29 .
drwxr-xr-x 12 root root 3660 Mar 26 15:47 ..
lrwxrwxrwx  1 root root    7 Apr 18  2013 grid -> ../xvdf
lrwxrwxrwx  1 root root    7 Apr 18  2013 u01_01 -> ../xvdb
lrwxrwxrwx  1 root root    7 Apr 18  2013 u01_02 -> ../xvdc
lrwxrwxrwx  1 root root    7 Apr 18  2013 u01_03 -> ../xvdd
lrwxrwxrwx  1 root root    7 Apr 18  2013 u01_04 -> ../xvde
lrwxrwxrwx  1 root root    7 Oct  4  2013 u01_05 -> ../xvdl
lrwxrwxrwx  1 root root    7 Oct  4  2013 u01_06 -> ../xvdm
lrwxrwxrwx  1 root root    7 Jan 24 10:29 u01_07 -> ../xvdn
lrwxrwxrwx  1 root root    7 Jan 24 10:29 u01_08 -> ../xvdo
lrwxrwxrwx  1 root root    7 Jan 24 10:29 u01_09 -> ../xvdp
lrwxrwxrwx  1 root root    7 Jan 24 10:29 u01_10 -> ../xvdq
lrwxrwxrwx  1 root root    7 Apr 18  2013 u02_01 -> ../xvdg
lrwxrwxrwx  1 root root    7 Apr 18  2013 u02_02 -> ../xvdh
lrwxrwxrwx  1 root root    7 Apr 18  2013 u02_03 -> ../xvdi
lrwxrwxrwx  1 root root    7 Apr 18  2013 u02_04 -> ../xvdj
lrwxrwxrwx  1 root root    7 Apr 18  2013 u02_05 -> ../xvdk

Problem Cause
As described in the Metalink-Article from above, the SQL statement and Cloud Control hang,
because the statement tried to query inexistent LUNs with a very long timeout.

Solution
In my case, the solution was to remove the old (invalid) mount points.
I did not need to change the ASM disk discovery string.


Tags: Oracle, ASM, Problems&Solutions, LUN, Hang, blockiert, Publish
May 06, 2014 at 09:21AM

2016-08-28

Kubuntu 14.04 black screen after monitor off/on


Whenever I turned my display off and on again after having logged on,  the screen stayed black. After rebooting, the logon screen appeared, but after logon with my user account, the screen got black. Logging with other user accounts had no problem.

This problem occurred using Kubuntu 14.04.  and a Nvidia graphics card connected by a display port cable.

Here is the description how I corrected it.


In short



Change the first false value of your screen definition file 
.kde/share/apps/kscreen/xxxxxxxxxxxxxx
from false to true.
Than make this file read only.



In Detail


Start one of the consoles: Ctrl-Alt-F1
Then enter your OS-User name and password.

Go to the directory .kde/share/apps/kscreen located in your home directory:
cd ~/.kde/share/apps/kscreen

Listing the files in this directory (ls -1), should display at least one file, that looks like the one bellow.
The files name is a mix of number an letters (seems a long hexadecimal number):
ls -1

7134be4579e47853d9bc866485e252fb

If you have/had more than one monitors, several files will be listed.

This is a text file. Its contents can be displayed with the command cat :
cat 7134be4579e47853d9bc866485e252fb

[ { "enabled" : false, "id" : "9a9b7a71150d853203babd861f68d8c5", "metadata" : { "fullname" : "xrandr-Dell Inc.-DELL U2515H-9X2VY61E10XL", "name" : "DP-1" }, "mode" : { "refresh" : 59.9506, "size" : { "height" : 1440, "width" : 2560 } }, "pos" : { "x" : 0, "y" : 0 }, "primary" : true, "rotation" : 1 } ]

Change the false value after "enabled" (from above) to true.

Here I show how to do it using the vi editor, that is available on every Linux system.
vi 7134be4579e47853d9bc866485e252fb

  • Go to the beginning of false by using the arrow keys
  • press the key [DEL] until false is completely deleted
  • press the key [i] in order to enter the insert mode
    (-- INSERT -- will then by displayed at the bottom line)
  • type true
  • press the key [ESC] in order to leave the insert mode
    (-- INSERT -- disappear from the bottom line)
  • press the keys [:] and [x]
    (":" starts the command mode and "x" is the command "exit with saving")

If you display the contents of your file again, the false should now have been replaced by true

Now the Graphical environment can be restarted by entering the command startx.
startx

I could avoid that this problem occurs again I made this file read only


chmod ugo-w 7134be4579e47853d9bc866485e252fb


I hope this helps.



Tags: Problems&Solutions, Kubuntu, Publish, Monitor, Black Screen
August 28, 2016 at 08:52AM

2016-07-07

Registering an Oracle DB into the RMAN Catalog


PROBLEM

If the Database ID changed (I described this in a previous post) and the RMAN catalog is used, RMAN will output the following error stack:

RMAN-03002: failure of backup command at 07/05/2016 03:56:13
RMAN-03014: implicit resync of recovery catalog failed
RMAN-06004: ORACLE error from recovery catalog database:
RMAN-20001: target database not found in recovery catalog



As the last error line says, the database can not be found in the RMAN catalog, because the DB ID is used in order to identify the catalog records belonging your DB.

SOLUTION

Logon as oracle on your DB host.
Logon with RMAN to your DB and your RMAN catalog (here TNS-Alias RMANCAT):

OS> rman target / catalog /@RMANCAT


Then register your DB into the RMAN catalog:

RMAN> REGISTER DATABASE;


PROBLEM 

If you are trying to register a standby DB and get this error:

RMAN> REGISTER DATABASE;
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

SOLUTION

First: make sure, that the primary DB is already registered in the RMAN catalog.
Then logon with the standby DB on the RMAN catalog and execute the following statement:

RUN {
  ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
  CROSSCHECK BACKUP;
}