{"id":2163,"date":"2012-07-02T14:33:57","date_gmt":"2012-07-02T19:33:57","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=2163"},"modified":"2012-07-02T14:34:48","modified_gmt":"2012-07-02T19:34:48","slug":"atg-primary-key-data-types","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2012\/07\/02\/atg-primary-key-data-types\/","title":{"rendered":"ATG primary key data types"},"content":{"rendered":"<p>Not much today, this is just a place holder as we evaluate conflict resolution schemes for ATG and Golden Gate.  Out of the box, it uses an application based sequence generator (DAS_ID_GENERATOR table).  You can (and are encouraged to) prepend a string, such as the data center location to the application provided ID.  The application fetches a set iof ID&#8217;s and incrementas the counter in DAS_ID_GENERATOR.  I don&#8217;t know if it does a &#8220;SELECT FOR UPDATE&#8221; when it fetches the next range.  If it doesn&#8217;t, and the fetch is done at the same time, it could get the same range on two different applciation servers.<\/p>\n<p>RAC contention could be an issue (monotonically increasing sequences can be problematic in RAC).  Since we will prepend the data center to the string, we shouldn&#8217;t have many conflicts, if any.<\/p>\n<p>ATG primary key data types&#8230;<\/p>\n<pre lang=\"sql\" line=\"1\">\r\nselect count(*),dc.table_name,data_type\r\n  from dba_constraints dc \r\n    inner join dba_cons_columns dcc on dc.constraint_name = dcc.constraint_name \r\n                                   and dc.owner = dcc.owner\r\n    inner join dba_tab_columns dtc on dcc.column_name = dtc.column_name\r\n                                   and dcc.table_name = dtc.table_name\r\n                                   and dcc.owner = dtc.owner                                   \r\n  where dc.owner like 'ATG%'\r\n    and constraint_type = 'P'\r\n    and dc.table_name not like 'BIN$%'\r\n  group by dc.table_name,data_type;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Not much today, this is just a place holder as we evaluate conflict resolution schemes for ATG and Golden Gate. Out of the box, it uses an application based sequence generator (DAS_ID_GENERATOR table). You can (and are encouraged to) prepend&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2012\/07\/02\/atg-primary-key-data-types\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[37,38,19,35],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/2163"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2163"}],"version-history":[{"count":11,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/2163\/revisions"}],"predecessor-version":[{"id":2345,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/2163\/revisions\/2345"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2163"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}