Something about database and shema triggers ?

What is wrong with this trigger ?
CREATE OR REPLACE TRIGGER OAP_WORK.LOGOFF_REC
BEFORE LOGOFF
ON OAP_WORK.SCHEMA
BEGIN
  INSERT INTO LOG_OFF
   VALUES
      (SYS_CONTEXT('userenv', 'terminal'),    
       SYS_CONTEXT('userenv','session_user'),
       TO_CHAR(SYSDATE),    
       SYSDATE);
END ;It compiles but does not work ! Why ?

These are my steps and it worked for me. Can you please show your steps?
SQL> create user trg_test identified by test;
User created.
SQL> grant connect, resource to trg_test;
Grant succeeded.
SQL> create table log_off (name varchar2(20), ddate date);
Table created.
SQL> CREATE OR REPLACE TRIGGER trg_log_off
BEFORE LOGOFF
ON trg_test.schema
BEGIN
  INSERT INTO LOG_OFF
   VALUES
      (USER,SYSDATE);
END ;
Trigger created.
SQL> conn trg_test/test
Connected.
SQL> disc
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn trg_test/test
Connected.
SQL> select * from log_off;
NAME                 DDATE
TRG_TEST             07-MAR-09
SQL>- - - - - - - - - - - - - - - - - - - - -
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com

Similar Messages

  • I love AI love Apple.  I own an iMac, a MacbookPro, an iPad, and an iPhone.  I've been a loyal Mac user since the '80's.   But, please, when are you going to do something about iCal and its Reminders component?  Attaching documents is clumsy. If you're on

    I love AI love Apple. I own an iMac, a MacbookPro, an iPad, and an iPhone.  I’ve been a loyal Mac user since the ‘80’s.   But, please, when are you going to do something about iCal and its Reminders component?  Attaching documents is clumsy. If you’re on iCloud, as I am, repeating events is impossible.  The ability to copy text or graphics into either events or Reminders doesn’t really exist.  This is an easy fix.   Why not get it done? 

    Maybe things will improve this summer,
    http://www.apple.com/macosx/mountain-lion/features.html
    Regards,
    Captfred

  • HT4009 I make an In-App purchase and my device fails to complete the purchase. Could you do something about it and prevent it from ever happening again?

    To iTunes Store
    I've being trying to make an In-App purchase and it doesn't work. I get this message that says the pruchase can't be completed. Could you do something about it and prevent it from ever happening again?
    Sincerely
    Cameron

    We are itunes users just like you.
    You should contact itunes support

  • Something about applet and database?

    applet cant write and read from outer files.
    but can it read from database?if i don't modify my security policies.

    zhangv,
    We hava a web application with an applet in it that communicates with the server over HTTP. So, you need not worry about security. We use a multi-tiered environment. That is, the middle layer uses an application server (Sybase EAServer) and the backend layer is our database (Sybase ASE 12.5). Our application server fetches the data from the database and streams XML to the applet via a servlet. You can find a wonderful example for how this works in an article on Java world, entitled:
    Title: "A J2EE presentation pattern: Applets with servlets and XML"
    Subtitle: "Enhance your Web interfaces with powerful XML-configured applet components"
    http://www.javaworld.com/javaworld/jw-05-2002/jw-0524-j2ee.html
    Hope this helps
    TJJ

  • Would someone tell me something about multithread and multiprocessor

    Hey, would you be so kind to tell me something about how to progrmme with using multithread in multiprocessro? and where can I find something about it? My problem is that
    Assume that you have to write a computer program that will receive as input a single array
    storing a large number of integers. The program has to compute the prefix sums of the
    number sequence.
    Given a sequence of numbers x1, x2, ..., xn, the prefix sums are the partial sums:
    s1 = x1
    s2 = x1 + x2
    sn = x1 + x2 + ... + xn
    �You have to be prepared to write a program for program should be able to use a variable, user-specified, number of processors. For
    example, the user should be able to run the program using any number of processors P
    between 1 and 16. The number of processors P can either be selected using a command
    line argument or the program can prompt the user.
    �Your program should be able to sum a variable, user-specified, number of integers. The
    integers in the input sequence should be randomly generated inside your program. (That
    is, the user will input n, and the program will then randomly generate n numbers.)
    �Your program should print out (either to the standard output or to a file) in ascending
    order the prefix sums computed: s1, s2, �, sn.
    Can someone give me some help? I have no idea about how to do it?
    thanks a lot of

    I think perhaps you are asking about how to create threads in Java? I'm not sure, but I'll give you some background anyway. Basically all that you need to know is documented in the class java.lang.Thread. If you want a class to run on a separate thread then you can do one of two things:
    (a) define a class that extends Thread.
    (b) define a class that implements Runnable.
    I prefer the latter, but it's up to you. So, for example, if I have some computationally expensive algorithm to execute I would define a class like this:
    public class ImExpensive implements Runnable {
    ����public void run() {
    ��������<insert code here>
    ����}
    Then when you want to run the algorithm you do this:
    ����ImExpensive o = new ImExpensive();
    ����new Thread(o).start();
    The second line in this case constructs a thread that the object 'o' can run on (the start() method causes the run() method in the ImExpensive class to execute).
    Now, as for running on multi-processors, I have never done this so I am not too sure. But all that you have to do is figure out a way of associating the thread that was created with a particular processor.
    Also, be careful when using threads. Everything will be OK if your computations are mutually exclusive (ie: they aren't interdependent). If they aren't then you might run into what is sometimes called "the racehorse problem". This is a phenomenon that occurs because you can't guarantee which threads are going to finish first or indeed the order of interleaved operations. It's difficult to describe but this tutorial may help you out.
    http://java.sun.com/docs/books/tutorial/essential/threads/
    Hope that helps. :)
    Ben

  • Not understanding something about margins and header

    Pages 2 5.5.3
    Mac OS 10.10.2
    I'm trying to rap my head around how pages does headers.
    I think of a header as a place were stuff goes so that it occurs at the top of each page. I would expect it to be positioned at the bottom of the top margin. For instance, with a top margin of .5 in and a header of 1. in, I would expect my header stuff to start at .5 in and my non header stuff to start at 1.5 in.
    This is what I observed. Her are a couple of clarifications to start:
    –All measures are vertical measures
    –Origin represents the offset were an object placed at zero in the body of the document appears.
    Top Margin, set to .5 in. Origin at .5 in as expected.
    -Add a 1 in header. origin moves to 1 in. I  would expect the origin to move to 1.5 in, .5 in top margin + 1 in for the header.
    -Add some 24 pt text to the header and the origin moves down even further, by at least a 1/3 in (24/72). Since 1/3 in is clearly less than one in, i would not expect the origin to change at all since the text would easily fit within 1 in.
    This is what i am seeing. Without a header, the origin is the height of the top margin. The header appears to ignore the top margin and makes its start at the header height and grows downward from there. This seems wrong.
    Can someone steer me straight?

    Here's my settings.
    Here's my results.
    See, the header starts at 1. inch. I do not have the dimensions reversed.

  • Question about database and java

    Suppose i have a form with a bunch of textboxes etc.
    What is the best way to send the data from the
    result set to the form objects.
    Thanks in advance
    Maggie

    hi,
    first you use the array of buttons then in a loop
    you should adopt the logic
    for(i=0;i<=10;i++)
    myButton.setTrxt(RecordSet[i]);
    where condition depends on the no of buttons.
    zafir

  • Best avenue to file complaints about bill and have them resolved

    I have been a customer since before 2005 and went with Ntelos in November, I called the night I was at Ntelos to ask Verizon what my contract buy outs were and I was given the prices. The representative tried to offer me whatever promotions she could offer (there wasn't many) and I declined service (there she should have took the initiative to ask about disconnecting). Since my bf opted to keep his number his phone disconnected automatically. I was told my Verizon phone would cycle off within 24 - 48 hours by the Ntelos rep. That was not the case so I called verizon to ensure my phone would disconnect and they told it would at the end of the billing cycle (december 20) which makes sense. I understand I would be responsible for the November - December. Anyways, December 20th rolls around and mind you I've called already to ensure it will take place and it doesn't. I phone in and come to find out the person who took my orders didn't complete the disconnection and now I have to wait until January 20th for it to cycle off and I can finally pay my bill! Well get this in my November - December bill they've charged me $51 for Monthly access (I have a work discount) and $49.99 for insurance and smartphone access for 12/21 - 1/20 and won't refund my $51 as they say that I called out on the phone. I turned the phone on and had voicemails that I think I checked around the time period that they are mentioning (1 day) and that data was used (1 day) I had no outbound calls after December 11th my birthday. Because there are no comments in my account (that I specifically asked them to make) my phone should have been disconnected when I had called in the first of December... really!?! The phone should have been turned off regardless and it was one day out of 30 seriously? I mean the phone has been turned off this whole time and literally only checked to make sure Verizon did their job. I CAN'T HELP IT YOU DON'T KNOW HOW TO DO YOUR JOB, I PUT THE EFFORT IN MULTIPLE TIMES TO LET YOU KNOW MY PHONE NEEDED TO BE DISCONNECTED YOU SHOULD HAVE KEPT RECORD OF IT!!! What really heats me up is that I was told a supervisor would give me a call back after they got out of a meeting and I have not rec'd a call back yet. VERIZON Reps/Supervisors your customers are the reason why you have get a paycheck, I suggest you start treating them a little better. You can't seriously tell me giving me back my $51 for service I DID NOT USE (except according to you for one day you can't even give me details about?) is really going to hurt your pockets. I've been jerked around by your reps for the last 2 months as one told me my contracts were up in January and I shouldn't' be charged for disconnection fees at all, she credited me those termination fees but they later got rejected (after she said her supervisor approved while I was on hold) and NO ONE HAD THE COURTESY TO NOTIFY ME!
    I've worked in customer service before and I'll be first to tell you that your reps are not trained very well and you have horrible ethic! You should not charge your customers for an error that was your fault; especially since it was your reps that I asked specifically to note my account and didn't (this isn't my first rodeo with you all, it should be standard procedure to give your reps time to comment before throwing them into another phone call). I'm not doing this for my health here, that $51 could buy diapers and baby food for my daughter and you are crazy if you think I'm going to let it slip through my fingers to line your pockets. I will keep escalating it until you do something about it and I don't care that you already gave me an inconvenience credit I deserve that and my $51 so don't try to justify it that way! This has been way more than an inconvenience, so don't worry I'll inconvenience you as well!
    >> Edited to comply with the Verizon Wireless Terms of Service <<
    Message was edited by: Verizon Moderator

    With my new provider I am only using the chat function to settle anything with them so I can save the conversations I've had with them (not that I've had any issues thus far). It should be standard procedure for them to comment your account while they are on the phone with you before hanging up. I should have been annoying and asked them to read back their comments (hindsight ugh!).  I'm sorry that you are having to deal with this as well, just know you are not the only one receiving horrible customer service. I'll share with you what I wrote on their Facebook page. They really should take some accountability for their actions and have better follow up on resolving issues (or train their representatives better). I can't stand having to talk to another person time and time again explaining the same thing i just explained to 3 people before them.
    Almost immediately, I received some attention after posting this:
    Dear Verizon,
    I am appalled, especially after reading your credo, that you are refusing to credit back money that is owed to me because your representatives didn't take the necessary time that they should have to comment (after I specifically asked) in my account after I diligently called in multiple times to ensure that my disconnection took place when it was scheduled to and was told that it would (an ongoing issue since the beginning of December). Come to find out that the representatives I spoke with prior to December 20th didn't do their jobs correctly by not entering the disconnection orders in. "Verizon Credo- a set of principles that describes our culture of integrity, respect, performance excellence and accountability. The Credo is a blueprint that directs us to live up to the highest standards possible when serving our customers, shareowners, communities and each other." Let me school you on something here because it appears that you just put that mission statement up on your website 'cause it sounds good, you certainly do not follow through! Accountability: Noun - the quality or state of being accountable; especially an obligation or willingness to accept responsibility or to account for one's actions (i.e. public officials lacking accountability). It doesn't matter that you cannot find any proof in my statements it doesn't change the fact that it happened and I am not a liar. I seriously wouldn't exhaust this must effort had I been lying. I'll take this a step further and reference your statement "we focus outward on the customer, not inward. We make it easy for customers to do business with us, by listening, anticipating and responding to their needs." First of all, when I made my initial call to you all asking what my contract buyout prices were and your rep tried to offer me promotions (or lack there of) to keep me as a customer and I declined she should have "anticipated" my need for disconnection. I shouldn't have had to jump through so many hoops to get my service disconnected from you all and pay my final bill. It's not my fault that your representatives weren't trained well enough to correctly put through disconnection orders. Based on my interactions with your customer service I could see where people would disconnect their services regularly!!!!! You are not making it easy for me to severe ties with you and conduct BUSINESS and you are not responding to my NEEDS. I think you forget that I could be a potential customer in the future. If it's one thing I learned from my Communications Degree is that negative feedback will reach more consumers vs. positive feedback of a company and how they handle their business. I have 1,000 plus facebook friends and twitter followers so I'm pretty sure my negative experience could reach quite a few people! You say you have integrity? How is it moral uprightness to charge me for a whole month of service (regardless if the phone was turned on once) for a billing period that shouldn't have existed if your customer service reps did their job correctly? I suggest that you all take a good look at the way you are treating your current customers because we are the reason you get a paycheck! You should make your customers a priority especially if they've been with you for 10 + years regardless if they are disconnecting service or not! How about following through, taking ACCOUNTABILITY and having that supervisor representative call me back from my phone conversation last night like I am a priority (how every customer should be treated) and helping me get the money that I am owed, regardless if the phone had been turned on for a short period (your rep couldn't even tell me what numbers I supposedly called - exactly the phone has been off since December 20th if not before unless turned on to confirm disconnection)! Oh but let me guess did you all forget to put that in my account comments as well? Probably like there is no mention of the formal complaint I filed against some of your representatives that there was supposedly no ticket number for. I thought I was going to regret leaving Verizon for another provider but it turns out that I only wish I would have left sooner and actually gone to a authorized dealer/ Verizon Store to process my disconnection because your customer service line is a joke!

  • Hi nid help with database and web

    hi to all! i wanted to get some help on how to connect to a database in a web... i dont know if its javascript,java applet,or jsp... could some1 pls give me a code on how to make a simple login database connection in a web through java.. i really nid it guys... we have our contest next week... pls.. i really nid your help... tnx!

    hi to all! i wanted to get some help on how to
    connect to a database in a web... what do you know about databases and the web today?
    i dont know if its
    javascript,java applet,or jsp... yes.
    could some1 pls give
    me a code on how to make a simple login database
    connection in a web through java.. (1) create a table USER in your favorite relational
    database - id, username, and password should be
    enough.
    (2) Use HTML to create a login form - username and
    password text fields and a submit button will be
    good.
    (3) Write a JSP using JSTL <sql> tags to query the
    database and put the result into request scope.
    (4) Redirect to a success JSP to demonstrate a
    successful login, or back to the login if it fails.
    i really nid itI hope this helps.
    guys... we have our contest next week... pls.. i
    really nid your help... tnx!What do "we" win? Will you be listing me as the sole
    developer if I write this for you?
    My rate is $120 USD per hour. Give a credit card
    number and I'll get right on it.<Actually its just a contest for our intramurals.. i was just hoping if u guys could help me ... thnx!

  • What's this I hear about Gmail and the iPhone?

    I have a gmail account with my iphone. I opened up a thread a few days ago saying something about gmail and the iphone (I didn't get to read the thread though) making it sound like the emails would get to my phone faster or something.
    Anyone know what I'm talking about?

    what you are talking about is called "pull", the phone pulls new messages every 15 minutes.
    in "push" mode if someone sends you an email it is pushed to your phone instantly, you don't have to wait up to 15 minutes for it to show up.
    you can find information about "push" vs. "pull" email on the internet (google works well for searching for information), wikipedia is especially handy:
    http://en.wikipedia.org/wiki/Push_e-mail
    and here is info about gmail push:
    http://googlemobile.blogspot.com/2009/09/google-sync-now-with-push-gmail-support .html

  • Beginners question about creating first database and tables

    Hi all,
    i recently have installed 10g express edition, because i want to transform my php-script from mysql to oracle database. (due to the fact that mysql is "not allowed sofware" at the company i work for).
    it is a quit small script, just a shift-report system, build because of frustration about an used shift report system based on excel sheets. Company likes it, but IT-department rejected it, because it is myssql. They do own a lot of oracle servers, so they set up a database for me, got a username and password.(Tnsnames entry). The rest i have to do by myself, no further support from IT department.
    I have made 2 simple php functions to connect to database:
    // for connection home server:
    function conn()
         $user = 'user';
         $password = 'password';
         $conn = oci_connect($user, $password, 'localhost/XE');
         return $conn;
    // for connection at work:
    function Xconn()
         $db = '(DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.eu.xxx.com)(PORT = 1521))
        (CONNECT_DATA = (SID = NVGPP)))';
         $user = 'xxxxxxxx';
         $password = 'xxxxxxx';
         $conn = oci_connect($user, $password, $db);
         return $conn;
    }I just add or remove X character before function name, for use at home or at work.
    both do work fine.
    First thing i wanted to do, is to create my database and tables.
    Schema dump from mysql:
    -- phpMyAdmin SQL Dump
    -- version 2.11.1
    -- http://www.phpmyadmin.net
    -- Host: localhost
    -- Generatie Tijd: 03 Aug 2010 om 21:35
    -- Server versie: 5.0.24
    -- PHP Versie: 5.2.4
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    -- Database: `ewb`
    -- Tabel structuur voor tabel `afsprakenblad`
    CREATE TABLE IF NOT EXISTS `afsprakenblad` (
      `id` mediumint(8) unsigned NOT NULL auto_increment,
      `naam` tinytext NOT NULL,
      `afspraak` text NOT NULL,
      KEY `id` (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Afsprakenblad' AUTO_INCREMENT=13 ;
    -- Tabel structuur voor tabel `verslag`
    CREATE TABLE IF NOT EXISTS `verslag` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `ewb_id` int(10) unsigned NOT NULL,
      `datum` date NOT NULL,
      `dienst` tinytext NOT NULL,
      `ploeg` tinytext NOT NULL,
      `gebouw` varchar(10) NOT NULL,
      `installatie` tinytext NOT NULL,
      `subdeel` tinytext NOT NULL,
      `subsubdeel` tinytext NOT NULL,
      `sap` int(4) unsigned NOT NULL,
      `tekst` text NOT NULL,
      `status` tinyint(3) unsigned NOT NULL,
      `afdeling` tinytext NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4663 ;
    -- Tabel structuur voor tabel `wachtverslag`
    CREATE TABLE IF NOT EXISTS `wachtverslag` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `datum` date NOT NULL,
      `dienst` tinytext NOT NULL,
      `team` tinytext NOT NULL,
      `afdeling` tinytext NOT NULL,
      `status` enum('open','dicht') NOT NULL default 'open',
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=800 ;When i wanted to create a new databse with: CREATE TABLE ewb, i get an error that databse already is mounted??
    How do i create this database and tables?
    after googling i read something about schema owners, but cant find anything about how to copy my mysql database/tables to oracle.
    Please, help is really appreciated by me.

    Translating from mysql to Oracle will need a bit of fixups for the DDL, once an oracle instance is created, set up and running, you won't create a database but you will have a database user or users that create/own a collection of tables, indexes, functions, procedures, etc.
    It will take a bit of pouring through the oracle documentation to get those table create statements to work, i.e. the engine=, charset=, auto_increment items won't succeed, datatypes need adjustments, the tic marks around the entity names aren't necessary, quite a few other items from the mysql data definition language don't have an oracle equivalent.

  • My ipod wont update any apps, it says something about storage managment but i have 4 gigs left and all of my iclous storage left. Is their ayway to fix this

    my app store wont let me update any apps when i click the update all button it doesnt do anything and eventually says i need to manage my storage, i have 4.4 gigs left and all of my icloud storage left and i just deleted 5 app hoping it would make room but it didnt work. is there something that happened to itouch 3rd gen during th ios5 update or something? please let me know if there is anything i can do

    it says something about storage management
    Try these support articles...
    iCloud: Managing your iCloud storage
    iCloud: Purchasing iCloud Storage and Billing

  • I bought a movie on my iPad. When it was stopped, by the cover pic/description, I pushed a small button thinking it was to finishing downloading but it deleted it. Now it says can't redownload and something about 90 days?? Help!! Just paid $20 bucks :(

    I downloaded Monsters Inc for my son for a car ride. It kept stopping towards the end with like 10min left. So I stopped it, went to the screen where you can choose to play it (where the movie pic and description are). I pushed the small butt on to the right of the pic, thought it was like iCloud or finish downloading, something along those lines. Well, it deleted it! In iTunes, when I push he iCloud button next to it because it shows I purchased it, it says something about already bought this and can't download to same Apple ID for 90 days, it says cancel or transfer. Even when I click transfer it didn't help. Please help!!!!! Just paid $20 for this!
    Oh it was under my husbands Apple ID too, if that matters. He uses that for his iPhone and the iPad.

    you can let apple know here
    http://www.apple.com/feedback/appletv.html
    and you can look here
    http://www.ebay.com/bhp/vhs-player

  • TS2834 I've been using the mail app that came with my Mac for over a year. Out of the blue, it will not open and keeps saying "Mail cannot open because of a problem" and something about not being compatible ??? Help! I miss my mail

    I've been using the mail app that came with my Mac for over a year. Out of the blue, it will not open and keeps giving me an error like "Mail cannot open because of an error and something about it not being compatible. Please help! I miss my mail

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • When I clicked on Firefox, the update bar started but when it stopped Firfox would not open. The blue screen of death popped up and said something about a new installation. We restarted the computer and now Firefox will not open. Help!

    When I clicked to open Firefox the update bar appeared and an update loaded. Usually when this happens Firefox will open up when the update is finished. This time it did not open. when I clicked on the icon again the blue screen opened and said something about a new installation and if this was the first time you have seen this screen restart your computer and try again. I restarted the computer and when I clicked on the Firefox icon the "hour glass" would appear like it was trying to open but it never would open. I don't know what else to do.

    See below -- the way I asked the question the first time may not be clear. This post was a goof but I can't figure out how to delete it

Maybe you are looking for