Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Fix Default Constraint Naming Expand / Collapse
Author
Message
Posted Wednesday, October 06, 2010 12:21 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, March 27, 2014 12:50 PM
Points: 233, Visits: 444
Comments posted to this topic are about the item Fix Default Constraint Naming
Post #998995
Posted Wednesday, October 06, 2010 7:34 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, January 26, 2011 1:32 PM
Points: 146, Visits: 327
Michael,

I get

Warning! The maximum key length is 900 bytes. The index 'PK_AliasRules' has maximum length of 1025 bytes. For some combination of large values, the insert/update operation will fail.

for your script at http://files.soendergaard.info/Install_spFixColumnDefaultNaming_V2005-2008.sql. Running the 2008 studio on a SQl2005 db.

It worked perfectly, BTW - awesome piece of code - I'll need to tweak it to do the same for PKs, FKs, IX and UKs ...

Great standards technique,
Doug
Post #999288
Posted Wednesday, October 06, 2010 10:47 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, March 27, 2014 12:50 PM
Points: 233, Visits: 444
Don't worry about the warning it only matters if you alias rows are larger than 900 bytes. And if you are not using any aliases it doesn't matter at all

Actually you don't need to tweak spFixColumnDefaultNaming for handling PK, FK, IX and UK. My other stored procedures are scheduled for publication the next couple of days. But if you can't wait. just check my site. http://sql.soendergaard.info
Post #999622
Posted Wednesday, October 06, 2010 11:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, January 26, 2011 1:32 PM
Points: 146, Visits: 327
Awesome - now these are the kind of articles we need.

Doug
Post #999645
Posted Wednesday, October 06, 2010 11:46 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, March 27, 2014 12:50 PM
Points: 233, Visits: 444
BTW for all future readers.

I have noticed two errors in the publication.

1. I am showing the source code for spFixColumnCheckNaming instead of spFixColumnDefaultNaming. However they are 99% identical in structure and feature. If you want to look at the right source code, check for install script, that is still correct.

2. A copy / paste error have occurred in the result output for example 2. Please ignore the first line
Post #999703
Posted Tuesday, November 29, 2011 2:04 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Sunday, April 13, 2014 5:45 PM
Points: 519, Visits: 1,209
I am using AliasRules table. I need clarity regarding this warning:

"Warning! The maximum key length is 900 bytes. The index 'PK_AliasRules' has maximum length of 1025 bytes. For some combination of large values, the insert/update operation will fail."

How can you tell if your key length will approach 900 bytes? What combination of large values will fail?
Post #1213552
Posted Friday, February 24, 2012 1:32 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, March 27, 2014 12:50 PM
Points: 233, Visits: 444
It means that if all columns making up the primary key is larger than 900 bytes combined, you would be able to add that to the alias table. In practice it shouldn't have an affect, unless your schema, table and column names are very long
Post #1257630
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse