SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 To create partitions within a Table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nicoolz05
Starting Member

India
2 Posts

Posted - 10/30/2013 :  10:04:52  Show Profile  Reply with Quote
I have a table in sql server 2008 enterprise editions with partitions on 3 month basis. I need to take back up of this table. If i used the script:

select * into <backup_table_name>
from <table_name>
where <condition>;

Another copy of table will be created. But will it be containing same data as in previous table with partitions ?

James K
Flowing Fount of Yak Knowledge

3559 Posts

Posted - 10/30/2013 :  10:17:12  Show Profile  Reply with Quote
All the data from all the partitions will be inserted into the new table (subject to your where conditions). But the new table will be created in the default partition. SELECT INTO construct cannot be used to create a partitioned table.
Go to Top of Page

nicoolz05
Starting Member

India
2 Posts

Posted - 10/31/2013 :  11:32:59  Show Profile  Reply with Quote
Hi James,

Thanks for your Reply. Normally when we install MS CRM , it creates partitions for AuditBase table. Normally it has some logs. These Logs are displayed in MSCRM GUI on 3 month partitioned basis.These logs can be deleted directly from CRM GUI, which will automatically clear all the contents from Database
(MSCRM 2011) only support fastdelete unlike CRM 4.0 which supports softdelete.

As it is a Prod box, prior deleting the logs directly from GUI i have to take backup.

How can i take backup ?

So that if client wants to rollback then i can show him in GUI that logs have been created again and that too as it was earlier (In partitioned format)
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3559 Posts

Posted - 10/31/2013 :  12:03:15  Show Profile  Reply with Quote
The pictures you posted did not come through. Regardless, if you want to take a copy of a partitioned table, and you want to have the copy also be on corresponding partitions, you have to first create the new partitioned table and then copy into that.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000