none
SSMA console - converting sequences. RRS feed

  • Question

  • Hi folks.

    I'm trying to add to my SSMA XML console script some sequences.  Didn't find anything specific about sequences neither online nor in the sample files; the most significant example I found was this:

        <!-- Example 4: Convert Schema  for a specific  object(say Table)
             (with only a few optional attributes & write-summary-report-to with a file name) -->
        <!--<convert-schema object-name="$OracleSchemaName$.TestTbl"
                        object-type="Tables"
                        write-summary-report-to="$SummaryReports$\ConvertSchemaReport1.xml"
                        report-errors="true" />-->

    Kind of intutive, I just have to modify the object name and its type, right?  Maybe like this: 

        <convert-schema object-name="lil2019.USERDEF_COLUMN_NO_SEQ"
                        object-type="sequences" />

    But then I got this error:

    [2019-07-04 15:42:05]  MESSAGE generic Microsoft SSMA for Oracle v8.2.0
    [2019-07-04 15:42:06] FATALERR Invalid xml file: c:\Users\martlean\Documents\Demandes\convert_oracle_sql\migrationv7\ssmaproj\Ora_to_Sql.xml. Schema Validation failed at line number 117 and position 21: attribute 'object-type' is invalid - Value 'sequences' is not valid with the datatype 'MetabaseObjectCategories'
    (The message might not be 100% correct, I tried to translate it from french)


    So, the example uses the value TABLES for a table but its not SEQUENCES for a sequence?  What would be the right value (or syntax) for converting sequences with the console?  Is there somewhere a full list of accepted values for object-types? 


    Thursday, July 4, 2019 8:34 PM

All replies

  • Who has a solution?
    Wednesday, July 10, 2019 7:44 AM
  • Hi,

    Looking at the XSD, it should be "Sequences" starting with upper-case "S". Can you please try that and see if it resolves the issue?

    Regards,
    Alex.

    Tuesday, July 30, 2019 4:35 AM
  • Wow, there's been quite some time since I asked this question and completely forgot about the sequences.  Sorry pals, should have come back earlier.

    Well, as mister Alexander-Ivanov always does, he found the problem on the XML: the value sequences with uper-case S.  That solved the problem... part of it.  Now I don't get errors when launching SSMA Console, but the sequences are not migrated, although the log say they were:

    [2019-10-16 15:14:06]  MESSAGE generic Finished loading all tables in schema SEA2019
    [2019-10-16 15:14:06]   FINISH 
    [2019-10-16 15:14:06]    START map-schema 
    [2019-10-16 15:14:06]  MESSAGE generic Mapping schema SEA2019 into SQL Server schema martlean.dbo
    [2019-10-16 15:14:06]   FINISH 
    [2019-10-16 15:14:06]    START convert-schema 
    [2019-10-16 15:14:06]  MESSAGE generic Object passed as a parameter sequence SEA2019.USERDEF_COLUMN_NO_SEQ
    [2019-10-16 15:14:06]  MESSAGE generic Running command on sequence SEA2019.USERDEF_COLUMN_NO_SEQ
    [2019-10-16 15:14:06]  MESSAGE generic Conversion/assessing started...
    [2019-10-16 15:14:06]  MESSAGE output-window Starting conversion...
    [2019-10-16 15:14:06]  MESSAGE output-window Analyzing metadata...
    [2019-10-16 15:14:07]  MESSAGE output-window Converting sequence SEA2019.USERDEF_COLUMN_NO_SEQ ...
    [2019-10-16 15:14:08]  MESSAGE output-window Conversion finished with 0 errors, 0 warnings, and 0 informational messages.
    [2019-10-16 15:14:09]   FINISH 

    But I see no sequence on the SQL Server side.  Maybe I should refer the sequence not only in the convert block, but also in the migrate block?  Not really intuitve but anyway, sequences have some data on it, don't then?  So I tried adding it:

    		<map-schema	source-schema="SAE2019"    
    					sql-server-schema="martlean.dbo"/>  			  
    
    				
    		<convert-schema object-name="SAE2019.USERDEF_COLUMN_NO_SEQ"
                        object-type="Sequences" />	
    
           <migrate-data verbose="true">
    			<data-migration-connection  
    				source-server="dbiso2"  
    				target-server="gslq3" />  
    				
    			<metabase-object object-name="SAE2019.USERDEF_COLUMN_NO_SEQ" />
    			

    Honestly, I expected an error; I was not sure about this syntaxe at all.  But, surprise, surprise: no errors!  Yay!  Did it migrated the sequence?  Acording to the log yes:

    [2019-10-16 16:27:30]    START force-load 
    [2019-10-16 16:27:30]  MESSAGE generic Started loading all tables in schema SEA2019
    [2019-10-16 16:27:37]  MESSAGE generic Finished loading all tables in schema SEA2019
    [2019-10-16 16:27:37]   FINISH 
    [2019-10-16 16:27:37]    START map-schema 
    [2019-10-16 16:27:37]  MESSAGE generic Mapping schema SEA2019 into SQL Server schema martlean.dbo
    [2019-10-16 16:27:37]   FINISH 
    [2019-10-16 16:27:37]    START convert-schema 
    [2019-10-16 16:27:37]  MESSAGE generic Object passed as a parameter sequence SEA2019.USERDEF_COLUMN_NO_SEQ
    [2019-10-16 16:27:37]  MESSAGE generic Running command on sequence SEA2019.USERDEF_COLUMN_NO_SEQ
    [2019-10-16 16:27:37]  MESSAGE generic Conversion/assessing started...
    [2019-10-16 16:27:37]  MESSAGE output-window Starting conversion...
    [2019-10-16 16:27:37]  MESSAGE output-window Analyzing metadata...
    [2019-10-16 16:27:38]  MESSAGE output-window Converting sequence SEA2019.USERDEF_COLUMN_NO_SEQ ...
    [2019-10-16 16:27:39]  MESSAGE output-window Conversion finished with 0 errors, 0 warnings, and 0 informational messages.
    [2019-10-16 16:27:39]   FINISH 
    [2019-10-16 16:27:39]    START migrate-data 
    [2019-10-16 16:27:39]  MESSAGE generic Object passed as a parameter sequence SEA2019.USERDEF_COLUMN_NO_SEQ
    [2019-10-16 16:27:39]  MESSAGE generic Object passed as a parameter table SEA2019.AGENCY

    But still no sequence on the SQL database.  Another case of "absence of errors is not a proof of sucess".

    Sooo... where did my sequence go?  Any ideas?






    Wednesday, October 16, 2019 8:48 PM