Want to modify existing trigger
I have tried to find logon/logoff details using trigger program.
1) trigger_logon for login time/date with user ans host information.
2) trigger_logoff for login time.
SQL> create or replace trigger tri_audit
2 AFTER LOGON ON DATABASE
3 declare
4 user varchar2(30);
5 sess_id number;
6 logdate date;
7 login_time VARCHAR2(15);
8 EXTERNAL_NAME VARCHAR2(15);
9 AUTHENTICATION_TYPE VARCHAR2(15);
10 HOST varchar2(10);
11 begin
12 select sys_context('USERENV','SESSION_USER') into user from dual;
13 select sys_context('USERENV','SESSIONID') into sess_id from dual;
14 select sys_context('USERENV','EXTERNAL_NAME') into EXTERNAL_NAME from dual;
15 select sys_context('USERENV','AUTHENTICATION_TYPE') into AUTHENTICATION_TYPE from dual;
16 select sys_context('USERENV','host') into host from dual;
17 select (sysdate) into LOGDATE from dual;
18 select to_char(SYSDATE,'HH24:MM:SS') into LOGIN_TIME from dual;
19 insert into user_login values (user,sess_id,EXTERNAL_NAME,AUTHENTICATION_TYPE,host,
20 logdate,login_time);
21 end;
22 /
Warning: Trigger created with compilation errors.
SQL> show errors;
Errors for TRIGGER TRI_AUDIT:
LINE/COL ERROR
17/1 PL/SQL: SQL Statement ignored
17/13 PL/SQL: ORA-00947: not enough values
Please help me to solve my problem.
table details
SQL> desc user_login
Name Null? Type
USERNAME VARCHAR2(15)
ISDBA VARCHAR2(15)
LOGDATE DATE
LOGIN_TIME VARCHAR2(15)
LOGOUT_TIME VARCHAR2(15)
EXTERNAL_NAME VARCHAR2(15)
AUTHENTICATION VARCHAR2(15)
HOST VARCHAR2(10)
SESSION_ID NUMBER
count the number of columns in your table. there are 9.
now count the number of values you are trying to insert in your statement
insert into user_login values (user,sess_id,EXTERNAL_NAME,AUTHENTICATION_TYPE,host,sysdate ,login_time);
there are only 7.
9 <> 7
you must have the same number of values to insert as the number of columns.
one way to ensure this is to always use a column list like this
insert into user_login (username,session_id,external_name, authentication, host, logdate, login_time)
values (user,sess_id,EXTERNAL_NAME,AUTHENTICATION_TYPE,host,sysdate ,login_time);
rather than what you're doing. Anyway, it is just good practice to always include the column list because if the underlying table structure changes, it will not fail.
Similar Messages
-
Hello all,
I'm 100% new to Adobe Connect development and 90% new to flash in general. I'm fairly surprised at the lack of resources I've been able to google up about Adobe Connect plug-ins, but maybe someone here can help. I want to modify the existing "Attendee List" pod, specifically I want to add another icon to the popup when you hover over an item in the list that would open up the person's default browser and direct them to a specific page.
What I'm really looking for is an "Is this possible? or do I have to create a new pod to do it?" If someone could also point me in the right direction to get started, well that would be great too
Thanks in advance,
John WilliamsYou have to create a new pod if you want to do that. Otherwise when the server was updated periodically it's possible your pod would get overwritten if you altered the original pod. I've not checked the software agreement so I am not sure if legally you are allowed under the agreement. Something to check!
You would have to create a new pod and name it something else. -
Hi ! I use N79. I just want to modify the theme to add a wallpaper so that it sit nicely in the middle of the screen. Where can I find the existing themes ? Thanks
Hi,
The location of your images directory depends on how you setup your APEX instance. Do you know which database version you're using? And whether you've configured your APEX instance to use the embedded gateway, which would be the default configuration on Oracle XE and 11g. Or did you setup APEX with mod_plsq or the APEX listener? Assuming you've installed XE, and you're using the embedded gateway, then your images are actually stored in the database (XML DB), and you would need to access your images folder via FTP or WebDAV. There are several blog posts out there that talk about how to connect to the images folder via FTP, here's one: http://www.apex-blog.com/oracle-apex/accessing-i-using-ftp-170.html If you're using any of the other configurations, your images directory would simply be a local folder on the machine running your web server.
As for creating a theme, there isn't really a "guide" out there that documents how to build a new theme. But the theme structure, templates, etc are documented in the APEX user guide. To start building a new theme, I would recommend starting out with an existing one that you like, ideally one that was recently modernized by us. I would recommend themes 21-23 as starting points. And then I would create a CSS file to overwrite some of the classes in the theme CSS file, rather than directly modifying the CSS file that ships with APEX. You should also use tools like Firebug, or the built-in developer functions in Chrome/Safari to try out different CSS settings. With our modernized themes you should be able to get most customizations done through CSS. So I would suggest staying away from actually altering the templates as much as possible, at least in the beginning.
Regards,
Marc -
Modifying existing jar file, how?
Hi there,
I have a problem trying to modify an existing jar file. When I want to create a jar file, I use something like:
REM build the application on windows, assuming the java/bin
REM directory is in the path environment variable
REM application is just the directory I am using
SET cp = c:\application\TestApp
javac -classpath %cp% TestApp.java
REM ****************************************
REM do packaging and adding manifest
REM ****************************************
jar cvfm App.jar manifest.mf TestApp*.class
REM ****************************************
REM run the jar file
REM ****************************************
javaw -jar App.jar
But now, I have an existing jar file (swingall.jar) and I want to modify a class within that file. So, I modified the .java file, and compiled it to get my new class file.
And the question is, how do I modify the existing file, so that I keep everything the same, except the modified class?
Thanks
FernandoI have just found out that I can't use "u". It seemsthat's only
possible with older versions of jar.Huh? I'm using the 1.4.2-b28 jdk, it's still there,
and I don't see how it could ever possibly be
removed.
Type:
jar
with no arguments to see all the options to jar.I already did, to double check it, and this is what I got:
C:\Documents and Settings\Fernando Sanz>jar
Usage: jar {ctx}[vfm0M] [jar-file] [manifest-file] files ...
Options:
-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-v generate verbose output on standard error
-f specify archive file name
-m include manifest information from specified manifest file
-0 store only; use no ZIP compression
-M Do not create a manifest file for the entries
If any file is a directory then it is processed recursively.
The manifest file name and the archive file name needs to be specified
in the same order the 'm' and 'f' flags are specified.
Example: to archive two class files into an archive called classes.jar:
jar cvf classes.jar Foo.class Bar.class
Note: use the '0' option to create a jar file that can be put in your CLASSPATH
Thanks for trying with jdk 1.4, I don't have it installed in my computer right now, so I'll try tomorrow with another computer at Uni.
Thanks! -
Modifying existing driver (newbie question?)
Hi
we are trying to modify an existing driver, but we are fairly new to Labview. We have some generic questions, but I will give some specific info about what we are trying to do as well.
We downloaded a driver (for the NDI Polaris motion tracker) from the NI site and want to modify this a little bit.
The zip file contains an ndipolaris subdirectory with 2 .llb files and some .mnu files.
Our first problem is that if we just open the .llb files, there are a lot of vi's in there (including working examples), but there are no project files, nor class definitions. This seems to prevent us from creating a new class that derives from a class which is apparently defined in the driver (but for which we don't seem to have the definition). Maybe a driver can be distributed without these definitions such that you can only use it, but not modify it?
Our second problem is that if we use the "create new driver from existing driver" method, the NDI Polaris does not show up in the list of existing drivers. (We did copy the ndipolaris directory to the labview/instr.lib directory and restarted labview). (This is probably not a major problem as we could just modify the existing driver instead).
Note that the existing driver is working nicely. We just want to add a time-stamp in the data. The existing driver has apparently a class (called "Tool info", whcih is a cluster of a few different types of data) for all the info that the Polaris returns, so we thought to modify that class or to derive a new class from it with the time-stamp added.
Sorry if this is a trivial question. Thanks for any pointers.
Kris
Solved!
Go to Solution.Hi Dennis
thanks to your suggestions, we've sorted
this out. We were confused by the fact that you cannot add controls
when in "block diagram" view. Here is what we did:
The
data cluster was constructed using the "bundle by name" function,
which takes a "template" cluster as input. It was this template that we
needed to modify. However, as the template was a "constant", it didn't
show up on the front panel, and so we couldn't add any controls to it.
So, when viewing the block diagram, we right-clicked the
template-cluster, converted it to a control, then switched to the front
panel, created a new (string) control on the front panel, and placed
that into the control corresponding to the template-cluster. Then we
switched back to the block diagram, and converted our template cluster
back to a "constant".
Not straightforward I think, but once you know (i.e. get help from you and read a bit of the manual...), it's ok.
thanks again
Kris -
How to modify existing concurrent program
I want to edit and modify existing pl/sql concurrent program.
what are the steps required to do this?Hi,
Pls keep in mind that modifying standard programs is not advisable. You will get SPAU (http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/61ec66e33611d1954b0000e82de14a/frameset.htm) when you upgrade your SAP system. Try to make an own version and include as much as possible from the standard program.
Eddy -
Want to modify GR/GI SLIP Field into change mode.new to badi
Hi,
I want to modify GR/GI SLIP Field into change mode , so my customer can change data whenever he wants.. This field exist in vl02n transaction.
Right now it is in disabled mode .I am new to badi , so please guide me .
Regards,
Ranu.
Edited by: ranu sharma on Nov 4, 2009 8:16 AMHi,
Please note this is the client requirement to have the field editable, so please do not convey the edit entires in table to users, this is basically for our reference only,
In this case, you'll have to use the user exits to make the field editable in SAP for users, kindly check the below user exits, and take help of delveloper on the same.
Exit name Description
SDVFX001 User exit header line in delivery to accounting
V50Q0001 Delivery Monitor: User Exits for Filling Display Fields
V50S0001 User Exits for Delivery Processing
V56TDLIF Filter Delivery Items for Shipment
Thanks & Regards,
Rahul Verulkar -
Proper way to modify existing files?
Hi! I'm writing a small package for my own purposes to install some keyboard options I want to add to X. I am adding some files to /usr/share/X11/xkb/, but I also need to modify /usr/share/X11/xkb/rules/evdev, /usr/share/X11/xkb/rules/evdev.lst, and possibly /usr/share/X11/xkb/rules/evdev.xml. The modifications are small -- two or three lines generally, but I'm not sure what the best way to make these modifications are.
Based on what I can find on the wiki, I can proceed one of two ways:
* I can create a patch for the files, apply the patch during build() to the source files, and then put them into the package to replace the existing files.
* I can add a .install file, which either applies the patches after install, or uses echo ... >> to add the appropriate lines to the files.
I'm not sure if I'm missing something, or what the best way to apply these changes is? Which of these options is the cleanest to back out of? And how does pacman handle possible interactions with other packages that might want to modify the same files?
I'm tempted towards the second option because if I use the various hooks it might be easier to back out of the changes?
Thanks,
RickyNeither of these are sane ideas. If you want to modify files which are owned by a package (any package) and not part of the backup array, you have a few options:
1) rebuild the package owning the files with your changes. you'll have to do this for every release.
2) rebuild the package with those files in the backup array. now you're free to change them and they won't be clobbered on upgrade. But, you'll still need to do this every release.
3) change the files anyways, and add them to NoUpgrade in /etc/pacman.conf
package install scriptlets are not meant to be used to arbitrarily modify files. -
Modify existing rebate condition and exclusion
Hi
We are rebate agreements for customers. Currently I want to modify rebate condition in one of rebate agreement.
Scenario: let us June 10th 2010 onwards, the rebate % is 3% for Profit center 'xxxx' & customer 'yyyy' instead of 1%. And 3% needs to accrued on billing docs going forward. How to set up this.
I tried to modify existing rebate condition using VBo2 as follows: went into rebate agreement using VBo2, changed rebate % for condition record with effective from 06/11/2010 and Saved. problem when I ran VBOF program, system posted reversal accrual for old rebate condition 1%. Old condition record validity from 01/01/2009 Valid to 12/31/2011.
I have one more question. We want to set up rebate condition for all materials exclude some of them. we have thousands of materials for which we need to calculate rebates. but we want to exclude some materials in the rebate agreement. How to set up such exclus
any ideas really appreciated
thnxThe key of your condition table (the one supporting your condition record in the agreement) is evidently Profit Center / Customer. So for any combination of profit center and customer, you can maintain a rate and validity period.
You are attempting to maintain two separate records having the same key. As you have experienced, the system does not allow it.
The simple solution is to expire that rebate agreement and start a new one with the updated validity period and conditions.
As for excluding certain materials, you need a more detailed key in your condition table. Something else from the material master seems appropriateu2014Commission Group for example. Maintain commissionable materials in group 01 and non-commissionable ones in group 02. Then a key combination of Commission Group / Profit Center / Customer would work well for you.
Regards,
Ken -
Hi all,
I need to change text/html part of message which I have in mail format. How to do this easily without loosing other parts of message?
Or maybe you know some better way to create kind of simple proxy for SMTP which would add and replace some text in HTML part of email?
So far I am reading message from plain stream of mail text representation (got it from Subethamail SMTP server) into JavaMail Message object. I had problem, when my changes to message were not reflected - I posted question on http://stackoverflow.com/questions/7674775/how-to-modify-existing-java-mail-mimemessage-body-parts/ and solved this one by calling message.saveChanges();
The issue is that when I call message.saveChanges() headers seams to be lost - especially those around Content Type and Charset.
My code looks like this:
public void resend(InputStream data) throws Exception {
Transport transport = mailSession.getTransport();
MimeMessage message = new MimeMessage(mailSession, data);
Object content = message.getContent();
if (MimeMultipart.class.isAssignableFrom(content.getClass())) {
MimeMultipart mimeMultipart = (MimeMultipart) content;
for (int i = 0; i < mimeMultipart.getCount(); i++) {
MimeBodyPart bodyPart = (MimeBodyPart) mimeMultipart.getBodyPart(i);
if (bodyPart.getContentType().startsWith("text/plain")) {
String cnt = updateContent((String) bodyPart.getContent());
System.out.println("ContentType = " + bodyPart.getContentType());
System.out.println("Content = " + cnt);
String contentType = bodyPart.getContentType();
System.out.println("Updating content type to = " + contentType);
bodyPart.setContent(cnt, contentType);
} else if (bodyPart.getContentType().startsWith("text/html")) {
String cnt = updateContent((String) bodyPart.getContent());
System.out.println("ContentType = " + bodyPart.getContentType());
System.out.println("Content = " + cnt);
String contentType = bodyPart.getContentType();
System.out.println("Updating content type to = " + contentType);
bodyPart.setContent(cnt, contentType);
} else {
String cnt = updateContent((String) message.getContent());
System.out.println("ContentType = " + message.getContentType());
System.out.println("Content = " + cnt);
String contentType = message.getContentType();
System.out.println("Updating content type to = " + contentType);
message.setContent(cnt, contentType);
message.saveChanges();
}Mark on Stackoverflow suggested that problem is in bodyPart.setContent(cnt, contentType); call...
Hope that makes sense for you... and you will be able to help me...
Thanks in advance
Konrad
Edited by: 890134 on 2011-10-07 08:29JavaMail wasn't really design to support "editing" of existing messages.
That's caused some problems over the years and I've had to fix a number
of bugs in this area. The current version (1.4.4) definitely works better
than older versions, but I won't be surprised if there are still bugs.
Even so, your code is making a number of invalid assumptions about the
structure of messages. I would suggest looking at the msgshow.java
demo program. It includes code that visits all the parts of a message.
It should be straightforward to extend that code to detect the parts you
want to modify and to change the content of those parts using the
setContent (or setText) method.
If it's still not working for you, provide more detail about what you're doing,
including a same message. (Send the details to me at [email protected]
if you prefer.) -
Can I transfer data from my G4 to my IMac over a firewire without them syncing or messing either one up - do not want to modify either one...!
Boot the G4 Mac into Target mode...
http://support.apple.com/kb/HT1661
That should make the G4 look like a big FW drive to the iMac. -
"are you sure you want to remove existing photos.."?
I just had to get a new hard drive (for my 2/12 year old Imac!) Did the time machine backup, all seems good. Now trying to sync photos from Imac to the Ipad. I'm getting this message:
"Are you sure you want to remove existing photos and sync photos from this computer? Photos synced to "xyz" from other photo libraries or folders will be removed and photos will be synced from this computer. Photos taken with "xyz" Ipad will not be affected" Choices are "cancel" or "remove and sync".
Does this mean that if I "remove and sync" that photos on my Ipad that say, I played around with in some photo app and are now in my camera roll,.. will be lost?? I'm confused by this message.
also, I turned off photo stream because it was driving me nuts.
Can anyone please help me? There are about 350 photos on my Imac that I want on my Ipad.. thanks!!An iPod can only be synced with one iPhoto library. If it has been synced with another library previously, the photos synced from that library will be removed from the iPod. Have you been switching between iPhoto libraries? You need to switch back to the iPhoto library that you want to sync with, before connecting your iPod.
The library you are using for syncing, needs to contail all photos that you want to sync to your iPod. -
Hi all, iTunes Sync help ...please?
I bought a MacMini having been a iPhone & iPad user with a winPC for many years and i fail to understand what iTunes wants to do with my suff on my iPhones etc. It appears to want to wipe it and start new and from previous blogs i cant see that this has actually been addressed.
I have tried to get Apple to call me by logging a case several times but they never ring and then just send me a mail saying we tried to call (they dont) so i am hoping someone can help me...please?
When i pug my iPhone or iPad in non of the apps appear in the simulation on the second tab and non of my music are there. When i hit 'Sync' a pop up says'Are you sure you want to remove existing music, movies, TV shows, books, and tones from this iPhone and sync with this iTunes library?
Music, movies, TV shows, books, and tones synced to “Chr15h’s iPhone5” from other iTunes libraries will be removed and items will be synced from this iTunes library.'
I realy dont want to loose all my data. Can anyone help or point me in the right direction...please?
Thanks (i hope) Chr15hZesty.Zooma wrote:
But will I be able to keep the data stored in the applications, photos, books and also the sorting and the folder arrangements the same way they were, after erasing all the data and synchornizing with the new library?
That is the aim of the process set out here: Recover your iTunes library from your iPod or iOS device.
tt2 -
I have a Western Digital external hard drive that needs to be re formatted for use on my iMac, but I do not want to lose existing data, is this possible ?
Formatting a disk always erases all the data on it. Your only option is to back it up elsewhere and restore it once formatted.
-
How to modify existing data in a file help me!!!!!
hi i had a file which contais the some data like
folder1:50
folder2:30
folder3:56 etc.....
now my problem is i want to update the integer value for a specified folder entry
i.e i want to modify folder1:50 to folder1:80 how to do it?
i am new to java PLZ help
i am unable to find best solution for this
thanks in advanceWell, it makes a big difference if what you're doing is always just replacing some bytes, or if bytes might be inserted or deleted.
In the latter case there really isn't much point in doing anything but generating a new version of the file by copying the unchanged bits and inserting the replacement bits. Then you can rename the old file to a back up and rename the new file to the old file name.
If you're always simply replacing one byte for another (and be careful because, depending on the character encoding, single characters may encode to a different number of bytes), then you can try using RandomAccessFile and, for added flexibility, you can memory map a file using RandomAccessFile.getFileChannel.map();
Either of these techniques will allow you to go to a particular position in the file and overwrite bytes to your heart's content. All your sample records are the same length. If the file is guaranteed to have all it's records the same length then, obviously, it will be easier to find the right bytes. If not you'll have to do a bit of searching.
Maybe you are looking for
-
Daisy Chain Snow to Time Capsule
A few months ago I got a new Time Capsule and retired my trusty old Snow ABS. I took the recommendation and set up WPA security. The Snow was WEP. Well a few days ago I had to bring out a nice old G3 iBook (late-model) for a project and when I tried
-
How to use repeat_interval in create_job of dbms_scheduler
Hi, Trying to execute a procedure repeatadly using job, but fails to execute. The procedure, I am trying to execute is create procedure p1 as begin insert into tab1 values ('ashish'); commit; end; where tab1 table is defined as create table tab1( a v
-
Database migrating to secondary server
I have 3 servers in my Exchange 2013 deployment with 2 being the primary database holders for my 2 active databases and the 3rd server being a failover for either. One of my databases is now activating itself on the failover even after I manually ac
-
Apple, please fix safari random crash and tab auto refresh
Apple, are those issues ever going to get fixed? They destroyed iOS 7's usability and the latest 7.1 beta doesnt seem to address either. 1) Safari randomly crashes - happens multiple times a day. Sometimes opening new pages, sometimes scrolling thro
-
I have iPhone 4. After I upgraded to ios5 I have a problem with Wi-Fi connection with "WPA enterprize" protection. I can define the connection and everything works fine. But after I lose signal or shutoff the WiFi, I cannot re-connect, and need re-de