Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...DNN 5.2.1 DB Upgrade ErrorDNN 5.2.1 DB Upgrade Error
Previous
 
Next
New Post
12/22/2009 11:58 PM
 

Hello-

I've just upgraded one of my sites to DNN 5.2.1 and ran into an error I'm finding interesting:

Upgrade Status Report
00:00:01.359 - Upgrading to Version: 05.02.01
00:00:07.296 - Executing Script: 05.02.01.SqlDataProvider Error! (see 05.02.01.log for more information)
00:00:18.812 - Executing Application Upgrades: 05.02.01
...

When I view the site logs via Host > Host Settings and select '05.02.01' from the 'View Upgrade Log for Version:' drop down list, I'm presented with the following:

System.Data.SqlClient.SqlException: Cannot find the user '$h@unW@1k3r', because it does not exist or you do not have permission.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
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.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 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.GrantStoredProceduresPermission(String Permission, String LoginOrRole)

GRANT EXECUTE TO [$h@unW@1k3r]

This seems wrong as user $h@unW@1k3r is the user defined in the connection string and is the same user that has been used since the site went live almost 5 years ago.

FYI - $h@unW@1k3r isn't the real user defined in my DB. However, I'm guessing someone might get a kick out of that :)


Wisconsins DNN User Group: www.WIDNN.com
Visit my home page: www.HerbBenton.com
 
New Post
12/23/2009 5:00 AM
 

please review content of the upgrade log file (website/providers/dataproviders/sqldataprovider/05.02.01.log) and post it here.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/23/2009 8:55 AM
 

@Herb,

  In 5.2.1 we added some defensive coding to try and ensure that the script has execution permissions when you are not using an upgradeconnectionstring or when you are not using the dbo schema.  Often people setup non-standard schema configurations or use logins with some limited user permissions.  In many instances these configurations will allow you to install DNN and then will manifest as an error later when other modules are installed.

If you open SQL Enterprise Manager, and open a query window and execute the following script (with the appropriate substitutions for db name and login:

USE

[$h@unsDB]

GRANT

EXECUTE to [$h@unW@1k3r]

If this code fails then there is some permission issue in your db.


Joe Brinkman
DNN Corp.
 
New Post
12/23/2009 8:55 AM
 

I got the same problem....

 

Here's my log:

 

System.Data.SqlClient.SqlException: There is already an object named 'UpgradeDefaultLanguages' in the database.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
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.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 DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)



/* ensure every portal has a default language */
/* This is a temporary procedure that will be deleted */
/* after application upgrade completes */
/******************************************************/
CREATE PROCEDURE dbo.UpgradeDefaultLanguages

AS
DECLARE @PortalID int
DECLARE @DefaultLanguage nvarchar(10)
DECLARE @LanguageID int

--Iterate through each portal
DECLARE Languages_Cursor CURSOR FOR
SELECT PortalID, DefaultLanguage
FROM dbo.Portals

OPEN Languages_Cursor
--get first
FETCH NEXT FROM Languages_Cursor
into @PortalID, @DefaultLanguage
WHILE @@FETCH_STATUS = 0
BEGIN
set @LanguageID=(select languageid from dbo.Languages where CultureCode=@DefaultLanguage)

if not exists(select * from PortalLanguages where PortalID=@PortalID)

exec dbo.[AddPortalLanguage] @PortalId,@LanguageId,-1

FETCH NEXT FROM Languages_Cursor
into @PortalID, @DefaultLanguage

END
CLOSE Languages_Cursor
DEALLOCATE Languages_Cursor




 

 
New Post
12/23/2009 9:03 AM
 

Miguel,

  Your error is different.  Some other code created an UpgradeDefaultLanguages procedure which is conflicting with ours.  Just change the name of the proc in the script prior to actually starting the upgrade.


Joe Brinkman
DNN Corp.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...DNN 5.2.1 DB Upgrade ErrorDNN 5.2.1 DB Upgrade Error


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out