sábado, 29 de junho de 2024
[ORACLE] ORA-46362: Could not translate variable ORACLE_BASE.
segunda-feira, 17 de junho de 2024
[ORACLE] Simple trick about DBMS_JOBS.
Ok, Ok!!! I know we should use the dbms_scheduler, but sometimes the customer uses an "old school" schedule, and they don't want to change.
In this case, if you run a creation with the SYS user, for example, the job will be created under the SYS User.
But you can change this using SYS.DBMS_IJOB.CHANGE_ENV.
what => 'begin USER_DEST.proc; end;',
next_date => SYSDATE+1,
interval => 'trunc(sysdate + 1) + 10/1440');
LOG_USER,
PRIV_USER,
SCHEMA_USER,
LAST_DATE,
LAST_SEC,
WHAT
FROM dba_jobs
WHERE JOB = 18068;
------- -------- --------- ----------- --------- --------- -------
JOB => 18068,
LUSER => 'USER_DEST',
PUSER => 'USER_DEST',
CUSER => 'USER_DEST',
NLSENV => NULL);
Where:
JOB => Job number
LUSER => Log user
PUSER => Priv user
CUSER => Schema User
NLSENV => NLS Language
-- Change only PRIV_USER
EXEC SYS.DBMS_IJOB.CHANGE_ENV(18068,NULL,'USER_DEST',NULL,NULL);
COMMIT;
EXEC SYS.DBMS_IJOB.CHANGE_ENV(18068,'USER_DEST','USER_DEST','USER_DEST',NULL);
COMMIT;
LOG_USER,
PRIV_USER,
SCHEMA_USER,
LAST_DATE,
LAST_SEC,
WHAT
FROM dba_jobs
WHERE JOB = 18068;
------- --------- --------- ----------- --------- --------- -------
quarta-feira, 12 de junho de 2024
[ORACLE] Cleanup Repository Area - Oracle Database Appliance (ODA)
- This step-by-step worked for me, but it may not work for you.
- It's a test environment. The real life will be different, for sure.
- This post is for study and testing as well and has no concern for performance and security best practices.
df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 189G 176K 189G 1% /dev
tmpfs 189G 845M 188G 1% /dev/shm
tmpfs 189G 4.1G 185G 3% /run
tmpfs 189G 0 189G 0% /sys/fs/cgroup
/dev/mapper/VolGroupSys-LogVolRoot 30G 9.6G 19G 35% /
/dev/md0 476M 123M 329M 28% /boot
/dev/sda1 500M 8.6M 492M 2% /boot/efi
/dev/asm/datprds-31 370G 291G 80G 79% /u02/app/oracle/oradata/prd
/dev/asm/commonstore-31 5.0G 631M 4.4G 13% /opt/oracle/dcs/commonstore
/dev/asm/datprodp-31 2.2T 1.6T 673G 70% /u02/app/oracle/oradata/mcg
/dev/asm/redo-365 236G 184G 53G 78% /u04/app/oracle/redo
/dev/asm/reco-8 1.8T 865G 936G 49% /u03/app/oracle
/dev/asm/datprodmv-31 17T 17T 16G 100% /u02/app/oracle/oradata/prodmvx7hmcg
tmpfs 38G 0 38G 0% /run/user/54325
tmpfs 38G 0 38G 0% /run/user/1000
tmpfs 38G 0 38G 0% /run/user/0
3) Check the repository area.
total 9.0G
-rw-r--r-- 1 root root 2.9G Jan 15 2021 db112.210119.tar.gz
-rw-r--r-- 1 root root 6.1G Feb 8 2021 grid19.tar.gz
-rw-r--r-- 1 root root 11K Feb 12 2021 clonemetadata.xml
38M asr
16G db
44M dcsadmin
609M dcsagent
46M dcscli
175M dcscontroller
32M firmwarecontroller
48M firmwaredisk
12M firmwareexpander
8.6M hmp
216M ilom
238M java
981M mysql
79M oak
585M opatch
9.7G orapkgs
527M os
91M oss
3.4M System
302M thirdpartypkgs
8.4M zookeeper
devtmpfs 189G 176K 189G 1% /dev
tmpfs 189G 845M 188G 1% /dev/shm
tmpfs 189G 4.1G 185G 3% /run
tmpfs 189G 0 189G 0% /sys/fs/cgroup
/dev/mapper/VolGroupSys-LogVolRoot 30G 9.6G 19G 35% /
/dev/md0 476M 123M 329M 28% /boot
/dev/sda1 500M 8.6M 492M 2% /boot/efi
/dev/mapper/VolGroupSys-LogVolOpt 59G 39G 18G 70% /opt
/dev/asm/datprds-31 370G 291G 80G 79% /u02/app/oracle/oradata/prd
/dev/asm/commonstore-31 5.0G 631M 4.4G 13% /opt/oracle/dcs/commonstore
/dev/asm/datprodp-31 2.2T 1.6T 673G 70% /u02/app/oracle/oradata/mcg
/dev/asm/datprodp-31 2.2T 1.6T 673G 70% /u02/app/oracle/oradata/mcg
/dev/asm/redo-365 236G 184G 53G 78% /u04/app/oracle/redo
/dev/asm/reco-8 1.8T 866G 935G 49% /u03/app/oracle
/dev/asm/datprodmv-31 17T 17T 16G 100% /u02/app/oracle/oradata/prodmvx7hmcg
tmpfs 38G 0 38G 0% /run/user/54325
tmpfs 38G 0 38G 0% /run/user/1000
tmpfs 38G 0 38G 0% /run/user/0
-rw-r--r-- 1 root root 2.9G Jan 15 2021 db112.210119.tar.gz
-rw-r--r-- 1 root root 11K Feb 12 2021 clonemetadata.xml
16G db
44M dcsadmin
609M dcsagent
46M dcscli
175M dcscontroller
32M firmwarecontroller
48M firmwaredisk
12M firmwareexpander
8.6M hmp
216M ilom
238M java
981M mysql
79M oak
585M opatch
3.6G orapkgs
527M os
91M oss
3.4M System
302M thirdpartypkgs
8.4M zookeeper
sexta-feira, 8 de março de 2024
[ORACLE] Batch change EDITIONABLE property.
- This step-by-step worked for me, but it may not work for you.
- It's a test environment. The real life will be different, for sure.
- This post is for study and testing as well and has no concern for performance and security best practices.
terça-feira, 23 de janeiro de 2024
[ORACLE] How to move a datafile to a new location in ASM.
- For SYS and SYSAUX, the procedure will be slightly different, so don't use this step-by-step in these two cases.
- There are also other ways to do this process, today I chose to do this one.
RMAN> BACKUP AS COPY DATAFILE 69 format '+DGFRA';
RMAN> recover datafile 69;
terça-feira, 10 de outubro de 2023
[ORACLE] ORA-16597: Oracle Data Guard Broker detects two or more primary databases. #JoelKallmanDay
Last week, I was doing a test using Data Guard Broker and at the end of the switchover I got the error bellow:
<error barrier> at 0x7ffcb2af9bf0 placed krsl.c@6774
ORA-03135: connection lost contact
*** 2023-10-04 09:57:23.145275 [krsh.c:6348]
- This step-by-step worked for me, but it may not work for you.
- It's a basic and limited environment. The real life will be different, for sure.
- This post is for study and testing as well, and has no concern for performance and security best practices.
rm -f /u01/app/oracle/product/19.3.0.0/db_1/dbs/dr2IMANDG.dat
Protection Mode: MaxPerformance
Members:
imandg - Primary database
ironman - Physical standby database
Properties:
FastStartFailoverThreshold = '30'
OperationTimeout = '30'
TraceLevel = 'USER'
FastStartFailoverLagLimit = '30'
CommunicationTimeout = '180'
ObserverReconnect = '0'
FastStartFailoverAutoReinstate = 'TRUE'
FastStartFailoverPmyShutdown = 'TRUE'
BystandersFollowRoleChange = 'ALL'
ObserverOverride = 'FALSE'
ExternalDestination1 = ''
ExternalDestination2 = ''
PrimaryLostWriteAction = 'CONTINUE'
ConfigurationWideServiceName = 'ironman_CFG'
terça-feira, 3 de outubro de 2023
[ORACLE] How do I upgrade the AHF.
Hello everyone!!!
I hope you're doing well!
In my last post here, I've showed how to install the Oracle Autonomous Health Framework (AHF).
Today, I'll show how you can upgrade the AHF and how to use the auto upgrade as well.
But always remember:
- This step-by-step worked for me, but it may not work for you.
- It's a basic and limited environment. The real life will be different, for sure.
- This post is for study and testing as well, and has no concern for performance and security best practices.
sexta-feira, 29 de setembro de 2023
[ORACLE] How do I install the Oracle Autonomous Health Framework (AHF)?
Hello everyone!!!
I hope you're doing well!
Today, I'll show you how to install the Oracle Autonomous Health Framework (AHF).
I don't have an Oracle RAC installed here on my laptop, but I'll provide it. Today I'll show you a single-node environment.
First, what is Oracle Autonomous Health Framework?
In Oracle's words, it's a "Machine learning-based solution for maintaining database availability and performance".
In Mario's words, it's a "very cool tool that collects and groups your system health information and logs and uses Machine Learning to provide you insights and predictions so that you can act preventively, avoiding problems in your environment".
- This step-by-step worked for me, but it may not work for you.
- It's a basic and limited environment. The real life will be different, for sure.
- This post is for study and testing as well, and has no concern for performance and security best practices.
Postagem em destaque
[ORACLE] Useful scripts for the day-to-day life of a DBA (Part 3) - System metrics
Hello everyone. Hope you're doing well! As I said here , I've created a repository on GITHUB to share some scripts that I like t...
