UNSOLVED

manny4566

updated

13 years ago

M

manny4566

8 Posts

0

38521

March 20th, 2014 03:00

Failed Upgrade OME 1.2.1 to 1.3 - Corrupted database.

Hi,


my upgrade to OME 1.3 failed with the error

"Clearing out the corrupted [OMEssentials] database."

in the "InstallUtil.log".

Why ? OME  1.2.1 had no porblems all the time.

We have a remote SQL Server 2008 R2.

The OME Server is Windows 2008 R2.

Why does the installation erase all data and tables? Without backup now all the data would be gone. That can not be right or ?

Some more errors in the Log File:

The .Net SqlClient Data Provider has received a severity 16, state 2 error number 1468
on line 4 of procedure '' on server 'XXX':
The operation cannot be performed on database "OMEssentials" because it is involved in a database mirroring session.

The .Net SqlClient Data Provider has received a severity 16, state 1 error number 5069
on line 4 of procedure '' on server 'XXX:
ALTER DATABASE statement failed.

Thanks for your help

  • 1368

    0

    Posted March 20th, 2014 03:00

    Hi,

    Thanks for the post.

    Can you please verify if you had duplicate discovery ranges present ? For example, same IP address or hostname added twice as a discovery range. 

    Also, can you please confirm if you see following or similar error in the InstallUtil.log after upgrade attempt ?

    Undefined exception occurred: System.Data.SqlClient.SqlException (0x80131904): The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Agent_DiscoveryConfiguration". The conflict occurred in database "OMEssentials", table "dbo.DiscoveryConfiguration", column 'Id'

    Thanks,

    Ashish

  • manny4566

    8 Posts

    1368

    0

    Posted March 20th, 2014 04:00

    I don't have this error in the log file.

    Duplicate discovery ranges I don't have too. I have check this with the SQL Statemant, wiht was posted in a other thread.


    I'm a step further.

    I have disable the mirroring of the OMEEssentials DB. Now the installer cann delete the OMEssentials.

    But now I have some other errors:

    The .Net SqlClient Data Provider has received a severity 16, state 6 error number 2714
    on line 2 of procedure '' on server 'XXX':
    There is already an object named 'Catalog' in the database.

    CREATE SCHEMA [Catalog]
        AUTHORIZATION [dbo];

    *
    The .Net SqlClient Data Provider has received a severity 16, state 0 error number 2759
    on line 2 of procedure '' on server 'XXX:
    CREATE SCHEMA failed due to previous errors.

    CREATE SCHEMA [Catalog]
        AUTHORIZATION [dbo];

    The installation will install the schema in the "master" DB. Why the master and not the OMEssentials? The user don't have permissions for the "master" DB.

    Why the installer delete the OMEssentials DB?

    Thanks

  • 1368

    0

    Posted March 20th, 2014 06:00

    Hi,

    Would it be possible to attach the InstallUtil.log file here ? Or you can copy paste the entire content of the file also.

    Thanks,

    Ashish

  • manny4566

    8 Posts

    1368

    0

    Posted March 20th, 2014 08:00

    2014-03-20 11:33:15
    "C:\Program Files\Dell\SysMgt\Essentials\bin\WebInstall\InstallUtil.exe"  -DatabaseOptions 640 -i -WebsitePath "C:\Program Files\Dell\SysMgt\Essentials\WWWRoot\Essentials" -WebsitePort "2607"

    Program.RunInstall(...)

    Website unzip started...

    Website un-install started...

    UpdateRegistration(True)
    Website un-install completed.


    OmeDAService.Uninstall()
    Service exe file not found:

    OmeHostService.Uninstall()
    Service exe file not found:

    Database.Install(...)

    Database.UnzipDataScripts()
     - C:\Users\XXX\AppData\Local\Temp\OMEssentials 2014-03-20 11.33.16
     - DatabaseAdd.sql
     - UpgradeOMEssentials, 1.0.0.30.sql
     - UpgradeOMEssentials, 1.0.1.1253.sql
     - UpgradeOMEssentials, 1.1.0.6063.sql
     - UpgradeOMEssentials, 1.2.0.1160.sql

    MigrateDatabase()

    MigrateDatabase(Registry64)
    Target Server: XXX
    Target SQL Server Instance:
    Target Database: OMEssentials
    Source Server: XXX
    Source SQL Server Instance:
    Source Database: OMEssentials

    MigrateDatabase(...)
    No Migration: The old database is not local


    LoadSqlLogin()

    Clearing out the corrupted [OMEssentials] database.

    Database.LoadServerPaths(...)

    Server Name:   XXX
    Database Name: OMEssentials
    Script:        C:\Users\XXX\AppData\Local\Temp\OMEssentials 2014-03-20 11.33.16\DatabaseAdd.sql
    SQL Login:     Yes

    Database.ExecuteSqlFile(...)
    Changed database context to 'OMEssentials'.
    Changed database context to 'master'.
    Changed database context to 'OMEssentials'.
    Dropping all views...
    Dropping all views complete
    Dropping all functions and stored procedures...
    Dropping all functions and stored procedures complete.
    Dropping all triggers...
    Dropping all triggers complete.
    Dropping foreign keys...
    Dropping foreign keys complete.
    Dropping unique constraints...
    Dropping unique constraints complete.
    Dropping primary keys...
    Dropping primary keys complete.
    Dropping default values...
    Dropping default values complete.
    Dropping indexes...
    Dropping indexes complete.
    Dropping all table comments...
    Dropping all table comments complete.
    Dropping all table column comments...
    Dropping all table column comments complete.
    Truncating tables...
    Truncating tables complete.
    Dropping Rows with data in non-null fields...
    Dropping Rows with data in non-null fields complete.
    Dropping Duplicate Rows...
    Dropping Duplicate Rows complete.
    Adding columns...
    dbo.DbColumnAdd(...) -> Table not found: Agent
    dbo.DbColumnAdd(...) -> Table not found: AppLaunchTemplates
    dbo.DbColumnAdd(...) -> Table not found: AppLaunchTemplates
    dbo.DbColumnAdd(...) -> Table not found: ArrayDisk
    dbo.DbColumnAdd(...) -> Table not found: ArrayDisk
    dbo.DbColumnAdd(...) -> Table not found: ArrayDisk
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: Controller
    dbo.DbColumnAdd(...) -> Table not found: DataCollectionType
    dbo.DbColumnAdd(...) -> Table not found: DeletedDevice
    dbo.DbColumnAdd(...) -> Table not found: Device
    dbo.DbColumnAdd(...) -> Table not found: Device
    dbo.DbColumnAdd(...) -> Table not found: DeviceCard
    dbo.DbColumnAdd(...) -> Table not found: DiscoveryConfiguration
    dbo.DbColumnAdd(...) -> Table not found: DiscoveryConfiguration
    dbo.DbColumnAdd(...) -> Table not found: DiscoveryConfiguration
    dbo.DbColumnAdd(...) -> Table not found: DiscoveryConfiguration
    dbo.DbColumnAdd(...) -> Table not found: DiscoveryConfiguration
    dbo.DbColumnAdd(...) -> Table not found: DiscoveryConfiguration
    dbo.DbColumnAdd(...) -> Table not found: DiscoveryConfiguration
    dbo.DbColumnAdd(...) -> Table not found: DiscoveryConfiguration
    dbo.DbColumnAdd(...) -> Table not found: Enclosure
    dbo.DbColumnAdd(...) -> Table not found: Enclosure
    dbo.DbColumnAdd(...) -> Table not found: Enclosure
    dbo.DbColumnAdd(...) -> Table not found: Enclosure
    dbo.DbColumnAdd(...) -> Table not found: Enclosure
    dbo.DbColumnAdd(...) -> Table not found: Enclosure
    dbo.DbColumnAdd(...) -> Table not found: Enclosure
    dbo.DbColumnAdd(...) -> Table not found: EnclosureManagementModule
    dbo.DbColumnAdd(...) -> Table not found: EnclosureManagementModule
    dbo.DbColumnAdd(...) -> Table not found: FruInformation
    dbo.DbColumnAdd(...) -> Table not found: GlobalConfiguration
    dbo.DbColumnAdd(...) -> Table not found: GlobalConfiguration
    dbo.DbColumnAdd(...) -> Table not found: GlobalConfiguration
    dbo.DbColumnAdd(...) -> Table not found: GlobalConfiguration
    dbo.DbColumnAdd(...) -> Table not found: GlobalConfiguration
    dbo.DbColumnAdd(...) -> Table not found: GlobalConfiguration
    dbo.DbColumnAdd(...) -> Table not found: GlobalConfiguration
    dbo.DbColumnAdd(...) -> Table not found: MemoryDevice
    dbo.DbColumnAdd(...) -> Table not found: MemoryDevice
    dbo.DbColumnAdd(...) -> Table not found: MemoryDevice
    dbo.DbColumnAdd(...) -> Table not found: MemoryDevice
    dbo.DbColumnAdd(...) -> Table not found: MemoryDevice
    dbo.DbColumnAdd(...) -> Table not found: ModularChassisAssociation
    dbo.DbColumnAdd(...) -> Table not found: ModularChassisAssociation
    dbo.DbColumnAdd(...) -> Table not found: NIC
    dbo.DbColumnAdd(...) -> Table not found: NIC
    dbo.DbColumnAdd(...) -> Table not found: OperatingSystem
    dbo.DbColumnAdd(...) -> Table not found: PowerSupply
    dbo.DbColumnAdd(...) -> Table not found: PRINTERSUPPLY
    dbo.DbColumnAdd(...) -> Table not found: Processor
    dbo.DbColumnAdd(...) -> Table not found: Processor
    dbo.DbColumnAdd(...) -> Table not found: Processor
    dbo.DbColumnAdd(...) -> Table not found: Processor
    dbo.DbColumnAdd(...) -> Table not found: RACDevice
    dbo.DbColumnAdd(...) -> Table not found: SubnetDeviceAssociation
    dbo.DbColumnAdd(...) -> Table not found: VirtualDisk
    dbo.DbColumnAdd(...) -> Table not found: VirtualDisk
    dbo.DbColumnAdd(...) -> Table not found: VirtualDisk
    Adding columns complete.
    Altering columns...
    Altering columns complete.
    Archiving orphaned records...
    Archiving orphaned records complete.
    Replacing Null Values...
    Replacing Null Values complete.
    Removing [ita_admin_application_role]...
    Removing [ita_admin_application_role] complete.
    Dropping all views...
    Dropping all views complete
    Dropping all functions and stored procedures...
    Dropping all functions and stored procedures complete.
    Dropping all triggers...
    Dropping all triggers complete.
    Dropping foreign keys...
    Dropping foreign keys complete.
    Dropping unique constraints...
    Dropping unique constraints complete.
    Dropping primary keys...
    Dropping primary keys complete.
    Dropping default values...
    Dropping default values complete.
    Dropping indexes...
    Dropping indexes complete.
    Dropping all table comments...
    Dropping all table comments complete.
    Dropping all table column comments...
    Dropping all table column comments complete.
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    Creating [Catalog]...
    *
    The .Net SqlClient Data Provider has received a severity 16, state 6 error number 2714
    on line 2 of procedure '' on server 'XXX':
    There is already an object named 'Catalog' in the database.

    CREATE SCHEMA [Catalog]
        AUTHORIZATION [dbo];





    *
    The .Net SqlClient Data Provider has received a severity 16, state 0 error number 2759
    on line 2 of procedure '' on server 'XXX':
    CREATE SCHEMA failed due to previous errors.

    CREATE SCHEMA [Catalog]
        AUTHORIZATION [dbo];





    Undefined exception occurred:
    System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'Catalog' in the database.
    CREATE SCHEMA failed due to previous errors.
       bei System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       bei System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       bei System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       bei System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
       bei System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
       bei System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       bei InstallUtil.Installers.Database.Database.RunScriptFile(SqlConnection sqlConnection, String filePath, String databaseName, String dataFilePath, String logFilePath)
       bei InstallUtil.Installers.Database.Database.Install(DatabaseOptions databaseOptions)
       bei InstallUtil.Program.RunInstall(CommandLineArgumentsDictionary arguments)
       bei InstallUtil.Program.Main(String[] args)
    ClientConnectionId:7673e099-b357-448c-af18-aa69128faf9d
    Website unzip complete.

    2014-03-20 11:33:32
    "C:\Program Files\Dell\SysMgt\Essentials\bin\WebInstall\InstallUtil.exe" -u

    Program.RunInstall(...)

    Website un-install started...

    UpdateRegistration(True)
    Website un-install completed.


    EventLogs.UninstallLogSources(...)

    EventLogs.UninstallLogSources(...) - Complete

    EventLogs.UninstallLogSources(...)

    Expected Exception
    Unable to delete the event log source: 'Essentials'
    System.ArgumentException: Die Quelle Essentials ist nicht auf dem Computer . registriert, oder Sie haben keinen Schreibzugriff auf den Registrierungsschlüssel HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog.
       bei System.Diagnostics.EventLog.DeleteEventSource(String source, String machineName)
       bei InstallUtil.Installers.EventLogs.UninstallLogSources(List`1 logSourceNames, Boolean logErrors)

    EventLogs.UninstallLogSources(...) - Complete

    OmeDAService.Uninstall()
    Service exe file not found:

    OmeHostService.Uninstall()
    Service exe file not found:

    Database.Uninstall(...)

    Removing the local windows groups.

    RemoveWindowsGroups(...)

    Exception thrown while uninstalling our windows security groups.
    System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'OMEssentials.dbo.SecureMember'.
       bei System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       bei System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       bei System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       bei System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       bei System.Data.SqlClient.SqlDataReader.get_MetaData()
       bei System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       bei System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)
       bei System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       bei System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       bei System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       bei System.Data.SqlClient.SqlCommand.ExecuteReader()
       bei InstallUtil.Installers.Database.Database.RemoveWindowsGroups(SqlConnection sqlConnection)
       bei InstallUtil.Installers.Database.Database.Uninstall(Nullable`1 databaseOptions)
    ClientConnectionId:aa71ac2b-3cb7-4686-a87a-b72bb6d456c2

    Deleting Database [OMEssentials]

    An exception was thrown while deleting the database backup history.

    This is an optional step and deleting the database can continue without it.
    System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'sp_delete_database_backuphistory', database 'msdb', schema 'dbo'.
       bei System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       bei System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       bei System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       bei System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
       bei System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
       bei System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       bei Helpers.Extensions.SqlConnectionHelper.DropDatabase(SqlConnection sqlConnection, String databaseName)
    ClientConnectionId:7b05728a-59de-4788-ab53-2cd1f46179c0

    Database.RemoveRegistryKeys()

    Unable to remove the registry key value: ApplicationGuid

    Unable to remove the registry key value: ApplicationGuid

    Database.RemoveRegistryKeys() - Complete

  • manny4566

    8 Posts

    1368

    0

    Posted March 20th, 2014 10:00

    Hi,

    now, after disabling the permissions for the SQL user to write in the master db, the installation was successful. The installer has use the old OMEssentials DB.

    But all data has been deleted in the new OMEssentials DB. Is this normal ? Why the installer delete all data ? Can  I restore the backup? I don't now if new tables or something else were created by the OME 1.3 installer.

    Thanks

  • DELL-Pupul M

    2 Intern

    •

    1004 Posts

    1368

    0

    Posted March 20th, 2014 12:00

    Hi,

    Since you have a back up of the database available, i would suggest you please log a trouble ticket @800-945-3355. They will be able to help you. Yes, OME 1.3 does have new tables, so it is better you log a trouble ticket.

  • willisdell

    1 Rookie

    •

    68 Posts

    1368

    0

    Posted May 6th, 2014 23:00

    I am planning a 1.1.0.6063 to v 1.3 upgrade of Open Manage Essentials. I noticed that I do have one duplicated devicename in my database. Is the most recent advice from Dell to remove the duplicate from the database prior to upgrade.? I can't remove the offending server from the GUI by right clicking the server name in the offending discovery range definition. The systems lets me delete it but it never disappears.  Can someone let me know the SQL command to run to remove it?

     

    I have been taking regular database backups of the local SQL Express database. Do you have a link to the restore procedures if one experiences a catastrophic database loss as is mentioned in this forum ?

     

     

     

  • 1368

    0

    Posted May 7th, 2014 07:00

    Willis - it's a good thing you have been taking regular database backups. Ensure that you have a backup from just before you attempt the upgrade.

    If you download the latest OMEv1.3 from our portal, you shouldn't have to manually delete any database entries. The OMEv1.3 installer will take care of that for you.

    (There are some forum posts about upgrade to OMEv1.3 failing because of duplicate entries, and some workaround solutions that. But that issue has since been fixed and the OMEv1.3 build online has been updated to include a fix.)

    In other words - you shouldn't have to manually delete any entries. Go ahead and update to OMEv1.3 and let us know how it goes.

    PPrabhu

  • willisdell

    1 Rookie

    •

    68 Posts

    1368

    0

    Posted May 11th, 2014 18:00

    If the upgrade was to fail. How would you fall back even with a backup of the DB? Surley you would end up with an updated  SQL Express 2012 instance with a backup of the 2008 database instance along with all the updated required products that OME requires. Would you need to run an uninstall? It all sounds potentially very messy.

  • 191

    0

    Posted May 12th, 2014 13:00

    Willis - In the unlikely event that the upgrade fails - it would uninstall OME (not including sql server). Some prerequisites would be left but those are not specific to OME.

    You have 2 choices then:

    1. Reinstall the old version of OME and then replace the database with the backup copy

    2. Restore the backup database to SQL 2012 and install the new version of OME. OME will detect the database and use it.

    If neither one of these works, then call OME Tech support and they will walk them through the process of recovery. 

    PPrabhu