BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 10-14-2010, 01:30 PM   #1
sjefkenl
New Member
 
Join Date: Oct 2010
Model: 9700
PIN: N/A
Carrier: none
Posts: 6
Default Upgrade to 5.0.2 failed

Please Login to Remove!

Did someone have this problem when upgrading from 5.0.1 to 5.0.2?


14 15:53:38.533):{0x18F4} Progress update 500. Current position is 8500 of 32000 = 26%
[30000] (10/14 15:53:38.533):{0x18F4} Executing file [D:\BlackBerry Enterprise Server\Logs\Installer\BES_SQL_Generated\MigrateUse rAndDevicesV101014155338.sql]
[30000] (10/14 15:53:38.533):{0x18F4} SQL being executed:
/************************************************** **************************
MigrateUserAndDevices.sql

This SQL script will migrate UserConfig records to BASUsers

NOTE: records are only inserted if missing


(C) 1997-2010 Research In Motion Limited.
************************************************** *************************/

set nocount on
[30000] (10/14 15:53:38.533):{0x18F4} SQL executed successfully
[30000] (10/14 15:53:38.533):{0x18F4} SQL being executed:

ALTER TABLE BASUsers DISABLE TRIGGER BASUsersUserConfigTrigger
[30000] (10/14 15:53:38.534):{0x18F4} SQL executed successfully
[30000] (10/14 15:53:38.534):{0x18F4} SQL being executed:

IF NOT EXISTS (SELECT * FROM syscolumns WHERE object_name(id) = 'GroupConfig' AND name = 'BASGroupId')
BEGIN
ALTER TABLE GroupConfig ADD BASGroupId INT
END
[30000] (10/14 15:53:38.545):{0x18F4} SQL executed successfully
[30000] (10/14 15:53:38.545):{0x18F4} SQL being executed:
DECLARE @groupName NVARCHAR(256)
DECLARE @groupConfigId INT
DECLARE @groupITPolicyId INT
DECLARE @basGroupId INT
DECLARE @basUserId INT
DECLARE group_config_cursor CURSOR FOR
SELECT GroupConfig.Id, GroupConfig.GroupName, UserConfig.BASUserId, GroupConfig.ITPolicy2Id
FROM GroupConfig, UserConfig
WHERE GroupConfig.Id = UserConfig.GroupConfigId
OPEN group_config_cursor
FETCH NEXT FROM group_config_cursor INTO @groupConfigId, @groupName, @basUserId, @groupITPolicyId
WHILE @@FETCH_STATUS = 0
BEGIN
IF NOT EXISTS (SELECT *
FROM BASLocaleNamesAndDescriptions
WHERE NameAndDescriptionTypeId = 7
AND PlugInId = 0
AND Locale = 'en_US'
AND Name = @groupName)
BEGIN
INSERT INTO BASGroups (GroupType, OrganizationId) VALUES (0, 0)
SET @basGroupId = SCOPE_IDENTITY()
INSERT INTO BASLocaleNamesAndDescriptions (Na
[30000] (10/14 15:53:38.647):{0x18F4} SQL executed successfully
[30000] (10/14 15:53:38.648):{0x18F4} SQL being executed:

DECLARE @userConfigId INT
DECLARE @organizationId INT
DECLARE @userState INT
DECLARE @lastLoginTime DATETIME
DECLARE @loginName VARCHAR(40)
DECLARE @loginPassword VARCHAR(40)
DECLARE @displayName VARCHAR(80)
DECLARE @emailAddress VARCHAR(255)
DECLARE @externalDataSourceId INT
DECLARE @lastLoginComputerName VARCHAR(80)
DECLARE @deletedDateTime DATETIME
DECLARE @pin VARCHAR(50)
DECLARE @basUserId INT
DECLARE @basDeviceId INT
DECLARE @basUserDeviceConfigurationId INT
DECLARE @deviceId INT
DECLARE @userId INT
DECLARE @forceLoadDeferralsRemaining INT
DECLARE @isBackupRequiredNow VARCHAR(1)
DECLARE @forceLoadResult INT
DECLARE @autoBackupResult INT
DECLARE @autoBackupFrequency INT
DECLARE @isAutoBackupExcludeMessage VARCHAR(1)
DECLARE @isAutoBackupExcludePIMData VARCHAR(1)
DECLARE @isAutoBackupEnabled VARCHAR(1)
DECLARE @isAutoBackupConfigured VARCHAR(1)
DECLARE @lastBackupTime DATETIME
DECLARE @capabilityKey INT
DECLARE @authenticatorTypeId INT
DECLARE @
[30000] (10/14 15:53:38.991):{0x18F4} SQL executed successfully
[30000] (10/14 15:53:38.992):{0x18F4} SQL being executed:

-- INSTALL_PROGRESS_BAR=316016

IF NOT EXISTS (SELECT * FROM ServerDBVersion WHERE BuildDateTime > N'20081101' AND CurrentVersion LIKE '5%')
BEGIN
DELETE FROM BASReferences
WHERE OwnerReferenceTypeId = 4
AND ReferenceTypeId = 5
AND OwnerReferenceTypePlugInId = 0
AND ReferenceTypePlugInId = 0
DECLARE @sequence INT
DECLARE @userId INT
DECLARE @userConfigId INT
DECLARE @serverConfigId INT
DECLARE @dispatcherServiceInstanceId INT
DECLARE create_user_dest_ref_cursor CURSOR FOR
SELECT UserId, UserConfigId FROM BASUsers WHERE UserConfigId IS NOT NULL
OPEN create_user_dest_ref_cursor
FETCH NEXT FROM create_user_dest_ref_cursor INTO @userId, @userConfigId
WHILE @@FETCH_STATUS = 0
BEGIN
SET @serverConfigId = (SELECT ServerConfigId
FROM UserConfig
WHERE Id = @userConfigId)
SET @dis
[30000] (10/14 15:53:39.000):{0x18F4} SQL executed successfully
[30000] (10/14 15:53:39.001):{0x18F4} SQL being executed:
-- INSTALL_PROGRESS_BAR=118718

ALTER TABLE BASUsers ENABLE TRIGGER BASUsersUserConfigTrigger
[30000] (10/14 15:53:39.002):{0x18F4} SQL executed successfully
[30000] (10/14 15:53:39.002):{0x18F4} SQL being executed:

IF EXISTS (SELECT * FROM syscolumns WHERE object_name(id) = 'GroupConfig' AND name = 'BASGroupId')
BEGIN
ALTER TABLE GroupConfig DROP COLUMN BASGroupId
END
DELETE FROM GroupSync
DELETE FROM GroupPushRules
DELETE FROM GroupPullRules
UPDATE UserConfig SET GroupConfigId = NULL WHERE GroupConfigId IS NOT NULL
DELETE FROM GroupConfig
[30000] (10/14 15:53:39.068):{0x18F4} SQL executed successfully
[30000] (10/14 15:53:39.077):{0x18F4} SQL being executed:

DECLARE @tmpSuperRoleId INT
DECLARE @capabilityKey INT
DECLARE @sysAdminUserId INT
IF NOT EXISTS (SELECT *
FROM BASLocaleNamesAndDescriptions
WHERE NameAndDescriptionTypeId = 8
AND PlugInId = 0
AND Locale = 'en_US'
AND Name = 'Security Administrator')
BEGIN
INSERT INTO BASRoles (OrganizationId) VALUES (0)
SET @tmpSuperRoleId = SCOPE_IDENTITY()
IF NOT EXISTS (SELECT *
FROM BASLocaleNamesAndDescriptions
WHERE NameAndDescriptionTypeId = 8
AND PlugInId = 0
AND NameAndDescriptionInstanceId = @tmpSuperRoleId
AND Locale = 'en_US'
AND Sequence = 1)
BEGIN
INSERT INTO BASLocaleNamesAndDescriptions (NameAndDescriptionTypeId, PlugInId, NameAndDescriptionInstanceId,
Lo
[20000] (10/14 15:53:40.116):{0x18F4} [CBESDBInstaller::executeRetryDDL] COM Error 0x80004005 - Unspecified error - Source: "Microsoft OLE DB Provider for SQL Server" - Description "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression." Native error = 512
[20000] (10/14 15:53:40.117):{0x18F4} [CBESDBInstaller::executeRetryDDL] SQL Error for:

DECLARE @tmpSuperRoleId INT
DECLARE @capabilityKey INT
DECLARE @sysAdminUserId INT
IF NOT EXISTS (SELECT *
FROM BASLocaleNamesAndDescriptions
WHERE NameAndDescriptionTypeId = 8
AND PlugInId = 0
AND Locale = 'en_US'
AND Name = 'Security Administrator')
BEGIN
INSERT INTO BASRoles (OrganizationId) VALUES (0)
SET @tmpSuperRoleId = SCOPE_IDENTITY()
IF NOT EXISTS (SELECT *
FROM BASLocaleNamesAndDescriptions
WHERE NameAndDescriptionTypeId = 8
AND PlugInId = 0
AND NameAndDescriptionInstanceId = @tmpSuperRoleId
AND Locale = 'en_US'
AND Sequence = 1)
BEGIN
INSERT INTO BASLocaleNamesAndDescriptions (NameAndDescriptionTypeId, PlugInId, NameAndDescriptionInstanceId,

[10000] (10/14 15:53:40.128):{0x18F4} An attempt to upgrade the database was unsuccessful. An error occurred while executing an SQL statement.

any help would be appriciated.

Server info:

Windows 2008 x64 standard
SQL Express 2005
BES Express 5.01 (trying to upgrade to 5.0.2:()


After this error in the log the upgrade will fail.

Last edited by sjefkenl; 10-14-2010 at 01:39 PM..
Offline  
Old 10-14-2010, 01:58 PM   #2
KalvinCline
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Canada
Model: 8110
PIN: N/A
Carrier: A crappy one aka. Rogers
Posts: 96
Default

Are you running the install file as the BES service account? and/or the same account that originally installed BES 5.0?
Offline  
Old 10-14-2010, 02:05 PM   #3
sjefkenl
New Member
 
Join Date: Oct 2010
Model: 9700
PIN: N/A
Carrier: none
Posts: 6
Default

Quote:
Originally Posted by KalvinCline View Post
Are you running the install file as the BES service account? and/or the same account that originally installed BES 5.0?
The same account as 5.0.1 is installed with. Upgrade trying from console. User is dbo for the db. Service account is the same account.

Thx for your help.
Posted via BlackBerryForums.com Mobile
Offline  
Old 10-14-2010, 02:13 PM   #4
KalvinCline
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Canada
Model: 8110
PIN: N/A
Carrier: A crappy one aka. Rogers
Posts: 96
Default

I'm trying to locate some docs I had on a similiar case. My Bad for not having them :(

In the meantime, you have a backup of the database prior to the attempted upgrade?
Offline  
Old 10-14-2010, 02:25 PM   #5
KalvinCline
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Canada
Model: 8110
PIN: N/A
Carrier: A crappy one aka. Rogers
Posts: 96
Default

Can you provide the next few lines in the log after the ones listed above?
Offline  
Old 10-14-2010, 03:20 PM   #6
sjefkenl
New Member
 
Join Date: Oct 2010
Model: 9700
PIN: N/A
Carrier: none
Posts: 6
Default log

Attached first part of log.
Attached Files
File Type: txt Setup20101014134934_1.txt (590.3 KB, 1 views)
Offline  
Old 10-14-2010, 03:22 PM   #7
sjefkenl
New Member
 
Join Date: Oct 2010
Model: 9700
PIN: N/A
Carrier: none
Posts: 6
Default log

Attached Second part.

This part of the log you requested.
Attached Files
File Type: txt Setup20101014134934_2.txt (621.7 KB, 1 views)
Offline  
Old 10-14-2010, 03:25 PM   #8
sjefkenl
New Member
 
Join Date: Oct 2010
Model: 9700
PIN: N/A
Carrier: none
Posts: 6
Default backup

I have a backup from just before the upgrade attempt.
Offline  
Old 10-15-2010, 07:29 AM   #9
KalvinCline
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Canada
Model: 8110
PIN: N/A
Carrier: A crappy one aka. Rogers
Posts: 96
Default

The error appears very generic. At this point, I would suggest restoring the old Database, verify the SQL permissions for the BES service account (Server Administrator, RIM_DB_BES_SERVER, and DB_Owner which I think you already checked).

Is the database local to the BES server?
Offline  
Old 10-15-2010, 08:57 AM   #10
sjefkenl
New Member
 
Join Date: Oct 2010
Model: 9700
PIN: N/A
Carrier: none
Posts: 6
Default db

Yes the db is a local db.

What is the use of restoring the db if i still want to upgrade? The same problem will occur again or not?

thx.
Offline  
Old 10-15-2010, 09:18 AM   #11
KalvinCline
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Canada
Model: 8110
PIN: N/A
Carrier: A crappy one aka. Rogers
Posts: 96
Default

If you restore the DB and verify the BES service account permissions. Especially if you have to add any of the 3 SQL permissions. Perhaps the upgrade was done with the wrong account without realizing it... then there is a chance the upgrade will work from the original Database.

Do you know if anyone made manual changes to the Database since it was originally installed....like update a field using SQL Management Studio?

If restore and upgrade do not work, you may need to contact RIM. It sounds like there is something wrong with the Database but hopefully it was just a problem during the upgrade.

Sorry, I couldn't be of more help.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


GE (Datex Ohmeda) Flow Sensor Transducer for Aestiva 5, Aespire, Avance, Aisys  picture

GE (Datex Ohmeda) Flow Sensor Transducer for Aestiva 5, Aespire, Avance, Aisys

$309.95



100PSI 5V Pressure Transducer or Sender 1/8NPT for Fuel Diesel Oil Air Water picture

100PSI 5V Pressure Transducer or Sender 1/8NPT for Fuel Diesel Oil Air Water

$12.82



1pcs New & Genuine 961-070-000 BELLOFRAM PRESSURE TRANSDUCER picture

1pcs New & Genuine 961-070-000 BELLOFRAM PRESSURE TRANSDUCER

$205.00



60W 40KHz Silvery Ultrasonic Piezoelectric Transducer High Conversion Efficiency picture

60W 40KHz Silvery Ultrasonic Piezoelectric Transducer High Conversion Efficiency

$18.99



MTS LPRHVU00701 Temposonics Transducer Linear Position LPR-HVU-00701 90014868 picture

MTS LPRHVU00701 Temposonics Transducer Linear Position LPR-HVU-00701 90014868

$238.95



CR Magnetics CR4120-100 True RMS Loop-Powered AC Current Transducer  picture

CR Magnetics CR4120-100 True RMS Loop-Powered AC Current Transducer

$167.86







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.