I had to do a restore of my msdb. Before I did, I
detached all of my databases. The restore went fine, and
I was able to re-attach all of my databases, except for
one of them. When I try to attach it, I get an error that
says "Error 5173: Cannot associate files with different
databases." The ldf files are on a differend drive than
the mdf file, but they were like that before I detached
them. Nothing has changed on this database. How do I get
this DB attached?
Thanks.Hi
At a guess you have either got the wrong file names are missing files or
they are in the wrong order!
You may also want to check the permissions on the files and directories.
If that fails you may want to try sp_attach_single_file_db and only specify
the data file (make sure you keep a copy of the original files)
John
"Ken" <anonymous@.discussions.microsoft.com> wrote in message
news:1f03501c457ae$c2d08cf0$a601280a@.phx
.gbl...
> I had to do a restore of my msdb. Before I did, I
> detached all of my databases. The restore went fine, and
> I was able to re-attach all of my databases, except for
> one of them. When I try to attach it, I get an error that
> says "Error 5173: Cannot associate files with different
> databases." The ldf files are on a differend drive than
> the mdf file, but they were like that before I detached
> them. Nothing has changed on this database. How do I get
> this DB attached?
> Thanks.|||I've double and triple checked the file names and they are
correct. All permissions look correct. It's only
one .mdf and one .ldf that need to attach.
If I run "sp_attach_single_file_db", will that create a
new log file? If so, is there a way for me to point the
log file somewhere else. I have to keep the log file on a
seperate drive due to disk space (60GB log file).
Thanks again.
>--Original Message--
>Hi
>At a guess you have either got the wrong file names are
missing files or
>they are in the wrong order!
>You may also want to check the permissions on the files
and directories.
>If that fails you may want to try
sp_attach_single_file_db and only specify
>the data file (make sure you keep a copy of the original
files)
>John
>"Ken" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1f03501c457ae$c2d08cf0$a601280a@.phx
.gbl...
and[vbcol=seagreen]
that[vbcol=seagreen]
get[vbcol=seagreen]
>
>.
>|||Hi
I would make sure that you keep safe copies of all the files!
I would then try to re-attach them in the original locations, if that works
then detach them again and move the files.
Alternatively if you backed up the database before trying this, you could
restore the backup using the MOVE option. See Books online about the RESTORE
command.
John
<anonymous@.discussions.microsoft.com> wrote in message
news:1f1a301c457b6$0dbf1ef0$a301280a@.phx
.gbl...[vbcol=seagreen]
> I've double and triple checked the file names and they are
> correct. All permissions look correct. It's only
> one .mdf and one .ldf that need to attach.
> If I run "sp_attach_single_file_db", will that create a
> new log file? If so, is there a way for me to point the
> log file somewhere else. I have to keep the log file on a
> seperate drive due to disk space (60GB log file).
> Thanks again.
>
> missing files or
> and directories.
> sp_attach_single_file_db and only specify
> files)
> message
> and
> that
> get
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment