I'm trying to detach a DB and then attach it with the
data and log files in a different location.
Here's what I'm doing.
I detach the DB in question
Copy the data and log files to a different location
Attach DB, using the copied files.
It attaches fine, but it makes the DB Read-Only, and I'm
unable to uncheck the read-only option in the properties
of the db. It gives a long error about the possibiliy of
the data and log files not being correct, which I know
they are.
Any thoughts?
Thanks much
MattSuggest running DBCC CHECKDB on the source, if good try detaching again
--
HTH
Ryan Waight, MCDBA, MCSE
"Matt Bender" <matt.bender@.berbee.com> wrote in message
news:093c01c3b2a8$d108f1a0$a001280a@.phx.gbl...
> I'm trying to detach a DB and then attach it with the
> data and log files in a different location.
> Here's what I'm doing.
> I detach the DB in question
> Copy the data and log files to a different location
> Attach DB, using the copied files.
> It attaches fine, but it makes the DB Read-Only, and I'm
> unable to uncheck the read-only option in the properties
> of the db. It gives a long error about the possibiliy of
> the data and log files not being correct, which I know
> they are.
> Any thoughts?
> Thanks much
> Matt|||Hi Matt
Is it possible the files themselves are read only in the OS? Maybe the
folder you copied them to had its readonly property set, and the db files
inherited that.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Matt Bender" <matt.bender@.berbee.com> wrote in message
news:093c01c3b2a8$d108f1a0$a001280a@.phx.gbl...
> I'm trying to detach a DB and then attach it with the
> data and log files in a different location.
> Here's what I'm doing.
> I detach the DB in question
> Copy the data and log files to a different location
> Attach DB, using the copied files.
> It attaches fine, but it makes the DB Read-Only, and I'm
> unable to uncheck the read-only option in the properties
> of the db. It gives a long error about the possibiliy of
> the data and log files not being correct, which I know
> they are.
> Any thoughts?
> Thanks much
> Matt|||thanks for the response. I did check that as well and
that is not the case either.
matt
>--Original Message--
>Hi Matt
>Is it possible the files themselves are read only in the
OS? Maybe the
>folder you copied them to had its readonly property set,
and the db files
>inherited that.
>--
>HTH
>--
>Kalen Delaney
>SQL Server MVP
>www.SolidQualityLearning.com
>
>"Matt Bender" <matt.bender@.berbee.com> wrote in message
>news:093c01c3b2a8$d108f1a0$a001280a@.phx.gbl...
>> I'm trying to detach a DB and then attach it with the
>> data and log files in a different location.
>> Here's what I'm doing.
>> I detach the DB in question
>> Copy the data and log files to a different location
>> Attach DB, using the copied files.
>> It attaches fine, but it makes the DB Read-Only, and
I'm
>> unable to uncheck the read-only option in the
properties
>> of the db. It gives a long error about the possibiliy
of
>> the data and log files not being correct, which I know
>> they are.
>> Any thoughts?
>> Thanks much
>> Matt
>
>.
>|||Are you sure no one is in the database? What happens when you try to set the
db to not read-only using ALTER DATABASE WITH ROLLBACK...
(Please see BOL for full syntax details.)
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Matt Bender" <anonymous@.discussions.microsoft.com> wrote in message
news:06d601c3b2cd$4df5cca0$a101280a@.phx.gbl...
> thanks for the response. I did check that as well and
> that is not the case either.
> matt
> >--Original Message--
> >Hi Matt
> >
> >Is it possible the files themselves are read only in the
> OS? Maybe the
> >folder you copied them to had its readonly property set,
> and the db files
> >inherited that.
> >
> >--
> >HTH
> >--
> >Kalen Delaney
> >SQL Server MVP
> >www.SolidQualityLearning.com
> >
> >
> >"Matt Bender" <matt.bender@.berbee.com> wrote in message
> >news:093c01c3b2a8$d108f1a0$a001280a@.phx.gbl...
> >> I'm trying to detach a DB and then attach it with the
> >> data and log files in a different location.
> >>
> >> Here's what I'm doing.
> >> I detach the DB in question
> >> Copy the data and log files to a different location
> >> Attach DB, using the copied files.
> >> It attaches fine, but it makes the DB Read-Only, and
> I'm
> >> unable to uncheck the read-only option in the
> properties
> >> of the db. It gives a long error about the possibiliy
> of
> >> the data and log files not being correct, which I know
> >> they are.
> >>
> >> Any thoughts?
> >>
> >> Thanks much
> >> Matt
> >
> >
> >.
> >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment