Triggers in particular schema
how can i see all the triggers present in a particular schema?
872959 wrote:
how can i see all the triggers present in a particular schema?Handle: 872959
Status Level: Newbie
Registered: Jul 16, 2011
Total Posts: 42
Total Questions: 25 (20 unresolved)
why so many unanswered questions?
query USER_TRIGGERS
SQL> desc user_triggers
Name Null? Type
TRIGGER_NAME VARCHAR2(30)
TRIGGER_TYPE VARCHAR2(16)
TRIGGERING_EVENT VARCHAR2(227)
TABLE_OWNER VARCHAR2(30)
BASE_OBJECT_TYPE VARCHAR2(16)
TABLE_NAME VARCHAR2(30)
COLUMN_NAME VARCHAR2(4000)
REFERENCING_NAMES VARCHAR2(128)
WHEN_CLAUSE VARCHAR2(4000)
STATUS VARCHAR2(8)
DESCRIPTION VARCHAR2(4000)
ACTION_TYPE VARCHAR2(11)
TRIGGER_BODY LONG
CROSSEDITION VARCHAR2(7)
BEFORE_STATEMENT VARCHAR2(3)
BEFORE_ROW VARCHAR2(3)
AFTER_ROW VARCHAR2(3)
AFTER_STATEMENT VARCHAR2(3)
INSTEAD_OF_ROW VARCHAR2(3)
FIRE_ONCE VARCHAR2(3)
APPLY_SERVER_ONLY VARCHAR2(3)Edited by: sb92075 on Oct 8, 2011 6:52 PM
Similar Messages
-
How to check whether the particular schema(user) is having import privilege
Hi,i need to check whether a particular schema(user) is having privilege to import the data to target database within the same database(10 g)
Answer is in the documentation - which is pretty easy to look up -
http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#i1007024
http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_5406.htm#REFRN26230
HTH
Srini -
Which is oracle's dictionary to find which TABLE in particular SCHEMA.
Hi All,
Which is oracle’s dictionary to find which TABLE in particular SCHEMA with particular ROLE is missing.
Thanks in advanceuser10699277 wrote:
Hi
We have role called XYZ which is assigned to specfic tables in schema ABC.No you don't. Roles are GRANTed (not assigned) to USERS or ROLES, not TABLES.
There are tables in the same schema which dont have the role XYZ.
In these case we need to find the table that dont have XYZ role.
Thanks in Advance... -
Can we relink the executables for a particular schema using adadmin utility
Is it possible to do the following tasks for a particular schema (say inv):
1. Relink the executables for INV schema using adadmin utility.
2. Regenerate the forms for INV schema using adadmin utility.
3. Check if there are any invalid objects in the database where the issue is replicated INV schema.
Thanks,
VijayHi,
Is it possible to do the following tasks for a particular schema (say inv):
1. Relink the executables for INV schema using adadmin utility.
2. Regenerate the forms for INV schema using adadmin utility.Yes, it is possible for specific schema -- See (Note: 141118.1 - How To Relink Forms Library Files Using Adadmin) for details.
3. Check if there are any invalid objects in the database where the issue is replicated INV schema.Through adadmin, it is not possible for specific schema. To check the list of invalid objects under the INV schema, you need to run this query:
SQL> select object_name, object_type
from dba_objects
where status = 'INVALID' and owner = 'INV';Regards,
Hussein -
Execute scripts into a particular schema
Hi Everyone,
I need to know if there's any command in pl/sql that allows me to execute a script into a particular schema in a DB Oracle 9i. I need to specify "run this script into schema A" if I log in with sys as sysdba.
Thanks in advance.
Jimena.Try this:
ALTER SESSION SET CURRENT_SCHEMA=jimbob;.
remember to change back afterwards!
Cheers, APC -
PO Release Strategy not triggerred for particular Total Net Order Value
Dear,
I am currently facing the issue where release strategy for purchase orders is not getting triggered for a particular value or lower.
For order value 1 INR or less, no release strategy is triggered for new created PO. And for value > 1 INR release strategy is getting triggered.
All otehr PO characterstics are the same, I mean to say the values for other characterstics such as plant material group are identical.
But the characterstics for release for Total net order value are <= 30000 INR. There are two system copies, where in one system the same release strategy is working as expected. But in other system the above mentioned issue occurs. There is no differnce which I can see in the release strategy setup.
Please suggest for solution.
Thank you.
Warm Regards.Dear All,
While looking further into the issue by going into debugging mode, we have found that in include LCLSCF2I, Internal table p_selection_criteria_tab , the value for ATFLV (Internal Floating point from) gets different values in the two systems. For example, in the affected system, for PO with 1INR tottal value, for one of the Total value chaaracterstics before INR characterstic, ATFLV value is 0,0000000000000000E+00, hence it gets out of loop and doesn't trigger release strategy.
But in another system for same PO values and release setup, ATFLV value is 1,0000000000000000E+00 for that characterstic.
May I know how the value for this field gets calculated.
Thank you.
Warm Regards. -
Having Problem with logon & logoff Triggers for the SCHEMA
hi,
I have created triggers "LOGOFF_TRIG" & "LOGON_TRIG" . This triggers fires each time the user SCOTT logings and logoff from the database and stores the info in table log_trig_table. Below the code of the trigger
LOGOFF_TRIG
CREATE OR REPLACE TRIGGER logoff_trig
BEFORE LOGOFF ON SCHEMA
BEGIN
INSERT INTO log_trig_table(user_id, log_date, action)
VALUES (USER, SYSDATE, ’Logging off’);
END;LOGON_TRIG
CREATE OR REPLACE TRIGGER logon_trig
AFTER LOGON ON SCHEMA
BEGIN
INSERT INTO log_trig_table(user_id, log_date, action)
VALUES (USER, SYSDATE, ’Logging on’);
END;But whenever i m loggin off or on using the user SCOTT there seems to be nothing being updated on table log_trig_table. Why ?i tried the new code provided it is telling not sufficeint priviledge. But i have all the priviledges for user SCOTT.
Also i tried putting the commit in the below code. Tried disconnect command from theSQL* Plus. this time i didnt got any ERROR but still there were no data in table log_trig_table
CREATE OR REPLACE TRIGGER logoff_trig
BEFORE LOGOFF
ON SCOTT.SCHEMA
BEGIN
INSERT INTO log_trig_table (user_id, log_date, action)
VALUES (USER, SYSDATE, 'Logging off');
commit;
END;Below is what my requirement
1) Create a trigger on Schema SCOTT for logon and logoff
2) Whenever user scott is connect or disconnect the respective trigger should fire and stores the result in table log_trig_table which is in schema SCOTT -
CPU,Temp utilization for a particular schema
Hi,
There is a requirement to get the CPU utilization at a schema level for a particular database.
Is this something we can get from AWR reports?
Is there any other way of getting these reports.
Regards,
NarayanAWR, yes
Try:
select a.username, count(*) "ON CPU", ratio_to_report(count(*)) over() ratio
from dba_users a, dba_hist_active_sess_history b
where a.user_id = b.user_id
and b.session_state = 'ON CPU'
and b.session_type = 'FOREGROUND' --comment out if needed
group by a.username
order by 2 desc;HTH -
How to know the packages,functions,triggers owned by schema
I got the script to find the tables,columns and indexes belonged to a schema
how to find the packages,functions triggers owned by a schema.
I need to compare schema of PROD with UAT
Any help will be appreciatedis it possible to find the source of all those
objects in a single scriptWhat do you mean?
user_source will give the script?Yes.
You can get script more easily with DBMS_METADATA
SQL> drop FUNCTION "HR"."F11";
Function dropped.
SQL> CREATE OR REPLACE FUNCTION "HR"."F11" return varchar2
as
v_date varchar2(1000);
begin
select to_char(sysdate,'mmddyyyy') into v_date from dual;
return v_date;
end; 2 3 4 5 6 7
8 /
Function created.
SQL> set pagesize 0
SQL> set long 90000
SQL> select DBMS_METADATA.GET_DDL (
'FUNCTION',
object_name,
'HR')
FROM all_objects
WHERE owner = 'HR'
AND object_type ='FUNCTION' 3 4 5 6 7
8 /
CREATE OR REPLACE FUNCTION "HR"."F11" return varchar2
as
v_date varchar2(1000);
begin
select to_char(sysdate,'mmddyyyy') into v_date from dual;
return v_date;
end;
Is there any script to identify source for all those
objects -
Disabled triggers in apps schema
Hi all
In my apps schema i can see too many triggers that are disabled!
Is this a normal situation?
I have lately convert my apps to multi-org.I have read some doc in metalink, that this situation can happen when converting to multi-org.
Do i have to enable all of them?
Thanks in advance, SoniHi Soni,
When converting to multi org all triggers are disabled and at the end enabled again (using a list created when starting the convert to multi org) when the conversion fails for example it will cause lots of invalid triggers.
See the following:
When starting Convert to multo org it first creates a Disable triggers script:
$APPL_TOP/admin/<SID>/PROD//out/orgcnvdt.sql"
and it will also create a script to enable them again:
$APPL_TOP/admin/<SID>/PROD/out/orgcnvet.sql
When the conversion fails somehow and you did not run the enable script before restarting you will endup with lost of disabled triggers from which you don't know which should be enabled.
If this is your test environment and you don't have the enable script anymore I would suggest to Create a new test environment as that will be faster then letting support fix the issue (possible not even possible)
In case of PROD and you don't have the enable script, then you have a serious problem as triggers are needed for everything, when you have triggers disabled which should be enabled it could cause data inconsistency, in that case contact Support asap as suggested already.
Good luck with it.
Regards,
Ronald -
Recompilation of all triggers in a schema.
Hi folks!
I got a gotcha!
I'd changed couple of table structures here and there in the schema and subsequently, quite understandably, all the triggers that are related to the afore-altered tables went into invalid status.
It is taking a toll on me to again recompile each and every trigger in the schema.
How do I recompile all the triggers in the entire schema with the help of a single statement?
Your favour'll be deeply appreciated.
Cheers, PCZ.I'd changed couple of table structures here and there
in the schema and subsequently, quite understandably,
all the triggers that are related to the
afore-altered tables went into invalid status.
It is taking a toll on me to again recompile each and
every trigger in the schema.
How do I recompile all the triggers in the entire
schema with the help of a single statement?
Your favour'll be deeply appreciated.
Cheers, PCZ.I wana know why you need explicitly recompile all triggers when implicit recompilation exist there??
SQL> CREATE OR REPLACE TRIGGER mytrigger BEFORE UPDATE ON emp FOR EACH ROW
2 BEGIN
3 IF :new.sal>100 THEN
4 RAISE_APPLICATION_ERROR(-2001,'No valid update');
5 END IF;
6 END;
7 .
SQL> /
Trigger created.
SQL> SELECT object_name,status FROM all_objects WHERE object_type='TRIGGE
OBJECT_NAME STATUS
MYTRIGGER VALID
SQL> ALTER TABLE emp ADD (a NUMBER);
Table altered.
SQL> SELECT object_name,status FROM all_objects WHERE object_type='TRIGGE
OBJECT_NAME STATUS
MYTRIGGER INVALID
SQL> UPDATE emp SET sal=200 WHERE deptno=20;
UPDATE emp SET sal=200 WHERE deptno=20
ERROR at line 1:
ORA-21000: error number argument to raise_application_error of -2001 is out of range
ORA-06512: at "SCOTT.MYTRIGGER", line 3
ORA-04088: error during execution of trigger 'SCOTT.MYTRIGGER'
SQL> SELECT object_name,status FROM all_objects WHERE object_type='TRIGGER';
OBJECT_NAME STATUS
MYTRIGGER VALIDKhurram -
Need to update one column of all table in that particular schema
hi all,
i am using db10g.
my task is to update one particular column's value of all the table in that schema.
to acheive the above
do i have to write update statement for each table or is there any way to do it in bulk?
i hope my question make sense.
Thanks..Hi karthick,
I want to know something which is not related to this thread .
How to include formatted post while replying to thread .
I know using will be used format code before posting . But how can we do it for posted message .
I hope you understand my question .
Thanks in advance . -
Frequency of triggerring a particular transaction code
How can I determine that how many time a particular transaction code has been triggered within a particular time period?
Regards,
SubhasishHi,
Try using TCode STAD.
Thanks,
Sriram Ponna. -
How to find what are the select statements fired on a particular schema
Hi Guys,
I have a development box schema whose username and the password is shared across many users who are doing the developement.
I wnat to know what are the select statement fired on it during a particular time interval.
Thanks,
Prafullawith dba user
BEGIN
DBMS_FGA.ADD_POLICY(object_schema => 'schemaname',
object_name => 'CALLS',
policy_name => 'CALLS_AUDIT',
statement_types => 'SELECT'
…enable => TRUE);
END;
then all select are viewed on table dba_fga_audit_trail
Edited by: Adigozalov Gurban on Dec 3, 2010 11:05 AM -
Dynamic Conversion of SQL Statement for a particular Schema
Hi,
Please suggest me a best method for my following scenerio,
user1 - Owner of table A (no number, name varchar2, location varchar2, age char(2) )
user2 - A normal database user
user2 has access to table A
Now, even if user2 executes " select * from A; " he should not get all the columns displayed, i.e for example the query "select * from A " should be dynamically converted to "select no, name from A ".
Like that the user1 should restrict the display of particular columns to particular users in database.
Please do help me out
ThanksOf course I can create a view but the thing is user2 needs to access the parent table A itselfWell, really they just need to think they're accessing parent table A.
The proper approach for that is a combination of views and synonyms and no direct visibility of the base table to the other user.
The other option is some element of VPD column masking - that will hide the data but not the column definition.
Maybe you are looking for
-
I currently have a 1.8 G5 that I bought in 2005. It came with Panther 10.3.7 and up to now has been relatively stable. Since I bought the computer within the Tiger realease window, I have the Tiger disc in hand. Since I now need Tiger to upgrade iTun
-
i get a message every time i start up firefox saying "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write
-
HCI DS - DataFlow trigger on an event
Hi, Is there any way to trigger scheduled DF in HCI based on some event or some flag? E.G. Data is extracted from BI, but we want schedules to run only when BI process chain is completed. BI team can generate any type of file or some status message b
-
Execute Query in Background get notified per email
Hello together, In a project we use BSP's to select variable values in a more comfortable way compared to the SAP Standard variable screen. For some long-running queries (e.g. show all line items in the ODS where the item text contains keyword 'XXX')
-
Installing upgrading from 8.1.7 to 9.2.0
Hi we are upgrading from 8.1.7 to 9.2.0. Some questions : 1-what is oraInst.loc used for ? 2-what should I modify in this file before beginning to Install and upgrade ? 3-in OUI , in file locations window I'm prompted to give Oracle Home name . What