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
Solved

Suspect Table, Inaccessible Files?

Posted on 2006-06-13
5
361 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
  • 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 500 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
SQL Server 2012 Lag Function With Group Levels 1 27
backup and restore 21 30
Location of Dynamics AX Service accounts in SQL 3 16
MS SQL + date 6 19
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

828 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