Problems connecting to SSMS 2012 from VS 2010

  • This application used to work. Its been a year and a half since I used it. The error I'm getting is:

    "Cannot open database \"Northwind\" requested by the login. The login failed.\rLogin failed for user 'Mike\\Mike Simpson'"

    When I try to add a user I'm told the user already exists. Which of course I know.

    Here is my hard coded connection string:

    "Data Source=Localhost;Initial Catalog=Northwind;Integrated Security=True"

    Should i just consider mixed mode?

    I'm not currently using web.config on this project.

    I followed the information found here But it doesn't work. In User Mapping, I'm already set at DBO for Northwind.

    http://blog.sqlauthority.com/2009/08/20/sql-server-fix-error-cannot-open-database-requested-by-the-login-the-login-failed-login-failed-for-user-nt-authoritynetwork-service/

    I don't know what else to do.

    Thanks!

  • So, this is a web application running on the same machine (MIKE) as the SQL instance that contains database Northwind?

    Are you sure that Northwind is on the default instance?

    Have you checked which network protocols are enabled in SQL Server Configuration Manager?

    Can you log in using SSMS using windows authentication? If so check which network protocols are working by going into the "Options" section of the SSMS login dialog and changing the Network protocol on the "Connection Properties" tab.

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • Thanks very much for your replies. I'll answer as best as I can because I'm an novice.

    mister.magoo (11/3/2013)


    So, this is a web application running on the same machine (MIKE) as the SQL instance that contains database Northwind?

    Yes, this is the same machine.

    Are you sure that Northwind is on the default instance?

    Not exactly sure but I think SSMS 2008 is my default instance. On SSMS 2008, there is no slash in the name. While SSMS 2012 has Mike/Arius. My "machine name" whatever that means, is the same as my name. Is that the same as my computer name--machine name that is? Northwind is on SSMS2012.

    Have you checked which network protocols are enabled in SQL Server Configuration Manager?

    In SQL Server Configuration Manager, I double clicked on Sql Server Network Configuration and protocols for ARIUS. I notice that Name Pipes is disabled. Shared Memory and TCP/IP are enabled.

    Can you log in using SSMS using windows authentication? If so check which network protocols are working by going into the "Options" section of the SSMS login dialog and changing the Network protocol on the "Connection Properties" tab.

    I am able to login using my username. Both SSMS 2012 (ARIUS) and SSMS 2008 both say Connect to database: Default and Network protocol is also set to Default. I tested each of the three above Shared memory, TCP/IP, and Named Pipes. I was able to connect using all but Named Pipes.

  • Jacob Pressures (11/3/2013)


    Thanks very much for your replies. I'll answer as best as I can because I'm an novice.

    Are you sure that Northwind is on the default instance?

    Not exactly sure but I think SSMS 2008 is my default instance. On SSMS 2008, there is no slash in the name. While SSMS 2012 has Mike/Arius. My "machine name" whatever that means, is the same as my name. Is that the same as my computer name--machine name that is? Northwind is on SSMS2012.

    Couple of things here, SSMS is Sql Server Management Studio - a tool for managing SQL Server, it is not the database engine and as such does not have an "instance" associated with it. SQL Server 2008 and SQL Server 2012 seem to be installed on your machine, and from what you said, SQL 2012 is using a named instance of Arius?

    In this case, you need to specifiy that in your connection string

    "Data Source=Localhost[highlight="#ffff11"]\Arius[/highlight];Initial Catalog=Northwind;Integrated Security=True"

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • Thanks 3 BILLION! That worked!!! I had to add another slash in there.

    string ConnectionString = "Data Source=Localhost\\Arius;Initial Catalog=Northwind;Integrated Security=True";

    I do wonder why this wasn't needed before.

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

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