none
Failed to create Application Services Database for SQL Server RRS feed

  • Question

  • I have sql 2005 express installed with VS2005. I tried to install the service database using Aspnet_regsql.exe but always ended up with the same error:

    Code Snippet

    Setup failed.

    Exception:
    An error occurred during the execution of the SQL file 'InstallMembership.sql'. The SQL error number is -2 and the SqlException message is: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

    ----------------------------------------
    Details of failure
    ----------------------------------------

    SQL Server:
    Database: [aspnetdb]
    SQL file loaded:
    InstallMembership.sql

    Commands failed:

    EXEC sp_addrolemember N'aspnet_Membership_BasicAccess', N'aspnet_Membership_FullAccess'
    EXEC sp_addrolemember N'aspnet_Membership_ReportingAccess', N'aspnet_Membership_FullAccess'


    SQL Exception:
    System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
       at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
       at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
       at System.Data.SqlClient.TdsParserStateObject.ReadByte()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at System.Web.Management.SqlServices.ExecuteFile(String file, String server, String database, String dbFileName, SqlConnection connection, Boolean sessionState, Boolean isInstall, SessionStateType sessionStatetype)




    The database aspnetdb was always created with just 4 tables and 3 views.

    Please can someone help me on this, thanks very much!
    Friday, July 27, 2007 11:58 AM

All replies

  •  

    If the database still exists, the script might wait for the last database connection to close to be able to drop the database. Is there any DROp statement in the sql file ?

    Jens K. Suessmeyer

    ---
    http://www.sqlserver2005.de
    ---

    Friday, July 27, 2007 8:44 PM
  • It seems as though the fail is towards the bottom of the InstallMembership.sql statement.  Not quite surte why it is happening, there are a few DROP statements in the sql statement, however, it seems to 'bomb' right before it goes into the GRANT EXECUTE section.  I might have to login and manually do this.  Not sure why the script won't work though.  I'm having the exact same issue.  Any thoughts?

    EXEC sp_addrolemember N'aspnet_Membership_BasicAccess', N'aspnet_Membership_FullAccess'
    EXEC sp_addrolemember N'aspnet_Membership_ReportingAccess', N'aspnet_Membership_FullAccess'
    GO

    --
    --Stored Procedure rights for BasicAcess


    Tuesday, May 13, 2008 1:24 PM