I am trying to attach a database in Squốc lộ Server 2008 & I have .mdf tệp tin of database but I am getting an exception of

Attach database failed for Server "Bilal-PC". (Microsoft.SqlServer.Smo)

I searched the solution of this problem và found one solution of access rights of database tệp tin but database file has already full control access rights. Now I want khổng lồ attach this database or want to get script of this database. But How?

I know this is a duplicate question but all the solutions given in answers are not working for me that"s why I am posting this question.

Bạn đang xem: Viện công nghệ và đào tạo devmaster

Please help me.


sql-server-2008
Share
Improve this question
Follow
edited Jun đôi mươi "trăng tròn at 9:12
*

Community♦
111 silver badge
asked Jun 5 "12 at 17:38
*

BillzBillz
96755 gold badges20trăng tròn silver badges4949 bronze badges
3
Add a comment |

6 Answers 6


Active sầu Oldest Votes
7

Share
Improve sầu this answer
Follow
answered Jun 5 "12 at 17:44
*

Aaron BertrandAaron Bertrand
244k3535 gold badges424424 silver badges454454 bronze badges
2
Add a phản hồi |
39
Try to run the Management Studio as Administrator và attach the database.

Right cliông chồng on Management Studio Properties và Run As Administrator.

Hope it helps you.....


Share
Improve sầu this answer
Follow
answered Jun 18 "13 at 3:00
*

ravi2iravi2i
51111 gold badge55 silver badges88 bronze badges
4
Add a bình luận |
3
u should edit security of .mdf & .ldf files to lớn full control lượt thích this pic
*


Share
Improve this answer
Follow
answered Dec 14 "15 at 14:38
*

Ahmed SolimanAhmed Soliman
31633 silver badges1010 bronze badges
Add a comment |
0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Instructions for attaching database to lớn the SQL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Run "SQL server năm trước management studio".

Login lớn SQLEXPRESS.

Right cliông xã on the Databases folder và select "Attach".

In the opened UI select Add.

Xem thêm: Hướng Dẫn Đăng Ký Visa Đài Loan Online 2019 Chi Tiết, Hướng Dẫn Xin Visa Đài Loan Online 2019 Chi Tiết

Browse to lớn the thư mục where the .mdf and .ldf files are located.

Select the .mdf file. Notice: The .mdf & .ldf files you"ve sầu selected will be deleted, so make sure you make a copy of those files beforehvà.

Click on the "Attach As" tab and type the new database name.

Make sure the "Current File Path" are correct for the ldf and the mdf files.

Click ok.


Share
Improve this answer
Follow
answered Jul 18 "16 at 12:59
shahar_mshahar_m
2,84944 gold badges3636 silver badges5656 bronze badges
Add a comment |
0
Run the Management Studio as Administrator and connect VPS with windows authentication.

Try to attach the database.

I have sầu done with this.....


Share
Improve sầu this answer
Follow
answered Oct 2 "16 at 6:40
Bhavesh PatelBhavesh Patel
5944 bronze badges
Add a phản hồi |
0
I think this has nothing to lớn vày with permission, I exactly don"t know the entire scenario, but for example, if you are trying to lớn attach an mdf from SQL hệ thống 2008 lớn Squốc lộ server 14 or something else, just copy the MDF và LDF file from C:Program Files (x86)Microsoft Squốc lộ ServerMSSQL10.SQLEXPRESSMSSQLDATA và place them in the C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLDATA & then try using the regular attach method, and you should be fine


Share
Improve this answer
Follow
answered Mar 3 at 12:24
user3615318user3615318
10511 bronze badge
Add a bình luận |
Highly active question. Earn 10 reputation (not counting the association bonus) in order to lớn answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Not the answer you're looking for? Browse other questions tagged sql-server-2008 or ask your own question.


The Overflow Blog
Featured on Meta
Related
1967
How lớn check if a column exists in a SQL Server table?
3
Could not open new database 'DB Name'. CREATE DATABASE is aborted (Squốc lộ Server, Error: 948)
0
Error in attaching a database in Squốc lộ Server 2008
238
How lớn restore khổng lồ a different database in sql server?
2
Attach SQL VPS 2008 R2 mdf tệp tin on Squốc lộ server 2008 database
2
SQL Server 2008 - Attach mdf without log - Operating system error 5: 5(Access is denied.)
1461
How can I delete using INNER JOIN with SQL Server?
1
Failed lớn Attach Database?
Hot Network Questions more hot questions
Question feed
Subscribe khổng lồ RSS
Question feed To subscribe khổng lồ this RSS feed, copy và paste this URL into your RSS reader.


lang-sql
Staông xã Overflow
Products
Company
Stack Exchange Network
site kiến thiết / hình ảnh © 2021 Staông chồng Exchange Inc; user contributions licensed under cc by-sa. rev2021.6.28.39592


Stachồng Overflow works best with JavaScript enabled
*

Your privacy

By clicking “Accept all cookies”, you agree Stachồng Exchange can store cookies on your device và discthua information in accordance with our Cookie Policy.