Skip to content

Instantly share code, notes, and snippets.

View dincosman's full-sized avatar

Osman DINC dincosman

View GitHub Profile
@dincosman
dincosman / restore_ocr.txt
Created November 26, 2022 19:11
Restore OCR and replace voting file location
[root@exadb01 ~]# crsctl stop crs -f
[root@exadb01 ~]# crsctl start crs -excl -nocrs
[oracle@exab01 ~]$ cat /etc/oracle/ocr.loc
#Device/file +DATA getting replaced by device +DATA/exa/OCRFILE/registry.255.1025972873
ocrconfig_loc=+DATA/exa/OCRFILE/registry.255.1025972873
[oracle@exadb01 ~]$ vi /etc/oracle/ocr.loc
ocrconfig_loc=+RECO ---> Restore location.
@dincosman
dincosman / create_pfile_drop_diskgroup.txt
Last active October 7, 2023 06:24
Restore spfile from offline asm diskgroup
SYS@+ASM1> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/exa/ASMPARAMETERFILE/registry.253.1025972865
[oracle@exadb01 ~]$ amdu -diskstring 'o/*/DATA_*' -extract data.253
amdu_2020_08_05_14_29_07/
[oracle@exadb01 ~]$ cd amdu_2020_08_05_14_29_07/
[oracle@exadb01 amdu_2020_08_05_14_29_07]$ ll
@dincosman
dincosman / create_diskgroup.txt
Last active October 7, 2023 06:24
Create diskgroup with missing disks
SYS@+ASM1> create diskgroup data normal redundancy disk 'o/192.168.31.10/DATA_CD_00_exacel02',
'o/192.168.31.10/DATA_CD_01_exacel02',
'o/192.168.31.10/DATA_CD_02_exacel02',
'o/192.168.31.10/DATA_CD_03_exacel02',
'o/192.168.31.10/DATA_CD_04_exacel02',
'o/192.168.31.10/DATA_CD_05_exacel02',
'o/192.168.31.10/DATA_CD_06_exacel02',
'o/192.168.31.10/DATA_CD_07_exacel02',
'o/192.168.31.10/DATA_CD_08_exacel02',
'o/192.168.31.10/DATA_CD_09_exacel02',
@dincosman
dincosman / create_passwordfile_asm.txt
Last active October 7, 2023 06:24
Error messages in crs logs and create asm password file
[root@exadb02 trace]# vi /u01/app/oracle/diag/crs/exadb02/crs/trace/alert.log
...
2020-08-06 11:24:10.239 [ORAROOTAGENT(278746)]CRS-5019: All OCR locations are on ASM disk groups [DATA], and none of these disk groups are mounted. Details are at "(:CLSN00140:)" in "/u01/app/oracle/diag/crs/exadb02/crs/trace/ohasd_orarootagent_root.trc".
...
[root@exadb02 trace]# tail -f /u01/app/oracle/diag/crs/exadb02/crs/trace/ohasd_orarootagent_root.trc
...
2020-08-06 11:29:37.160 : USRTHRD:697435904: [ INFO] {0:5:3} [ora.storage] Error [kgfoAl06] in [kgfokge] at kgfo.c:3169
2020-08-06 11:29:37.160 : USRTHRD:697435904: [ INFO] {0:5:3} [ora.storage] ORA-01017: invalid username/password; logon denied
...
@dincosman
dincosman / crs_5019_error.txt
Created December 4, 2022 17:16
CRS-5019 error output.
[root@exadb02 trace]# vi /u01/app/oracle/diag/crs/exadb02/crs/trace/alert.log
...
2020-08-06 11:24:10.239 [ORAROOTAGENT(278746)]CRS-5019: All OCR locations are on ASM disk groups [DATA], and none of these disk groups are mounted. Details are at "(:CLSN00140:)" in "/u01/app/oracle/diag/crs/exadb02/crs/trace/ohasd_orarootagent_root.trc".
...
[root@exadb02 trace]# tail -f /u01/app/oracle/diag/crs/exadb02/crs/trace/ohasd_orarootagent_root.trc
...
2020-08-06 11:29:37.160 : USRTHRD:697435904: [ INFO] {0:5:3} [ora.storage] Error [kgfoAl06] in [kgfokge] at kgfo.c:3169
2020-08-06 11:29:37.160 : USRTHRD:697435904: [ INFO] {0:5:3} [ora.storage] ORA-01017: invalid username/password; logon denied
...
@dincosman
dincosman / flex_asm_users.txt
Last active October 7, 2023 06:24
The users used in Flex ASM
We have this privileged database users in a healthy cluster :
ASMCMD> lspwusr
Username sysdba sysoper sysasm
SYS TRUE TRUE TRUE
CRSUSER__ASM_001 TRUE FALSE TRUE
ASMSNMP TRUE FALSE FALSE
What do we have :
ASMCMD> lspwusr
Username sysdba sysoper sysasm
@dincosman
dincosman / retrieve_credential.txt
Last active December 3, 2024 17:21
Retrieve credential from crs and modify CRSUSER__ASM_001 password
[oracle@exadb01 ~]$ ocrdump /tmp/ocr.dmp
PROT-310: Not all keys were dumped due to permissions.
[oracle@exadb01 ~]$ vi /tmp/ocr.dmp
...
[SYSTEM.ASM.CREDENTIALS.USERS.CRSUSER__ASM_001]
ORATEXT : 8956aa1aaa66aa46aaaa2222a895aa5a:oracle
...
[oracle@exadb01 ~]$ crsctl get credmaint -path /ASM/Self/8956aa1aaa66aa46aaaa2222a895aa5a -credtype userpass -id 0 -attr passwd -local
ZbV9Zx7F8BKxM2ZD4gUnKMjaH5Hnk
@dincosman
dincosman / modify_asm_pwbackup.txt
Created December 4, 2022 21:08
Modify location of backup of asm password file.
ASMCMD> pwcopy +DATA/orapwasm +RECO/orapwasm_backup
copying +DATA/orapwasm -> +RECO/orapwasm_backup
[oracle@exadb01 dbs]$ srvctl config asm
ASM home: <CRS home>
Password file: +DATA/orapwasm
Backup of Password file: +DATA/orapwASM_backup
ASM listener: LISTENER
ASM instance count: ALL
Cluster ASM listener: ASMNET1LSNR_ASM
@dincosman
dincosman / parse_error.txt
Created December 17, 2022 19:35
Parsing Error Output
2022-02-17T14:25:33.918516+10:30
WARNING: too many parse errors, count=9700 SQL hash=0xcccb313a
PARSE ERROR: ospid=33356, error=923 for statement:
2022-02-17T14:25:33.918632+10:30
select dual
Additional information: hd=0xb336ab08 phd=0xb336af30 flg=0x28 cisid=120 sid=120 ciuid=120 uid=120
2022-02-17T14:29:04.673714+10:30
WARNING: too many parse errors, count=9800 SQL hash=0xcccb313a
PARSE ERROR: ospid=34578, error=923 for statement:
2022-02-17T14:29:04.673839+10:30
@dincosman
dincosman / mute_parse_failure.txt
Created December 17, 2022 20:05
Mute Parse Failure Errors
SQL> ALTER SYSTEM SET "_kks_parse_error_warning"=0 SCOPE=BOTH;