Can no longer connect to SQL Server from Visual Studio 2005 after installing SQL Management Server Express

  • I recently got started with Visual Studio 2005 to build websites. Everything was going pretty smoothly. I set up user security for my site using the Website Administration Tool and it automatically created an SQL Server database in my APP_DATA folder called ASPNETDB.MDF.

    However the next step was to start importing my data into the SQL Server database. I did some searching online and it appeared that in order to export data from Access to SQL Server, I needed SQL Management Server Express, so I downloaded it and installed it.

    When I opened up SQL Management Server Express, I noted that my website database was not there so I had to "attach" it, which I did. Then I was able to go into Access, create an ODBC DSN and start exporting the tables I needed. I then re-opened up Visual Studio and was happy to see that my tables had successfully been imported into my ASPNETDB.MDF database.

    However, now I cannot connect to the SQL Server database. I have tried everything. When I try to create a new data source, it says "database schema could not be retrieved" and login failed for user COMPUTERNAME\USERNAME".

    Then when I go back into the website administration tool, it tells me that it could not establish a connection to the database and that I should use aspnet_regsql command-line utility. When I do this, it also errors, saying:

    "An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 262 and the SqlException message is: CREATE DATABASE permission denied in database 'master'.

    Creating the aspnetdb database..."

    I have even tried uninstalling SQL Management Express and creating a brand new website but I still get the same errors. I really hope I do not have to reinstall Visual Studio all over again to get it back working because that took forever.

    I am really shocked that all of this has been so difficult, even the very most basic website requires importing data from an external source, so why is it so difficult to accomplish with Visual Studio?

    Any help to my predicament would be greatly appreciated.:-)

  • Are you attempting to perform the installation using an Account with Administrator Privileges?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Viewing 2 posts - 1 through 1 (of 1 total)

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