Manually Fire A Trigger
Sep 10, 2010
I disable the triggers when I program. what the program is doing behind the scenes. So if I insert into a table, the trigger would fire and insert into another table. Disabling the triggers shows me that I need to insert into both tables. This also allows me to have the primary key in my conversion tables match the database.
With that being said, can I tell the trigger to fire after the fact?
View 1 Replies
ADVERTISEMENT
Jan 17, 2013
I need a trigger to fire whenever an update happens. Seems easy, but there are several problems there:
- I need it to fire in case both :OLD and :NEW are the same value. i.e. I've got "5" currently in the field, and I update and set the same field to "5" again.
View 1 Replies
View Related
Jul 9, 2013
I am trying to make a particular field (called reason_code) "required" on a form I am working on.
Now this field has two fields before it, and I have to tab to reach my reason_code field.
But the functionality I want is that when I tab into the reason_code field, the WHEN-VALIDATE-ITEM trigger should fire even when this field is NULL.
IF :REASON_CODE IS NULL THEN
MESSAGE ("Please enter a reason code!");
end if;
The trigger doesn't fire when I don't enter a reason_code field and I can tab past this field and not get the ("Please enter a reason code!") error message.
On researching the problem, I saw that this field has to be of status "CHANGED" in order for the trigger to fire.
View 17 Replies
View Related
Nov 7, 2013
How to write and fire trigger if any database object will created?
View 1 Replies
View Related
Oct 31, 2011
I would like to create a trigger that will fire whenever any user will access to a Schema of Oracle DB (for each and every login). regardless the access will be through an application or SQLPLUS and this trigger must insert the below information into a table.
1) IP address
2) Machine Name
3) login time
4) logout time
5) name of accessed schema
writing this trigger and creating the table that will hold the required data.
View 6 Replies
View Related
Sep 24, 2012
A user is using an ad hoc tool similar to SQL Developer called PeopleSoft Application Designer.
He creates a connection to the db, then issues an alter session set current_schema = 'restricted_schema'. The connected user does not have direct privileges on the "restricted_schema" which they call SYSADM.
After changing the schema context in that manner he creates objects in SYSADM. A schema trigger is then fired and grants privileges on the new objects created in SYSADM. Doing the same in either SQL Plus or SQL Developer does not fire the schema trigger.
I think SQL Plus and SQL Dev are working as they should. Altering the session like that does not change your identity - just the schema context. But, when you examine v_$session, the connection with this other tool looks exactly the same as one from SQL Plus or SQL Dev when changing the schema context in the session.
Instead of trying to figure out what this other tool is doing, is there any way for that schema trigger to fire when using this process from one of our tools?
View 6 Replies
View Related
Dec 8, 2011
I have the source tables having 10 columns. I want to track the delta changes of only 6 columns. In case of insertion/updation, that new record should be inserted into another DELTA table of different schema.While in case of deletion, A new row will be inserted into that DELTA table , with the value of the primary key and other columns populated with NULL values.
I have applied the concept of 'after trigger' specifying the columns names but it logic is not working properly. Its tracking the changes for other 4 columns also.
View 4 Replies
View Related
Dec 31, 2012
My collection is not working as expected, what could be the issue here. This is what i did,
1. I created a collection in a process to fire on page load
if apex_collection.collection_exists(p_collection_name=>'MMMM') then
apex_collection.delete_collection(p_collection_name=>'MMMM');
end if;
APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION(p_collection_name => 'MMMM');
2. On my page i have a text field P1_text1 when i enter value into text field like ="sample data" i want this data loaded into my collection, so i created a button and added a process(on submit - before computations...) so it should insert into the collection when i click the button but no data is loaded, process:
APEX_COLLECTION.ADD_MEMBER(
p_collection_name => 'MMMM',
p_c001 => :P1_TEXT1,
p_c002 => 'TESTDATA' );
3. when i run the below query it shows "no data found" ,
SELECT c001,c002
FROM APEX_COLLECTIONS
WHERE collection_name = 'MMMM';
View 4 Replies
View Related
Jul 2, 2013
We have an application that has "After Submit" and AJAX "On-Demand" processes. We need the "After Submit" to fire and complete first, set an application item (by referencing the next value in a sequence), and then fire the "On-Demand" processes. We have the sequence number set accordingly, with all of the "After Submit" processes given a lower (APEX) sequence number than the "On-Demand" processes; however, it seems the "After Submit" processes are still not firing and completing because only intermittently are the "On-Demand" processes able to access the application item's value--80% of the time this value is simply blank. Making matters more complicated is that the application item is derived from an Oracle sequence, so in my "On-Demand" processes, I cannot simply re-run some of the same logic used in one of the "After Submit" processes that sets the sequence--the sequence may only be set once, and only by this "After Submit" process; we have no choice in that regard. Is there any way possible in APEX to 100% force processes to fire AND complete, one after another, in the order in which they are listed by their (APEX) sequence? In other words, if we have this:
(APEX) Seq Name & Process Type
1 process A ("After Submit")
2 process B ("After Submit")--this sets application item :XYZ
3 process C ("On-Demand)--this uses application item :XYZ and MUST have this item value available to do any processing Can we instruct APEX to fire process A, complete it, fire process B, complete it, and only then, fire process C?
View 2 Replies
View Related
Nov 8, 2012
When a user selects a Plan Type (Parent Select list) Plan codes (Child select list) to be filtered, working OK.
When a plan code is selected I need to do conditional display of regions.
Example: Plan code = A then display Region A
Plan code = B then display Region B etc.
I have a DA on Plan code select list but it's not working as it's being a cascaded (child) select list and the 'Change' event is already fired when I selected the Plan type, I also tried with other event options with no success.
Plan code shows no value in the session.
View 4 Replies
View Related
Oct 19, 2012
Just started to learn oracle DBA. I am creating database manually.. I am facing following errors
I executed catproc.sql script it was running suddenlt oracle throwd following error.
CODEPL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Package body created.
No errors.
Package body created.
BEGIN
*
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'TEMP'
ORA-06512: at "SYS.DBMS_STATS", line 13210
ORA-06512: at "SYS.DBMS_STATS", line 13517
[code]...
Script detail's
CODECREATE DATABASE drprod
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/drprod/redo01.log') SIZE 100M , GROUP 2 ('/u01/app/oracle/oradata/drprod/redo02.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
[code]...
View 14 Replies
View Related
Jul 15, 2010
How can one lock a table manually?
View 7 Replies
View Related
Nov 13, 2012
I am trying to make database manually and i am successfully created it,but when i am trying to run catalog.sql and catproc.sql my database get dismount automatically. i also tried to upgrade it via search results on problem but i found this below error when i am typing startup.
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
View 3 Replies
View Related
Aug 30, 2013
I have a form with a datablock displaying 3 text item fields.But the actual oracle table have 8 columns.When ever I insert new data and save it, only the three records are being stored in backend whereas remaining column stores with null value.That is the basic function of the form.
I placed an another list item field in a control block which is non-database item.Now I want to store the list item value into a column along with the 3 columns.In a simple way, how to insert record manually along with the other records?
View 14 Replies
View Related
Dec 21, 2011
when i connected with oracle user i got error message like "
ERROR:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_APPLICATION_INFO.SET_MODULE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
"
View 1 Replies
View Related
Jan 15, 2013
I want to check an item manually. Here is the
//when-validate-item
declare
i number;
begin
if :a.b is null then
i:=show_alert('null');
else if :a.b between 1900 and 2013 then
message('date valid');
else
i:=show_alert('date_invalid');
:a.b:=null;
raise form_trigger_failure;
end if;
end if;
exception when others then
i:=show_alert('exception');
end;
the problem for example when I entered a value "3000" I received two messages (the first on the alert "date_invalid" and the 2nd on the exception message) but normally I must received one message, the relative "date_invalid"
View 4 Replies
View Related
May 21, 2013
I have lots of materialized views and I want to refresh it manually every weekend (Sunday).
I tried :
SQL> refresh materialize view model_type_mv;
SP2-0734: unknown command beginning "refresh ma..." - rest of line ignored.
I am missing something?
View 4 Replies
View Related
Oct 25, 2013
I know how to design master_detail form using wizard but i want to create it without using wizard.I have created two blocks emp and dept without using wizard ,and connected them to emp and dept table by changing their properties.Now i want to create relationship between these two blocks, My requirement is when i press execute_query button if deptno is 10 in dept block then emp block should show data for deptno 10 only.
I know it can be done using add relationhip option in dept block (which is master block)but how to do that.
View 8 Replies
View Related
Dec 11, 2010
I am getting error ORA-16816: incorrect database role. The reason is my switch over to standby become failed and now both primary and standby databases showing 'database_role' as 'Physical Standby'.My question is how to manually set 'database_role' to 'PRIMARY' on primary database.
--------------------------------------------
DGMGRL> show configuration
Configuration - dgproj
Protection Mode: MaxPerformance
Databases:
repl - Primary database
Error: ORA-16816: incorrect database role
dgrepl - Physical standby database
--------------------------------------------
View 8 Replies
View Related
Jun 19, 2013
I have install Oracle 10g Database software in Red Hat 5.9 64bit. When I want to create a database manually (not using DBCA) I am getting errors like follow:
[oracle@t24app2 ~]$ export ORACLE_SID=dbend08
[oracle@t24app2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 19 16:19:37 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR: ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name: I am trying to connect as host not using Tns file info.
View 4 Replies
View Related
Mar 31, 2010
How to retrieve data manually to the text fields from the EMP database.what are the main properties ?
View 5 Replies
View Related
Aug 27, 2012
i forget my system password and i can't login to my database,and its not letting me in as sys/manager as sysdba...how to generate new user and password....
View 13 Replies
View Related
Oct 30, 2010
i want to create a blood donor report, which consists of his profile, donations_n_tests details, donor_to_patient tracking. each is a different table which i have imported to the layout.
now the problem is that for the 1st ever layout that i make via the report builder wizard, it offers me to choose aggregate functions (like sum, cout, avg, etc). but for the rest of the tables that i import into this layout via ADDITIONAL LAYOUT OPTION (report block. it does not offer me these summary functions.
actually i can only configure aggrigate functions via the report layout wizard, perhaps report builder is not that friendly like form developer where we can put a display item set calculation mode to summary and specify the column for the aggregate function.
View 1 Replies
View Related
Sep 30, 2013
Grid Version:11.2.0.3OS : RHEL 5.8 I have succesfully installed cluster (GI) and installed RDBMS software on my 2-Node RAC . But, I don't want to use dbca to create the database due to some custom requirements. Instead , I want to run CREATE DATABASE command manually to create the RAC DB. Once the DB is created in one node, what are the steps I need to do to make this DB a RAC DB?
View 5 Replies
View Related
Oct 23, 2012
i want to run this procedure manually for testing purpose
procedure Reject_Doc(itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out NOCOPY varchar2 )
what are the possible values for the variables itemtype,itemkey, actid,funcmode?
View 3 Replies
View Related
Apr 25, 2013
I am using oracle 9.2.0.8 on RHEL 4.8 (64-bit). I am facing a strange problem. I have this one job in database that takes almost 12-15 minutes to execute but when I execute procedure in that job manually, it executes in one minute. Even when no other job is running in database, it takes more than 10 minutes to execute.
View 1 Replies
View Related
Apr 25, 2011
1) First Problem:
Difference in hours is supposed to be 35 but it comes as 34.When i manually find the difference in days and multiply by 24 it comes as 34.999999999 and floor converts it as 34.. But when i execute the difference between dates alone and convert to 24 it shows as 35. So when i apply floor to this, it should be 35 instead of 34 right?
SQL> select (to_date('2011-05-03 09:00:00', 'yyyy-mm-dd hh24:mi:ss') -
2 to_date('2011-05-01 22:00:00', 'yyyy-mm-dd hh24:mi:ss'))
3 from dual
4 ;
[code].....
1) Second Problem:
For the following query, difference of the dates in minutes is 2100.. so mod(2100,60) should give 0 but it's giving 60.. Separately if if put mod(2100,60) it is giving as 0 only.
SQL> SELECT MOD(((to_date('2011-05-03 09:00:00', 'yyyy-mm-dd hh24:mi:ss') -
2 to_date('2011-05-01 22:00:00', 'yyyy-mm-dd hh24:mi:ss')) * 1440),
3 60) AS duration,
4 (to_date('2011-05-03 09:00:00', 'yyyy-mm-dd hh24:mi:ss') -
5 to_date('2011-05-01 22:00:00', 'yyyy-mm-dd hh24:mi:ss')) * 1440 as diffinmin
[code]....
View 2 Replies
View Related
Feb 21, 2013
how to create database manually(without dbca).
View 2 Replies
View Related
Mar 6, 2011
I've been working to create (via script) this database for the last 2 days.. everytime I startup in nomount mode (as sysdba), it displays this error:
$ echo $ORACLE_SID
elams
$
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 7 09:41:26 2011
[code]....
View 4 Replies
View Related
Apr 25, 2013
I am using oracle 9.2.0.8 on RHEL 4.8 (64-bit). I have this one job in database that takes almost 12-15 minutes to execute but when I execute procedure in that job manually, it executes in one minute. Even when no other job is running in database, it takes more than 10 minutes to execute.
View 1 Replies
View Related