Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

SQL Scrip to recreate a Database

$
0
0

I have a database that has grown to 200GB (due to many drop/create table statements, many delete/append data queries, etc.). Is there a way that I can create a script to recreate the database as a new one, thus releasing the unused space, plus, defragment. In other words, is it possible to create a copy DB that contains all objects & data, but since it's new, size and defragmentation are greatly reduced or eliminated?

I don't need to restore any data, so, the log files can be created from scratch (so space can also be recuperated).


Adrian Hernandez



Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>