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
 General SQL Server Forums
 New to SQL Server Programming
 How SQL Server Engine assigns the ObjectId ?

Author  Topic 

Vishal_sql
Posting Yak Master

102 Posts

Posted - 2012-10-31 : 02:35:15
Hi All,

I created table test and dropped by below query

if object_id('dbo.aatest2','U') is not null
begin
drop table dbo.aatest2
end

and every time i got some noncontiguous (different) values of objectid every time when i checked by

select object_id('dbo.aatest2','U')
i got
objectid 1st time :- 907202332
objectid 2nd time :- 923202389

I wanted to know ,How SQL Server Engine assigns the objectid to objects?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-10-31 : 05:28:49
does it really matter ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2012-10-31 : 05:33:59
Normally an object_id is create with a gap of 16000057 but its not a valid every time.

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page
   

- Advertisement -