Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Bad doc for NewSequentialId -- what does it mean?

 
   Database Help (Home) -> Programming RSS
Next:  DESCARGAS - ANTIVIRUS GRATIS 7639  
Author Message
DWalker07

External


Since: Jan 15, 2009
Posts: 3



(Msg. 1) Posted: Thu Feb 18, 2010 2:41 pm
Post subject: Bad doc for NewSequentialId -- what does it mean?
Archived from groups: microsoft>public>sqlserver>programming (more info?)

For NewSequentialId, BOL says "Creates a GUID that is greater than any GUID
previously generated by this function on a specified computer.".

This is not right - you do not "specify" a computer, so the word
"specified" is meaningless and unneccessary in the definition. Maybe the
function actually "Creates a GUID that is greater than any GUID previously
generated by this function on a SPECIFIC computer.". But even so, which
computer?

Are the GUIDs increasing on the SQL server that holds the database, or on
the computer that is connected to the server and causing the
NewSequentialId() function to be run? This function probably runs ON the
server, since it can't be run directly from a Query Analyzer window. But
I'm not sure.

This distinction is crucial, because the description doesn't tell you what
happens when six users are connected to one server. Will each execution of
Newsequentialid() by ANY of the connected users result in strictly
increasing GUIDs, or are the GUIDS only increasing within each connected
computer? Inquiring minds want to know. And the word "specified" doesn't
add anything.

Maybe the description should say "Creates a GUID that is greater than any
GUID previously generated by this function on the SQL server.". Assuming
that description is correct, that is, and I'm not sure it is.

If anyone knows the answer, please let me know. Thanks. I have submitted
a Feedback form.

David Walker

 >> Stay informed about: Bad doc for NewSequentialId -- what does it mean? 
Back to top
Login to vote
gareth erskine-jones

External


Since: Feb 19, 2010
Posts: 1



(Msg. 2) Posted: Thu Feb 18, 2010 8:25 pm
Post subject: Re: Bad doc for NewSequentialId -- what does it mean? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 18 Feb 2010 14:41:52 -0800, DWalker07 wrote:

>For NewSequentialId, BOL says "Creates a GUID that is greater than any GUID
>previously generated by this function on a specified computer.".
>
>This is not right - you do not "specify" a computer, so the word
>"specified" is meaningless and unneccessary in the definition. Maybe the
>function actually "Creates a GUID that is greater than any GUID previously
>generated by this function on a SPECIFIC computer.". But even so, which
>computer?

It just means the computer which is running the function. If you run
newsequentialid on computer X, it should produce a guid greater than
any produced by newsequentialid running on X since the last reboot.

>Are the GUIDs increasing on the SQL server that holds the database, or on
>the computer that is connected to the server and causing the
>NewSequentialId() function to be run? This function probably runs ON the
>server, since it can't be run directly from a Query Analyzer window. But
>I'm not sure.

It's run server-sde.

>This distinction is crucial, because the description doesn't tell you what
>happens when six users are connected to one server. Will each execution of
>Newsequentialid() by ANY of the connected users result in strictly
>increasing GUIDs, or are the GUIDS only increasing within each connected
>computer? Inquiring minds want to know. And the word "specified" doesn't
>add anything.

Bear in mind that you shouldn't rely on the order of the guids in any
semantic way - newsequentialid is purely a performance feature.

GSEJ

 >> Stay informed about: Bad doc for NewSequentialId -- what does it mean? 
Back to top
Login to vote
DWalker07

External


Since: Jan 15, 2009
Posts: 3



(Msg. 3) Posted: Fri Feb 26, 2010 9:57 am
Post subject: Re: Bad doc for NewSequentialId -- what does it mean? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

gareth erskine-jones wrote in


> On Thu, 18 Feb 2010 14:41:52 -0800, DWalker07 wrote:
>
>>For NewSequentialId, BOL says "Creates a GUID that is greater than any
>>GUID previously generated by this function on a specified computer.".
>>
>>This is not right - you do not "specify" a computer, so the word
>>"specified" is meaningless and unneccessary in the definition. Maybe
>>the function actually "Creates a GUID that is greater than any GUID
>>previously generated by this function on a SPECIFIC computer.". But
>>even so, which computer?
>
> It just means the computer which is running the function. If you run
> newsequentialid on computer X, it should produce a guid greater than
> any produced by newsequentialid running on X since the last reboot.
>
>>Are the GUIDs increasing on the SQL server that holds the database, or
>>on the computer that is connected to the server and causing the
>>NewSequentialId() function to be run? This function probably runs ON
>>the server, since it can't be run directly from a Query Analyzer
>>window. But I'm not sure.
>
> It's run server-sde.
>
>>This distinction is crucial, because the description doesn't tell you
>>what happens when six users are connected to one server. Will each
>>execution of Newsequentialid() by ANY of the connected users result in
>>strictly increasing GUIDs, or are the GUIDS only increasing within
>>each connected computer? Inquiring minds want to know. And the word
>>"specified" doesn't add anything.
>
> Bear in mind that you shouldn't rely on the order of the guids in any
> semantic way - newsequentialid is purely a performance feature.
>
> GSEJ
>

Yes, I know not to rely on it. But the wording of "specified computer"
is exceedingly strange. And it doesn't SAY in the doc that it's run on
the server.

Even your comment, "If you run newsequentialid on computer X," is
confusing, because you usually "run" newsequentialid from one of several
computers that are connected to a server using a SQL connection. So it
SEEMS that you are "running" this from your own computer. So it's very
easy to use terminology which I think is confusing here.

And I am adamant that "specified computer" is the wrong phrase.

Thanks.

David Walker
 >> Stay informed about: Bad doc for NewSequentialId -- what does it mean? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
need help with query - I want to sum the records in a table (u) which have 'P.M.' in a field value and test against a fixed limit something to the effect of : case when SUM(substring(u.sTime,1,4)='P.M.') <= 64 Then .... except it should work ...

Next?? - I have a field stored as NTEXT(16). I need to replace some of the content in this field. I know the replace function doesnt work. I see there is UPDATETEXT - is this the ONLY way to do it ?? 'cos it looks quite complicated? thanks, Justin

How can I get the resultset from a stored procedure - I have a stored procedure which will output a table. How can I use a sql statement to get the result of the sp? Thanks a lot

Audit V2 - I am looking to write a SQL script that will show me for each table, in all the databases on a server, which users / groups have access. In addition, I want to break the access into whether it is SELECT, UPDATE, INSERT or DELETE permissions. Is this..

Detecting an existence of local temporary table - Hi, I create a temporary table. for example: <font color=purple> ; create table #t1 (ID_T1 integer)</font> Next I would like to detect If the table already exists: exec sp_table #t1 if @@ROWCOUNT > 0 <font color=purple>&...
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]