Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Suspect Table, Inaccessible Files?

Posted on 2006-06-13
5
Medium Priority
?
367 Views
Last Modified: 2008-02-01
Hi,

I have a database that works fine on SQL 2000 Server on my web server.  However, when I copy the .MDF and .LDF files to my test server on my personal laptop, the database is labeled 'Suspect', and when I try to access it it gives the following error:

"Database 'msm' cannot be opened due to inaccessibly files or insufficient memory or disk space. See the SQL Server errorlog for details."

I don't understand what's going on...

The following is from the errorlog:

2006-06-13 16:17:55.98 spid51    Starting up database 'msm'.
2006-06-13 16:17:55.98 spid51    udopen: Operating system error 2(The system cannot find the file specified.) during the creation/opening of physical device C:\Inetpub\wwwroot\MSSQL$ORBUSDEV\msm_Data.mdf.
2006-06-13 16:17:55.98 spid51    FCB::Open failed: Could not open device C:\Inetpub\wwwroot\MSSQL$ORBUSDEV\msm_Data.mdf for virtual device number (VDN) 1.

The file is there.  I can see it and I can browse to it.  I tried re-downloading it to my laptop with no change or improvement.

Any ideas?
0
Comment
Question by:brassmonkeyboy
[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
  • 2
  • 2
5 Comments
 
LVL 25

Expert Comment

by:jrb1
ID: 16898736
Here is some info from another post.  See if you are missing something:

Right click on the database (that you wish to recreate in test env) in the enterprise manager of the prod server.

Note the physical locations of the data files (.mdf,.ndf etc) and also the transaction log (.ldf).

Copy the .mdf and .ldf files (.ndf file also if any) to the test server in the usual location (C:\Program Files\Microsoft SQL Server\MSSQL\data)

Now go to the enterprise manager of the test server. Choose Databases->All Tasks->Attach Database.

In the Attach Database dialog, choose the location of the .MDF file. It automatically pulls up the .LDF file also (provided .ldf file is also in same location as .mdf)

Specify the name of the database in 'Attach as' field.

Also specify the database owner for this database in test server.

The database is now created in test server with all data as in production.
0
 

Author Comment

by:brassmonkeyboy
ID: 16898902
I tried the above, but to no avail.

The first time I did it it seemed to work - but when I looked at the tables, none of the tables were there.  Only the default non-user created tables.

The second time I was particularly careful to use the most updated .MDF file from my server, and it told me that "msm_Data.MDF is not a primary database file"

Any further ideas?
0
 
LVL 21

Accepted Solution

by:
Yurich earned 2000 total points
ID: 16898920
try doing it through database backup - always worked for me and a lot easier technically. let me know if you need further assistance with this.

good luck,
yurich
0
 

Author Comment

by:brassmonkeyboy
ID: 16898971
I did it through a database backup utilizing Force Overwrite and changing pathnames.
0
 
LVL 21

Expert Comment

by:Yurich
ID: 16899456
:) glad you got it working :)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

604 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