Solved

partition

Posted on 2011-03-21
2
207 Views
Last Modified: 2012-05-11
I am trying to do partition switch.. the destination table has an identity column ,
How can I handle partition switch in and out if the destination table has an identify column? I need to be able to insert the unique id into the destination table ( there shouldn’t be no duplicate id in the destination table)..
0
Comment
Question by:jung1975
2 Comments
 
LVL 7

Accepted Solution

by:
TheTull earned 500 total points
ID: 35182500
Is this just an issue of not being able to insert the unique ID into the table after you get your records, in which case you can use set identity_insert table on to enable inserting into the identity column of that table? Or are you running into something more complicated?
0
 

Author Comment

by:jung1975
ID: 35183173
I guess my question is
Do i have to have an idenity field in the source table if the destination table has the identity field in order to switch in or out? i know the structure of two tables should be the same if you want to do the partition switch.. does it include an indentity field?

if so, the identity in source table ( table you are trying to switch in ) need to to have an identy value greater than the max value of identity in the destination table.. how can I handle the identiy column in partition switch situation ?
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question