Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss Content Posted by Steve Jones
»
IDENTITY_INSERT
IDENTITY_INSERT
Rate Topic
Display Mode
Topic Options
Author
Message
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Saturday, January 24, 2009 11:16 AM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 12:01 PM
Points: 31,436,
Visits: 13,750
Comments posted to this topic are about the item
IDENTITY_INSERT
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #643010
Adi Cohn-120898
Adi Cohn-120898
Posted Monday, January 26, 2009 1:40 AM
SSCrazy
Group: General Forum Members
Last Login: 2 days ago @ 9:50 AM
Points: 2,019,
Visits: 4,923
I think that the answer “You cannot set IDENTITY_INSERT on for more than one table in a database” should be changed to You cannot set IDENTITY_INSERT on for more than one table at the same time in a SESSION.
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #643292
SuperDBA-207096
SuperDBA-207096
Posted Monday, January 26, 2009 8:19 AM
UDP Broadcaster
Group: General Forum Members
Last Login: Wednesday, January 02, 2013 12:15 PM
Points: 1,443,
Visits: 711
Adi Cohn (1/26/2009)
I think that the answer “You cannot set IDENTITY_INSERT on for more than one table in a database” should be changed to You cannot set IDENTITY_INSERT on for more than one table at the same time in a SESSION.
Adi
To clarify further I would think
You cannot set IDENTITY_INSERT on for more than one table AT A TIME in a SESSION.
:)
Post #643456
jmcleish
jmcleish
Posted Monday, January 26, 2009 3:16 PM
SSC Rookie
Group: General Forum Members
Last Login: Tuesday, February 01, 2011 5:56 PM
Points: 28,
Visits: 56
You want to correct a problem with two of your tables with keys created by identity values.
Personally I think this implies that there is erroneous data to be removed before an insert.
Inserting without deleting will simply add data without rectifying the problem. (generalisation)
Post #643745
Richard Barber
Richard Barber
Posted Monday, January 26, 2009 8:02 PM
Forum Newbie
Group: General Forum Members
Last Login: Friday, May 21, 2010 12:32 AM
Points: 1,
Visits: 14
Does anybody else but me think that Order_details is designed wrongly? OrderID should be a foreign key to Orders.OrderID. The natural key of Order_Details is OrderID and LineItemID which does not require an IDENTITY column at all.;)
Post #643868
Lynn Pettis
Lynn Pettis
Posted Monday, January 26, 2009 9:29 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 11:55 AM
Points: 21,626,
Visits: 27,476
hmmm, over-think question we are. IDENTITY_INSERT is the heart of the question, not design of the tables.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #643888
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Tuesday, January 27, 2009 9:06 AM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 12:01 PM
Points: 31,436,
Visits: 13,750
Correcting the question now. good points about the session.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #644245
si_downes
si_downes
Posted Wednesday, March 18, 2009 10:38 AM
SSC-Addicted
Group: General Forum Members
Last Login: Monday, November 05, 2012 7:45 AM
Points: 426,
Visits: 215
Adi Cohn (1/26/2009)
I think that the answer “You cannot set IDENTITY_INSERT on for more than one table in a database” should be changed to You cannot set IDENTITY_INSERT on for more than one table at the same time in a SESSION.
Adi
true. very misleading
Post #678701
kapil_kk
kapil_kk
Posted Monday, January 28, 2013 5:18 AM
Ten Centuries
Group: General Forum Members
Last Login: Sunday, May 19, 2013 11:16 PM
Points: 1,061,
Visits: 1,151
nice basic question
Post #1412358
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.