ORA-10561: block type ‘TRANSACTION MANAGED DATA BLOCK’

The standby database alert log has the following errors:

Tue Nov 17 11:43:51 2020
 Errors in file /u01/app/oracle/diag/rdbms/stbytestdb/STBYTESTDB/trace/STBYTESTDB_mrp0_7269.trc:
 ORA-00600: internal error code, arguments: [3020], [3], [115047], [115047], [], [], [], [], [], [], [], []
 ORA-10567: Redo is inconsistent with data block (file# 3, block# 115047, file offset is 942465024 bytes)
 ORA-10564: tablespace SYSAUX
 ORA-01110: data file 3: '/u02/oradata/STBYTESTDB/sysaux01.dbf'
 ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 8316
 Tue Nov 17 11:43:51 2020
 MRP0: Background Media Recovery process shutdown (STBYTESTDB)

SOLUTION

Subscribe to get access

Read more of this content when you subscribe today.

How to Speed Up Index Creation in AWS PostgreSQL RDS

I was asked by a client about how to speed up index creation in a terabytes AWS PostgreSQL database. This post tries to explain all the details, and give some examples in real situation.

Subscribe to get access

Read more of this content when you subscribe today.

SSMA : Violation of PRIMARY KEY constraint

While running SSMA migrates Oracle database to Microsoft SQL Server, the constraint violation errors occurred for some tables as below:

Violation of PRIMARY KEY constraint ‘TABLENAME_PK’. Cannot insert duplicate key in object ‘USER.TABLE’. The duplicate key value is (John).

Subscribe to get access

Read more of this content when you subscribe today.

How to Migrate On-Premise Oracle Database onto AWS RDS Microsoft SQL Server

Introduction

This article will demonstrate step by step how to migrate on-premise Oracle database onto AWS RDS SQL Server, the issues encountered plus their solutions and workarounds during the migration.

The following environment and tools will be involved in this activity:

  • Oracle Database 19c
  • SQL Server 2019
  • AWS RDS SQL Server 2019
  • Oracle Client 19c
  • AWS Database Migration Service ( DMS) or AWS S3
  • SQL Server Management Studio ( SSMS )
  • Microsoft SQL Server Migration Assistant (SSMA) for Oracle

There is no direct migration on-premise Oracle database onto AWS SQL Server RDS, so the the high level migration procedure will be:

  1. Migrate on-premise Oracle database by using SSMA to on-premise SQL Server database.
  2. Migrate on-premise SQL Server database onto AWS RDS SQL Server.

Subscribe to get access

Read more of this content when you subscribe today.

Oracle Large Tables Partially Migrated by SSMA from Oracle to SQL Server

In SSAM ( migration data from Oracle to SQL Server, there are big table with more than 10m records always partially migrated.

The following messages will be seen from SSMA console or SSMA logs.

...
..
.
Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
  Errors: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
...
..
.

OR

Starting data migration Engine
Starting data migration…
The data migration engine is migrating table '"DBUSER"."CDR"': > [DBPROD].[DBUSER].[CDR], 12129453 rows total
Table "DBUSER"."CDR" data migration: 1215859 rows processed.
Table "DBUSER"."CDR" data migration: 2427701 rows processed.
Table "DBUSER"."CDR" data migration: 3640494 rows processed.
Table "DBUSER"."CDR" data migration: 4852614 rows processed.
Completing migration of table "DBUSER"."CDR"…
Migration complete for table '"DBUSER"."CDR"': > [DBPROD].[DBUSER].[CDR], 5377300 rows migrated (Elapsed Time = 00:00:36:35:747).
Data migration operation has finished.
0 table(s) successfully migrated.
1 table(s) partially migrated.
0 table(s) failed to migrate.

Check the SSMA log ( C:\Users\USERNAME\AppData\Roaming\Microsoft SQL Server Migration Assistant\Oracle\log:

[Error: Datamigrator] [5696/37] [2020-10-31 13:53:37]: Error occurred while adding/enabling the constraints and indexes in bulk load optimization.
[Error: Datamigrator] [5696/37] [2020-10-31 13:53:37]: Exception: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
 site: Void OnError(System.Data.SqlClient.SqlException, Boolean, System.Action`1[System.Action])
 source: .Net SqlClient Data Provider
 error code: -2146232060
 data: [HelpLink.ProdName] = [Microsoft SQL Server]
 data: [HelpLink.ProdVer] = [14.00.3257]
 data: [HelpLink.EvtSrc] = [MSSQLServer]
 data: [HelpLink.EvtID] = [-2]
 data: [HelpLink.BaseHelpUrl] = [http://go.microsoft.com/fwlink]
 data: [HelpLink.LinkId] = [20476]
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.SSMA.Framework.Generic.DbUtilities.SsmaDbCommand.Execute[T](ExecutionDelegate`1 executionMethod)
   at Microsoft.SSMA.Framework.Generic.DbUtilities.SsmaDbCommand.ExecuteNonQuery()
   at Microsoft.SSMA.Framework.Generic.DefaultDataMigrationEngine.DataMigrationEngineBase`1.ExecuteSPWithParameters(IDbConnection connection, String query, String keyType, ConstraintsActionMode mode, Boolean parallelDM, Boolean bulkLoadOptimize)
   at Microsoft.SSMA.Framework.Generic.DefaultDataMigrationEngine.DataMigrationEngineBase`1.EnableOrDisableNonClusteredIndex(Boolean parallelDM, Boolean isEnable)
   at Microsoft.SSMA.Framework.Generic.DefaultDataMigrationEngine.DataMigrationEngineBase`1.PostBulkLoadOptimization(Boolean parallelDM, Boolean bulkLoadOptimize)
[Error: Datamigrator] [5696/37] [2020-10-31 13:53:37]: Inner Exception #1: The wait operation timed out
 site: 
 source: 
 error code: -2147467259

WORKAROUND

Subscribe to get access

Read more of this content when you subscribe today.