Solved

partition

Posted on 2011-03-21
2
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

739 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