Is there a generic way to get sequence
Hey,
I need a counter that will not initialized when my sever restarted, so i decide to write sequence in the data base for this.
My question is there a generic (for any vendor) way to get next id?
Thank you
If all of the target databases supports transactions then it is possible
1. Create a table that holds sequence number
2. For each operation
....a. Start transaction
....b. Get row - only one exists. Hold unto value.
....c. Increment value
....d. Update row
....e. Commit transaction.
....f. Return value from step b.
3. Use index value in some other expression.
Some databases, with non-ANSI SQL code might allow step 2 to be handled as a single statement, thus no transaction is needed.
The above allows for sequential values.
You can find "guid" algorithms written in java. Those produce non-sequential values.
You can produce your own value that is sequential if you can make assumptions about the enviroment that all of the systems will be running in by combining some or all of the following values.
- datetime
- ip
- process id
- static counter in application
- thread id
Similar Messages
-
Are there any ways to get sequence number other than getting it for each re
are there any ways to get sequence number other than getting it for each record
CACHE is the number of values Oracle stores in memory. So the first call to NEXTVAL Oracle grabs x numbers; subsequent calls to NEXTVAL are served from memory until they're all gone and them another bunch is grabbed. The attached sql*plus output demonstrates this behaviour.
Note that normally unused numbers in the cache are returned to the data dictionary but in exceptional circumstances (DB crash) they may be lost.
Cheers, APC
SQL> create sequence seq cache 3
2 /
Sequence created.
SQL> select last_number from user_sequences
2 where sequence_name = 'SEQ'
3 /
LAST_NUMBER
1
SQL> select seq.nextval from dual
2 /
NEXTVAL
1
SQL> select last_number from user_sequences
2 where sequence_name = 'SEQ'
3 /
LAST_NUMBER
4
SQL> select seq.nextval from dual
2 /
NEXTVAL
2
SQL> select last_number from user_sequences
2 where sequence_name = 'SEQ'
3 /
LAST_NUMBER
4
SQL> select seq.nextval from dual
2 /
NEXTVAL
3
SQL> select last_number from user_sequences
2 where sequence_name = 'SEQ'
3 /
LAST_NUMBER
4
SQL> select seq.nextval from dual
2 /
NEXTVAL
4
SQL> select last_number from user_sequences
2 where sequence_name = 'SEQ'
3 /
LAST_NUMBER
7
SQL> -
Is there any other way to get Adobe Captivate help?
Hi guys,
is there any other way to get Adobe Captivate specific help? I've posted a question twice with no help, it's very specific, so no one here might actually know the solution. I'm wondering though, since the chat is obviously not for Captivate users with product or service questions.
Is there a tech team I can somehow contact? We really need an answer to the problem.
Thanks,
Nat
P.S. I'll post the problem again here:
We publish mp4 training videos as HTML5 content and have the problem that we need to restrict the player to only play/pause.
Adobe Captivate 7 works fantastic for us on almost all devices, many Androids, many browsers, and even on iPad. Captivate, after adding the video as a multi-slide video to one slide and publishing it as HTML5 content, only lets the student play and pause the video - just what we need.
But then we test it on iPhone and the iPhone's internal quicktime player recognizes the mp4 video and kicks in, gives the student all the functions they want, totally overrides the HTML5 published Captivate restricted playback options.
Is there ANY way we can get around that? Any function or box we haven't checked before publishing the HTML5 content?
We would even be happy, if the video wouldn't play on iPhone - just as long as they can't use it to fast forward to the end of the video.
Does anyone here know how to bypass the internal iPhone 5 player?
Thanks,
NatBy the way, I have updated to the newest Captivate 7 version and am using iOS version 7.0.4.
Again, it's fine on iPad, but not on iPhone 5. -
Sometimes when I copy a CD into iTunes all of the songs do not show y up in one album, but mutiple albums, all with the same name. Is there an easy way to get all of the songs into one album.
Generally adding a common album artist will fix things.
tt2 -
Apple says my epson perfection 1240u scanner is no longer supported with 10.7.
Is there an alternative way to get it to work?Download updates from the manufacturers pages:
http://www.epson.com/cgi-bin/Store/support/supDetail.jsp?oid=14549&BV_UseBVCooki e=yes&infoType=Downloads&platform=OSF_M_… -
after this new itunes and ios7 update all my music is off my ipod touch unless i download them one artist at a time, i have over 3500 songs in there. really? is there no easier way to get my music back into my ipod? like a download all button? thanks.
thanks for the reply. guess i'll have to do that. apple, not really happy with what you've done with this latest update. have not been able to enjoy my music in my car since the update. most of us dont mind changes that progress timely, but this was much more than just a progression. this was a complete change. and not a good one, at all. thanks to the two people that replied. appreciate it.
-
Is there any possible ways to get the MAC address?
Hi guys:
I am writing servlets on the server side. Is there any possible ways to get the MAC address when a HTTP request come in? Thank you very much for any helps.
all the best!It is usually impossible to get the MAC address of the maker of a HTTP request in any programming language or system.
At best, you can get the MAC of the closest intervening router, firewall, whatever.
Are you sure you mean the MAC address? MAC looks like this: 8:ab:f0:0:71:bb:90 (Ethernet), or 01-23-45-67-89-ab (Token Ring), etc, depending on your network type.
In contrast, an IP address looks like this: 209.249.116.195. If you want the IP address, check out the javadoc for HttpServletRequest and ServletRequest. Caveat: load balancers, web caches, proxy servers, etc will mask the "true" peer's address. Don't do anything silly like try to use the IP address for security or authentication. -
My cousin told me there was a way to get free apps and that he could do it but what he really did was try to refund all my apps, the apps are gone from the history but no money has come back for me to even get the apps back, is this permanent?
Yup!!
Got what you deserved!
Do not try and rip off or steal from people or companies.
You have good cousin, there!(sarcasm) -
I have purchased a new iPad2 and I was wondering if there is a way to get iPod content onto this new device. I am having difficulty finding any information on this kind of transfer and I am not sure if it is even possible. Just not looking forward to loosing my progress in games and information in notes and other apps. Thanks
Have you been syncing the iPod with iTunes? Then you just connect the iPad and set it up through iTunes and sync any content you want onto it.
http://support.apple.com/kb/ht1386
In terms of games/apps. If they are not universal (you will see a + symbol next to them) or made for iPad (you would see an HD in the name, usually) then they won't look good on an iPad as those apps will open in a iPod sized window, giving you the option to enlarge. -
Is there any free way to get music i lost back if it's not synced to my computer?
is there any free way to get music i lost back if it's not synced to my computer?
In a word. No.
-
Hi there, my phone was recently stolen and I'm gutted that I haven't backed my photos up on iCloud. Only my contact can be accessed. Is there any possible way of getting my photos back?
Often when plugging a device into a computer (which has not been discussed if this has ever happened) one will be given the auto play option of transferring photos/data from the mobile device to the computer. Did you ever transfer the photos from your device to a computer?
-
Hi! I 've a problem with my ipad mini. Does anyone know if there is a way to get out from recovery mode without reinstall iOS?
Many thanks Deggie! I think my iPad has a big problem because is not possible to restore it....I downloaded the most upgraded version of iOS but when I try to restore an error message occurs (4005)......
-
I want to download a previously purchased album that had an "error" and isn't complete. I have an older Mac and don't have iCloud. Surely there is some way to get the music I paid for!
Hi,
See this http://support.apple.com/kb/ht2519
Jim -
After updating to Yosemite, my screen saver settings are not maintained. The screen saver reverts to some Apple default. There is no way to get my setting to be maintained.
Hi ..
Might be corrupted preferences.
Open the Finder. From the Finder menu bar click Go > Go to Folder
Type or copy paste the following:
~/Library/Preferences/com.apple.screensaver.plist
Click Go then move the com.apple.screensaver.plist file to the Trash.
Restart your Mac then reset your screen saver. -
Help, What if I accidentally deleted 1 contact Integrated messages is there a possible way of getting that conversation back?
I'm sorry to learn that an important conversation was deleted in error CDRINGL! As indicated by Snn5 (thanks!), it is not possible to retrieve deleted conversations.
AntonioC_VZW
Follow us on Twitter at www.twitter.com/VZWSupport
Maybe you are looking for
-
CS3 (WIN) Cross referencing script
Today I downloaded a cross-referencing script created by Teus do Jong, and I have found it to be of great use, but when it comes to using the script with linked and formatted copy (Word) and tables (Excel), it does not work (destinations are lost). I
-
I want to make a Report where on each page there are 3 columns. By columns I mean like columns in a newspaper. When it gets to the bottom of the page in the first column, it then goes to the top of the page in the second column, etc. How do I structu
-
i need info on how to setup aliases on portal systems For ex: http://<hostname>:<portnumber>/irj/portal can be called as abc instead of complete url the user just type abc in the browser. i know how to setup system aliases but i need help on setting
-
Can't get home videos imported into iTunes?
iTunes will let me import videos but then they are not there? And ideas on how to help? Thanks
-
I am noticing this in the past week or so, right after, it seems, the installation of SP3 for XP Pro. When sharpening using Smart Sharp, a 50M file is taking 4+ minutes but sharpening the same file in ACR takes about 11 seconds after the Open button