Error Attaching Database Access Denied
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers sql server attach database access denied or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Attach Database Failed Access Is Denied
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only 5123 error attaching database takes a minute: Sign up Access is denied when attaching a database up vote 108 down vote favorite 19 I am using SQL Server 2008 developer edition. I was trying to attach the AdventureWorks2008 database. When I tried to attach, error in attaching database sql 2008 I received an "access is denied" error. According to the event log, it came from the O/S: Open failed: Could not open file D:\ProjectData\AdventureWorks\AdventureWorksLT2008_Data.mdf for file number 0. OS error: 5(Access is denied.). I thought "NTFS problem", but System (and I) have modify access to both files. I found that I can successfully attach the database if I log in as sa, but my user account won't work. I am a member of the local administrators group on my machine,
Microsoft Sql Server Error 5120 Operating System Error 5
and I am in the sysadmins role in SQL Server instance. Any idea why I had to be logged in as sa? sql-server security administration share|improve this question edited Feb 3 '12 at 15:03 Rob 30.6k1683111 asked Feb 24 '10 at 23:19 JMarsch 13.2k94394 Is the MDF file encrypted by any chance? –Brettski Feb 24 '10 at 23:31 Nope -- the real curiosity for me is that it works fine if I log in as sa (using Management Studio), but it does not work if I use my local admin account. My account is an admin, a domain admin, and it is the account that I was logged in under when I installed SQL Server (during setup there was an option to make my current account a sysadmin, and I did so). –JMarsch Feb 25 '10 at 15:43 1 This is how UAC works in W7, no surprise. –Al Kepp Jun 16 '12 at 1:53 @AlKepp Nope -- not a UAC thing. Just logging in as sa corrects (SQL server account, has nothing to do with UAC) the problem. Also, just by being a member of the local admins group, I get my permissions -- I do not have to elevate in order for my AD credentials to work. –JMarsch Jun 18 '12 at 14:01 add a comment| 29 Answers 29 active oldest votes up vote 89 down vote Run SQL Server
Du siehst YouTube auf Deutsch. Du kannst diese Einstellung unten ändern. Learn more You're viewing YouTube in German. You can change this preference below. Schließen Ja, sql server access is denied ich möchte sie behalten Rückgängig machen Schließen Dieses Video ist an error occurred when attaching the database nicht verfügbar. WiedergabelisteWarteschlangeWiedergabelisteWarteschlange Alle entfernenBeenden Wird geladen... Wiedergabeliste Warteschlange __count__/__total__ SQL Server 2012: How to
Error 5120 In Sql Server 2014
fix Access Denied error when trying to attach AdventureWorks2012 .mdf Hoàng Tuấn AbonnierenAbonniertAbo beenden7878 Wird geladen... Wird geladen... Wird verarbeitet... Hinzufügen Möchtest du dieses Video http://stackoverflow.com/questions/2330439/access-is-denied-when-attaching-a-database später noch einmal ansehen? Wenn du bei YouTube angemeldet bist, kannst du dieses Video zu einer Playlist hinzufügen. Anmelden Teilen Mehr Melden Möchtest du dieses Video melden? Melde dich an, um unangemessene Inhalte zu melden. Anmelden Statistik 5.350 Aufrufe 12 Dieses Video gefällt dir? Melde dich bei YouTube an, damit dein https://www.youtube.com/watch?v=bwmHlM9epYE Feedback gezählt wird. Anmelden 13 3 Dieses Video gefällt dir nicht? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 4 Wird geladen... Wird geladen... Wird geladen... Die Bewertungsfunktion ist nach Ausleihen des Videos verfügbar. Diese Funktion ist zurzeit nicht verfügbar. Bitte versuche es später erneut. Veröffentlicht am 12.05.2014SQL Server 2012: How to fix Access Denied error when trying to attach AdventureWorks2012 .mdf Kategorie Menschen & Blogs Lizenz Standard-YouTube-Lizenz Mehr anzeigen Weniger anzeigen Wird geladen... Autoplay Wenn Autoplay aktiviert ist, wird die Wiedergabe automatisch mit einem der aktuellen Videovorschläge fortgesetzt. Nächstes Video Premission Error when Attaching a database in Sql Server Management Studio - Dauer: 3:53 Randal Root 182 Aufrufe 3:53 SQL SERVER – Fix : Error: 5120 - Unable to attach sql database - Dauer: 5:31 TECHNO TRICKS - BRK 940 Aufrufe 5:31 Attach .Mdf file in Sql Server Database - Dauer: 6:24 GK developmentS 69.182 Aufrufe 6:
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an http://www.codeproject.com/Questions/557667/Unalbeplustoplusattachplussqlplusdatabaseplus-Micr article or tip Post your Blog quick answersQ&A Ask a Question View Unanswered Questions View All Questions... C# questions Linux questions ASP.NET questions SQL questions VB.NET questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET sql server JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch error attaching database features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ Unable to attach sql database (Microsoft SQL Server, Error: 5120) Rate this: Please Sign up or sign in to vote. See more: SQL-server-2005 SQL SQL-Server While attaching the mdf & ldf file in sql it is showing error Unable to open the physical file "D:\Database1.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120) Posted 6-Mar-13 4:33am abhinavvijay2.7K Updated 6-Jul-16