Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 18th, 2004, 02:05 AM
Registered User
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sunilj20 Send a message via Yahoo to sunilj20
Default sql state: 42000 modify file encountered os error

Dear All,

I am trying to restore a database backup file. The machine is Win 2000
Server, with SQL server 2000 installed.

When i restore the database, i get the following error :

"[ms sql dmo] [odbc] sql state: 42000 modify file encountered os error
112 (not enough space on the disk) while attempting the physical file
could not adjust the page allocation for file 'totaldb_data' restoring
db abnormally."

I have ample space about 11 GB on both the drives,
the data folder for the database is in D:\ which has space in it. I
have also truncated the log files. The the actual database, is not
more than 700KB to 750KB as the auto shrink option is set 'True'.

still the restore results in this error.

Please let me know, what could be causing the error.

Thanx in advance

Regards
Sunil J


 
Old June 18th, 2004, 12:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Sunil,

Hope you are trying to restore the backup file that was backed up from another system. There could be a possiblity of drive mismatch between the two servers.

Eg: Source server from where you backed up the DB call it as ServerA, would have the db files stored in drive E. But the destination server call it as ServerB, would have drive E with lesser space OR assigned to CD drive. So in that case while restoring you may get this error.

Check for that. If so, you can restore the database like this with a WITH MOVE option in Sql Query Analyser and specify the drives that you have enough space and want it to be restored to.

Code:
RESTORE DATABASE TestDB 
    FROM DISK = 'c:\Northwind.bak'
    WITH MOVE 'Northwind' TO 'c:\test\testdb.mdf',
    MOVE 'Northwind_log' TO 'c:\test\testdb.ldf'
GO
Hope that explains.
Cheers!

_________________________
-Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [42000] [Microsoft][ODBC driver for Oracle][ sanjeev jha General .NET 0 June 28th, 2008 12:50 AM
Access / Modify Configuration File prasanna.nadgir C# 2 October 2nd, 2007 12:14 PM
Download mov file in MAC OS JeromeQin Classic ASP Professional 1 July 20th, 2006 05:00 AM
re: modify the column in a xml file ramya General .NET 1 January 20th, 2005 04:50 AM
write file to mac OS using ASP Lamox Classic ASP Basics 0 December 21st, 2004 06:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.