Solved

restoring database excluding a specific table and records in the table

Posted on 2013-11-15
2
351 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

808 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