Archiving

  • Can anyone suggest a good solution or some tips on how to archive a SQL database?  

    I am trying to get about 1 week's worth of data from a production database across to a development database so that our programmers can do some testing.  The database is 200+ GB and as there isn't enough space on the development server I can't actually restore it before performing an acrhive.

    Thanks in advance!

  • If you want a live copy of the database on the development server you will need enough space on the server to restore the database. There is no other option. If you use a compression utility like LiteSpeed (www.imceda.com) you can dramatically reduce the size of the backup file but the fact is, if you want a duplicate database you will need the 200+ gigs on your dev server. Another option is simply extract the most critical tables out of the production system using BCP or DTS and simply move those tables to the development server.

    Does this give you any help? If not can you clarify what exactly you are looking for.

  • I agree, doing a backup/restore to get one week of data seems a little awkward since you are getting everything and not just a week...  Go with the BCP suggestion! Look in the scripts section about BCPing out all tables, add some check so the TimeBased tables gets an additional WHERE clause which filters out only one week, move to development (maybe zipping before transferring over network), use another little script that BCPs in all files and you are set!

  • Hi,

    u can use BCP or more simple but little time taking create a linked server and run simple insert state with date time criteria.

    ex:

    insert into tablename select * from servername.databasename.usename.tablename

    where date between '' and ''

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply