Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Data Archival/Purging - through table partition switch IN/OUT Expand / Collapse
Author
Message
Posted Wednesday, March 6, 2013 11:49 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 1:28 AM
Points: 496, Visits: 457
Hi All,

I have a daily partitioned table 'TBL' and I hold data for 30 Day's. I archive data to TBLHistory table by Switch out minimum partion and switch in the partition to TBLHistory.

The Main Table 'TBL' and 'TBLHistory' resides on the same database. As a result size of database is increasing.
My manager ask me to Create a HistoryDB database and move 'TBLHistory' to the history database.

Can i move 'TBLHistory' to HistoryDB and still i can perform switch out and Switch in?
Note:Both DBs are residing on same instance of the server.

(MainDB) -->TBL-->SwithOut to --> Swith In to --> (HistoryDB)-->TBLHistory ?

Please guide me how can i best achive this.

Thanks
Vineet Dubey











Post #1427791
Posted Thursday, March 7, 2013 1:00 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 5:01 AM
Points: 2,840, Visits: 3,968
vineet_dubey1975 (3/6/2013)[hr
Can i move 'TBLHistory' to HistoryDB and still i can perform switch out and Switch in?
Note:Both DBs are residing on same instance of the server.
NO . for switch-in & switch out , tables should be resided on partitoned filegroups. see this link http://sqlserverpedia.com/wiki/Switching_Partitions_-_Example


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1427817
Posted Thursday, March 7, 2013 2:07 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 1:28 AM
Points: 496, Visits: 457
My both the DBS are on same file filegroup e.g. PRIMARY.
Post #1427840
Posted Thursday, March 7, 2013 4:06 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 5:01 AM
Points: 2,840, Visits: 3,968
vineet_dubey1975 (3/7/2013)
My both the DBS are on same file filegroup e.g. PRIMARY.
Refer the link i posted above


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1427890
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse