Unique IDs

Does anyone have a good method for creating integer IDs that are
guaranteed to be unique for a given partition, regardless of how many
tasks are running on the partition, without a network hit, and will work
on both client and server partitions?
Any ideas would be appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chris Johnson
BORN Information Services Group
Forte National Practice
http://www.born.com
Mailto:[email protected]
612-404-4409
612-404-4440 (fax)

First, I think you'll need to use DSEE 7, as previous versions don't enforce any syntax checking. That is, previous version won't complain when you import some data that doesn't comply with the schema. You'll be able to have strings values for integer attributes with those versions.
Then, you need to use a case sensitive attribute as RDN. Since uid is not case sensitive, DSEE 7 treats uid values without distinction between lower and upper cases.
Another option that I would not recommend would be to change your schema and modify the standard uid attribute definition to make it case sensitive. Rather consider creating a brand new attribute of your own .

Similar Messages

  • Cannot insert more than 1 WSUS update source with different unique ids

    Hello LnG
    I am aware that are a whole bunch of forum threads on this error however little bit of additional help would be of great help, as I have nearly tracked this 'pain' down.
    Our environment: SCCM 2007 R3
    1 Central
    15 Primaries and a whole bunch of secondaries
    Single WSUS server
    OK, so we have just taken handover of this new account and still getting a hang of the creek and corners in the environment. We have about 1000 machines sitting in "Failed to download updates" state.  Error
    = 0x80040694
    WUAHandler.log:
    Its a WSUS Update Source type ({A2762CA9-9739-4260-9C3A-DC4B36122E16}), adding it
    Cannot insert more than 1 WSUS update source with different unique ids
    Failed to Add Update Source for WUAgent of type (2) and id ({A2762CA9-9739-4260-9C3A-DC4B36122E16}). Error = 0x80040694.
    Its a WSUS Update Source type ({BCB9D60B-2668-459B-BFFD-6DDD11AADC53}), adding it
    Existing WUA Managed server was already set (http://WSUSServername:8530), skipping Group Policy registration.
    Added Update Source ({BCB9D60B-2668-459B-BFFD-6DDD11AADC53}) of content type: 2
    WUAHandler
    Async searching of updates using WUAgent started.
    Checked the
    CI_UpdateSources table and found 2 Update sources  unique ids:
    {BCB9D60B-2668-459B-BFFD-6DDD11AADC53} Date Created 2011-01-11 03:47:52.000/Date Modified 2011-01-11 03:47:52.000
    and
    {A2762CA9-9739-4260-9C3A-DC4B36122E16} Date Created 2014-07-09 02:48:46.000 / Date Modified 2014-07-09 02:48:46.000
    My questions:
    Can I rely on the last modified/created date for inactive update source and delete it off the database? in this case can I delete {BCB9D60B-2668-459B-BFFD-6DDD11AADC53}?
    When i browsed to the registry location on the Central Server
    HKLM\Software\Wow6432Node\Microsoft\SMS\Components\SMS_WSUS_SYNC_MANAGER i saw the update source as {BCB9D60B-2668-459B-BFFD-6DDD11AADC53}.
    Does it imply that a stale record?
    Any help/guidance will be much appreciated :)

    Well!! My wsyncmgr.log  says  this: 
    Set content version of update source {BCB9D60B-2668-459B-BFFD-6DDD11AADC53} for site XX to 18
    Set content version of update source {BCB9D60B-2668-459B-BFFD-6DDD11AADC53} for site XX1 to 18
    Set content version of update source {BCB9D60B-2668-459B-BFFD-6DDD11AADC53} for site XX2 to 18
    Set content version of update source {BCB9D60B-2668-459B-BFFD-6DDD11AADC53} for site XX3 to 18
    Set content version of update source {BCB9D60B-2668-459B-BFFD-6DDD11AADC53} for site XX4 to 18
    Set content version of update source {BCB9D60B-2668-459B-BFFD-6DDD11AADC53} for site XX5to 1
    Set content version of update source {BCB9D60B-2668-459B-BFFD-6DDD11AADC53} for site XX6 to 18
    So, this is an active update source! ?? I cannnot uninstall and reinstall SUP currently. Any thoughts?? Any ody?

  • Off topic: Database Unique IDs

    Hi folks,
    This is a little off-topic, but I figure that there may be other people out
    there whose Forte development would benefit from the discussion.
    I am currently building a development framework for our new software
    product. As part of that framework I'd like to include the facility for
    generating unique, user-invisible, integer database IDs.
    Now there is some doubt here that this is actually required and that the
    primary key should be whatever the programmer wants it to be, including
    multiple columns if necessary.
    I was wondering if anyone can give us some rules-of-thumb regarding
    the use of unique IDs as primary keys. Or if someone can point me to
    some on-line resources (or even a good book) that can guide us in this
    area.
    The arguments I have given for using integer IDs are:
    - Single, integer columns should be faster
    - User invisible integer ID allows editing/duplicates of all user-visible fields
    - Single, integer foreign keys would reduce storage requirements
    - Standardising on integer IDs would allow generic functionality built into
    framework
    - More object-oriented as objects have "built-in" unique identity
    I would appreciate any comments people have. We can take this
    discussion off-list if that is preferable.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email: [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10 years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi folks,
    This is a little off-topic, but I figure that there may be other people out
    there whose Forte development would benefit from the discussion.
    I am currently building a development framework for our new software
    product. As part of that framework I'd like to include the facility for
    generating unique, user-invisible, integer database IDs.
    Now there is some doubt here that this is actually required and that the
    primary key should be whatever the programmer wants it to be, including
    multiple columns if necessary.
    I was wondering if anyone can give us some rules-of-thumb regarding
    the use of unique IDs as primary keys. Or if someone can point me to
    some on-line resources (or even a good book) that can guide us in this
    area.
    The arguments I have given for using integer IDs are:
    - Single, integer columns should be faster
    - User invisible integer ID allows editing/duplicates of all user-visible fields
    - Single, integer foreign keys would reduce storage requirements
    - Standardising on integer IDs would allow generic functionality built into
    framework
    - More object-oriented as objects have "built-in" unique identity
    I would appreciate any comments people have. We can take this
    discussion off-list if that is preferable.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email: [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10 years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • EJB Unique Ids - Weblogic & Ms SQL server -

    Hello,
    I know that there is the possiblity to use auto-generate key with Weblogic&Ms SQL server.
    But my problem is that I would like not to use this possibility (because I have some constraints for the primary key: for my java program the key should be between 5000 & 10000 and between 70000 and 80000...).
    So I would like to use some methods getMaxId() to have the latest available id.
    But how can we be sure not to give the SAME id to 2 requests at the same time (before creating the Entity bean) ? Obviously the insert of 2 similar ids will generate errors and I do not want to have those problems (as the application will be available for several persons at the same time).
    Thanks for any way to solve this problem !!
    Best Regards,
    P.S: before using EJB/Java, we were using HOLDLOCK in a SQL stored procedure to get the max id and then insert the new line being sure that we have an unique id.

    Hello,
    I personally don't like the approach you are using, however these are your requirements.
    If you are familiar with stored procedures why don't you try calling a stored procedure from a method of a session bean? Then have that bean return an ID.
    Maybe I can help you more if you tell me more about the implementation (e.g. BMP or CMP; you need to use those primary keys in your application or not).
    I hope this helps.
    Nikola

  • How to generate unique IDs for a metadata field

    Hi,
    We have a requirement to generate a unique ID for a metadata field. Does anybody know how this can be achieved? Ideally I would want to have a database sequence and specify the metadata field to get value from this database sequence, similar to how Content ID is generated.
    Any help is appreciated. Thank you in advance.
    Regards,
    Tim

    Look into the Counters table. You should be able to create a component install filter to add in your field to the Counters table.
    You could then create some Java code to fetch the next value from the Counters database for your field (and increment the value).
    Jonathan
    http://redstonecontentsolutions.com
    http://corecontentonly.com

  • Struts, beans, and unique IDs

    Hi,
    I'm trying to capture info from a web form using Struts, and I have a ActionForm (bean?) for that. When submitted (or instantiated - I don't know the details of how or when exactly it's being created), I want that bean to somehow get assigned a uniqueID so I could locate it easily in a database later.
    Where and when should I be doing this? Is it in the action class after the form has been submitted that I should assign ID to the bean (bean.setID(generatedInt); - but that's not good practice, I think), or inside the bean in its constructor? Or maybe there's a simple and clean way Struts can do this?
    And generally, is there good info on how and when the bean is being created by Struts? From Struts docs I got an idea of a bean representing a form through which the data is being submitted. Is this so?

    There are beans and then there are beans. They are used for many purposes.
    Struts ActionForm beans are used to gather together and validate the data from a JSP page (or some other view) and present it to the Action. Those are the beans they were probably talking about in the struts docs.
    Your business logic for the most part should be stored in different beans from these ActionForm beans.
    Database properties don't always correspond directly to all the fields on a form and vice versa. The whole point is that these business beans are your model - they should not in any way be affected by the view.
    On assigning Ids - my approach would be to have it in your business layer, rather than in the action class. That would mean that the beans could be usable outside of struts. Each individual class should be responsible for getting its id - ideally the first time it is saved.
    Just my 2 cents,
    evnafets

  • Unique IDs in Dictionary Project (NW Developer Studio 7.0)

    Hi all,
    I am working with NWDS 7.0 and creating a table in Java Schema with a Dictionary Project.
    What I need is a unique ID field with auto-increment value. How do I create such a field? Is this possible at all? Before we use workarounds such as java.rmi.server.UID, creating tables with Oracle, utilizing stored procedures, etc. we would like to know if this can be achieved with a standard dictionary project.
    Any comments will be appreciated and rewarded.

    Hi,
    if you use entity beans for O/R Mapping and your unique id will be the primary key you could also try and use automatic primary key generation. The documentation can be found here:
    http://help.sap.com/saphelp_nw04s/helpdata/en/b3/b238bfd13a8f408958d70a6989d001/frameset.htm
    However, I think you do not have much influence on how the keys will be generated.
    Another possiblity  if you use entity beans is the Entity Bean Primary Key Generator from Floyd Marinescu:
    http://www.theserverside.com/patterns/thread.tss?thread_id=220
    These solutions both do not rely on any special database requirements.
    Best regards,
    Stefan Brauneis

  • Are PageItem unique ids permanent?

    If I read the id of an InDesign PageItem and get back 12, is it guaranteed to stay as 12 for as long as that object exists, or can it change? Is this documented somewhere that I'm just not seeing?

    Hi Harbs! Thanks for your answer. I perhaps wasn't very clear in my question: are they unique *and* permanent? That is, are they guaranteed to stay the same for the life of the document? I don't see this documented anywhere.

  • Unique IDs- Case sensitive

    In my directory, for user UID is my DN(Distinguished Name). So no one should be able to have the same UID. Yet, if you change the case, the directory still allows it. I cannot find the attribute in the config that prevents this. Any suggestions?

    First, I think you'll need to use DSEE 7, as previous versions don't enforce any syntax checking. That is, previous version won't complain when you import some data that doesn't comply with the schema. You'll be able to have strings values for integer attributes with those versions.
    Then, you need to use a case sensitive attribute as RDN. Since uid is not case sensitive, DSEE 7 treats uid values without distinction between lower and upper cases.
    Another option that I would not recommend would be to change your schema and modify the standard uid attribute definition to make it case sensitive. Rather consider creating a brand new attribute of your own .

  • To get the unique id of the selected row in a JTable as in Database

    Hi,
    After fetching the recodrs from the Database, I have displayed them in a JTable. Though I fetched all the columns from db, I am displying only only 2 columns, say Name and Number neither of which is unique, however I have a unique ID for each record in the db. Now when I select some row in the JTable, I need to know its unique ID (the one which is in the db) which i have not displayed in the JTable.
    Is there any API method that can store the unique ids of a table? Or how can this be done?
    Thanks in Advance.

    Although, if you don't want the Id visible in the table, then you need to remove its TableColumn from the TableColumnModel.
    Then when you want to reference the id you need to use:
    table.getModel.getValueAt(...);

  • How to show a unique Row-ID even if the rows become re-sort

    I would like to have unique-ids for each row to identify the row even though the order of the rows change.

    before you sort you could add a new column and place an incrementing number in each row.  To do this...
    1) create a new column (right click in the column header, one of the letters are the top) and select "Add Column..."  choose whether Before ar After
    Make the first row a header and title the new column something like "Original Sort Order".  Then in the first row of the new column type a "1", and in the second row type "2".  Now select the first and second cells of the new column.
    hover the cursor over the hollow circle at the bottom-right corner of the selection.  The cursor will change to a "+".  Now click, and hold, on the you can fill the pattern down the column as needed.  Now you can always sort by this column to get your original order back.

  • How to generate unique values while initializing values

    I am initializing values in my pl/sql program and want to use a sequence to set my unique ids but it errors out. Below is what I use.
    ie. table_id := table_seq.nextval;
    How can I use my sequence to initialize values or is this possible?

    The method suggested by user605919 will work. However, you don't need to initialize a variable like this. It is better and more performant to do it like the third example below:
    SQL> create table mytable
      2  ( id number(6)
      3  , description varchar2(30)
      4  )
      5  /
    Tabel is aangemaakt.
    SQL> create sequence table_seq start with 1 increment by 1
      2  /
    Reeks is aangemaakt.
    SQL> declare
      2    table_id mytable.id%type := table_seq.nextval;
      3  begin
      4    insert into mytable
      5    ( id
      6    , description
      7    )
      8    values
      9    ( table_id
    10    , 'Some description'
    11    );
    12  end;
    13  /
      table_id mytable.id%type := table_seq.nextval;
    FOUT in regel 2:
    .ORA-06550: line 2, column 41:
    PLS-00357: Table,View Or Sequence reference 'TABLE_SEQ.NEXTVAL' not allowed in this context
    ORA-06550: line 2, column 12:
    PL/SQL: Item ignored
    ORA-06550: line 9, column 5:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 9, column 5:
    PL/SQL: ORA-00904: "TABLE_ID": invalid identifier
    ORA-06550: line 4, column 3:
    PL/SQL: SQL Statement ignored
    SQL> declare
      2    table_id mytable.id%type;
      3  begin
      4    select table_seq.nextval
      5      into table_id
      6      from dual
      7    ;
      8    insert into mytable
      9    ( id
    10    , description
    11    )
    12    values
    13    ( table_id
    14    , 'Some description'
    15    );
    16  end;
    17  /
    PL/SQL-procedure is geslaagd.
    SQL> begin
      2    insert into mytable
      3    ( id
      4    , description
      5    )
      6    values
      7    ( table_seq.nextval
      8    , 'Some description'
      9    );
    10  end;
    11  /
    PL/SQL-procedure is geslaagd.And if you need the id value for some code after the insert, you use the RETURNING clause.
    Regards,
    Rob.

  • Fine Grained Access ERROR on INSERT when generating unique keys

    I'm using VPD/Fine Grained Access Control (FGAC) to implement security on my 9i backend. I created a security policy function that returns the predicate 'owner = USER'; - each of the tables has an additional column titled OWNER which contains the name of the logged-in user. Every time a user inserts a record, a BEFORE INSERT trigger fires (for every row) and inserts the USER name into the OWNER column. This is fairly straightforward and ensures that users can see only their rows. Using the DBMS_RLS.add_policy procedure, I attached the security policy to several tables and made it effective upon SELECT, UPDATE, INSERT, and DELETE statements.
    However, the frontend Java application (custom-made) generates unique IDs (sequences are not used) by selecting max(ID)+1 from the primary key columns of the tables. The problem is that the predicate is appended to the SELECT max(ID)+1 query to limit the max(ID) to only those rows where 'owner = USER'. Therefore, the max(ID) generated is not the largest ID for the entire table, but only the largest among the USER rows.
    So unless that USER happens to have the the largest ID in the whole table (and it has worked then), a primary-key violation error will be returned and the INSERT operation will be aborted.
    How can I allow every USER to select from AND get the absolute largest ID from the PK column without allowing that user to select records that don't belong to him? If I had developed the application, I would have made use of sequences on the back-end to generate unique primary key IDs. Unfortunately, I don't have this option and must work with the application as is.
    NOTE: the front-end Java application understands only the base table names, NOT Views created by me on the server. If the answer to this problem involves views, how can I make use of them on the backend when the front-end code does not recognize them?
    Any help is greatly appreciated!
    Michael

    first you could use default column values, not a trigger, which is more expensive.
    if your apps already assumes full access to table to get max id ( another RT ), this is bad. Current RLS can not really help if you can not change the apps because of this flaw logic ( you can store the maxid anywhere, why scanning the whole table to find it )

  • Your opinion needed - generating unique ID from a URL

    I am currently making a web crawler type program and before rushing straight in and coding something I thought i'd gather a few "expert" opinions so to speak ;)
    A crawler obviously takes a URL, downloads it and saves it in a database somewhere. However I need to keep a record of which URLs have been previously crawled - as not to crawl and recrawl the same URL.
    Ideally I need to make an algorithm which takes a String URL and outputs a unique ID for that URL - no other URL would be assigned the same ID.
    After a while researching I have ran into base64 which could take a URL and output a long String of characters. I have a question here though:
    1. Is base64 always going to output UNIQUE IDs for every URL or is there a slight offchance you could have duplicates?
    However even if base64 worked and it gave me the ID:
    aHR0cDovL3d3dy5qYXZhLmNvbQ==
    For the URL:
    http://www.java.com
    I still have to record it in a database and search for its prescence to determine if the URL has been crawled before.
    So my question is:
    Is there a way to construct a unique NUMERICAL ID for a URL?
    This way, it would be much easier to find the record if all were sorted by their numerical ID number.
    Hope I havent confused you, if I have just tell me!
    Thanks
    -Myles

    I need a numerical representation of a URL as it would reduce the time to search for a URl to check if it had been previously crawled.BUNKUM! Sorry, but it is... you're talking about saving pooftenths of second on each database seek... but if you're web-crawler isn't inherently I/O bound (say what 2 to 5 seconds a page) then who's your ISP? and how much do they charge.
    IE: Your barking up the wrong tree. Just use an MD5's, keep your "current site" in a hashset... for instance if was crawling http://forum.java.sun.com I'd load a hashset from the DB of that domain... crawl within it, and save the whole shebang back to the DB in one hit, delaying any external links until the end.. then load each of those "sites" and crawl and save them, again delaying any external links... and so on until the end of time in all probability.
    And, sorry, you're reinventing the square wheel again... ever heard of jackrabbit?
    http://mail-archives.apache.org/mod_mbox/jackrabbit-commits/200502.mbox/%[email protected]%3E
    (I love google)
    PS: Someone once told me that the internet has a higher probability of surviving a nuclear war than the human race... and if your solar power station also survives then maybe in about a 1,000,000 one cocker-roach might turn to the other cocker-roach and say, "Dad it's finally finished. Can I play Toad Killer 3 now?" ;-)
    keith.

  • Extracting unique identifier for illustrator layers

    Hi All,
    Multiple layers in an illustrator file can have the same name. So the layer name cannot be a unique identifier for layers. Is there a way to extract a unique identifier for layers through scripting? I saw that if the 'Identify Objects by' property (inside Preferences -> Units) is set to XML ID, all layer names, even identical ones are replaced by some unique ids. Can we extract these ids via scripting without manually changing the 'Identify Objects by' property. Basically, extraction of any unique identifier for illustrator layers would serve the purpose. I am really stuck with this and need help urgently. Any help would be highly appreciated.
    Thanks in advance.

    When I found this I noticed it changed the name of the layers in the layers pallet.
    I had not had a chance to test this with code.
    If "use XML ID" is turned on then you are not able to name layers the same thing.
    this in turn would follow through to your script using layer.name
    for existing files you would need to fix names manually or...
    I am sure it would be possible to Script.
    eg. export SVG file and pull the layer ID's from that and rename the document layers accordingly. (may be a little tricky for sublayers, but top level layers should be straight forward)
    Then as long as "use XML ID" is left on the files would not need this run again as you cannot use duplicate layer names.

Maybe you are looking for