Archive Automation | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Archive Automation

Hi,
I need to pull the database older than 60 days.Can somebody please help me with a script to do that.
Thanks for your help in advance!

Welcome to the forums!.
Automatic script?

What exactly do you mean by "pull the database" please?

<guess>
select * from table
where date_col>=dateadd(day,-60,getdate())

Create Archive Database and then create a archive table as you want then write a query as
INSERT INTO archivedatabase.dbo.archivetable
SELECT * FROM sourcedatabase.dbo.sourcetable
where datecolumn <= getdate()-60

]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |