﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / T-SQL (SS2K8)  / Partition Switch to another database / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 20:43:01 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Partition Switch to another database</title><link>http://www.sqlservercentral.com/Forums/Topic1407735-392-1.aspx</link><description>[quote][b]Bhuvnesh (1/16/2013)[/b][hr][quote][b]Suresh B. (1/16/2013)[/b][hr]However, the filegroup can be different from that of the corresponding tables or other corresponding indexes.[/quote] What does it mean ?[/quote]It means table and index can be reside on different filegroup. But they must move to thier corresponding filegroup.For example: Let's say Table1 is on filegroup Data1. And an index called IX_Table1_Name is on filegroup Index1.They should move to thier corresponding filegroup on the same database.</description><pubDate>Wed, 16 Jan 2013 05:27:58 GMT</pubDate><dc:creator>Suresh B.</dc:creator></item><item><title>RE: Partition Switch to another database</title><link>http://www.sqlservercentral.com/Forums/Topic1407735-392-1.aspx</link><description>[quote][b]Suresh B. (1/16/2013)[/b][hr]However, the filegroup can be different from that of the corresponding tables or other corresponding indexes.[/quote] What does it mean ?</description><pubDate>Wed, 16 Jan 2013 05:19:59 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item><item><title>RE: Partition Switch to another database</title><link>http://www.sqlservercentral.com/Forums/Topic1407735-392-1.aspx</link><description>No. It's not possible.Not only in the same database, objects should be in the same filegroup.BOL:[quote]Source and target tables must share the same filegroup. The source and the target table of the ALTER TABLE...SWITCH statement must reside in the same filegroup, and their large-value columns must be stored in the same filegroup. Any corresponding indexes, index partitions, or indexed view partitions must also reside in the same filegroup. However, the filegroup can be different from that of the corresponding tables or other corresponding indexes.[/quote]</description><pubDate>Wed, 16 Jan 2013 05:13:22 GMT</pubDate><dc:creator>Suresh B.</dc:creator></item><item><title>Partition Switch to another database</title><link>http://www.sqlservercentral.com/Forums/Topic1407735-392-1.aspx</link><description>is it possible to switch the data from one database to another. See the below test code [code="sql"]USE [AdventureWorks2008R2]GOALTER TABLE orders_part SWITCH PARTITION 1 TO TailspinToys.dbo.orders_part_2[/code]Error [i]Msg 4948, Level 16, State 1, Line 1ALTER TABLE SWITCH statement failed. The source table 'orders_part' is in database 'AdventureWorks2008R2' while the target table 'TailspinToys.dbo.orders_part_2' is in database 'TailspinToys'.[/i]</description><pubDate>Wed, 16 Jan 2013 04:20:23 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item></channel></rss>