Unable to connect to SQL 2005 Server

Discussion in 'Databases' started by Featheriver, Jan 9, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I confess I'm not very knowledgeable about connecting a database built with Visual Web Developer 2008, and I'm failing miserably in following the KB article 010369 about "How to connect to SQL Server 2005 using SQL Server Management Studio?"</o:p>
    </o:p>
    I've been all over the books I have, this forum, and the MSDN library trying everything I can to make the connection without success.</o:p>
    </o:p>
    Following is the error message I get.</o:p>
    </o:p>
    Can anyone explain simply what I need to do to make the connection? Help would be greatly appreciated.</o:p>
    </o:p>
    ===================================</o:p>
    Cannot connect to sql2k511.discountasp.net.</o:p>
    ===================================</o:p>
    Login failed for user 'ncdccnet000'. (.Net SqlClient Data Provider)</o:p>
    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&amp;EvtSrc=MSSQLServer&amp;EvtID=18456&amp;LinkId=20476</o:p>
    ------------------------------
    Server Name: sql2k511.discountasp.net
    Error Number: 18456
    Severity: 14
    State: 1
    Line Number: 65536</o:p>

    ------------------------------
    Program Location:</o:p>
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
    at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
    at System.Data.SqlClient.SqlConnection.Open()
    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
    at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.Connect</o:p>
    </o:p>
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    This error means that you are using a wrong username / passwrod.

    I noticed that you are using your account username. By default, SQL login is different from your account login. Check the SQL manager in the control panel for username.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. "Check the SQL manager in the control panel for username."

    Thanks Bruce. I went to the Control Panel and looked for something called "SQL manager" and found nothing with that name.

    Wereabouts in the Contol Panel can it be found?
     
  4. Takeshi Eto

    Takeshi Eto DiscountASP.NET Staff

    Navigate to the SQL 2005 Section of the control panel.



    Eric
    DiscountASP.NET - Microsoft Gold Partner
    - Best ASP.NET Web hosting: 2008, 2007, 2006, 2005 - asp.netPRO Magazine
    - Best ASP.NET Web Hosting: 2007, 2005 - Visual Studio Magazine
    - kb.discountasp.net - community.discountasp.net - www.daspblog.com
     
  5. Thanks Eric. I finally figured out the login name is different. When I try to access the website with Internet Explorer I get the following error message. Can you tell me the solution to this? I do appreciate your assistance.



    Parser Error Message: Required attribute 'connectionString' not found.
    Source Error:






    Code:
    Line 26: 	</appSettings>
    Line 27: 	<connectionStrings>
    Line 28: 		<add name="Data Source=tcp:sql2k511.discountasp.net;Initial Catalog=SQL2005_584267_ppdatabase;User ID=SQL2005_584267_ppdatabase_user;Password=maggierambo;" />
    Line 29: 	</connectionStrings>
    Line 30: 	<system.web>


    Source File: E:\web\ncdccnet000\htdocs\web.config Line: 28


    Post Edited (ncdccnet000) : 1/9/2009 10:00:09 PM GMT
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    are you sure you set your site to run under asp.net 2.0? check it in the control panel's iis manager.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page