Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
T-SQL (SS2K5)
»
Data archive
Data archive
Rate Topic
Display Mode
Topic Options
Author
Message
Zeal-DBA
Zeal-DBA
Posted Monday, August 02, 2010 1:55 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 6:11 AM
Points: 185,
Visits: 941
hello experts,
i have a database which has around 10 tables which stores log of different operations of application. as i said there are log tables so they grows frequently, some of these data i use in application also,
actually i want to transfer some data of these table to a different database. after that i want to delete data from these tables, but each table shud have at least one month data. i how can accomplish that in a ssis package which i wud run every fortnightly and it will archive the data automatically, can any body suggest me
thank in advace
Post #962019
Adiga
Adiga
Posted Monday, August 02, 2010 4:08 AM
SSCommitted
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 1,618,
Visits: 20,900
You can accomplish through the
Execute SQL Task
. You can write the custom sql script to meet your requirements.
Pradeep Adiga
Blog:
sqldbadiaries.com
Twitter:
@pradeepadiga
Post #962059
Zeal-DBA
Zeal-DBA
Posted Monday, August 02, 2010 4:21 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 6:11 AM
Points: 185,
Visits: 941
can you suggest me what kind of sql script i'll have to write here
Post #962066
Adiga
Adiga
Posted Monday, August 02, 2010 4:56 AM
SSCommitted
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 1,618,
Visits: 20,900
1)actually i want to transfer some data of these table to a different database.
2)after that i want to delete data from these tables, but each table shud have at least one month data.
1) The T-SQL query which will insert the requisite data into the other database
2) A delete statement which will delete the copied data from the source
Pradeep Adiga
Blog:
sqldbadiaries.com
Twitter:
@pradeepadiga
Post #962083
Zeal-DBA
Zeal-DBA
Posted Monday, August 02, 2010 6:00 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 6:11 AM
Points: 185,
Visits: 941
can you suggest me query to append data in existing table data
Post #962108
Adiga
Adiga
Posted Monday, August 02, 2010 6:40 AM
SSCommitted
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 1,618,
Visits: 20,900
Appending = Inserting
Please go through the
INSERT statement details on MSDN
.
Pradeep Adiga
Blog:
sqldbadiaries.com
Twitter:
@pradeepadiga
Post #962132
ColdCoffee
ColdCoffee
Posted Monday, August 02, 2010 7:04 AM
SSCrazy
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 4:37 PM
Points: 2,248,
Visits: 5,352
Going through you request, i found that Table Partitioning might do the trick for you.. Me, in my sytem, implemented this Partition for Archive data; which is maintaining only the latest set (we have specific mechanism on we define sets using "versions" each time a job inserts data into the Archive tables) of data for each month in one filegroup and then "moving" the rest to the some another filegroup which will be located on a different drive..
If you are interested in this process, try going this awesome whitepaper from Kim Tripp :
Partitioned Tables and Indexes in SQL Server 2005
Hope this helps!
Post #962156
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.