Discussion Locked

sql server

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
There are two files: oopbone_data.mdf and oopbone_log.ldf in a directory named voodoo in the f drive. These two files were orininally setup in an sql server, data base name oopbone. However, the c drive is reformatted (NTFS) because of clashes and testings of some programs. We reloaded nt server and sql server on the c drvie but we cannot assess the oopbone_data.mdf and voodoo.ldf again. Please show me a way to access these two old files using the newly reinstalled sql server. Thanks a billion.

7 replies

by gbworld

Attach them. I am assuming this is SQL Server 7 or 2000. If so:

1. Open the enterprise manager.
2. Expand down to the server you are trying to attach to.
3. Right click on databases
4. Choose All Tasks --> Attach database
5. Find the mdb filewith the browse button.

If the ldb file is in the same directory, this will conquer your ills. If you have problems with the log file attaching, you can specify the correct directory for the file in the properties. You may have to play a bit if it does not attach properly, but it should not be that difficult. I have yet to have a problem attaching or detaching a database in SQL 7/2000.

Gregory A. Beamer
MCP: +I, SE, SD, DBA

by awdfg

I think there is no "attach db" option in SQL Server 7.0 in the enterpirse manager.
You can try the following:

Execute the following command in the Query Analyzer:

EXEC sp_attach_db @dbname = N'oopbone',
@filename1 = N'f:\voodoo\oopbone_data.mdf',
@filename2 = N'f:\voodoo\oopbone_log.ldf'

and your database will get attached.

by ukothari

There is no Attach command in SQL 7 Enterprise Manager however you can use system stored procedure to do it.

You can run the following command from Query Analyzer to restore old database.

EXEC sp_attach_db @dbname = N'oopbone',
@filename1= 'F:\voodoo\oopbone.mdf',
@filename2 = N'F:\voodoo\oopbone.ldf'

Hope this help.

Good luck.

Uday Kothari
CTO, Compulink Systems
www.compulnk.com
www.projectbynet.com

This discussion is closed to new replies.