Error 40 when trying to configure SLK for SQL Express

Topics: User Forum
Nov 24, 2006 at 3:38 PM
Hi,

I have SQL 2005 Express installed on the same server as WSS3. It fails to connect to the database, when I try to configure SLK with the following error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

More information has been written to the server event log.



And from the event log:
Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: None
Event ID: 0
Date: 24/11/2006
Time: 15:20:47
User: N/A
Computer: TESTWSS3
Description:
SharePoint Learning Kit Error

System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
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.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
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.SharePointLearningKit.Administration.SaveConfiguration(Guid spSiteGuid, String databaseServer, String databaseName, String schemaToCreateDatabase, String instructorPermission, String learnerPermission, Boolean createPermissions, String settingsFileContents, String defaultSettingsFileContents)
at Microsoft.SharePointLearningKit.AdminPages.ConfigurePage.BtnOk_Click(Object sender, EventArgs e)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Thanks.
Nov 27, 2006 at 5:16 PM
Are you specifying the SQLEXPRESS instance of SQL? For SQL Express you have to specify <ServerName>\SQLEXPRESS as the Database server in the SLK configuration page. Otherwise, I think the server's default SQL instance may be the WSS SQL, which SLK cannot use for its database.
Nov 28, 2006 at 10:52 AM
That was indeed the problem. Cheers Mark.
Nov 29, 2006 at 6:43 AM
I'll put a note to that effect in the next GettingStarted guide.
Dec 12, 2006 at 3:22 PM
I'm not certain this is related, but i think it probably is.

I have a clean Server2003 R2 install with MSOSS 2007 Standard (full release) on it. I installed the SQL component when prompted from the MSOSS install (Rather than a full blown SQL2005 install.

The above solution didn't quite work for me, but using the servername:
<servername>\OFFICESERVERS worked successfully.

(i guess that is the default database name installed with MSOSS?).. Now, im not sure if what i have done is right or not.. it doesnt matter too much to me as i am no where near production at this stage. but pls reply if its a bad solution.
Jan 18, 2007 at 1:22 PM
I'm running MOSS 2007 Trial with SQL 2005 Express, and I too wasn't having any success with <servername>SQLEXPRESS, however when I tried <servername>OFFICESERVERS I receive the following error:

Cannot open database "SharePointLearningKit" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Any ideas on how to resolve this would be greatly appreciated.

Chris