Thursday, March 22, 2012

Determening the setting

We can use this to change the setting
SET IDENTITY_INSERT T1 ON
How can I find out if it is on or off ?sp_help (tablename) will give you all the table information. The third
result grid will show identity seed and value if on
"Alur" wrote:

> We can use this to change the setting
> SET IDENTITY_INSERT T1 ON
> How can I find out if it is on or off ?|||It doesn't look there is a way to check this. However, as a SET option, if
you set it on, it only applies to your connection, so there is no way
someone else could have set it without you knowing.
HTH
Kalen Delaney, SQL Server MVP
"Alur" <Alur@.discussions.microsoft.com> wrote in message
news:B673336F-D4DC-4AAF-B8D2-80F32E098B38@.microsoft.com...
> We can use this to change the setting
> SET IDENTITY_INSERT T1 ON
> How can I find out if it is on or off ?|||Nope, sp_help will give the same information whether IDENTITY_INSERT is on
or off. It basically tells you whether or not the table has an identity
column, but it doesn't tell you whether you can supply explicit values for
the identity column.
--
HTH
Kalen Delaney, SQL Server MVP
"Derekman" <Derekman@.discussions.microsoft.com> wrote in message
news:1C99D06F-40F5-48BF-8935-460ECDD19026@.microsoft.com...
> sp_help (tablename) will give you all the table information. The third
> result grid will show identity seed and value if on
> "Alur" wrote:
>|||It would be nice if there is features to get those informations like
OpenTran gives all oldest active transactions
Madhivanan
Kalen Delaney wrote:
> Nope, sp_help will give the same information whether IDENTITY_INSERT is on
> or off. It basically tells you whether or not the table has an identity
> column, but it doesn't tell you whether you can supply explicit values for
> the identity column.
> --
> HTH
> Kalen Delaney, SQL Server MVP
>
> "Derekman" <Derekman@.discussions.microsoft.com> wrote in message
> news:1C99D06F-40F5-48BF-8935-460ECDD19026@.microsoft.com...

No comments:

Post a Comment