• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

to use sequence in JDBC

 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't have permission to access oracle database so i have to work on predesigned tables, in one of my field i have to auto increament that field and i can't create sequence in oracle database so is there is any way to do that through servlet . i mean using queries.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has absolutely nothing to do with servlets, so it's been moved to the JDBC forum with an appropriate change of title.
 
Srinivasan Duraisamy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what kind of access you have with Oracle , So could not give any solution from DB level.

But if your application going to run in only one server then you can use plain text file for your sequence source.

Using synchronized block you can generate sequence from the text file.

For better performance use Cache .

Thanks
Srinivasan. D
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would go an talk to your DBA (or whoever designed the tables) they MUST have created a sequence for this index field, or had a plan how you were going to use it.
If they didn't explain to them why they need to create one for it.

Just because you don't have permissin to do something, doesn't mean you can't get it done.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic