none
Problems with SQL Server 2012 Express Edition

    Question

  • When I installed Visual Studio Express 2012, I didn't have SP1 for Windows 7 installed.  (This was the first version of VS which I tried installing).  I do not remember if I received an error message or not in reference to SQL Server.  In any case, I was not able to open the table designer when I tried adding an .mdf (service- based database) to a C# Solution.  I uninstalled all of SQL Server 2012 that I could find, installed SP1, and then installed SQL Server 2012 with Tools.  

    I am still unable to add any new tables, and the database diagram node does not even show up.  

    When I tried connecting to an existing database from Management Studio, I could not access my documents folder at all.  When I tried adding a new connection from the wizard, I received a message to update the installation (which should have been complete) by adding basic maintenance (or something else).  When I tried that, I could not find a valid installation directory.

    Do I need to uninstall Visual Studio and SQL Server and start again?  Will doing so give me a problem with my registration?  Or is there something else I need to know?

    Sunday, July 14, 2013 9:26 AM

Answers

  • Switched computers, now loading table designer is working fine.

    >>When I tried connecting to an existing database from Management Studio, I could not access my documents

    When I log into (localdb)\v11.0 instead of SQLServerExpress, I am able to access my databases


    Temi Unger .Net Developer

    • Marked as answer by TemiU Sunday, October 13, 2013 8:59 AM
    Sunday, October 13, 2013 8:59 AM

All replies

  • >>>When I tried connecting to an existing database from Management Studio, I could not access my documents >>>folder at all.  

    What errors are  you getting?

    >>>I was not able to open the table designer when I tried adding an .mdf (service- based database) to a C# Solution

    http://msdn.microsoft.com/en-us/library/ms190209.aspx


    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Blog: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance

    Sunday, July 14, 2013 11:06 AM
    Answerer

  • I wasn't getting any errors, I just did not see any folders under my root username directory.  

    Thanks for the link.  However, I was trying to create a new database from a C# project, and I could not add tables or access the database designer.  I was following step-by-step instructions from a video tutorial of how to do it, and it was clear that the fault lay in my computer, not in my actions. 

    Sunday, July 14, 2013 7:25 PM
  • http://www.microsoft.com/en-us/download/details.aspx?id=29062

    Try reinstall EXPRESS Edition from this web site.


    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Blog: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance

    Monday, July 15, 2013 5:19 AM
    Answerer
  • Do I have to uninstall SQL Server first?  
    Wednesday, July 17, 2013 9:38 AM
  • Hi TemiU,

    From your description, I understand that you have reinstalled the SQL Server 2012 Express with tool on Windows7 successfully, When you tried to connect to an existing database from Management Studio, the documents folder can’t be accessed.

    This issue can occur due to user permissions. Please refer to the following code to check permissions.

    Step1:Check whether the current user has permission to create database.
             
    • SELECT * FROM fn_my_permissions(NULL, 'SERVER');
    • GO

    Step2:Check whether the current user has permission to create table.
    • SELECT * FROM fn_my_permissions(NULL, 'database');
    • GO        
    If you haven’t permission, you can  right click on the SQL Server and look up properties.

    Step3: If you want to attach an existing database file, please execute the following code. Please refer to the codes.
    • sp_attach_db  'DB', 'E:\Data\DB.mdf '


    References:
    • http://msdn.microsoft.com/en-us/library/ms179877.aspx
    • http://www.microsoft.com/en-us/download/details.aspx?id=35579

    Regards,
    Heidi Duan

    Thursday, July 18, 2013 1:14 AM
  • If I see all the permissions in the table which is created from these statements, does that mean that I have permission to do all of those actions?  

    Also, when I tried running the attach code on a database which I created in Visual Studio, I received the following error message:

    Msg 5133, Level 16, State 1, Line 1
    Directory lookup for the file "C:\Users\MyName\Documents\Visual Studio 2012\Projects\Homework6\Day6\Day6\ACME.mdf " failed with the operating system error 5(Access is denied.).

    What should I have done differently?


    Temi Unger .Net Developer

    Sunday, July 21, 2013 6:54 PM
  • I uninstalled both VS and SQL Server.  Then I re-installed VS, and the table designer loaded, i.e., I was able to create my own tables in VS.  Next, I uninstalled SQL Server and reinstalled the file from the download site (SQL Server Express with Tools), which resulted in a successful install.  

    I once again can not load the table designer in VS, nor can I see the database which I created in VS from SQL Management Studio.  (Though I am running the computer as an Administrator, and I set no permissions, I am not able to navigate below my username root directory, and receive an "Access is denied" error message when I try attaching the database using code as Heidi suggested below.)


    Temi Unger .Net Developer

    Sunday, July 21, 2013 6:59 PM
  • Is this still an issue?

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Saturday, August 03, 2013 9:41 AM
    Owner
  • I've been trying to work around it by creating my databases in SQL Management Studio (thereby avoiding the issue of not being able to load the table designer in VS), and by storing my files in a different directory, which I can access.  However, it is still an issue.

    I uninstalled SQL Server after re-installing Visual Studio Express 2012 and then reinstalled the With Tools edition from the website.  Should I not have uninstalled? Should I re-install VS again?


    Temi Unger .Net Developer

    Sunday, August 04, 2013 7:55 AM
  • I had uninstalled the Compact Edition, as I thought this was necessary to allow the Express Edition With Tools installation.  I just re-installed Server 4.0 Compact, but I still get "error loading table definition" when I try to create a new table in a new Service-based database in VS Express.

    Temi Unger .Net Developer

    Sunday, August 04, 2013 9:24 AM
  • Can anyone help TemiU?

    Thanks!


    Ed Price, SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Tuesday, September 03, 2013 9:58 AM
    Owner
  • Switched computers, now loading table designer is working fine.

    >>When I tried connecting to an existing database from Management Studio, I could not access my documents

    When I log into (localdb)\v11.0 instead of SQLServerExpress, I am able to access my databases


    Temi Unger .Net Developer

    • Marked as answer by TemiU Sunday, October 13, 2013 8:59 AM
    Sunday, October 13, 2013 8:59 AM