Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I recently downloaded DotWiki which I plan on using for a support section for my companies website. The application itself has two different security modes "simple" and "full". Full uses an ASP.NET Membership provider for security. However when I run the following command (of course replacing [sql server] and such with proper information) I get a pretty big error.

aspnet_regsql -S [my computer name]\[sql server] -E -A all -d DotWiki

I get the following error when I run this.

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql -S AGQAOFFICE\SQLSER
VER05 -E -A all -d DotWiki

Start adding the following features:
Membership
Profile
RoleManager
Personalization
SqlWebEventProvider

.
An error occurred during the execution of the SQL file 'InstallMembership.sql'.
The SQL error number is 290 and the SqlException message is: Invalid EXECUTE sta
tement using object "Relation", method "SetUseVarDecimal".
SQL Server: [my computer name]\[sql server]
Database: [DotWiki]
SQL file loaded:
InstallMembership.sql

Commands failed:

/*************************************************************/
/*************************************************************/
/*************************************************************/

DECLARE @ver int
DECLARE @version nchar(100)
DECLARE @dot int
DECLARE @hyphen int
DECLARE @SqlToExec nchar(400)

SELECT @ver = 8
SELECT @version = @@Version
SELECT @hyphen  = CHARINDEX(N' - ', @version)
IF (NOT(@hyphen IS NULL) AND @hyphen > 0)
BEGIN
    SELECT @hyphen = @hyphen + 3
    SELECT @dot    = CHARINDEX(N'.', @version, @hyphen)
    IF (NOT(@dot IS NULL) AND @dot > @hyphen)
    BEGIN
        SELECT @version = SUBSTRING(@version, @hyphen, @dot - @hyphen)
        SELECT @ver     = CONVERT(int, @version)
    END
END

/*************************************************************/

IF (@ver >= 8)
    EXEC sp_tableoption N'aspnet_Membership', 'text in row', 3000

/*************************************************************/
/*************************************************************/

IF (EXISTS (SELECT name
              FROM sysobjects
             WHERE (name = N'aspnet_Membership_CreateUser')
               AND (type = 'P')))
DROP PROCEDURE dbo.aspnet_Membership_CreateUser

SQL Exception:
System.Data.SqlClient.SqlException: Invalid EXECUTE statement using object "Rela
tion", method "SetUseVarDecimal".
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
ParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName,
Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult res
ult, 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 sessionSta
te, Boolean isInstall, SessionStateType sessionStatetype)

Any help would be appreciated :)

share|improve this question

4 Answers 4

First of, please install the latest servicepack as splattne suggested, as the @@version you've mentioned is NOT sp2. See http://www.krell-software.com/mssql-builds.asp

Second, you can also install the required tables, sprocs and views directly. You can find scripts to run in SQL server here: %WINDOWS%\Microsoft.NET\Framework\v2.0.50727\

See this page for more information: http://aspnet.4guysfromrolla.com/articles/040506-1.aspx

share|improve this answer

Which Service Pack do you have installed on SQL Server 2005? Seems it has been resolved with SP2 (the last one is Service Pack 3).

share|improve this answer
    
select @@version Microsoft SQL Server 2005 - 9.00.1406.00 (Intel X86) Mar 3 2007 18:40:02 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2) So it looks like service pack 2, should 3 fix it? Installing it might be a big problem, trying to avoid it if possible. –  Kevin Wiskia Jun 16 '09 at 16:03

So the line that is actually getting the error would be this:

EXEC sp_tableoption N'aspnet_Membership', 'text in row', 3000

Invalid EXECUTE statement using object "Relation", method "SetUseVarDecimal"

I'm getting a lot of mixed results, updating to service pack 2 (which I already have). Also some people are saying it's a problem with the permissions. Nothing seems to work.

share|improve this answer

Is your database running in the correct Compatability Mode for SQL2005? That would be 90. Also make sure that you have ALTER permissions on the Relation table.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.