Attach Database Error 15105
Contents |
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new create file encountered operating system error 5 failed to retrieve text for this error reason 15105 threads on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search
Sql Error 5123
| ForumFAQ Register Now and get your question answered! Username: Password: Save Password Forgot your Password? All Forums SQL Server 2005 unable to open the physical file operating system error 5 reason 15105 Forums SQL Server Administration (2005) Error while Detaching / Attaching a Database Reply to Topic Printer Friendly Author Topic paulnamroud Starting Member 26 Posts Posted-03/28/2011: 11:53:35 Hello,I want to change the Folder/Path error 5120 unable to attach database of my database. I read about this process over the net and I tried different methods but it keeps returning the same error.First, I copied the files ".mdf" and ".ldf" from the old folder E:\Data to the new folder E:\MSSQL\Data. And i make sure that these files are NOT flagged as Read Only.Second, I tried manually to do the following actions:- Right click and detach the database. - Then, I attached
Operating System Error 2(failed To Retrieve Text For This Error. Reason 15105)
the database by seclecting the ".mdf" from the new folder. The Database is Read Only!So I tried to run the following script to make the database as Read-Write, but it didn't work! USE master;GOALTER DATABASE MY_DB SET SINGLE_USER WITH ROLLBACK IMMEDIATE;GOALTER DATABASE MY_DB SET READ_WRITE;GOALTER DATABASE MY_DB SET MULTI_USER;GOIt returned the following error messages:Msg 5120, Level 16, State 101, Line 1Unable to open the physical file "E:\MSSQL\Data\MY_DB.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)".Msg 5120, Level 16, State 101, Line 1Unable to open the physical file "E:\MSSQL\Data\MY_DB_log.LDF". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)".Msg 945, Level 14, State 2, Line 1Database 'MY_DB' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Third, I tried to run another script and I got the same error message!Script:USE master;GOEXEC sp_detach_db @dbname = N'MY_DB';GOUSE master;GOCREATE DATABASE MY_DB ON (FILENAME = 'E:\MSSQL\Data\MY_DB_Data.mdf'), (FILENAME = 'E:\MSSQL\Data\MY_DB_Log.ldf') FOR ATTACH;GOError:Msg 5120, Level 16, State 101, Line 1Unable to open the physical file "E:\MSSQL\Data\MY_DB_Data.mdf". Operating system error 2: "2(failed to retrieve text for this error. Reason: 15105)".Note:- I have more than enough space on my disk (> 100G
for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120) Problem - bummer. This is some permission issue. It seemed, 2 things can cause this error: trying to attach an mdf-file, that has not been detached (properly) some unable to open the physical file operating system error 2 other stuff, which was my case. Never found out what (as I did, indeed, detach this database first) What I tried first Moving mdf- and log-files to somewhere else, retry -> fail trying to give my SQLSERVER/SQLEXPRESS service(s) modify-permissions on my DB-folder. The use NETWORK_SERVICE as default. This caused, btw, an error, when applying the modify-rights to the individual (db-)files in the folder. Oh: -> fail Cursing, http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=158733 random rebooting. Lots of that kind of stuff Solution 1 hour of googling and uber-fail led me to somewhere (i closed the tab - sorry for the missing reference), suggesting running the Management Studio Instance as an administrator. Guess what: WIN! 6 years ago IT ← OpenX 2.8.2 missing statistics - solution Missing IPV4 address and domain restrictions in IIS7 → Join the conversation Cancel Reply Reply Valery http://schoening.it/blog/attach-database-failed-for-server-unable-to-open-the-physical-file-operating-system-error-5-5failed-to-retrieve-text-for-this-error-reason-15105-microsoft-sql-server-error/ - 5 years ago In order to successfully attach of a database with SQL (Express), the account configured to run the service (Check via the "SQL Server Configuration Manager") must be granted "FULL CONTROL" access on the folder where the database files are located. "MODIFY" access right is not enough ! V. Reply Tareq Mansour - 5 years ago thanks you, it was annoying me Reply Lhasson - 4 years ago Thanks so much. Reply dwe306 - 4 years ago Thank you for taking the time to post this solution. Much as trying to get my head around Visual Web Developer and SQL Server Express is - hitting brick walls every 5 seconds where what the help says to do doesn't acutally work and there's no clues as to why - you can have too much of a good thing and I'm on the verge of taking an axe to the PC at this point … so the solution to this was much appreciated, thank you. Reply dwe306 - 4 years ago Syntax error - that should've read: Thank you for taking the time to post this solution. Much as trying to get my head around Visual Web Developer and SQL Se
log in tour help Tour Start 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 http://dba.stackexchange.com/questions/69208/error-attaching-mdf-file-to-sql-server-2008-r2 Overflow the company Business Learn more about hiring developers or posting ads with us http://www.codeproject.com/Questions/381898/an-error-occurs-in-Ms-Sql-Studio-when-I-attach-a-m Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can operating system answer The best answers are voted up and rise to the top Error attaching mdf file to SQL Server 2008 R2 [closed] up vote 0 down vote favorite When I want to attach a .mdf file to SQL Server 2008 R2, but I get the following error: Attach database failed for Server 'BABAK-PC'. Unable to open the physical file "C:\madrase\madrase\entekhab_vahed\entekhab_vahed.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: operating system error 15105)". (Microsoft SQL Server, Error: 5120) In other systems I can attach this .mdf file. Why am I receiving this error? sql-server sql-server-2008-r2 share edited Jun 28 '14 at 8:33 marc_s 5,38132743 asked Jun 27 '14 at 13:59 Rare-Man migration rejected from stackoverflow.com Jul 18 '14 at 16:39 This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated. closed as unclear what you're asking by swasheck, Paul White♦, RolandoMySQLDBA, Phil, Marian Jul 18 '14 at 16:39 Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question. Offtopic. Not a programming question. Try the DBA SE site. –Marc B Jun 27 '14 at 14:00 possible duplicate of Cannot access any database in SQL Server 2008 R2 Express after moving workstation from domain to workgroup –swasheck Jun 27 '14 at 15:50 comments disabled on deleted / locked
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an 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 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 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 an error occurs in Ms Sql Studio when I attach a mdf file Rate this: Please Sign up or sign in to vote. See more: SQL-Server Hello all codeproject members , when I want to attach a mdf file to Ms Sql management studio, I face this error , I dont know why ! please help me , Tnx a lot Error: Attach database failed for Server 'STM'. (Microsoft.SqlServer.Smo) ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) Unable to open the physical file "D:\MyAspProjects\EShop\