Database triger to XI
Hi,
Can we triger XI interface using Database trigger? I mean some database trigger sends (triger not on receive side) message to XI and integration starts.
thanks in advance.
KP
Hi KP
check the following blog,
/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
cheers
Sameer
Similar Messages
-
Me.dataAdapter.Update(table) Update code?
I've got a dynamic win form which basically just has:
Private dataGridView1 As New DataGridView()
Private bindingSource1 As New BindingSource()
Private dataAdapter As New SqlDataAdapter()
' Create a new data adapter based on the specified query.
Me.dataAdapter = New SqlDataAdapter(selectCommand, mConnectionString)
With the select command being "Select col1, col2, col3, DataModified from MyTable"
Then I have a Update button that calls
Me.dataAdapter.Update(CType(Me.bindingSource1.DataSource, DataTable)) Which updates the table in the database but unless I modify the LastModified field it just writes the LastModified from the database table when
it loaded. I need to specify that on the update the LastModified field for each updated row in the table with DateTime.NOW().I can't figure out how to get into the actual Update code to add this for each Update row?Hi Mimosa Arts,
According to your description, you'd like to update the specialized column with the nowtime automatically when update the other column.
I suggest you adding a
Trigger to your database. trigging it when you using the update statement.
CREATE TRIGGER tgr_modstamp
ON **TABLENAME**
AFTER UPDATE AS
UPDATE **TABLENAME**
SET **ColumnName** = GETDATE()
WHERE **ID** IN (SELECT DISTINCT **ID** FROM Inserted)
With this, when you use the update statement, the ColumnName column will be updated to NowTime automatically.
If you have any other concern regarding this issue, please feel free to let me know.
Best regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Multiple values from database on a single text item
i am trying to do the following
on a single text item in a form
(under form property pallete->records->number of items displayed is 5) run a triger "when-new-block-instance" with the following pl/sql statement
declare
menu_item VARCHAR2(35);
begin
select label into menu_item
from menu_options;
end;
however, once i run the form it gives me
WHEN-NEW-BLOCK-INSTANCE trigger raised unhandeled exception ORA-01422
however, if in the pl/sql statement contains only
begin
execute querry;
end;
then it works fine
The problem i beleive is the fact that the first querry retreives multiple values or recordset instead of A record.
How can i go arond this and allow the form to list all the values in this form. Eventually i will need to add conditional SQL statments and that is why just execute querry will not work.
Also, is there a way to dynamically assign a number to "number of records shown" property?
All help is very much appreciated!
nullHi, Marko
I teach Forms, and I usually find a bad idea to use SQL statements directly (in particular when you can "make" Forms to do what you want).
Inside PL/SQL, a SELECT..INTO statement is supposed to select a single row, otherwise an error occurs.
EXECUTE_QUERY works.
If by "conditional SQL statements" you mean restricted (filtered) queries, you don't need to write SQL to do this.
You can set the DEFAULT_WHERE block property to a different value before using EXECUTE_QUERY, like:
SET_BLOCK_PROPERTY('your_block', DEFAULT_WHERE, 'where menu_id > 100');
And the answer to your second question is no, you cannot dynamically change the number of records a block is displaying.
You can limit the number of records your block queries from the database table using Maximum Records Fetched block property (available in Forms 6 and above, not sure about Forms 5). However, this will only work as expected if you set Query All Records to Yes.
Hope this helps,
Pedro -
How to update a table in database
Hi.
i am working on HR system. I have developed a form of report engine. Report Engine form contains no any database table but text items, buttons and options.
I have placed a button and in its when button press triger i wrote a procedure to update a table record as:
Update Empbiodata
Set Status = 'Retired'
Where Status = 'On Duty'
but that button is not updating the database record. when i add a line of Commit_form, after that i faced the error message there is no change to save.
I have run this code on SQL prompt and saw working well.
please solve the problem that why this code is not working in button press trigger in the form.
thnxHi Zaheerms,
You can do this kind of updates in the Forms.
I will help u in this scenario.
1st tell me the update column is a database item or not ?
Sample code :
begin
Update Empbiodata
Set Status = :block.column_name --'Retired'
Where Status =:block.column_name -- 'On Duty'
commit;
-- For checking message
fnd_messahe.set_string('Testing'||:block.column_name);
fnd_message.show;
end;
and give some condition as per ur requirement.
I think so this will help you.
If not post again and i will try to clarify you.
thanks,
SIvaprasad -
Trig etc functions on fractions?
Fraction.java with trig methods?
I've been playing with geospatial stuff for a while now, and I've been striking a lot of problems with the inherent inaccuracies of floating point number representations, especially in complex-calculated values.
Here's a simple but pertinent example:
class TheSumOfSevenSevethsIsNotOne
public static void main(String[] args) {
double f = 1.0/7.0;
double sum = 0.0;
for (int i=0; i<7; i++) {
sum += f;
System.out.println("sum = "+sum);
// OUTPUT:
// sum = 0.9999999999999998
// not 1 as you might expectThe numbers I'm storing are latitudes and longitudes in degrees, so the max_value is just 360, but the requirement is that lat/lon must be accurate to 9 decimal places, which equates to about +/- 0.6 millimetres, which is (apparently) close enough to be regarded as "millimetre accuracy" by cartographers, even though total ambiguity is 1.2 mm.
So three digits, plus six digits, is only nine digits, right?... and the humble int can store a tad more than 9 digits...
123.123 456
Integer.MAX_VALUE = (2^31)-1 = 2,147,483,647So I got to thinking... How would it be if I stored all lat/lons in the database as integers (multiplied by a million)? and did all my calculations rounded (not truncated) to the nearest 1. I could even save a few hundred million bytes that way... But that still leaves the same ole ambiguity around the actual calculations, many of which involve division ;-(.
So I got to thinking maybe I could use fractions? How would a Fraction.java look?
I googled around and found some great stuff, including:<ul>
<li>[Diane Kramers Fraction.java|http://aleph0.clarku.edu/~djoyce/cs101/Resources/Fraction.java]
<li>[Working with Fractions in Java|http://www.merriampark.com/fractions.htm] (includes BigFraction.java - very handy)
<li>[Doug Leas Fraction.java|http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/misc/Fraction.java]
</ul>
But I haven't found anything which implements the basic trigonometry functions like sin, cos, tan, cot (and whatever else)... but [Daves Short Trig Course|http://www.clarku.edu/~djoyce/trig/] might give me the understanding required to do so... nor does any existing Fraction.java (which I've found so far) implement handy things like x^y, log, modulo (and whatever else) ... and not being a mathematician myself, I'm not overly eager to implement them... I'd never be sure I'd done the job properly.
Please is anyone aware of any such implementations, even partial ones? Or could someone perhaps be persuaded to do part(s) of it just for the challenge?
Cheers all. Keith.Sir Turing Pest,
I do geospatial stuff amost exclusively and I dont understand this post.
Why not just use doubles? The "error" you're seeing is so trivial.
Put into perspective, if you were positioning something from the
Sun to Pluto you'd be off by half a millimeter.
How do you figure that you only need 9 digits?
ignore 360 degrees. the circumference of the earth is 41k km and you need
accuracy to .6 mm = 11 places
(40 075.02 kilometers) / (.5 millimeters) = 80,150,040,000I didn't figure it, our local GIS expert did, based mainly on the size of an integer,
When I do the math I get to 9 decimal places == about 1.11 mm, and that's allways rounded (not truncated) to 9 decimal places which I think means our points are accurate to plus or minus about 0.6 mm.... but I'm just a humble computer programmer, NOT a mathemetician or a geospatial expert.
We're storing lat/lon to 9 decimal places... So 1 is 1 degree.
40,075.160000000 kilometers circumference of the earth
equals 40,075,160.000000000 meters circumference of the earth
equals 111,319.888888889 meters meters per degree at the equator
equals 0.000000001 degrees storage accurracy
equals 0.000111320 meters
equals 1.113198889 millemeters storage accurracy in millimeters
So sure you established that aggregate double addition comes out "wrong".
Then dont do it, lol. Dont waste your time trying to invent new number
storage. Just try to write your algorithms so you don't do aggregate addition as much.We try not to aggregate calculated values... but there are certain algorithms, like the reverse/mercator transforms where it's unavoidable... So opportunities for improvement is this area a likely to be NOT very cost effective, ie: bigger than Ben Hur, harder than a bulls azz, and uglier than an extreme closeup of my scotum... My main concern has been (rightly or wrongly) the inherent inaccuracy in our storage of numbers.... thinking that improvements in this area just might be cost-effective, and therefore doable.
Iterestingly... we had a tree-clearing case kicked out of court recenctly because we couldn't define the boundaries of the national park in question to the satisfaction of the court... a "satisfaction level" which was based on our own "millimeter accuracy" definition of the required accuracy of survey data, which is based on international standards for GIS. ie: It's a bit of sore spot around the office at the moment, and I'm trying to do some bluddy thing about it... I'm just at a bit of a loss as to exactly what, without throwing literally millions of dollars at the problem to upgrade ALL our systems to 11 decimal places (or better). I'm in stress city.
Cheers. Keith. -
Seebeyond eventstore database problems
Hi,
-are running on JCAPS 5.1.1 still, and are getting errors in the server.log complaining about some internal (?) SQL-errors.
The errors occure independent of which project running in the domain, and are "trigged" by some kind of error in a jcd. We are using "standard" error handling via CSF (Common Services Framework).
If the application (jcd) are running without any errors, everything seems to be working OK, no errors in the log.
The error log and stack-traces are long, but the one first in the log is this:
+++[#|2008-01-18T12:59:11.478+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
++++java.sql.SQLException: Invalid escape character: Invalid escape character: hexadecimal string contains non hex character in statement [INSERT INTO EVENT_STORE VALUES('SEEBEYOND_EVENT_200711141531602_3826855916454061546','aced000573720032636f6d2e7374632e6576656e746d616e6167656d656e742e696d706c2e4e6f74696669636174696f6e4576656e74496d706c49881a421ac8a80302000c4a00036d49645a00126d4c697374656e6572734e6f7469666965644900136d4f62736572766174696f6e616c53746174654900116d4f7065726174696f6e616c53746174654900096d53657665726974794c000c6d4d657373616765436f64657400124c6a6176612f6c616e672f537472696e673b5b00106d4d657373616765436f6465417267737400135b4c6a6176612f6c616e672f537472696e673b4c000f6d4d65737361676544657461696c7371007e00014c00056d5479706571007e00015b000e6f625374617465537472696e677371007e00025b000e6f705374617465537472696e677371007e00025b000f7365766572697479537472696e677371007e000278720026636f6d2e7374632e6576656e746d616e6167656d656e742e696d706c2e4576656e74496d706c4248c88b25e4d24c02000b4a00036d49644a000a6d54696d655374616d704c000e6d436f6d706f6e656e744e616d6571007e00014c00196d436f6d706f6e656e7450726f6a656374506174684e616d6571007e00014c000e6d436f6d706f6e656e745479706571007e00014c000f6d4465706c6f796d656e744e616d6571007e00014c00106d456e7669726f6e6d656e744e616d6571007e00014c00106d4c6f676963616c486f73744e616d6571007e00014c00116d506879736963616c486f73744e616d6571007e00014c000b6d5365727665724e616d6571007e00014c000b6d5365727665725479706571007e000178700000000000000000000001163e9273e274000c65614854545053657276657274000c436f6e6e65637469766974797400044557415974001864704950535061796d656e745f69734465765f3139343030740006656e764465767400056c684465767074000b69734465765f313934303074000b494e544547524154494f4e00000000000000000000000000000000070000000474002348545450534552564552455741592d524551554553542d4641494c45443030303030317074007f4572726f7220696e2068616e646c6552657175657374207768696c652070726f63657373696e6720504f5354206f722047455420726571756573743b204661756c742072657475726e65647b687474703a2f2f7365656265796f6e642f636f6d2f787364646566696e65642f4661756c744d657373616765737d4661INSERT INTO EVENT_STORE VALUES('SEEBEYOND_EVENT_200711141531602_3826855916454061546','aced000573720032636f6d2e7374632e6576656e746d616e6167656d656e742e696d706c2e4e6f74696669636174696f6e4576656e74496d706c49881a421ac8a80302000c4a00036d49645a00126d4c697374656e6572734e6f7469666965644900136d4f62736572766174696f6e616c53746174654900116d4f7065726174696f6e616c53746174654900096d53657665726974794c000c6d4d657373616765436f64657400124c6a6176612f6c616e672f537472696e673b5b00106d4d657373616765436f6465417267737400135b4c6a6176612f6c616e672f537472696e673b4c000f6d4d65737361676544657461696c7371007e00014c00056d5479706571007e00015b000e6f625374617465537472696e677371007e00025b000e6f705374617465537472696e677371007e00025b000f7365766572697479537472696e677371007e000278720026636f6d2e7374632e6576656e746d616e6167656d656e742e696d706c2e4576656e74496d706c4248c88b25e4d24c02000b4a00036d49644a000a6d54696d655374616d704c000e6d436f6d706f6e656e744e616d6571007e00014c00196d436f6d706f6e656e7450726f6a656374506174684e616d6571007e00014c000e6d436f6d706f6e656e745479706571007e00014c000f6d4465706c6f796d656e744e616d6571007e00014c00106d456e7669726f6e6d656e744e616d6571007e00014c00106d4c6f676963616c486f73744e616d6571007e00014c00116d506879736963616c486f73744e616d6571007e00014c000b6d5365727665724e616d6571007e00014c000b6d5365727665725479706571007e000178700000000000000000000001163e9273e274000c65614854545053657276657274000c436f6e6e65637469766974797400044557415974001864704950535061796d656e745f69734465765f3139343030740006656e764465767400056c684465767074000b69734465765f313934303074000b494e544547524154494f4e00000000000000000000000000000000070000000474002348545450534552564552455741592d524551554553542d4641494c45443030303030317074007f4572726f7220696e2068616e646c6552657175657374207768696c652070726f63657373696e6720504f5354206f722047455420726571756573743b204661756c742072657475726e65647b687474703a2f2f7365656265796f6e642f636f6d2f787364646566696e65642f4661756c744d657373616765737d4661756c74740005416c657274757200135b4c6a6176612e6c616e672e537472696e673badd256e7e91d7b4702000078700000000374000a554e4f425345525645447400084f425345525645447400085245534f4c5645447571007e001000000007740007554e4b4e4f574e7400085354415254494e4774000a53555350454e44494e4774000953555350454e44454474000853544f5050494e4774000753544f5050454474000752554e4e494e477571007e001000000006740005464154414c740008435249544943414c7400054d414a4f527400054d494e4f527400075741524e494e47740004494e464f'+)]|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.Trace.getError(Unknown Source)|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.Log.runScript(Unknown Source)|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.Log.open(Unknown Source)|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.Database$Logger.openLog(Unknown Source)|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.Database.open(Unknown Source)|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.Database.<init>(Unknown Source)|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.jdbcConnection.openStandalone(Unknown Source)|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.jdbcConnection.<init>(Unknown Source)|#]+++
+++[#|2008-01-18T12:59:11.479+0100|WARNING|IS5.1.1|javax.enterprise.system.stream.err|_ThreadID=32; ThreadName=http19401-Processor3;|+++
+++ at org.hsqldb.jdbcDriver.connect(Unknown Source)|#]+++
Seems (to me) like some internal errors in some event database, none of this SQLs refer to something I have created, or exist in our database.
Anyone able to shed some light into this for me??
BR
-AlfHi Alfie61,
This appears to be the cause: "hexadecimal string contains non hex character in statement".
So I guess somewhere in a jcd a wrong value is being passed into an SQL statement. It could be that a byte[] is expected but a string is given.
Perhaps it is an idea to see if it is one of your jcds or a jcaps problem.
Stijn. -
Database Trigger Execution Order
Hi folks:
I want to know which is the order of execution of the database triggers I have associated to a specific table.
By Example:
Table Name: Employees
Triggers:
name: first_step second_step
type: before each row before each row
trig event: insert or update insert or update
In these case, which one is executed first?
Thanks a lot.
AbdelIt depends ...
From http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96524/c18trigs.htm#13363
Although triggers of different types are fired in a specific order, triggers of the same type for the same statement are not guaranteed to fire in any specific order. For example, all BEFORE row triggers for a single UPDATE statement may not always fire in the same order. Design your applications so they do not rely on the firing order of multiple triggers of the same type. -
SCHEMA/DATABASE 내에 새로운 OBJECT 가 생성될때 자동으로 권한을 부여받는 방법
제품 : ORACLE SERVER
작성날짜 : 2002-11-05
SCHEMA/DATABASE 내에 새로운 OBJECT 가 생성될때 자동으로 권한을 부여받는 방법
=====================================================
PURPOSE
schema 나 database 내에 새로운 table 이 생성될 때 application role 에
object privilege 를 grant 하는 operation 을 자동으로 하는 방법에 대해
소개한다.
이 방법은 procedural object, view 와 같은 object type 에도 확장 적용할
수 있으며 database 내의 application object 의 보안을 관리하는 모든
DBA 에게 필요한 자료이다.
Explanation
CREATE 같은 DDL 문과 관련된 trigger 를 fire 시킬 수 있는 user event
를 사용한다.
- DDL trigger 는 database 나 schema 와 관련될 수 있다.
- SCHEMA triger 는 특정 user 에 대해 각 event 에 대해서 fire 된다.
- DATABASE trigger 는 모든 user 에 대해 각 event 에 대해 fire 된다.
Example
SCOTT schema 에 table 이 생성될 때마다, SELECT, INSERT, UPDATE,
DELETE privilege 를 role R1 에 grant 할 필요가 있는 예를 살펴보자.
( 참고로, 다음은 oracle 9i 에서 role R1 이 있다는 전제하에 test 한다.)
1. sys user 에서 새로 생성되는 table 이름을 저장할 table 을 생성한다.
생성된 table 을 특정 schema 또는 PUBLIC 으로 모든 권한을 부여한다.
SQL> connect / as sysdba
Connected.
SQL> drop table event_table;
Table dropped.
SQL> create table event_table
(ora_dict_obj_owner varchar2(30), ora_dict_obj_name varchar2(30));
Table created.
SQL> grant all on sys.event_table to scott;
Grant succeeded.
2. procedure 를 생성한다.
위의 1.에서 생성한 table 로 부터 table name 을 retrieve 하여
role R1 에 table name 의 권한을 부여하고 row 를 삭제한다.
SQL> create or replace PROCEDURE grant_proc AS
own VARCHAR2(30);
nam VARCHAR2(30);
v_cur INTEGER;
cursor pkgs is
select ora_dict_obj_owner, ora_dict_obj_name
from SYS.event_table;
BEGIN
open pkgs;
loop
fetch pkgs into own, nam;
exit when pkgs%notfound;
v_cur := dbms_sql.open_cursor;
dbms_sql.parse(v_cur,
'grant SELECT, INSERT, UPDATE, DELETE on '||own||'.
'||nam|| ' to R1', dbms_sql.native);
dbms_sql.close_cursor(v_cur);
commit;
delete from sys.event_table;
commit;
end loop;
end;
Procedure created.
3. role R1 에 권한을 부여하는 procedure 를 call 하는 job 을 submit
하는 procedure 를 생성한다.
SQL> create or replace procedure grant_job(procname varchar2) as
jobid number := 0;
procnm varchar2(30);
begin
ProcNm := 'Begin '||ProcName||'; End;';
dbms_job.submit(jobid, procnm);
commit;
end;
Procedure created.
4. trigger 를 생성한다.
이 trigger 는 CREATE 문 이후에 fire 되며 위의 1.에서 생성된
table 에 생성된 table 의 이름이 insert 된다.
그리고 role R1 에 object 권한을 부여하는 procedure 를 call 하는
job 을 submit 하는 procedure 를 call 한다.
SQL> CREATE or REPLACE TRIGGER role_update
AFTER CREATE on scott.schema
DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
IF( ora_sysevent='CREATE' and ora_dict_obj_type = 'TABLE') THEN
insert into sys.event_table values
(ora_dict_obj_owner, ora_dict_obj_name);
grant_job('grant_proc');
END IF;
END;
Trigger created.
5. 다음의 작업으로 확인해 볼 수 있다.
SQL> connect scott/tiger
Connected.
SQL> create table test_trig (c number);
Table created.
SQL> create table test_trig2 (c number);
Table created.
SQL> select * from sys.event_table;
ORA_DICT_OBJ_OWNER ORA_DICT_OBJ_NAME
SCOTT TEST_TRIG
SCOTT TEST_TRIG2
-> 위에서 새로 생성된 table 의 이름들이 insert 되어 있다.
SQL> connect / as sysdba
Connected.
SQL> select * from dba_tab_privs where grantee='R1';
no rows selected
-> job 이 아직 실행되지 않았을 것이다.
SQL> select * from user_jobs;
JOB LOG_USER PRIV_USER
SCHEMA_USER LAST_DATE LAST_SEC THIS_DATE THIS_SEC NEXT_DATE
NEXT_SEC TOTAL_TIME B
INTERVAL
FAILURES
WHAT
NLS_ENV
MISC_ENV INSTANCE
39 SCOTT SYS
SYS 13-SEP-02
11:43:46 0 N
null
Begin grant_proc; End;
NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA' NLS_CURRENCY='$' NLS_ISO_CURRENC
Y='AMERICA' NLS_NUMERIC_CHARACTERS='.,' NLS_DATE_FORMAT='DD-MON-RR' NLS_DATE_LAN
GUAGE='AMERICAN' NLS_SORT='BINARY'
0102000000000000 0
-> job 이 실행되는 동안 기다린다.
다시 event_table 을 select 해 본다.
SQL> select * from sys.event_table;
no rows selected
SQL> select * from dba_tab_privs where grantee='R1';
GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE GRA HIE
R1 SCOTT TEST_TRIG SCOTT INSERT NO NO
R1 SCOTT TEST_TRIG SCOTT SELECT NO NO
R1 SCOTT TEST_TRIG SCOTT UPDATE NO NO
R1 SCOTT TEST_TRIG SCOTT DELETE NO NO
R1 SCOTT TEST_TRIG2 SCOTT INSERT NO NO
R1 SCOTT TEST_TRIG2 SCOTT SELECT NO NO
R1 SCOTT TEST_TRIG2 SCOTT UPDATE NO NO
R1 SCOTT TEST_TRIG2 SCOTT DELETE NO NO
8 rows selected.
job 이 실행된 후 event_table 은 비워 있고
role R1 은 새로 생성된 2개의 table 에 대한 권한을 받았을 것이다.
SQL> select * from user_jobs;
no rows selected
단, 위에서 설명된 것에 따르면 SCHEMA trigger 는 현재 user 의
schema 에서만 fire 되므로 DBA 가 해당 schema 아래에 table 을 생성한다면 이는 작동되지 않을 것이다.
SQL> connect system/manager
Connected.
SQL> create table SCOTT.TEST_TRIG3 (c number);
Table created.
SQL> select * from dba_tab_privs
where grantee='R1' and table_name='TEST_TRIG3';
no rows selected
scott.schema 대신에 DATABASE 에 같은 trigger 를 생성한다면
schema 내에 생성된 table 은 누가 생성했던지 role R1 은 object 권한을
적절하게 부여 받을 것이다.
Reference Documents
<Note:210693.1>
Oracle9i Application Developer's Guide - Fundamentals
Chapter Working With System Events - Event Attribute Functions
Oracle8i SQL Reference - SQL Statements - CREATE TRIGGER
Oracle8i SQL Reference - SQL Statements - CREATE PROCEDURE -
LOGFF triger does not execute when clients terminated abnormally
Here is a triger for LOGOFF:
create or replace TRIGGER scott.before_logoff_trg
before LOGoff ON database
declare
If clients exit normally, it is executed( just delete some rows from a table). But if clients crashed, this triger will not be executed.
Is there any way I can execute some pl/sql code when a client log off normally or abnormally?Antares wrote:
My application want to do this:
1. Client A can insert rows into a table, and client B can read them at the same time. So I think client A must commit his changes.
2. Later, client A can decide to keep or discard changes from the time he connected to Oracle. If he want to discard, all rows inserted should be deleted; If he want to keep, all rows should be inserted to another table. He must choose to keep or discard changes, so there should no rows for him in that table at last.
3. If client A crashed, the rows he inserted can not be deleted. There is no opportunity to do this.
PS: Many client can log in Oracle using same Oracle user name.
These inserted rows are "server side resource" owned by one client. It should be cleared when clients log off normally or abnormally.
I want something just like DBMS_LOCK. I think locks owned by one client could be released when the client log off normally or abnormally.What a very odd requirement. Why would you require a client "B" to be able to see what client "A" has inserted if client "A" is not yet ready to commit business-wise to that inserted data?
1. You're right client A would have to commit inserted rows for client B to see them.
2. Why is client A choosing to discard rows that he was already happy for client B to see? What if client B is acting upon those rows? That would suggest that client B can take action upon something that is not yet truly committed in the business process. This sounds like a serious flaw in the business process and hence the database design.
3. If client A crashes, how is anything supposed to know about that? Client A can't send a signal/message to say "I've crashed" and just because client A hasn't performed activity doesn't necessarily mean that it's crashed, so how does anything know client A has crashed? As previously mentioned, the database server doesn't call out to all clients to check they are alive, that's not the way client server architecture works. Server's don't talk out to clients.... it's clients that talk in to servers.
If there were any logical reason for trying to implement something as bizarre as the above, the closest thing you could have would probably be some sort of "keep alive" signal that client A sends periodically, whether that's through the client application automatically sending something to the database on a timer or whether it's an interactive thing with the user so that they have a countdown timer or something on the screen and have to perform some activity on the client to indicate that they are still alive. Then you'd have something running periodically on the database as a scheduled job, to check for any "clients" that haven't sent their "keep alive" signal in time and remove any data from the intermediate table related to that client. Of course there's a potential delay (determined by your implementation) between a client crashing (or user being inactive) and the associated data getting deleted, but that's the price you pay for implementing something so unusual. -
Logical Database in Abap Objects
Hi to All
I want do it a program report using a Logical Database.
Is this possible ??? But when I make a GET <node>, occurs the following error:
"" Statement "ENDMETHOD" missing. ""
I'm doing the following:
CLASS MONFIN IMPLEMENTATION.
METHOD TRAER_DATOS.
GET VBRK.
ENDMETHOD.
ENDCLASS.
Please, somebody tell me how I use the logical database in Abap Objects.
Thank you very much
Regards
Dario R.Hi there
Logical databases whilst of "some use" are not really part of OO.
If you want to use a logical database in an abap OO program I would create a special class which just does the get data from your DB and pass this either at record or table level.
Techniques such as GET XXXX LATE aren't really part of any OO type of application since at Object Instantiation time you should be able to access ALL the attributes of that object.
As far as OO is concerned Logical databases are a throwback to "Dinosaur Technology".
Since however modules such as SD and FI are still heavily reliant on relational structures (i.e linked tables etc) then there is still some limited life in this stuff but for OO try and solve it by another method.
If you really must use this stuff in OO then do it via a FMOD call and save the data in a table which your method will pass back to your application program.
You can't issue a GET command directly in a method.
Cheers
Jimbo -
Hello,
I have a program in R/3 that is based on a logical database. I don't want to have to write the program all over again in Webdynpro.
Is there a way to use the logical database in Webdynpro for ABAP.Basically WDA calls a FM and then the following help is a good starting point:
"Calling a Logical Database Using a Function Module"
http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm
Kindly close the thread and award appropriate a points to the answer given.
Sergio -
Logical database in adhoc query
Hello All,
Can anyone tell me what is the logical database in adhoc query?Hi
When you create a query , you have to select an infoset. Infoset can be considered as a source from which data is populated in the Query Fields.
Infosets are created from Transaction SQ02.
There can be four methods through which an Infoset can become a source of data:
1. Table join ( By joining two or more tables from Data dictionary)
example: Joining tables PA0001 and PA0006 on Pernr to get a one resultant dataset
2. Direct read of Basis Table ( Like PA0001 as a source for data in Infoset )
3. Logical Database ( A Pre-written Program by SAP that extract data from clusters, tables taking care of authorizations and validity periods)
Example : Logical database PNP, PNPCE (Concurrent Employement),PCH ( LDB for Personnel Development Data)
Custom Logical DBs can be created in T_Code SE-36.
4. Data Retrieval by a Program ( Custom code written by ABAP developers which will collect and process data) . This program has a corresponding Structure in data dictionary and the fields of this structure will be used in query)
Reward Points, if helpful.
Regards
Waseem Imran -
LOGICAL DATABASE IN HR ABAP PRPGRAMMING
Hi Friends,
what is use of LOGICAL DATABASE IN HR ABAP PROGRAMMING
AND END-OF-SELECTION EVENT IN HR PROGRAMMING PROGRAMMING???
regards,
vijay.hi
HR Logical Databases
In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
PNP (PNPCE)
PAP
PCH
By selecting a logical database, you determine the HR data that can be reported on using an InfoSet.
Logical Database PCH
This logical database generally enables you to report on all HR infotypes. However, you are advised not to use this logical database unless you want to report on Personnel Planning data.
Logical Database PNP (or PNPCE)
Use logical database PNP to report on HR master data. It is possible to use logical database PCH to access this data, but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons.
Logical database PNP enables you to access HR master data and infotypes from Personnel Planning. For example, you have the following options:
Reporting on the costs, number of attendees booked, and instructor for a business event on which an employee is booked
Reporting on working time and planned compensation for a position that an employee occupies
Reporting on the validity and proficiency of a qualification that an employee fulfils
From a technical perspective, this means you can use PNP to report on all of the infotypes that exist for objects (infotype 1000) that have a direct relationship (infotype 1001) with the Person object.
The ability to access infotypes from Personnel Planning using logical database PNP is a special feature that you can only use in the context of SAP Query and Ad Hoc Query. You cannot use this functionality for ABAP reports you programmed yourself.
You can also use logical database PNP to report on data from Personnel Time Management (infotypes 2000 to 2999) and Payroll (special payroll infotypes for the USA and customer infotypes; for more information, access Customizing for the Human Resources Information System and see Payroll Results).
Logical Database PAP
Logical database PAP enables you to access data from Recruitment.
regards
navjot
reward if helpfull -
Installation problem with NW'04 SR1: database connection failed
Hi all,
while installing NW '04 SR1 on Windows Server 2003 SP1 and MS SQL Server 2000 SP4 I ran into an error related to the database connection. While performing the step "Load Java Database content" SAPinst crashes with the message
com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
The connection to the SLQ Server with e.g. the Query Analyzer is OK. I had a problem with this installation setup before (have a look at the corresponding <a href="https://forums.sdn.sap.com/thread.jspa?threadID=338638&tstart=0">thread</a> ), the JDBC drivers where missing on the installation master but after copying them in the right direction the installation went on with no problem up to this point...
Has anybody an idea what could have happened here? Is this maybe a problem connected to the one I recently had
Below I attached the sapinst.log and jload.log with more detailed messages.
sapinst.log ###########
INFO 2007-03-12 22:06:24
Working directory changed to C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_~1\ONE_HOST.
INFO 2007-03-12 22:06:24
Output of D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log' is written to the logfile C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_~1\ONE_HOST/jload.java.log.
WARNING 2007-03-12 22:06:26
Execution of the command "D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log'" finished with return code 1. Output:
java version "1.4.2_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_13-b06)
Java HotSpot(TM) Client VM (build 1.4.2_13-b06, mixed mode)
12.03.2007 22:06:25 com.sap.inst.jload.Jload main
INFO: Jload -sec WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key -dataDir S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML -log C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log
12.03.2007 22:06:26 com.sap.inst.jload.Jload main
SCHWERWIEGEND: couldn't connect to DB
com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
ERROR 2007-03-12 22:06:26
CJS-20065 Execution of JLoad tool 'D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log'' aborts with returncode 1. Check 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log' and 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.java.log' for more information.
jload.log ###########
12.03.07 22:06 com.sap.inst.jload.Jload main
INFO: Jload -sec WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key -dataDir S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML -log C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log
12.03.07 22:06 com.sap.inst.jload.Jload main
SEVERE: couldn't connect to DB
com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
Best regards,
BerndHello Kairat,
Please follow the below mentioned guide to install it.
Check all the parameters to set and run pre requisite checker before starting installation.
Keep in mind that before starting any SAP installation you should always run prerequisite checker.
https://websmp205.sap-ag.de/instguides --> SAP Netweaver -->SAP Netweaver 7.0 -- > Installations --> EHP2
Regards,
Amit Barnawal -
Message: "The database structure has been modified" every time I log to SAP
Hello,
"The database structure has been modified. In order to resume this process, all open windows will be closed". Every time I log to one of my companies in SAP Business One this message appears.
I haven't installed any new addons and made no changes in database structure (and any other user hasn't done any changes), but this message appears always when I log to company for the first time (when I try to log on another user or log to another company there is no message). Can anyone help me with this problem?
Best regards
Ela ŚwiderskaHi Ela Świderska,
You may check this thread first:
UDFs disappeared
Thanks,
Gordon
Maybe you are looking for
-
HTML View Error in Crystal Report 2008 Designer
Hi, I am getting an Error when i am trying to see the HTML Preview on the Crystal Report Designer. but, It is working Properly From CMC. I was getting the following Error. "Failed to access the HTML Server Page Contact your system administrator an
-
HT1044 Low resolution warning in iPhoto 09 but on screen looks great
Hi: I'm working with Snow Leopard and iPhoto 09. I'm building a book and have added photos. Some of the photos show a low resolution warning. I'd like to keep them at the size shown in the book. I've increased the zoom on the pages and the photos
-
How do I populate a drop-down list from a schema variable
I'm a novice programmer and new to the LiveCycle environment. I need help to populate a drop-down list in LiveCycle from a hard coded variable within my form's schema. I have a list of 28 names (the number of names and actual names change annually).
-
Problems with the Complexe backup in FCPro X!!!!
Hi there, I have 2 HD disks to backup my FCPX projects so...there's my problem/question: I create an Event. I create the original Project in one of my disks...I put clips from the event on the timeline, transitions, sounds...etc Now I backup the proj
-
I bring my Macbook Pro to work every day and plug it into an external monitor on my desk. When I plug it in, I have to go through a routine that involves changing the resolution on the external monitor, then switching it back to mirror displays (beca