Here I will explain how to disable trigger on in oracle. Some time we have to disable the trigger on table. Use below query to disable the trigger in oracle database.
Disable all trigger on table
SQL>alter table table_name disable all triggers;
Disable all trigger on schema
We can build script using below sql and execute them on sql prompt.
SQL>spool schema_trigger.sql
SQL>select 'alter trigger ' || table_owner || '.' || trigger_name || ' disable;' from user_triggers;
SQL>@schema_trigger.sql
Disable specific trigger on table
SQL>alter trigger trigger_name disable;
User below query to find the status of trigger
SQL>select status from user_triggers where trigger_name='Trigger_name';
In oracle database its very important to manage the archive logs to free up the space on archive log destination for new archive logs.
Below are some rman commands to delete the old archive log which was already backuped up on disk.
rman target /
RMAN>
run
{
allocate channel c1 type disk;
#Backup archivelog oder than 2 day's and delete them.
backup
format '/backup01/prod/%d_ARC_%u_%s_%p'
archivelog until time 'sysdate-2' delete input;
release channel c1;
}
============================================
run {
allocate channel c1 type disk;
#Delete archielog older than 2 day's
delete archivelog all completed before ‘sysdate-2’;
release channel c1;
}
===============================================
run {
allocate channel c1 type disk;
#Backup archivelog that was not backup.
backup archivelog all not backed up 1 times;
release channel c1;
}
============================================
run{
allocate channel c1 type disk;
sql'alter system archivelog current';
#Backup database plus archivelog older than 2 day's and delete them.
BACKUP
FORMAT '/backup01/prod/%d_DB_%u_%s_%p'
DATABASE
PLUS ARCHIVELOG UNTIL TIME 'sysdate-2'
delete input;
release channel c1;
}
==============================================
Run {
allocate channel c1 type disk;
#Delete archielog older than 5 day's which was backup atleast 1 time.
DELETE ARCHIVELOG UNTIL TIME 'sysdate-5' BACKED UP 1 TIMES TO DEVICE TYPE DISK;
release channel c1;
}
================================================
Use below script to delete noprompt expired archivelog .
Run{
allocate channel c1 type disk;
delete expired archivelog all;
release channel c1;
}
or -------------------------------------------------------
Run{
allocate channel c1 type disk;
delete noprompt expired archivelog all;
release channel c1;
}
Click here for more information on rman backup of oracle database. If you want to restore the rman backup click here.
When attempting to apply R12.ATG_PF.B.delta.3 patch 8919491, error appears on relink,
the following error occurs on relinking executables task.
ERROR -- adrelink failed in r12
adrelink.log:-
Relink of module "MSCCPP" failed.
Relink of module "MSCMON" failed.
Relink of module "MSCNEW" failed.
Relink of module "MSCNSP" failed.
Relink of module "MSCNSPNM" failed.
Relink of module "MSCPCL" failed.
Relink of module "MSCPDW" failed.
Relink of module "MSCPRG" failed.
Relink of module "MSCSDW" failed.
Relink of module "MSCSLD" failed.
Relink of module "MSCXGCAL" failed.
Relink of module "MSONEW" failed.
-----------------------
Relink of module "MSCPDW" failed.
See error messages above (also recorded in log file) for possible
reasons for the failure. Also, please check that the Unix userid
running adrelink has read, write, and execute permissions
on the directory /data03/APPS_8027/apps/apps_st/appl/msc/12.0.0/bin,
and that there is sufficient space remaining on the disk partition
containing your Oracle Applications installation.
..
collect2: ld returned 1 exit status
make: ***
[/data03/GST_APPS_8027/apps/apps_st/appl/msc/12.0.0/bin/MSCCPP] Error 1
Done with link of msc executable 'MSCCPP' on Thu Jul 26 10:29:09 IST 2018
Relink of module "MSCCPP" failed.
See error messages above (also recorded in log file) for possible
reasons for the failure. Also, please check that the Unix userid
running adrelink has read, write, and execute permissions
on the directory /data03/GST_APPS_8027/apps/apps_st/appl/msc/12.0.0/bin,
and that there is sufficient space remaining on the disk partition
containing your Oracle Applications installation.
Relinking module 'MSCMON' in product msc ...
adrelink is exiting with status 1
End of adrelink session
Date/time is Wed Sep 5 09:33:39 IST 2018
**********************************************************
Line-wrapping log file for readability ...
Done line-wrapping log file.
Original copy is /acedata03/GST_APPS_8027_1/apps/apps_st/appl/admin/GST/log/adrelink.lsv
New copy is /data03/GST_APPS_8027_1/apps/apps_st/appl/admin/GST/log/adrelink.log
An error occurred while relinking application programs.
Continue as if it were successful [No] :
Solution:-
To fix this problem, users are required to replace the following line under the Linux section of the $AD_TOP/bin/adrelinknew.sh:
CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh'
with
CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh -Wl,--noinhibit-exec'
After making this change, users are then required to run the adadmin utility and relink application executables.
Ensure to create a copy of the file before trying any change. Also try this change in Test environment before doing it in a production.