> Forums > Active Forums > Community Support > FYI - PIVOT error with incorrect database compatibility level while upgrading to 4.2
Last Post 01 Apr 2010 12:45 PM by Will Morgenweck. 8 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Clifford Simpkins
Customers
Clifford Simpkins
Post Count:69

--
29 Mar 2010 09:58 AM
    I had some issues over the weekend while upgrading AF to 4.2, and I thought I would share my issues in case anyone else runs into a similar issue.

    During the upgrade, the install (a) timed out during the upgrade/install of the module the first time, and (b) didn't report an error during subsequent reinstalls. After installing, the module would take forever and throw lots of errors into the event log, complaining about a missing dbo.activeforums_SettingsTable object and about encountering <% and %> in the html.

    I eventually ran the SQL scripts by hand to locate the issue, which had to do with the CREATE FUNCTION dbo.activeforums_SettingsTable call in the 04.02.00.SqlDataProvider file - it seems that my SQL Server instance did not like the usage of the PIVOT functionality. Long story short, my DNN installation dates back about 6 or 7 years ago, and it was originally installed on a SQL Server 2000 database (which doesn't support the PIVOT capability). When I upgraded from SQL Server 2000 to 2005, my hosting provider did the upgrade using backup/restore - and my database was still running in SQL Server 2000 compatibility mode.

    To get the database to realize it is, in fact, SQL Server 2005, I had to run the following command:
    EXEC sp_dbcmptlevel dbname, 90;
    GO

    This forced the database to run in SQL Server 2005 compatibility mode - at which time I was able to rerun the CREATE FUNCTION script without error. I then reran the SQL files (for good measure), and everything worked again!

    Hope this helps,
    Cliff
    Cliff Simpkins
    www.resguild.com
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    29 Mar 2010 10:23 AM
    Thanks for posting. This has been very common support topic. Regardless of how we explain it, many customers still feel it is a problem with the installer. This is a very useful post. Maybe since another customer has reported the solution it will have a better result then when we try to describe it. I did alter the subject slightly to reflect the actual problem.
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Dan Ball
    Customers
    Dan Ball
    Post Count:582

    --
    29 Mar 2010 03:43 PM
    This seems to be a recurring problem with several of us (the compatibility mode issue), can you put anything in the install scripts that detects an older compatibility mode and won't install until it is resolved?
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    29 Mar 2010 03:58 PM
    I wish I could, but the DNN installer is an all or nothing. I can't add any kind of conditions for database version.
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Clifford Simpkins
    Customers
    Clifford Simpkins
    Post Count:69

    --
    29 Mar 2010 10:26 PM
    I have to admit, it was a squirrly issue to resolve...and it didn't help that I had several issues with upgrading DNN from 5.1.0 to 5.3.1 the same evening.

    If I didn't have experience writing my own DNN module installations, I would likely have opened up a request as well.

    For those looking for additional information on it, the Microsoft documentation tells the full story, but isn't very readable. I found a semi-random MVP blog post on the stored proc to be much more useful.

    In the end, everything turned out pretty swell...and it all runs much faster than it had prior...I just figured it was worth giving folks something to search for should they run into the same problem...nothing scarier than doing a web search and getting no results back.
    Cliff Simpkins
    www.resguild.com
    Hector Sosa
    Customers
    Hector Sosa
    Post Count:24

    --
    30 Mar 2010 06:56 PM
    I'm very glad somebody posted about this. My installation was messed up pretty bad. I had to run all of the SQL scripts that came in the zip file. I had to edit several of the scripts, before they completed. Thankfully, my forums are back.
    =+=+=+=+=+=+=+=+=+=+=+=+=+=
    Hector Sosa, Jr
    http://www.systemwidgets.com
    Utilities for taming IT Operations
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    30 Mar 2010 11:15 PM
    Hector,
    What did you have to edit? I could maybe understand changing a create statement to alter, but I'm not sure why anything else would need to be changed.
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Ceri Wheeldon
    Customers
    Ceri Wheeldon
    Post Count:3

    --
    01 Apr 2010 03:58 AM
    Hi

    I have managed to get the script to load following the initial fix at the start of this thread but my forums are still not loading so I am at a loss and have an irritable client to deal with. Problem I am encountering is that the forums just dont load.

    Thanks
    Sharon
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    01 Apr 2010 12:45 PM
    Running the command in the first post isn't going to fix the entire situation. You now need to run the install scripts again.

    Ceri, I think you already have a support ticket open about this issue. Ben will help you get this corrected.

    All others that come across this problem:
    Your best course of action would be to restore your database to the backup you made just prior to installing the upgrade. You can then run the script at the top of this post. Then install the package again.

    Active Forums Enterprise and Active Social customers can create a help desk ticket. We can correct this for you with host access.

    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    You are not authorized to post a reply.
    > Forums > Active Forums > Community Support > FYI - PIVOT error with incorrect database compatibility level while upgrading to 4.2
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy