显示标签为“alter”的博文。显示所有博文
显示标签为“alter”的博文。显示所有博文

2012年3月25日星期日

Anyone from MS?

Can you please tell me what the ATTESTED BY and REMOVE ATTESTED OPTION
options do in the ALTER CERTIFICATE and ALTER ASYMMETRIC key statements?
Somebody up there has to know...
ThanksThose should not show up in the doc. They are used by some internal Windows
components in Vista for signing MS specific schema.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Mike C#" <xyz@.xyz.com> wrote in message
news:uzznVFfxGHA.4880@.TK2MSFTNGP04.phx.gbl...
> Can you please tell me what the ATTESTED BY and REMOVE ATTESTED OPTION
> options do in the ALTER CERTIFICATE and ALTER ASYMMETRIC key statements?
> Somebody up there has to know...
> Thanks
>|||"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:%23tXjprfxGHA.4412@.TK2MSFTNGP05.phx.gbl...
> Those should not show up in the doc. They are used by some internal
> Windows components in Vista for signing MS specific schema.
>
Interesting. Basically it's just proprietary tweaks and hidden
functionality that no one but MS can use? It just accidentally got halfway
into the documentation, eh? Didn't MS just settle a big case with the
European Union over this type of thing?|||Not a hidden function but one that only makes sense if you are running SQL
Server as part of the OS which normal users can't do.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Mike C#" <xyz@.xyz.com> wrote in message
news:OzBpx7fxGHA.3888@.TK2MSFTNGP02.phx.gbl...
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
> news:%23tXjprfxGHA.4412@.TK2MSFTNGP05.phx.gbl...
> Interesting. Basically it's just proprietary tweaks and hidden
> functionality that no one but MS can use? It just accidentally got
> halfway into the documentation, eh? Didn't MS just settle a big case with
> the European Union over this type of thing?
>|||Not hidden, yet it should not have been documented. That's an interesting
paradigm. Maybe a new term like "almost documented functionality" would be
more precise?
So let's say that I'd like to know more about this feature now that the BOL
team has gotten my curiousity up. Where does one go to find out precisely
what this functionality does and the format for the DLL's referenced by it?
Obviously not BOL since it was not supposed to be in there in the first
place. Searching MSDN returns only the BOL pages that "almost document" it.
Where's the documentation? Is it documented in the Vista docs?
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:ekzktqgxGHA.1272@.TK2MSFTNGP05.phx.gbl...
> Not a hidden function but one that only makes sense if you are running SQL
> Server as part of the OS which normal users can't do.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Mike C#" <xyz@.xyz.com> wrote in message
> news:OzBpx7fxGHA.3888@.TK2MSFTNGP02.phx.gbl...
>sql

2012年2月18日星期六

Any harm in changing nullability while a default exists for a colu

Hi,
In Microsoft SQL Server 2000 SP3 are there any potential drawbacks of
changing the table column nullability via the ALTER TABLE ALTER COLUMN while
a default is also defined for that column? If yes, what are they?
--
Many thanks,
OskarYou'll need to drop the default constraint before ALTER TABLE...ALTER COLUMN
and re-add the constraint afterwards.
Column nullability doesn't affect the behavior of the default constraint so
I'm not aware of any drawbacks. The default value is used only when the
column is not included in the column list of an INSERT statement. Of
course, an explicit NULL value will be permitted only when the column allows
nulls.
Hope this helps.
Dan Guzman
SQL Server MVP
"Oskar" <Oskar@.discussions.microsoft.com> wrote in message
news:D50EF76B-BF46-4B49-9AD9-07364BF75E8A@.microsoft.com...
> Hi,
> In Microsoft SQL Server 2000 SP3 are there any potential drawbacks of
> changing the table column nullability via the ALTER TABLE ALTER COLUMN
> while
> a default is also defined for that column? If yes, what are they?
> --
> Many thanks,
> Oskar
>|||Yes, but when I needed to change a column from NULL to NOT NULL in one of the
tables and a default was defined on that column, the SQL Server parser didn't
complain about that. It allowed me to change the definition without any
warnings. Does this mean that I've done it in the wrong way? If yes, why?
--
Many thanks,
Oskar
"Dan Guzman" wrote:
> You'll need to drop the default constraint before ALTER TABLE...ALTER COLUMN
> and re-add the constraint afterwards.
> Column nullability doesn't affect the behavior of the default constraint so
> I'm not aware of any drawbacks. The default value is used only when the
> column is not included in the column list of an INSERT statement. Of
> course, an explicit NULL value will be permitted only when the column allows
> nulls.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Oskar" <Oskar@.discussions.microsoft.com> wrote in message
> news:D50EF76B-BF46-4B49-9AD9-07364BF75E8A@.microsoft.com...
> > Hi,
> > In Microsoft SQL Server 2000 SP3 are there any potential drawbacks of
> > changing the table column nullability via the ALTER TABLE ALTER COLUMN
> > while
> > a default is also defined for that column? If yes, what are they?
> >
> > --
> > Many thanks,
> > Oskar
> >
> >
>
>|||No, Oskar, you didn't do anything wrong. My comment about dropping and
re-adding the constraint applies when changing the column data type but not
when changing only column nullability. Sorry for the confusion.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Oskar" <Oskar@.discussions.microsoft.com> wrote in message
news:3049DDD6-BA64-4A17-BEB6-7B34B9C68D80@.microsoft.com...
> Yes, but when I needed to change a column from NULL to NOT NULL in one of
> the
> tables and a default was defined on that column, the SQL Server parser
> didn't
> complain about that. It allowed me to change the definition without any
> warnings. Does this mean that I've done it in the wrong way? If yes, why?
> --
> Many thanks,
> Oskar
> "Dan Guzman" wrote:
>> You'll need to drop the default constraint before ALTER TABLE...ALTER
>> COLUMN
>> and re-add the constraint afterwards.
>> Column nullability doesn't affect the behavior of the default constraint
>> so
>> I'm not aware of any drawbacks. The default value is used only when the
>> column is not included in the column list of an INSERT statement. Of
>> course, an explicit NULL value will be permitted only when the column
>> allows
>> nulls.
>>
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Oskar" <Oskar@.discussions.microsoft.com> wrote in message
>> news:D50EF76B-BF46-4B49-9AD9-07364BF75E8A@.microsoft.com...
>> > Hi,
>> > In Microsoft SQL Server 2000 SP3 are there any potential drawbacks of
>> > changing the table column nullability via the ALTER TABLE ALTER COLUMN
>> > while
>> > a default is also defined for that column? If yes, what are they?
>> >
>> > --
>> > Many thanks,
>> > Oskar
>> >
>> >
>>