SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


"Sql server error 5120" while attaching database


"Sql server error 5120" while attaching database

Author
Message
Gary A Davis
Gary A Davis
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 18
Moving the mdf/ldf files worked for me (Nutshell.mdf for LinqPad examples).

C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA

Note I do have a MSSQL11.SQLEXPRESS folder but no MSSQL\DATA in it.

Gary Davis
it 72899
it 72899
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 0
It worked out for me when i logged in using Windows Authentication, too :-)

With that Administrators run it was not working for me. Hehe


Thank you :-)

One more advice > If you can not connect to your database through network - check, that you have IIS installed + enable TCP/IP through "SQL server configuration manager" - SQL server 2005 Network configuration - Protocols for MSSQLSERVER.

Have a nice day w00t
alita2012
alita2012
SSC Rookie
SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)

Group: General Forum Members
Points: 37 Visits: 0
thats true thanks cuz I try anything but dosen't work but ur solution is great !
Sqlash
Sqlash
SSC Rookie
SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)

Group: General Forum Members
Points: 33 Visits: 13
I had this error when trying to attach a db on my SQL Server 2012 instance connected using Windows credentials. What fixed the problem was giving full control of the mdf and ldf files to this user.

Right click the folder containing mdf and ldf files, Go to Properties --> Security tab --> Edit --> Scroll down to the user and select Allow under full control permissions --> Click Apply.
pavantodupunuri
pavantodupunuri
SSC Rookie
SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)

Group: General Forum Members
Points: 33 Visits: 0
Worked like a charm.

Thanks for the post mate, Had seen lot of websites for the solution and I'm done with quite number of RnD attempts but never thought the solution would be so simple. Will remember you
sivarjun4u
sivarjun4u
SSC Rookie
SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)

Group: General Forum Members
Points: 29 Visits: 0
Thank you Sqlash...:-)
hessar
hessar
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 3
Just Go to SQL-Server Configuration
Change SQL Service Browser Service type to Localservice
will be done
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search