Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 identity_insert

Author  Topic 

asarak
Starting Member

36 Posts

Posted - 2005-11-18 : 07:22:35
How could i check in what status is the identity_insert ???
I want to find out if in a restore the identity_insert became off
instead of on which is by default.....

thanks
ASARAK

asarak
Starting Member

36 Posts

Posted - 2005-11-18 : 07:33:24
THIS IS WHAT I VE GOT FROM THE JOB....THAT I RUN

Cannot insert explicit value for identity column in table 'TABLE_NAME' when IDENTITY_INSERT is set to OFF. [SQLSTATE 23000] (Error 544). The step failed.
Go to Top of Page

surendrakalekar
Posting Yak Master

120 Posts

Posted - 2005-11-18 : 07:39:13
To insert value into the indentity column SET IDENTITY_INSERT = ON is must and required. You can not insert the value by seting it OFF

Surendra
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-18 : 07:54:59
Set identity_insert tableName ON
insert records
Set identity_insert tableName OFF


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-11-18 : 11:39:40
"I want to find out if in a restore the identity_insert became off
instead of on which is by default.....
"

The default is OFF isn't it?

Kristen
Go to Top of Page

ChrisB
Starting Member

6 Posts

Posted - 2005-11-29 : 20:31:53
I've run into the same problem. Sometimes it works, but most of the time it doesn't. I found this on MS: http://support.microsoft.com/default.aspx?scid=kb;en-us;878501
It says that SP4 fixes the problem, so I installed it, but I'm still getting the error. If anyone finds out something, please let me know.

Thanks,
Chris
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-11-30 : 08:50:51
If I've remembered correctly:

You can only have it ON on one table at a time.
You must explicitly turn it OFF on that table before you can turn it ON on another.

(But I don't know how to check which table it is set to ON for ...)

Could that be the source of your problem?

Kristen
Go to Top of Page
   

- Advertisement -