Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
eia72
Starting Member
9 Posts |
Posted - 2006-03-01 : 02:29:09
|
| how can i attached MDF file only without .log and data only |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-03-01 : 02:32:51
|
| usesp_attach_single_file_db 'DBname' ,'MDF File' |
 |
|
|
eia72
Starting Member
9 Posts |
Posted - 2006-03-01 : 02:42:27
|
| usesp_attach_single_file_db 'DBname' ,'MDF File'how can i do this command?can you give me step by step instruction? |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-03-01 : 02:56:37
|
| use enterprise manager,right click on the databases nodechoose to attach databasefollow the onscreen instruction--------------------keeping it simple... |
 |
|
|
eia72
Starting Member
9 Posts |
Posted - 2006-03-01 : 03:05:20
|
| my Log file is corrupted and unrecoverable to attach,i only have the mdf file and the data file |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-03-01 : 03:08:12
|
| doesn't matter, have you tried?attach a single file using enterprise manager, otherwiseyou need to read more of this in BOL for details on the command you were asking in another post of yours--------------------keeping it simple... |
 |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-03-01 : 03:41:05
|
| Hi,open your query analyzer window and select master DB.write sp_attach_single_file_db '<DBname>' ,'<MDF File>'replace <DBname> with the database namereplace <MDF File> with the colplete path of your .mdf file you want to attach..Or you can also use Enterprise Manager to attach DB as specified by jen |
 |
|
|
|
|
|