Solved

restoring database excluding a specific table and records in the table

Posted on 2013-11-15
2
344 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:ScottPletcher
ScottPletcher 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now