Solved

restoring database excluding a specific table and records in the table

Posted on 2013-11-15
2
341 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

762 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

12 Experts available now in Live!

Get 1:1 Help Now