Solved

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

Posted on 2014-12-09
4
18 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 15

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 49

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help how to find where my error is in UFD 6 47
PROPERCASE SCRIPT IN SQL 3 24
SQL - format decimal in a string 5 51
Display SQL 2008 last modified/update Database 11 53
After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 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