CRS-4995: The command ‘Setperm resource’ is invalid in crsctl

While running “crsctl setperm” from 12.1.0.2 GI environment, CRS-4995 error occurred.

1. Run the command as grid user.

$ crsctl getperm resource ora.testdb.test.svc 
Name: ora.testdb.test.svc
owner:oracle:rwx,pgrp:oinstall:r--,other::r--,group:dba:r-x,user:grid:r-x

$crsctl setperm resource ora.testdb.test.svc -u 'pgrp:oinstall:r-x' CRS-4995: The command 'Setperm resource' is invalid in crsctl. Use srvctl for this command.

Subscribe to get access

Read more of this content when you subscribe today.

How to Fix Incomplete RDBMS DST Upgrading in 12c

It is a good practice to raise a service request for issues of DST upgrading in production environment.

There is a database upgraded from 11.2.0.4 to 12.1.0.2 by using “Complete Checklist for Upgrading to Oracle Database 12c Release 1 using DBUA (Doc ID 1516557.1)”. For some reason, the DST upgrading was not complete successfully after the upgrading checking:

Current DST state is still “Upgrade”.

SQL>SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
    FROM DATABASE_PROPERTIES
    WHERE PROPERTY_NAME LIKE 'DST_%'
    ORDER BY PROPERTY_NAME;

PROPERTY_NAME			    VALUE
----------------------------------- ------------------------------
DST_PRIMARY_TT_VERSION		    18
DST_SECONDARY_TT_VERSION	    14
DST_UPGRADE_STATE		    UPGRADE

Try to end the upgrading, still got issues.

SQL>shutdown immediate
SQL>startup

SQL>alter session set "_with_subquery"=materialize;
SQL>alter session set "_simple_view_merging"=TRUE;


SQL>VAR fail number
SQL>BEGIN
DBMS_DST.END_UPGRADE(:fail);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);
END;
/
Number of failures: 2
BEGIN
*
ERROR at line 1:
ORA-56929: Ending an upgrade window failed
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DST", line 1289
ORA-06512: at line 

SQL>SELECT * FROM sys.dst$error_table;

no rows selected

SQL>SELECT OWNER, TABLE_NAME, UPGRADE_IN_PROGRESS 
      FROM ALL_TSTZ_TABLES 
     where UPGRADE_IN_PROGRESS='YES';

OWNER            TABLE_NAME                    UPG
---------------- ----------------------------  ----  
GSMADMIN_INTERNAL AQ$_CHANGE_LOG_QUEUE_TABLE_L YES
GSMADMIN_INTERNAL AQ$_CHANGE_LOG_QUEUE_TABLE_S YES

Start database normally and run DBMS_DST.UPGRADE_DATABASE.

SQL>set serveroutput on
SQL>VAR numfail number
SQL>BEGIN
DBMS_DST.UPGRADE_DATABASE(:numfail,
parallel => TRUE,
log_errors => TRUE,
log_errors_table => 'SYS.DST$ERROR_TABLE',
log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
error_on_overlap_time => FALSE,
error_on_nonexisting_time => FALSE);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
END;
/

Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
Number of failures: 0
Failures:0

PL/SQL procedure successfully completed.



SQL>SELECT * FROM sys.dst$error_table;

no rows selected

End the upgrading.

SQL> VAR fail number
BEGIN
DBMS_DST.END_UPGRADE(:fail);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);
END;
/
An upgrade window has been successfully ended.
Failures:0

PL/SQL procedure successfully completed.

Check the successful upgrading.

SQL>SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
      FROM DATABASE_PROPERTIES
     WHERE PROPERTY_NAME LIKE 'DST_%'
  ORDER BY PROPERTY_NAME;  

PROPERTY_NAME             VALUE
------------------------- -------
DST_PRIMARY_TT_VERSION       18
DST_SECONDARY_TT_VERSION      0
DST_UPGRADE_STATE          NONE


SQL>SELECT * FROM v$timezone_file;

FILENAME		VERSION     CON_ID
-------------------- ---------- ----------
timezlrg_18.dat 	     18 	 0

Reference:

Updating the RDBMS DST version in 12c Release 1 (12.1.0.1 and up) using DBMS_DST (Doc ID 1509653.1)

Scripts to automatically update the RDBMS DST (timezone) version in an 11gR2 or 12cR1 database . (Doc ID 1585343.1)

How to run an ILOM Snapshot on a Sun/Oracle X86 System from the service processor CLI interface

ILOM snapshot is the first thing Oracle support normally asks for.

This post demonstrates how to run an ILOM snapshot on a cell server ( xx.xx.xx.xx ), on which one or more flashdisks have failed. This snapshot is required by Oracle support for diagnosing the issue.

1) Log in to the ILOM CLI interface.

# ssh xx.xx.xx.xx-ilom
Password:

Oracle(R) Integrated Lights Out Manager
Version 3.1.2.20.c r86871
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.

->

2) After the ‘->’ prompt, type command in below:

-> set /SP/diag/snapshot dataset=normal
Set 'dataset' to 'normal'

3) Type the following command:

Here password contains special characters, so  double quotes around the password are needed.

IP ( 10.10.10.17 ) could be either cell server or database server IP, as long as the user/password works on it.

-> set /SP/diag/snapshot dump_uri=sftp://testuser:"Password#"@10.10.10.17/tmp
Set 'dump_uri' to 'sftp://testuser:Password#@10.10.10.17/tmp'

4) cd to the snapshot directory and view the status. It shows “Running” initially.

-> cd /SP/diag/snapshot
/SP/diag/snapshot

-> show

/SP/diag/snapshot
 Targets:

Properties:
 dataset = normal
 dump_uri = (Cannot show property)
 encrypt_output = false
 result = Running

Commands:
 cd
 set
 show

5) Wait for the snapshot process to complete. It may take several minutes.
Continue to check until the status is shows ‘Snapshot Complete’
Do not use, access, view, copy or move the snapshot file until it has completed.

-> show

/SP/diag/snapshot
 Targets:

Properties:
 dataset = normal
 dump_uri = (Cannot show property)
 encrypt_output = false
 result = Collecting data into 
 sftp://testuser:*****@10.10.10.17/tmp/xx.xx.xx.xx-ilom_1152FMM0C1
 _2016-04-17T10-59-15.zip
 Snapshot Complete.
 Done.

Commands:
 cd
 set
 show

6) exit the CLI interface and find your snapshot in the directory you specified.

->exit
Connection to xx.xx.xx.xx-ilom closed.

$ssh testuser@10.10.10.17
testuser@10.10.10.17's password: 

$ls -ltr /tmp/xx.xx.xx.xx-ilom_1152FMM0C1_2016-04-17T10-59-15.zip

-rw-r--r-- 1 testuser dba 1129640 Apr 17 04:03 xx.xx.xx.xx-ilom_1152FMM0C1_2016-04-17T10-59-15.zip

Reference :

How to run an ILOM Snapshot on a Sun/Oracle X86 System (Doc ID 1448069.1)

How to Move OCR, Voting Disk File, ASM SPILE to a New Diskgroup ( 12.1.0.2 )

It is a good practice to have different dedicated disk groups for databases, OCR/VOTE and cluster health monitor( chm ) repository respectively.

Active Session History (ASH) Performed an Emergency Flush

Set proper ASH size to avoid emergency flushes.

The alert log with following message now and then :

"Active Session History (ASH) performed an emergency flush. This
 may mean that ASH is undersized. If emergency flushes are a 
recurring issue, you may consider increasing ASH size by setting 
the value of _ASH_SIZE to a sufficiently large value. Currently, 
ASH size is 134217728 bytes. Both ASH size and the total number 
of emergency flushes since instance startup can be monitored by 
running the following query:  

select total_size, awr_flush_emergency_count from v$ash_info;"

Query the current ASH size :

SQL> select total_size from v$ash_info;

TOTAL_SIZE
----------
 134217728

Current size is 134M according both the query and the messages in alert.log. We can add another 50% by running the following sql. The size should be appropriate if without any more similar messages in alert.log. Otherwise increase it up to maximum 254M.

SQL>alter system set "_ash_size"=200M;