Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Production Maintenance

Author  Topic 

anaylor01
Starting Member

28 Posts

Posted - 2011-10-30 : 21:56:18
I have a 1.4 terabyte database. There has been no maintenance done on this database for years. I have 1 table that has 1.7 Billion records that has no partitioning. 7 other tables are almost as bad. I have taken a recent backup and restored it on a test server. I have drop and recreated all the indexes, created table partitioning on the large tables, created missing indexes, updated statistics. Now my question is what is the best way to move this back to production? My plan is to
1. restore the latest transaction logs to the test server.
2. Rename the data files.
3. copy data files to production.
4. detach production database.
5. rename the new data files.
6. attach the database.

Sachin.Nand

2937 Posts

Posted - 2011-10-31 : 00:51:05
And what about the data in the prod which was inserted when you were doing all these operations on the test server ?

PBUH

Go to Top of Page

anaylor01
Starting Member

28 Posts

Posted - 2011-10-31 : 01:24:42
We are going to restore the transaction logs to the test server right before we detach. Then restore the transaction logs from production after we attach to production.
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2011-10-31 : 13:50:21
quote:
Originally posted by anaylor01

We are going to restore the transaction logs to the test server right before we detach. Then restore the transaction logs from production after we attach to production.



That is not going to be possible. You have already restored the database and recovered it - otherwise, you would not have been able to make the changes.

Your only option is to reproduce the process you did in test on your production system.

Jeff
Go to Top of Page
   

- Advertisement -