1 Reply Latest reply on Mar 22, 2011 2:03 PM by David Allan-Oracle

    OMBPlus - scripting issue with OMBCOPY

    629790
      We are attempting to script the creation of a new ORACLE_MODULE within one of our projects in OWB. We figured that because a lot of the objects are straight copies from another module, that OMBPlus would be the way to go.

      What's happening is that when running each of the steps independently in OMB+ we are successful, but when we try to put them into a TCL script, we get the following error:

      Cannot construct ARRAY instance, invalid connection.

      The steps we manually follow in OMB+ are these:

      -----
      OMBCONNECT ...
      OMBCC 'MY_PROJECT'
      OMBCREATE ORACLE_MODULE 'MODULE_2' SET REF etc. etc.
      OMBSAVE
      OMBCC '/MY_PROJECT/MODULE_1'
      OMBCOPY TABLE '.*' TO '/MY_PROJECT/MODULE_2'
      OMBSAVE
      -----

      This works correctly. However, when we try to add it to a TCL script, we get the error mentioned above. Here's the TCL script:

      -----
      OMBCONNECT ...

      set $location "/MY_PROJECT";
      OMBCC '$location'

      puts "Creating module..."
      OMBCREATE ORACLE_MODULE 'MODULE_2' SET REF METADATA_LOCATION 'METADATA_LOC' ADD REF LOCATION 'DATA_LOC' SET AS DEFAULT
      OMBSAVE
      puts "Create successful!"

      OMBCC '$location/MODULE_1'
      puts "Copying Tables..."
      OMBCOPY TABLE '.*' TO '$location/MODULE_2'
      OMBSAVE
      puts "Copy Complete!"

      OMBDISC
      -----

      Any thoughts or feedback would be greatly appreciated. Have we encountered a bug? Or is it something we're missing in our TCL script?

      Thanks!