SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


NEWSEQUENTIALID()


NEWSEQUENTIALID()

Author
Message
Katie Walsh
Katie Walsh
SSC Veteran
SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)

Group: General Forum Members
Points: 203 Visits: 1

currently our database uses quite a feq guid's with a default value of newid(), I would like to change the default value in management studio for our guids to NEWSEQUENTIALID(). When I try and do this I get an error "error validating default value for column".


Site Owners
Site Owners
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: Administrators
Points: 18505 Visits: 217
No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have!
zootie
zootie
SSC-Addicted
SSC-Addicted (430 reputation)SSC-Addicted (430 reputation)SSC-Addicted (430 reputation)SSC-Addicted (430 reputation)SSC-Addicted (430 reputation)SSC-Addicted (430 reputation)SSC-Addicted (430 reputation)SSC-Addicted (430 reputation)

Group: General Forum Members
Points: 430 Visits: 48


I just came across this one myself. I imagine that by now you already have a solution, but I'm posting for the benefit of the next person to come across it. You can safely ignore the error. When you get the error dialog, you choose "No". When you try and save the table, you'll get a pre-save validation warning (and you choose Yes to indicate you want to attempt to save). Or you can always use ALTER TABLE.




---------------------------
Microsoft SQL Server Management Studio
---------------------------
Error validating the default for column 'NameGuid'.

Do you want to cancel your changes ?

---------------------------
Yes No Help
---------------------------




Andy Warren
Andy Warren
SSC Guru
SSC Guru (52K reputation)SSC Guru (52K reputation)SSC Guru (52K reputation)SSC Guru (52K reputation)SSC Guru (52K reputation)SSC Guru (52K reputation)SSC Guru (52K reputation)SSC Guru (52K reputation)

Group: Moderators
Points: 52068 Visits: 2795
Katie, are you making the change because page splitting is an issue with newid, or just like the newer behavior better?

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Katie Walsh
Katie Walsh
SSC Veteran
SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)

Group: General Forum Members
Points: 203 Visits: 1
It is the PK on some of our tables and causing lots of fragmentation. Thought this would ease some of that fragmentation by having newsequential() for all inserts. So yes page splitting
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search