Solved

Can't able to get back deleted table space from sql server 2012 database .

Posted on 2014-12-09
4
13 Views
Last Modified: 2016-06-16
Hi ...

I have one sql server 2012 database, and it's size is near about 64 GB

i had deleted unwanted tables which are near about 30 GB size .
but , still my database have 64 GB size.
If i am taking full backup of database then it is 34 GB.
I had restarted server, also rebuilds all tables indexes , but still my database size is 64 GB ,
can any one tell me how can i get back deleted tables size from my database.
It's mdf file size.
i had shrink   Log file size,
0
Comment
Question by:Ashvin Ajagiya
4 Comments
 
LVL 14

Accepted Solution

by:
Vikas Garg earned 250 total points
ID: 40490704
SQL will not free the unused space after deleting data but will insert new data in that place so the size is not reducing without shrinking the MDF file.

You have to shrink the mdf file if you want the free size back but this will lead to fragmentation which you can overcome by rebuilding Indexes.

Hope this would help you.
0
 
LVL 7

Assisted Solution

by:Dung Dinh
Dung Dinh earned 250 total points
ID: 40490829
Hi,

Shrinking file is not recommend idea because it cause fragmentation of data. I recommend that you rebuild indexes and move to new data files.

Thanks,
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
ID: 40490949
Can you run the following command and post here the result?
sp_helpdb YourDatabaseNameHere

Open in new window

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

Suggested Solutions

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
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 tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

19 Experts available now in Live!

Get 1:1 Help Now