Oracle DBA ++
16 FOLLOWERS
Oracle DBA ++, This blog lets you know about Oracle DBA activities, issues, concepts, etc.
Oracle DBA ++
3d ago
Please note that scan and scan_listener can be stopped/started by oracle(rdbms software installation owner) or grid user.
This requires downtime of the entire database if the application is using SCAN for app to DB connectivity. There is no order of stopping/starting scan and scan_listener. If you try to stop the scan first before scan_listener then, you will face below error messages. In this case, you need to stop the scan with force option(-f). This will stop the scan as well as scan_listener, both.
[oracle@rac1 ~]$ srvctl stop scan
PRCR-1065 : Failed to stop resource o ..read more
Oracle DBA ++
3d ago
Execute below commands by oracle or rdbms software installation owner.
Please note that here, mydb is the DB_UNIQUE_NAME used in all srvctl commands.
rac1 and rac2 are the hostnames of the cluster nodes.
#Command to list the DB_UNIQUE_NAME configured in srvctl. This is required if you don't know the DB_UNIQUE_NAME configured in srvctl.
[oracle@rac1 ~]$ srvctl config db
mydb
#Command to check the srvctl configuration for the mentioned DB_UNIQUE_NAME.
[oracle@rac1 ~]$ srvctl config db -d mydb
Database unique name: mydb
Database name: mydb
Oracle home: /u01/a ..read more
Oracle DBA ++
3d ago
Disable HAS is required if you don't require to start the HAS services when servers starts-up. Later you can start it manually. The default is enable. By default, HAS will be started when server reboots.
Execute below commands by root user.
#Command to display the automatic startup configuration of Oracle HAS stack on the server.
[root@rac1 bin]# ./crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.
#Command to disable the automatic startup configuration of the Oracle HAS stack on the server when server starts up.
[root@rac1 bin]# ./crsctl disable has ..read more
Oracle DBA ++
3d ago
#Execute below query check unusable indexes in the database.
SQL> select owner,index_name,status from dba_indexes where status='UNUSABLE';
OWNER INDEX_NAME STATUS
--------------- ------------------------- --------
SYS IDX_TEST UNUSABLE
The unusable indexes can be rebuilt online to mark the indexes as usable.
SQL> alter index IDX_TEST rebuild online;
Index altered.
SQL ..read more
Oracle DBA ++
3d ago
# Open the windows command prompt by "run as administrator" and execute below command to create an Oracle Instance in Windows Operating System.
Note: The below command will create an Oracle service or Instance "OracleServiceTEST" in services.msc and start the instance by PFILE.
C:\Windows\System32>oradim -NEW -SID TEST -SYSPWD m0n1tor#1234 -STARTMODE auto -PFILE D:\oracle\app\oracle\product\19.0.0\dbhome_1\database\INITTEST.ORA
Here,
oradim: Its an Oracle binary file.
-NEW : This will create new service.
-SID : This is for creating SI ..read more
Oracle DBA ++
1w ago
-: For Single Instance :-
Adding Online Redo log groups - Single Instance:
#Groups to be added are group#4, group#5, group#6.
SQL> set lines 300 pages 3000
SQL> col member for a70
SQL> select group#,type,member from v$logfile order by 1;
GROUP# TYPE MEMBER
------ ------- ----------------------------------------------
1 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO1.LOG
2 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO2.LOG
3 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\R ..read more
Oracle DBA ++
1w ago
#Error while dropping less than two redo log groups.
SQL> alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01567: dropping log 1 would leave less than 2 log files for instance test (thread 1)
ORA-00312: online log 1 thread 1: 'D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO01.LOG'
Cause:
You can not drop all the groups and keep only one group. Minimum two redo log groups are required for the instance.
Solution:
Add more redo log groups and drop the existing ones if you want to drop it.
#First check the status of the re ..read more
Oracle DBA ++
1w ago
#Error while dropping current redo log group members
SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01623: log 3 is current log for instance test (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: 'D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO03.LOG'
Cause:
You can not drop current or active redo log group members.
Solution:
Switch 2-3 logs and change the status of current or active to inactive and then drop the redo log group members.
#First check the status of the redo log group members.
SQL> select group ..read more
Oracle DBA ++
2w ago
LNS, NSS, NSA, TT are the redo transport processes in Oracle Dataguard for SYNC and ASYNC mode.
1) NSS - Network Server SYNC Process
2) NSA - Network Server ASYNC Process
3) TT - Redo Transport Slave Process
1) NSSn: This transfers the redo from current online redo logs to remote standby destinations configured for SYNC transport. Here, n is 1-9 or A.
2) NSA: This transfers the redo from current online redo logs to remote standby destinations configured for ASYNC transport.
3) TTnn: This ships the redo from current online and standby redo logs to remote st ..read more
Oracle DBA ++
3w ago
What is Standby Redo Log or SRLs? Why do we need Standby Redo Logs ?
Standby redo logs or SRLs are used only when the database is running in the standby role. Standby Redo logs (SRLs) are not required if the database role is Primary, but these can be created in Primary database since these are required after switchover operation when Primary database becomes standby database. Standby redo logs can be created during standby configuration or after the standby creation. Standby Redo Logs are required to avoid data loss in case of Primary DB server outages like failover situation. From ..read more