We help IT Professionals succeed at work.

SQL Database restore error

MD SHAMIM
MD SHAMIM asked
on
115 Views
Last Modified: 2018-01-12
hello experts ,

currently i am trying to migrate my database(SQL server 2008R2 standard edition ) from test environment to dev(SQL server 2014 standard edition) .my BD size is 535 GB and my disk size is 2.49 TB ,every time i am trying to restore my DB getting error :

Msg 3257, Level 16, State 1, Line 2 There is insufficient free space on disk volume 'K:\' to create the database. The database requires 3106808856576 additional free bytes, while only 2670337888256 bytes are available. Msg 3119, Level 16, State 4, Line 2 Problems were identified while planning for the RESTORE statement. Previous messages provide details. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally.

why i am getting this error since i have enough space on my drive .i am not trying to restore in C drive . how could i solve this ? thanks
Comment
Watch Question

ste5anSenior Developer
CERTIFIED EXPERT

Commented:
A backup contains only the data, no fill space as for example required by the fill factor settings. It also maybe compressed. Use RESTORE FILELISTONLY to see how much space you really need.

Author

Commented:
after running RESTORE FILELISTONLY I GOT restore.png .AND MY RESTORE COMMAND IS :

USE [master]
 RESTORE DATABASE [MYDB]
 FROM DISK = 'K:\Backups\MYDB_backup_20180103.bak'
 WITH FILE = 1,

MOVE 'MYdb_dat' TO 'K:\MYDB20180109\MYDB.mdf',
 MOVE 'MYDB_F2' TO 'K:\MYDB20180109\MYDB_F2.ndf',
 MOVE 'MYdb_log' TO 'K:\MYDB20180109\MYDB.ldf',
 NOUNLOAD, REPLACE, RECOVERY, STATS = 5

GO
Senior Developer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
thanks for your help ,i am going to make some room (2.8 TB )and run my restore command again .
ste5anSenior Developer
CERTIFIED EXPERT

Commented:
You may try to restore file-by-file. And run a DBCC SHRINKFILE after each file is created (untested).

Author

Commented:
how do i restore file by file ?
ste5anSenior Developer
CERTIFIED EXPERT

Commented:
You don't, was a dumb idea.
Vitor Montalv√£oIT Engineer
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
Shrink the transaction log from the original database and them perform the backup and use this last backup for the restore operation.
CERTIFIED EXPERT

Commented:
So the error message says this!
The database requires 3106808856576 additional free bytes, while only 2670337888256 bytes are available

so the restore wants 3.1TB (2.83TiB), but only 2.67TB (2.42TiB) available

How ever you look at it, you dont have enough free space available!
I would suggest you need at least 5TB available so you have some headroom.
Bharat BhushanSolution Manager

Commented:
What is the size of K:\ drive?

Author

Commented:
thanks for your help .

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.