none
unable to open the physical file operating system error 32

    Question

  • Hi,

    I have installed Sql Server 2005 with an instance name.

    I am able to login using SQL Management Studio.

    When i try to connect using Visual Studio through database explorer (its a VSTA for infopath), I get the error unable to open the physical file operating system error 32.  I am struggling to slove this. 

    Any help in this regard would be helpful.

    Thanks and Regards,
    Vijaybabu.N.S

    • Moved by Bob BeaucheminMVP Thursday, August 19, 2010 5:28 PM Moving to a more relevent forum (From:.NET Framework inside SQL Server)
    Thursday, July 09, 2009 3:00 PM

All replies

  • Seems you are trying to connect to a user instance and the file for the user instance isn´t present. Which edition of SQL Server are you using and what do you see in the Server Explorer ? (Maybe you can upload a file to a image hoster and share your information by posting the link to that picture in your next post)

    -Jens
    Jens K. Suessmeyer http://blogs.msdn.com/Jenss
    Thursday, July 09, 2009 4:03 PM
    Moderator
  • Hello Jens,

    Thank you very much for your immediate reply.

    I have SQL Server 2005 Development Edition.

    From VSTA (Visual Studio Tools for Applications) i see only Database explorer not a server explorer.  In that i see a tree "Database connection", from here i try to connect database using "Add connection" and do the following steps

    1. Select Data Source as -->Microsoft SQL Server Database File (SqlClient)
    2. Browse and Select the mdf file
    3. From Advance button, I change Data Source Property from .\SqlExpress to .\Vijay (instance name) and turn User Instance to Flase

    I get the following error message
    Unable to open the Physical file "file path" Operating System error 32

    When i turn the User instance to True, I get the following error message
    The User Instance flag is not supported by this version of SQL Server

    Please help in solving this.

    Thanks and Regards,
    Vijay
    Thursday, July 16, 2009 11:05 AM
  • Hi,
    Just in case if anybody is still looking for solution to this error, this works for me:
    1) Open the VStudio project for which you need to connect to a SQL database
    2)Separately, Go to  Start->Run->Services.msc
    3) Look for SQL Server (SQLEXPRESS) service and Stop it
    4) Start it again
    5) Try connecting your database now.

    Looks like the reason it works has something to do with User Instance discussion that is going on in this thread.


    • Proposed as answer by Kalman Toth Sunday, November 22, 2009 10:18 PM
    Saturday, October 24, 2009 12:00 AM
  • SANKETKHAN, THANK YOU LOTS!

    3) Look for SQL Server (SQLEXPRESS) service and Stop it
    4) Start it again

     

    this worked for me.

    here is my previous post and my problem for anyone who's interested in my error..

    http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/5b245db8-51f6-4dba-9bec-95160df1f102?prof=required

    Thursday, August 19, 2010 2:02 PM
  • Hi all, just a quick update. After some experimenting I have come up with the following conclusion.

    If you access / edit your external database in SQL Server 2008 (express R2 in my case) then try to debug / run an app that also accesses the same database, even if you have disconnected and shut down SQL Server, you get this error because it seems that your pc's server still has (or thinks it has) a connection to your SQL Server program! I also noted that if I first accessed my database from inside Visual C# express 2010, then tried to access it from SQL server, SQL Server gave this error, because my pc server was still ONLY connected to my Visual C# program.

    I wonder if any microsoft person has a comment on this as besides it being annoying, you can run SQL server and Visual Web Developer (VWD 2010 express) side by side with both accessing the same database when ever I want to fine. Seems like a bug to me...

    Only work around is to use the database explorer in Visual C# to access and edit database.

    Cheers and good luck.

    Saturday, August 21, 2010 8:20 AM
  • 3) Look for SQL Server (SQLEXPRESS) service and Stop it
    4) Start it again

    It helps me!

    Thanks!

    Monday, February 07, 2011 8:56 PM
  • This is how I solved this problem...

     I am using Windows 7 Home Premium, Microsoft VSS 2010, SQL Server 2008 R2.

    1. Make sure you have rights to both database files. (The .mdb, and .ldf). Check that you have permissions to open them.

        Right click each file and add yourself in the security tab and give yourself full permissions.

    2. Go the Services, and stop SQLEXPRESS and restart it.

    3. Now try to attach your database file in VSS 2010.

    This worked for me. You probably should be good after you add yourself to the security, (assuming you have administrative priveleges.)

    -DiskScanner

    • Proposed as answer by DiskScanner Friday, April 08, 2011 8:36 PM
    Friday, April 08, 2011 8:36 PM
  • Hi I Follow The Above Instruction But It's Not Working. Gives Error Unable To Connect The Physical Path Operating system error 5 (Access denied )

    Pls Give me Answer    prashant_patil2687@yahoo.com

    Thursday, December 19, 2013 9:02 AM