I'm used the Copy Database Wizard to copy a database from one server to
another. While in the copy operation the destination machine was hanging and
I had to reset it.
Now when I want to attach the source database again, I get the following
error:
"CREATE FILE encountered operating system error 5 (Access is denied.)..."
What is going on here? Why was the source machine affected in this
destructive manner?
What do I need to do in order to attach my source again?
OlavI generally find that it's 10x easier to shoot yourself in the foot and get
into serious trouble with SQL Server 2005 than it was with SQL Server 2000.
Olav
"Olav" <x@.y.com> wrote in message
news:O0Fj8YZXGHA.4212@.TK2MSFTNGP02.phx.gbl...
> I'm used the Copy Database Wizard to copy a database from one server to
> another. While in the copy operation the destination machine was hanging
> and I had to reset it.
> Now when I want to attach the source database again, I get the following
> error:
> "CREATE FILE encountered operating system error 5 (Access is denied.)..."
> What is going on here? Why was the source machine affected in this
> destructive manner?
> What do I need to do in order to attach my source again?
> Olav
>|||I read somewhere detaching databases is very risky, and can infact
corrupt the entire database if something goes wrong... Good luck to
you.|||?
Nice if that is the default option the Copy Database Wizard is using then?
Olav
"KBuser" <Kyle.Buser@.gmail.com> wrote in message
news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
>I read somewhere detaching databases is very risky, and can infact
> corrupt the entire database if something goes wrong... Good luck to
> you.
>|||Stop me if im boring you ...
Basically a database created using created database Test consists of 2 files
mdf for tables
ldf for transaction logs
In effect detaching a database is what happens when you stop sql server
attaching is what happens when you start sql server
so dont be afraid of this process
Be aware though that ...
Any transactions not written down to the mdf file and still in the ldf
transaction logs will need to be recovered by SQL server.
to limit this complication we
stop all users
run checkpoint 3 times to for those transactions down into mdf
then detach
at this point the logfile is emptied and can be ditched on attach
Ever wanted to shink you log file. then this method can be employed.
Note I would not used this method on prodction systems crital to business..
Lifes too short and its a hassel geting another job.
If you detached thdatabase then you basicall have 2 files
If a file gets chopped on a copy you would normally tidy up and resend file.
hope this helps
"Olav" wrote:
> ?
> Nice if that is the default option the Copy Database Wizard is using then?
> Olav
> "KBuser" <Kyle.Buser@.gmail.com> wrote in message
> news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
>
>|||"KBuser" <Kyle.Buser@.gmail.com> wrote in message
news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
> I read somewhere detaching databases is very risky, and can infact
> corrupt the entire database if something goes wrong... Good luck to
> you.
No, detaching a database should be perfectly fine.
But you need to copy both the MDF and LDF files and attach both.
>
No comments:
Post a Comment