Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 removing a paratiotion

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2008-06-24 : 08:50:52
i want to build a paratiotin which the key of the paratition will be a datre in this structure :
20080101235959
20080102235959
20080103235959
20080104235959
20080105235959
and so on.....
and i want that when there is a paration that it's "date" is more then 30 days to delete it (and that its data will be deleted too)
how do i do that?
thnaks in advance
peleg





Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2008-06-24 : 09:17:20
Deletion?....by a scheduled job...running once each day.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-24 : 09:21:48
What is the reason to create a LEFT PARTITION function and scheme, one for each day?


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-24 : 09:23:39
Yes, you can both SPLIT and MERGE existing partitions.

Take a real good look in Books Online, the SQL Server help file.
It has everything you need to know about partitioning.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2008-06-24 : 10:04:04
AndrewMurphy - i know i should use a job :)
Peso - i have lot of data,beacuse of that i want to delete all data and paratition bigger then 30 days


Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-24 : 10:06:54
Did you look at what Peso has suggested. There is really good white paper regarding Switch .I don't seem to find right now.
Go to Top of Page
   

- Advertisement -