Solved

restoring database excluding a specific table and records in the table

Posted on 2013-11-15
2
349 Views
Last Modified: 2013-11-16
I do backup a database from sql 2008 and restore to a testing server daily. Recently the database grows too fast due to history records of two particular tables in it which I don't need.
Can you provide sql codes or through management studio how to schedule to restore from backup file excluding  the two tables?
0
Comment
Question by:crcsupport
2 Comments
 
LVL 69

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 250 total points
ID: 39652446
SQL Server doesn't have that option or capability, unless those tables happen to be in separate filegroup(s).
0
 
LVL 26

Accepted Solution

by:
Zberteoc earned 250 total points
ID: 39653296
One thing you can do is to replicate the database to the test server in which case you can specify what tables and even what columns you want to replicate. Use transnational replication. You can exclude whatever you want. This way your database on the test server  will be permanently in sync with your source database and you don't need to to restores anymore.

Setup transnational replication: http://www.youtube.com/watch?v=sbrUtfkkVUE
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question