sql server management studio express data attach won't open some of the folders in the tree heirarchy

  • I've been working with Visual Web Developer and created a sql database in the app_data folder. The tutorial I was following demonstrated how to attach to the database with Management Studio Express.

    I am unable to attach the database in my instance of sql server 2005 express because the Locate Files browser (Databases | Attach ... | Add | Locate Database Files) won't open subfolders in my \Documents and Settings folder. The files are located down in the \My Documents\Visual Studio 2008\Websites folder.

    All the files were created within my user profile which has admin priviliges.

    Thanks for any help.

  • you created them using your admin account, but when you connected with SSIs Express, did you connect as that same user, or as a SQL Server login, like 'sa'?

    that might be why you can't browse to Documents and Settings...'sa' doesn't have an NT account, so it can't browse there for files.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Instead of bringing the mountain to Mohammad, why not bring Mohammad to the mountain?

    As in - why not copy the database and move it to the data directories where SQL Server is storing its database files? If you plan on having SSMS-E manage the databases, then that means you're going to want the data files to be and stay attached in your SQL Express install. So - put the data files where the server expects them to be.

    You will have to adjust how your app connects to it, but turning it into a "permanent" DB and not a user instance will help your application (will be faster). Just be sure to turn off the "auto-close" feature on the DB once you attach it.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • I'm still not certain while Management Studio Express will navigate to some folders and not others, but I'll probably solve that issue someday.

    Part of the problem may be that the Visual Studio Express versions for Web Developer and Visual Basic use "user instances" when they create a data connection. There's an excellent article about user instances at:

    http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx

    There is also a spot-on posting a better way to form data connection strings if you're running off the parent instance of SQL Server 2005 Express Edition at

    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2862992&SiteID=1

    Visual Basic 2008 Express Edition no longer has the Server Explorer (to the best of my research). I was running into a problem of my data connection failing in VB2008EE after using Management Studio Express to work with the database VB2008EE was connected to. By going into MyProject and editing the connection string I no longer have that problem and can use VB2008EE and MSE in tandem.

    Hope this helps others who might be struggling with this....

  • I came across this problem myself recently and figured out that you can't browse any folders where the NETWORK SERVICE account doesn't have direct or indirect security permissions.

    You can give SSMS access to all the folders for your login by granting full control of C:\Documents and Settings\account to the group SQLServer2005MSSQLUser$server$SQLEXPRESS.

    Select your account folder under Documents and Settings, select Sharing and Security..., add the group SQLServer2005MSSQLUser$server$SQLEXPRESS, and check full control under permissions.

    This works because the NETWORK SERVICE account is a member of the group SQLServer2005MSSQLUser$server$SQLEXPRESS.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply