Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Implement an Oracle sequence in MS-SQL Server

Author  Topic 

tal_olier
Starting Member

13 Posts

Posted - 2002-08-18 : 03:49:38
We would like to implement an Oracle sequence in MS-SQL Server without using identity column property.

We've tried to impalement the naive way using a trigger updating a 'sequence' table every insert - the penalty was about 100%

If we could create a global variable that is shared between sessions (database sessions) we might have been able to create a caching mechanism.

Are you familiar with a way the above can be accomplished ?

Anyone ?

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-08-18 : 09:38:07
Just out of curiousity, why don't you want to use an identity column?

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-18 : 09:41:11
And if you need an Oracle sequence, why aren't you using Oracle?

Go to Top of Page

tal_olier
Starting Member

13 Posts

Posted - 2002-08-18 : 11:43:08
quote:

Just out of curiousity, why don't you want to use an identity column?

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.



Because identity column has a limitation of making a partiton view un-insertable !

Go to Top of Page

tal_olier
Starting Member

13 Posts

Posted - 2002-08-18 : 11:45:16
quote:

And if you need an Oracle sequence, why aren't you using Oracle?




I'll rephrase, I would like to get a database method using MS-SQL Server in order to get unique sequential values, ideas anyone

Go to Top of Page
   

- Advertisement -