Question about unique ViewAttributes

Hello Everyone,
Is there a way to have the BC4J framework fire a ValidationException when the setAttribute method is called and a unique constraint is violated ? Currently the framework will throw an SQLException when the application attempts to commit a Transaction under such conditions.
I would like to be able to inform the user about such a condition before they attempt to commit their transaction. I have tried the "IsUnique" setting for the ViewAttribute but have not had any luck. Does anyone know how to acheive this ? I appreciate any insight anyone can provide!
Thank you,
Jim
null

It acts as a unique constraint on both the columns.If duplicate row is inserted you will get error like
05:40:30 sql>create unique index u_a on a (column1,column2);
05:41:07 sql>insert into a values (1,2);
1 row created.
Elapsed: 00:00:00.00
05:41:12 sql>insert into a values (1,2);
insert into a values (1,2)
ERROR at line 1:
ORA-00001: unique constraint (SYSADM.U_A) violated
05:41:15 sql>insert into a values (1,3);
1 row created.
Elapsed: 00:00:00.00Anand
Edited by: Anand... on Nov 5, 2009 5:41 AM

Similar Messages

  • Question about UNIQUE INDEX

    Given a table with 2 columns. They are not setup as UNIQUE.
    TABLE_A (
    column1 NUMBER NOT NULL,
    column2 NUMBER
    Then, a UNIQUE INDEX is created for both of the columns
    CREATE UNIQUE INDEX XX.TABLEA_U ON TABLE_A
    (column1, column2)
    My question is does the above UNIQUE INDEX somehow act as a UNIQUE Constraint to "column1"?
    Thanks in Advance

    It acts as a unique constraint on both the columns.If duplicate row is inserted you will get error like
    05:40:30 sql>create unique index u_a on a (column1,column2);
    05:41:07 sql>insert into a values (1,2);
    1 row created.
    Elapsed: 00:00:00.00
    05:41:12 sql>insert into a values (1,2);
    insert into a values (1,2)
    ERROR at line 1:
    ORA-00001: unique constraint (SYSADM.U_A) violated
    05:41:15 sql>insert into a values (1,3);
    1 row created.
    Elapsed: 00:00:00.00Anand
    Edited by: Anand... on Nov 5, 2009 5:41 AM

  • Question about Unique Table Columns - How to Handle Alerts

    I have a table with a unique column, and I want to provide an error alert when a user tries to insert a record in which there is another record that already has the same value for that column.
    I tried just relying on the table constraint in the DB, but I just get a "cannot insert record" message on the form run-time.
    I put a query in the PRE-INSERT trigger to query and see if that value exists in another record and display the alert there, but my concern is that a record could be inserted by another user after my check query runs. In that case, I will still just get the "cannot insert record" message.
    What is a good way that I can give an error alert AND assure that another record is not being inserted in the mean time?
    Thanks,
    Kurz

    There is NO way you can absolutely trap all situations by checking in the when-validate triggers.
    Your user could even try to insert the same duplicate value in two rows at the same time.
    Or another user could commit at the same time as the first.
    The ONLY way to handle those errors is to trap for the error in the On-Error trigger, which fires
    when Forms returns the FRM-40508 or FRM-40509 code. Here is the standard code we have settled on here:
    -- On-Error form-level trigger                                       --*
    DECLARE
      Err_Code NUMBER(5)     := ERROR_CODE;
      Msg      VARCHAR2(150)
              := SUBSTR('   '||ERROR_TYPE||'-'||TO_CHAR(ERR_Code)||': '
                                         ||ERROR_TEXT,1,150);
      DBMS_TXT VARCHAR2(200);
    BEGIN
      -- 40508=Unable to insert rec.  40509=Unable to update rec.
      IF Err_Code IN(40508,40509) THEN
        DBMS_TXT := SUBSTR(DBMS_ERROR_TEXT,1,200);
        IF  DBMS_TXT like '%unique constraint%'
        AND DBMS_TXT like '%I_PK_ASGTABLE%'  THEN
          U73_ERR_TIMER('ASG.RESIDENCE_CODE');
          Message('   5011  DUPLICATE RESIDENCE CODE FOUND');
          Raise Form_trigger_failure;
        END IF;
      END IF;
      -- This handles all other on-error messages:
      Message(Msg);
      Raise Form_trigger_failure;
    END;U73_ERR_TIMER just assures that focus gets placed on the correct item, and sets its color red.

  • Some questions about Muse

    First of all, I would like to say that I am very impressed with how well Muse works and how easy it was to create a website that satisfies me. Before I started a daily updated website I thought I would encounter many problems I will not be able to solve. I have only had a few minor issues which I would like to share with you.
    The most problems I have with a horizontal layouts (http://www.leftlane.pl/sty14/dig-t-r-3-cylindrowy-silnik-nissana-o-wadze-40-kg-i-mocy-400- km.html). Marking and copying of a text is possible only on the last (top) layer of a document. The same situation is with widgets or anything connected with rollover state - it does not work. In the above example it would be perfect to use a composition/tooltip widget on the first page. Unfortunately, you cannot even move the cursor into it.
    It would be helpful to have an option of rolling a mouse to an anchor (like in here http://www.play.pl/super-smartfony/lg-nexus-5.html and here http://www.thepetedesign.com/demos/onepage_scroll_demo.html).  I mean any action of a mouse wheel would make a move to another anchor/screen. It would make navigation of my site very easy.
    Is it possible to create a widget with a function next anchor/previous anchor? Currently, in the menu every button must be connected to a different anchor for the menu to be functional.
    A question about Adobe Muse. Is it possible to create panels in different columns? It would make it easier to go through all the sophisticated program functions.
    The hits from Facebook have sometimes very long links, eg.
    (http://www.leftlane.pl/sty14/mclaren-p1-nowy-krol-nurburgring.html?fb_action_ids=143235557 3667782&fb_action_types=og.likes&fb_source=aggregation&fb_aggregation_id=288381481237582). If such a link is activated, the anchors in the menu do not work on any page. I mean the backlight of an active state, which helps the user to find out where on page they currently are. The problem also occurs when in the name of a html file polish fonts exist. And sometimes the dots does not work without any reason, mostly in the main page, sometimes in the cooperation page either (http://www.leftlane.pl/wspolpraca/). In the first case (on main page), I do not know why. I have checked if they did not drop into a state button by accident,  moved them among the layers, numbered them from scratch and it did not help. In the cooperation page, the first anchor does not work if it is in Y axle set at 0. If I move it right direction- everything is ok.
    The text frame with background fill does not change text color in overlay state (http://www.leftlane.pl/sty14/nowe-mini-krolestwo-silnikow-3-cylindrowych.html). I mean a source button at the beginning of every text. I would like a dark text and a light layer in a rollover, but  the text after export and moving cursor into it does not change color for some reason.
    I was not sure whether to keep everything (whole website) in one Muse file (but I may be mistaken?). I have decided to divide it into months. Everyone is in a different Muse file. If something goes wrong, I will not have any trouble with an upload of a whole site, which is going to get bigger and bigger.
    The problem is that every file has two master pages. Everything works well up to the moment when I realize how many times I have to make changes in upper menu when I need to add something there. I have already 5 files, every with 2 masters. Is there any way to solve this problem? Maybe something to do with Business Catalyst, where I could connect a menu to every subpage independently, deleting it from Muse file? Doing so I would be able to edit it everywhere from one place. It would make my work much easier, but I have no idea jendak how to do it.
    The comments Disqus do not load, especially at horizontal layouts  (http://www.leftlane.pl/sty14/2014-infiniti-q50-eau-rouge-concept.html). I have exchanged some mails and screenshots with Disqus help. I have sent them a screenshot where the comments are not loaded, because they almost never load. They have replied that it works at their place even with attached screenshot. I have a hard time to discuss it, because it does not work with me and with my friends either. Maybe you could fix it? I would not like to end up with awful facebook comments ;). The problem is with Firefox on PC and Mac. Chrome, Safari and Opera work ok.
    YouTube movie level layouts do not work well with IE11 and Safari 7 (http://www.leftlane.pl/sty14/wypadki-drogowe--004.html). The background should roll left, but in the above mentioned browsers it jumps up. Moreover the scrolling with menu dots is not fluent on Firefox, but I guess it is due to Firefox issues? The same layout but in vertical version rolls fluently in Firefox (http://www.leftlane.pl/sty14/polskie-wypadki--005.html).
    Now, viewing the website on new smartphones and tablets. I know it is not a mobile/tablet layout, but I tried to make it possible to be used on mobile hardware with HD (1280) display. I mean most of all horizontal layouts (http://www.leftlane.pl/sty14/2015-hyundai-genesis.html), where If we want to roll left, we need to roll down. Is there a way to make it possible to move the finger the direction in which the layout goes?
    On Android phones (Nexus 4, Android 4.4.2, Chrome 32) the fade away background effect does not work, although I have spent a lot of time over it (http://www.leftlane.pl/lut14/koniec-produkcji-elektrycznego-renault-fluence-ze!.html). It is ok on PC, but on the phone it does not look good. A whole picture moves from a lower layer instead of an edge which spoils everything.
    This layout does not look good on Android (http://www.leftlane.pl/sty14/nowe-mini-krolestwo-silnikow-3-cylindrowych.html#a07). The background does not fill the whole width of a page. There are also problems with a photo gallery, where full screen pictures should fill more of a screen.
    Is it possible to make an option of  scroll effects/motions for a fullscreen slideshow widget thumbnails (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a06)? It would help me with designing layouts. Currently, it can go from a bottom of a page at x1 speed or emerge (like in this layout) by changing opacity. Something more will be needed, I suppose.
    Sometimes the pictures from gallery (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a06 download very slowly. The website is hosted at Business Catalyst. I cannot state when exactly it happens, most of the time it works ok.
    I really like layouts like this (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a03). On the top is a description and a main text, and the picture is a filled object with a hold set at the bottom edge. That is why there is a nice effect of a filling a whole screen- nevertheless the resolution that is set. It works perfect on PC, but on Android the picture goes beyond the screen. You can do something about it?
    In horizontal layouts (http://www.leftlane.pl/sty14/dig-t-r-3-cylindrowy-silnik-nissana-o-wadze-40-kg-i-mocy-400- km.html) holding of a filling object does not work. Everything is always held to upper edge of a screen regardless the settings. Possibility of holding the picture to the bottom edge or center would make my work much easier.
    According to UE regulations we have to inform about the cookies. I do not know how to do it in Muse. I mean, when the message shows up one time and is accepted, there would be no need to show it again and again during another visit on the website. Is there any way to do it? Is there any widget for it maybe?
    The YouTube widget sometimes changes size just like that. It is so when the miniature of the movie does not load, and the widget is set to stroke (in our case 4 pixels, rounded to 1 pixel). As I remember ( in case of a load error) it extends for 8 pixels wide.
    Last but not least - we use the cheapest hosting plan in Business Catalyst. The monthly bandwidth is enough, although we have a lot of pictures and we worried about it at first. Yet we are running out of the disk storage very quickly. We have used more than a half of a 1 GB after a month. We do not want to change BC for a different one, because we like the way it is connected with Muse. But we do not want to buy the most expensive package - but only this one has more disk space. We do not need any other of these functions and it would devastate our budget. Do we have any other option?
    I’m using Adobe Muse 7.2 on OS X 10.9.1.
    and I'm sending Muse file to <[email protected]>

    Unfortunatley, there is no way to get a code view in Muse. I know quite a few people requested it in the previous forum, but not really sure where that ended up. Also, you may not want to bring the html into DW unless you only have 1 or 2 small changes 2 make. Two reasons. First, it isnt backwards compatible, so if you are planning on updating that site in Muse, you will need to make those changes in DW everytime you update. Second, by all accounts the HTML that Muse puts out is not pretty or easy to work with. Unlike you, I am code averse, but there was a lenghty discussion on the previous forum on this topic. I know they were striving to make it better with every release, just not sure where it is at this point.
    Dont think I am reading that second question right, but there was a ton of info on that old site. You may want to take a look there, people posted a ton of great unique solutions, so it worth a look.
    Here is the link to the old forums- http://support.muse.adobe.com/muse

  • I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher

    I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher #1 iPad to its AppleTV without effecting/projecting onto the adjacent teachers #2 classroom AppleTV?

    Not as such.
    Give the AppleTV units unique names and also enable Airplay password in settings with unique passwords for each teacher.
    AC

  • Question about the chain step name in DEFINE_CHAIN_STEP

    I have questions about the chain step name in DEFINE_CHAIN_STEP:
    1. Can the step name be a number (e.g. "8")?
    2. Should the step name be unique within a chain or across all chains?
    I am having this exception:
    ORA-25448: rule DMUSER.RULE_6_3707 has errors
    ORA-22806: not an object or REF
    After I changed the step names (in DEFINE_CHAIN_STEP), the chain seems to run fine.
    Thanks,
    Denny

    The reason I asked about the step name is to confirm it can handle numbers (it looks it can handle it from the doc).
    Why I changed the step names say from "11" to "21", the error goes away, that puzzled me. Because the way I defined steps and the rules for the steps were exactly the same. Just changing the step names made the error goes away?!
    Thanks.

  • Three questions about the creation of secondary indexes in ODS design mode

    1. When we right click the Indexes folder in ODS design to select Create to create the Index folder 010, a small window pops up with a check box called "Unique", do we have to check this checkbox to create folder 010?
    2. If we would like to include 3 InfoObjects into the secondary indexes, then how many folders we need to create? Need to create 3 folders like 010, 020, and 030 and place the 3 InfoObj. into the 3 folder respectively or create only one folder 010 and place all the 3 InfoObj. into this one folder 010?
    3. In SAP documentation titled "BW Performance Tuning" about the Indices, it says "If the (uncompressed) F fact table is small, it is usually faster to drop the secondary (bitmap) indices before the load and build them up after the load"
    Someone here says secondary index is only for ODS other than for cubes, but from the above statement, F fact table is related to cubes, then how to explain it? Also the above statement is talking above the variant in process chain that when you bring in a variant to load data to cube, then the drop index and generate index variants will be automatically created, does it refer to this? And what's bitmap index?
    Thanks in advance and we will continue to give you reward points!

    Hi Kevin,
    Cube has Secondary index's. The index's that we find in the Manage of the Cube are the Secondary Index's. Please check the following link for more information.
    http://help.sap.com/saphelp_erp2004/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/frameset.htm
    Also, to know about Unique indexes, use the following link
    http://help.sap.com/saphelp_erp2004/helpdata/en/9b/c743f5b40711d194f900a0c929b3c3/frameset.htm
    "The indexes displayed are the secondary indexes of the F and E fact tables for the InfoCube. The primary indexes and those defined by the user are not displayed. " (SAP help).
    This should answer your questions.
    Regards,
    Praveen.

  • 3 questions about the evalution license ?

    Hi - I have some questions about the Weblogic Server Eval license.
    Before I start let me just say I'm not trying to rip BEA off, I just
    want to know what's possible.
    1. Firstly what happens after the 30 days does the server just not
    work or only work in a restricted form ? If restricted, how so ?
    2. I read that the eval edition will only access 3 unique IP
    addresses. I intend to have WL running on a RedHat linux box whilst
    the pages are served by IIS on a W2K box (both machines are on our
    internal LAN). Am I going to be able to do this with the eval license
    ? I'm not quite sure what the 3 IP addresses refer to ...
    3. Do I need anything super-strong in the way of a Linux box to run
    this on ? I've got an old Pentium with 32Mb of RAM in it. I can't see
    a "minimum spec" on the BEA site. Bear in mind it's not to do any
    "real" work just to give the thing a run around the block ?
    4. When the Eval license is dead what's the minimum amount a small s/w
    house would pay for a licence to develop under (US (or anywhere)
    prices will do I just want a ballpark).
    Sorry that was 4 questions ;-). I'd appreciate any information you
    have to share.
    Thanks
    Richard Shea.

    1)The server won't start if the license expires.
    2)The 3 unique IP'S refer to the number of clients that can access the
    server. It means that WLS will server requests coming from 3 different
    ip's at most. A request coming froma 4th client with a different ip will
    be rejected.
    3)I guess 32 MB's is relatively less The default scripts always use 64 MB
    exclusively for the JVM . Having 32mb RAM means that a part of it will be
    used by t he Operating System and other Applications. You might experience
    OutOfmemory errors and slow performance
    4)email [email protected] and they should be able to handle this
    Yeshwant
    Richard Shea wrote:
    Hi - I have some questions about the Weblogic Server Eval license.
    Before I start let me just say I'm not trying to rip BEA off, I just
    want to know what's possible.
    1. Firstly what happens after the 30 days does the server just not
    work or only work in a restricted form ? If restricted, how so ?
    2. I read that the eval edition will only access 3 unique IP
    addresses. I intend to have WL running on a RedHat linux box whilst
    the pages are served by IIS on a W2K box (both machines are on our
    internal LAN). Am I going to be able to do this with the eval license
    ? I'm not quite sure what the 3 IP addresses refer to ...
    3. Do I need anything super-strong in the way of a Linux box to run
    this on ? I've got an old Pentium with 32Mb of RAM in it. I can't see
    a "minimum spec" on the BEA site. Bear in mind it's not to do any
    "real" work just to give the thing a run around the block ?
    4. When the Eval license is dead what's the minimum amount a small s/w
    house would pay for a licence to develop under (US (or anywhere)
    prices will do I just want a ballpark).
    Sorry that was 4 questions ;-). I'd appreciate any information you
    have to share.
    Thanks
    Richard Shea.

  • A question about foreign key to multiple tables

    Hello everybody,
    I have a question about creating foreign key and I would appreciate if you could kindly give me a hand. Here are my tables:
    CREATE TABLE TEAM1(team_id VARCHAR2(20), project_id VARCHAR2(20));
    ALTER TABLE TEAM1 ADD CONSTRAINT PK_TEAM1 PRIMARY KEY(team_id);
    CREATE TABLE TEAM2(team_id VARCHAR2(20), project_id VARCHAR2(20));
    ALTER TABLE TEAM2 ADD CONSTRAINT PK_TEAM2 PRIMARY KEY(team_id);although the structure of both the tables is exactly the same, the values (in particular team_id) in both tables are different.
    Also I have another table named AGENT
    CREATE TABLE AGENT(agent_id VARCHAR2(20), team_id VARCHAR2(20));
    ALTER TABLE AGENT ADD CONSTRAINT PK_AGENT PRIMARY KEY(agent_id)Now the problem is that the column team_id in AGENT table is actually a foreign key, but the value can be in either TEAM1 or TEAM2. As far as I know a foreign key points only to one table.
    How can I deal with this problem? Whenever there is an INSERT or UPDATE I have to make sure that the value of the column "team_id" in the table "AGENT" is a valid value either in "TEAM1" or "TEAM2"
    Thanks in advance,
    Kind Regards,
    Dariyoosh

    Do you have the ability to change the data model? If so a more appropriate structure may be something like this:
    CREATE TABLE TEAM(team_id VARCHAR2(20), team_name VARCHAR2(20));
    ALTER TABLE TEAM ADD CONSTRAINT PK_TEAM PRIMARY KEY(team_id);
    ALTER TABLE TEAM ADD CONSTRAINT UK_TEAM UNIQUE (team_name);
    CREATE TABLE TEAM_PROJECT(team_id VARCHAR2(20), project_id VARCHAR2(20));
    ALTER TABLE TEAM ADD CONSTRAINT PK_TEAM_PROJECT PRIMARY KEY(team_id, project_id);
    ALTER TABLE AGENT ADD CONSTRAINT FK_TEAM_PROJECT1 FOREIGN KEY (team_id) REFERENCES TEAM(team_id);
    CREATE TABLE AGENT(agent_id VARCHAR2(20), team_id VARCHAR2(20));
    ALTER TABLE AGENT ADD CONSTRAINT PK_AGENT PRIMARY KEY(agent_id);
    ALTER TABLE AGENT ADD CONSTRAINT FK_TEAM FOREIGN KEY (team_id) REFERENCES TEAM(team_id);Edited by: Centinul on Jun 25, 2010 10:50 AM

  • Question about searching

    Hi all,
    I'm considering Oracle BDBJE for a project that stores visited url's (data) based on a key of ip-address (4 bytes) combined with a date (long) to make the keys unique.
    If want to search on date (ignore ip) do I have to make a secondary database that has the date of the visited url's as primary index?
    Does a method like Cursor.getSearchKeyRange, if supplied with partial key, always search a the beginning of the key? Or could I use it to search for a date by only supplying the date-part of the key? Prop. in this case the bytes for the date will be mistaken for the bytes of the ip-address that comes first in the key.
    Thanks for any help.
    regards,
    Jeroen

    Hi Jeroen,
    I'm not sure I have all of your data model yet, but I think you've given us enough for me to say you should likely try one or possibly two secondary databases.
    If you have not already done so you should review the documentation on Secondary Indexes as found here:
    http://www.oracle.com/technology/documentation/berkeley-db/je/GettingStartedGuide/indexes.html
    Inserting/Modifying records is faster without using a secondary index. But the queries that you have identified would perform better with secondary indexes. But you should experiment with a few different approaches and compare that with your performance goals.
    Also, if you have not already thought about this, I would consider using DPL to implement this, especially since you will be evaluating alternative database designs. You will find that the implementation time is faster and you can also make changes quickly.
    http://www.oracle.com/technology/documentation/berkeley-db/je/PersistenceAPI/BerkeleyDB-JE-Persistence-GSG.pdf
    You know your data best, but based on the info you provided here are my thoughts/alternatives:
    Primary Database key = IP/Date or Maybe Date/IP is better if the Secondary for IP address exists
    data = URL plus other data not sure what
    Secondary Database Key = URL (I left out date because you said it is not likely that the same URL will exist for multiple dates).
    Possible Secondary Database Key = IP address (Which URL's were visited by IP X).
    Again, I think you may want to try out something like this a model your inserts and also your query performance. Feel free to post further questions about any results you are getting as you move forward.
    Also, if you have not already seen this I would keep this URL handy and consult with it before you post:
    http://www.oracle.com/technology/products/berkeley-db/faq/je_faq.html
    I hope this helps!
    Ron

  • Some basic questions about rmi registry  context  "bind" and "lookup"

    We have more processing to do than can be accomplished with a single computer. To solve the problem I've implemented a distributed computing solution using RMI. (The first time I saw RMI was about 2 weeks ago, so please bear with me!)
    The implementation is a proof of concept not a fully fleshed out system. I have one "Workunit Distributor" computer and any number of "Data Processor" computers all on the same lan segment. "Workunit Distributor" and "Data Processor" computers are both RMI client and server to each other. The "Data Processor" computers are given the ip address and name of the "Data Distributor" on the commandline when they start. They communicate their willingness to receive and process a workunit to the ""Workunit Distributor" via a RMI call. Work units are sent to available "DataProcessors" and results are eventually returned to the "WorkunitDistributor" (minutes or hours later). The model program works quite well, and appears to be capable of doing the processing we need to get done.
    But now that it seems viable, I've been asked to make it a little more scalable, flexible and self configuring. In particular, instead of one "Workunit Distributor", any number of "Workunit Distributors" should be allowed to show up or disappear from the lan at any time and the system should continue to function. I've worked out a good scheme for how this can be done, but I have a couple of questions about the RMI registry (registries?). I'm trying to keep from implementing some functionality that may already be available as a library or subsystem.
    With my current model design, each computer binds to its own registry with a unique name. For instance:
    CRDataProcessorImpl crdpi = new CRDataProcessorImpl(svr);
    Context crDataProcessingContext = new InitialContext();
    crDataProcessingContext.bind("rmi:"+hostName, crdpi);
    Currently the "Data Processors" get the info they need for a Context lookup() of the one and only "Workunit Distributor" from the commandline. And the info the "Workunit Distributor" needs to do a Context lookup() of a "DataProcessor" is passed to it from each "DataProcessor" via a RMI call.
    But in the newer (yet to be implemented) scheme where any and all "Workunit Distributors" show up and disappear whenever they feel like, the naming bootstrapping scheme described above won't work.
    I can imagine a few ways of solving this problem. For instance, having "Workunit Distributors" multicast their contact information on the lan and have a worker thread on each "Data Processor" keep track of the naming information that was multicast. Another alternative (more organized, but more complex) might be to have a dedicated host with a "well known" address and port that "Workunit Distributors" and "Data Processors" could all go to, to register or look up at an application level. Sort of a "domain name service" for RMI. But both these schemes look like a lot of work to implement , debug and maintain.
    The BEST thing would be if there was one plain vanilla RMI registry that was usable by all RMI enabled computers instead of having each computer have its own local name registry. In volume 2 of the Core Java2 book it says that every registry must be local. I'm only hoping there's been progress since the book was published and now a central rmi registry is available.
    If you have any ideas about this I'd like to hear what you know.
    Thanks in advance for any advice.
    Lenny Wintfeld
    ps - I don't believe web services, as full featured as it is, is a useful alternative. I'm moving 100's (in the future possibly 1000's) of megabytes back an forth for processing.

    The local bind/rebind/unbind restriction is still there and it will always be there.
    I would look at
    (a) RMI/IIOP, where you use COSNaming as a registry, which doesn't have that registriction, and which also has location-independent object identifiers
    (b) Jini.

  • Question about the order to creating Account, Contact, Contact Role

    Hi, my friends,
    I have some questions about the order of creating Account, Contact, Contact Role, etc in Web Service 1.0. I could create them in the following case:
    1. Insert Contact object and get contactId (now new contact exists in CRMOD)
    2. Insert Account object with Contact Role child associated with contactId
    My questions are:
    1. Do we have the following order? Insert new Account with new Contact child and Contact Role child (Contact is new and does not exist in CRMOD).
    2. Looks like system need accountId, contactId, etc to make the objects relationship. Is there other field having the same function?
    Thanks
    Ray

    Hi Ray,
    In response to your questions:
    1. Do we have the following order? Insert new Account with new Contact child and Contact Role child (Contact is new and does not exist in CRMOD).No. Both the Account and Contact must already exist. The Role value is an attribute on the Account Contact relationship, this relationship must exist in order to assign a role value to it. This is consistent with the behaviour of the UI, when you press the New button on the Contact child applet, you are taken to the Contact New page where you can create a Contact record. Once you save, the relationship is created but you cannot assign a role value unless you click the Edit Roles link next to the new Contact.
    2. Looks like system need accountId, contactId, etc to make the objects relationship. Is there other field having the same function?Correct, the system needs to know which Account/Contact pair is being assigned a role value. To do this the Account and Contact values must be uniquely identified using the Id values for each.
    I hope this helps.
    Thanks,
    Sean
    Edited by: Sean Duffy on Jan 25, 2010 10:11 AM

  • Questions about count

    I have a few questions about count
    a) Is there any difference between select count(*) and select
    count)1)
    b) If I have created index for the table, will select count use
    the index for counting?

    If you don't analyze your tables and indexes and compute
    statistics, the indexes will not be used.
    If you have analyzed your tables and indexes and computed
    statistics and the index is on a not null column, the index will
    be used for COUNT(*), COUNT(constant) such as COUNT(1) or COUNT
    (0) or COUNT('x'), and for COUNT(not null column) where the not
    null column can be the column that the index was created on or
    any other column that has a not null constraint.
    If the index is on a column that can contain null values, then
    the index will not be used for the COUNT functions listed above.
    Much to my surprise, bitmap indexes are not used for counting,
    whether they are created on columns with not null constraints or
    not. I seem to recall that bitmap indexes are recommended in
    situations of low cardinality, so perhaps they are inappropriate
    for counting.
    The following tests should demonstrate all of the above: (I
    found that the original was too big, so I had to delete some of
    it.)
    SQL> CREATE TABLE test
    2 AS
    3 SELECT *
    4 FROM emp
    5 /
    Table created.
    SQL> ALTER TABLE test
    2 MODIFY (deptno NOT NULL)
    3 /
    Table altered.
    SQL> DESC test
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NOT NULL NUMBER(2)
    SQL> CREATE INDEX test_empno_idx
    2 ON test (empno)
    3 /
    Index created.
    SQL> CREATE INDEX test_ename_idx
    2 ON test (ename)
    3 /
    Index created.
    SQL> SET AUTOTRACE ON
    SQL> SELECT COUNT (*)
    2 FROM test
    3 /
    COUNT
    14
    Execution Plan
    0 SELECT STATEMENT
    Optimizer=CHOOSE
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL)
    OF 'TEST'
    SQL> SELECT COUNT (1)
    2 FROM test
    3 /
    COUNT
    (1)
    14
    Execution Plan
    0 SELECT STATEMENT
    Optimizer=CHOOSE
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL)
    OF 'TEST'
    SQL> SELECT COUNT (empno)
    2 FROM test
    3 /
    COUNT
    (EMPNO)
    14
    Execution Plan
    0 SELECT STATEMENT
    Optimizer=CHOOSE
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL)
    OF 'TEST'
    SQL> SELECT COUNT (ename)
    2 FROM test
    3 /
    COUNT
    (ENAME)
    14
    Execution Plan
    0 SELECT STATEMENT
    Optimizer=CHOOSE
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL)
    OF 'TEST'
    SQL> SELECT COUNT (deptno)
    2 FROM test
    3 /
    COUNT
    (DEPTNO)
    14
    Execution Plan
    0 SELECT STATEMENT
    Optimizer=CHOOSE
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL)
    OF 'TEST'
    SQL> ANALYZE TABLE test
    2 COMPUTE STATISTICS
    3 /
    Table analyzed.
    SQL> ANALYZE INDEX test_empno_idx
    2 COMPUTE STATISTICS
    3 /
    Index analyzed.
    SQL> ANALYZE INDEX test_ename_idx
    2 COMPUTE STATISTICS
    3 /
    Index analyzed.
    SQL> SELECT COUNT (*)
    2 FROM test
    3 /
    COUNT
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 INDEX (FULL SCAN) OF 'TEST_EMPNO_IDX' (NON-UNIQUE)
    (Cost
    =1
    Card=14)
    SQL> SELECT COUNT (1)
    2 FROM test
    3 /
    COUNT
    (1)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 INDEX (FULL SCAN) OF 'TEST_EMPNO_IDX' (NON-UNIQUE)
    (Cost
    =1
    Card=14)
    SQL> SELECT COUNT (empno)
    2 FROM test
    3 /
    COUNT
    (EMPNO)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 INDEX (FULL SCAN) OF 'TEST_EMPNO_IDX' (NON-UNIQUE)
    (Cost
    =1
    Card=14)
    SQL> SELECT COUNT (ename)
    2 FROM test
    3 /
    COUNT
    (ENAME)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1
    Bytes=5)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1 Card=14
    Bytes=70)
    SQL> SELECT COUNT (deptno)
    2 FROM test
    3 /
    COUNT
    (DEPTNO)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 INDEX (FULL SCAN) OF 'TEST_EMPNO_IDX' (NON-UNIQUE)
    (Cost
    =1
    Card=14)
    SQL> DROP INDEX test_empno_idx
    2 /
    Index dropped.
    SQL> SELECT COUNT (*)
    2 FROM test
    3 /
    COUNT
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1
    Card=14)
    SQL> SELECT COUNT (1)
    2 FROM test
    3 /
    COUNT
    (1)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1
    Card=14)
    SQL> SELECT COUNT (empno)
    2 FROM test
    3 /
    COUNT
    (EMPNO)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1
    Card=14)
    SQL> SELECT COUNT (ename)
    2 FROM test
    3 /
    COUNT
    (ENAME)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1
    Bytes=5)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1 Card=14
    Bytes=70)
    SQL> SELECT COUNT (deptno)
    2 FROM test
    3 /
    COUNT
    (DEPTNO)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1
    Card=14)
    SQL> DROP INDEX test_ename_idx
    2 /
    Index dropped.
    SQL> CREATE BITMAP INDEX test_empno_bm_idx
    2 ON test (empno)
    3 /
    Index created.
    SQL> CREATE BITMAP INDEX test_ename_bm_idx
    2 ON test (ename)
    3 /
    Index created.
    SQL> ANALYZE INDEX test_empno_bm_idx
    2 COMPUTE STATISTICS
    3 /
    Index analyzed.
    SQL> ANALYZE INDEX test_ename_bm_idx
    2 COMPUTE STATISTICS
    3 /
    Index analyzed.
    SQL> SELECT COUNT (*)
    2 FROM test
    3 /
    COUNT
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1
    Card=14)
    SQL> SELECT COUNT (1)
    2 FROM test
    3 /
    COUNT
    (1)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1
    Card=14)
    SQL> SELECT COUNT (empno)
    2 FROM test
    3 /
    COUNT
    (EMPNO)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1
    Card=14)
    SQL> SELECT COUNT (ename)
    2 FROM test
    3 /
    COUNT
    (ENAME)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1
    Bytes=5)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1 Card=14
    Bytes=70)
    SQL> SELECT COUNT (deptno)
    2 FROM test
    3 /
    COUNT
    (DEPTNO)
    14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1
    Card=1)
    1 0 SORT
    (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'TEST' (Cost=1
    Card=14)

  • Two little questions about ROWID

    Hello friends at www.oracle.com ,
    as we know, each time we insert a new line, Oracle creates an unique ROWID for that line. I have 2 questions about ROWID:
    1. Is there a way for me to obtain ROWID value at the moment of insertion, other than doing a SELECT rowid FROM (table) WHERE (primary key inserted values) to obtain the ROWID that was generated for that line?
    2. If, for any reason, we have a so big database that all ROWID possible combinations are over, how would Oracle handle such situation? I believe it's something quite rare to happen but, anyway, there's the possibility as Murphy Laws have taught us :)
    Thanks for all answers, and best regards,
    Franklin Gongalves Jr.

    1. The (quite new) DML RETURNING clause allwos this:
    Eg. insert into bonus values ('Bill', 'work',100, 4) returning rowid into :x
    This works in 8.1.7 and 9.0.1 I don't know about earlier.
    2. A rowid includes the physical address of the data. Before you used all the rowid's, the database wouldn't be able to hold any more data. The limit is big, but not infinite. If you hit it, try going to distributed databases using database links.

  • Several questions about oracle ASM in 11gR2.

    Hi, all.
    The db is 11.2.0.3 on a linux machine.
    I have several questions about oracle ASM functionality.
    1. V$ASM_DISKGROUP.ALLOCATION_UNIT_SIZE is the stripe size in bytes??
    2. V$ASM_DISK.DISK_NUMBER is unique to a physical disk??
    3. if the second question is the case,
    disk_number=0 (a physical disk) has 14 partition on it.
    And each partition belongs to several diskgroups.
    Is ths right??
    with q1 as (
         select /*+ use_hash(b,a) */
              disk_number,b.group_number,b.name,a.path,sum(os_mb) tot_size ,count(*) cnt
         from v$asm_disk a, v$asm_diskgroup b
         where a.group_number=b.group_number
         group by disk_number,b.group_number,b.name,a.path
         order by disk_number,b.group_number,b.name
    select disk_number,group_number,name,path,tot_size,
           sum(tot_size) over (partition by disk_number) disk_size,
           sum(cnt) over (partition by disk_number) parition_cnt_per_disk
      from q1
      order by q1.disk_number,group_number
    DISK_NUMBER     GROUP_NUMBER     NAME     PATH     TOT_SIZE     DISK_SIZE     PARITION_CNT_PER_DISK
    0     1     ARCH     /dev/raw/raw100     53256     454460     14
    0     2     AAAREDO1     /dev/raw/raw111     10240     454460     14
    0     3     AAAREDO2     /dev/raw/raw113     10240     454460     14
    0     4     CRS     /dev/raw/raw83     3000     454460     14
    0     5     BBBDATA1     /dev/raw/raw10     50232     454460     14
    0     6     BBBDATA2     /dev/raw/raw41     50232     454460     14
    0     7     BBBREDO1     /dev/raw/raw1     10240     454460     14
    0     8     BBBREDO2     /dev/raw/raw3     10240     454460     14
    0     9     CCCDATA1     /dev/raw/raw75     76400     454460     14
    0     10     CCCDATA2     /dev/raw/raw165     51300     454460     14
    0     11     CCCREDO1     /dev/raw/raw118     10240     454460     14
    0     12     CCCREDO2     /dev/raw/raw120     10240     454460     14
    0     13     CCCDATA1     /dev/raw/raw125     51300     454460     14
    0     14     BBBDDATA     /dev/raw/raw71     57300     454460     14
    .Thanks in advance..
    Best Regards.
    Edited by: 869578 on 2012. 12. 23 오후 10:05

    1. No. The stripe size always equals 128 KB in any configuration.
    (http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmcon.htm#BABCGDBF)That is not a true statement. Please read the document, the stripe size depends upon what method of striping we using (fine-grained or coarse-grained)
    --from the same oracle document:
    To stripe data, Oracle ASM separates files into stripes and spreads data evenly across all of the disks in a disk group. The fine-grained stripe size always equals 128 KB in any configuration; this provides lower I/O latency for small I/O operations. The coarse-grained stripe size is always equal to the AU size (not the data extent size).
    --are we using fine grained or coarse-grained ? and how to change the striping method (using TEMPLATES)
    http://docs.oracle.com/cd/E11882_01/server.112/e16102/asmfiles.htm#g2223792
    also see following:
    http://oracletechlovers.blogspot.com/2012/06/asm-differences-between-corse-and-fine.html

Maybe you are looking for

  • After 10.4.4, Safari launches, then immediately crashes.

    After downloading 10.4.4, Safari launches every time, but then crashes after only a few seconds. It does this every time. Could Safari be having a problem with the Apple site? (To post this, I'm using an alternate startup disk with OS-X 10.4 and Safa

  • Need invoice numbers for material masters.

    Dear experts, I have a list of approx. 200 PO numbers (not SO numbers) and material masters. I need to find invoice# for each PO#. Could you please help me what is the fastest way to find the invoice# using the data mentioned above? I do not want to

  • Trouble understanding RH customization when linking FM files

    Is there a video that will help with this, particularly creating and customizing a single CSS for use with my work? I also would like to have an idea of the best workflow. Here is what I am doing and some issues: Open RH. Click File > New > Project.

  • I can not cancel a preorder since updating to OS 6

    Since updating to OS 6 I can not delete any preorders on iBooks and the support email that I received from apple support did not help. Does anybody know how to do this with the iPad 2

  • Hide Textbox when buttons are clicked

    Hi all, Im trying to create a form for our customer service reps to make their lives easier. Which is a plus for me. I tried googling and playing with some Validation scripts and nothing seems to work. Here is what im trying to accomplish. There is 3