Cannot remove index via the transformation script custom

I want to remove through the Custom transformation script a clue, in the relational model.
Le script runs without error by only the index is not deleted

  1. tables = model.getTableSet () .toArray ();
  2. for (var t = 0; t < tables.length; t ++) {}
  3. table = table [t];
  4. table.setDirty (true);
  5. constlist = table.getKeys ();
  6. for (var i = 0; i < constlist.length; i ++) {}
  7. constraint = constlist [i];
  8. constraint.setDirty (true);
  9. indname = constraint.getName () + "_IX";
  10. {if (Constraint.isFK ())}
  11. index = table.getIndexes () .getByName (indname);
  12. index = table.getObject (indname);
  13. If (index! = null) {}
  14. index.setDirty (true);
  15. {if (index. GetName(). Equals (indname))}
  16. the index. Remove;
  17. }
  18. }
  19. }
  20. }
  21. }

Hello

If you use "debug", probably you will see some of the problems you have.

line 16 - index.remove;

be - index.remove ();

but you can't get there because you're wrong check:

{if (Constraint.isFK ())}

must be:

{if (!) {(Constraint.isFK ())}

other problems:

(1) 4th place will put all the paintings as dirty

table.setDirty (true);

This should be moved after the removal of the index

(2) the same for the constraint - you define constraints like salty, BTW, it is not necessary define elements of array as dirty, if the table is / will be defined as dirty.

Script could be dangerous - make your tests on the copy of the drawing or model. Versioning can help here - after running the script and save the drawing, you can see in the outgoing changes (subject to a window changes) exactly what is changed by this script and probably undo the changes if you don't like them.

Philippe

Tags: Database

Similar Questions

  • delete the index in the transformation script

    In a custom transformation script, I would delete the indexes on a table.  However, I don't see that there is no table.removeIndex function ().  Is there another way I can drop an index?

    You can use the table.remove(KeyObject key) method, passing the Index into the KeyObject parameter.

    David

  • How to enable and disable, copy or rename the rules via the groovy script?

    A client, we received this question:

    How to enable and disable, copy or rename the rules via the groovy script?

    Foglight 5.7.5

    Hello

    There is this example of support KB

    support.Software.Dell.com/.../99059

    and there is also documentation of Service layer of the administration on the RuleService console.

    Best regards

    Golan

  • ORA-02327: cannot create indexes on the LOB data type expression

    DB 10.2.0.4
    DB 5.2

    I am not able to move lobindex and lobsegment. While try occurs below error

    SQL > ALTER INDEX dev. "" SYS_IL0000718396C00002$ $"REBUILD THE TABLESPACE DATA_TEMP;
    ALTER INDEX dev. "" SYS_IL0000718396C00002$ $"REBUILD TABLESPACE DATA_TEMP
    *
    ERROR on line 1:
    ORA-02327: cannot create indexes on the LOB data type expression

    Thank you

    Published by: user13382934 on October 16, 2012 14:05

    correct syntax is
    ALTER TABLE.

    MOVE the LOB ()
    STORE AS (tablespace );

    Where is a name of the / columns LOB, not the name of the segment. Moving type LOB data will move its indexes as well.

  • index on the column using custom function

    Can we create index on the column using custom function?

    http://www.dbasupport.com/Oracle/ora8/FBI.shtml

    Kind regards
    Kaila Mahesh

  • How to use the transformation script to add columns to the PK?

    I'm working on a script transformation that:
    -create a table
    -Adds the columns to the table
    -create a primary key for the table

    See the below script.
    Now, I want to add the primary key column.
    Documentation fix r: class IndexColumnUsage

    The Index of the class has a getter: getIndexColumnUsageList()
    and the list apply: applyIndexColumnUsageList

    Someone at - it an idea how to use these methods to add the column to the PK?

    I thank in advance.


    relational = model.getDesign () .getFirstOpenRelationalDesign ();
    table = relational.getTableSet () .createTable (null);
    table.setName ("TABLE");
    column = table.createColumn (null);
    column.setName ("COLUMN");
    index = table.createIndex (null);
    index.setName ("PK");
    index.setIndexState ("primary obligation");

    Hello

    If you have the column and index (both belonging to the same table) use:

    the index. Add (Column);

    to remove the column:

    the index. Remove (Column)

    Philippe

  • Debug log 5 Apex: "cannot find index for the item.

    I just spotted some strange output in the debug log in an application built in 4.0, still, using this mode of compatibility, now in 5.0.1

    apex5_debug_log.png

    Some error messages for crawlers

    Fetch application meta data
    can not find index for component (3,15469335749905175)
    can not find region index for region #15469335749905175 when trying to add (1,15481314906419581) - it must be excluded because of REQUIRED_PATCH
    

    Can anyone advise me on what it means? Or what other information of interest?

    Nothing seems to be a problem with the page. The specified region is extremely basic html with a compilation option that is excluded. Other regions with the same compilation option do not report these log files in the debug.

    Scott.

    Hi Scott,.

    It is indeed related to the build option and you can ignore the messages. I'll put their debug level 9 If you don't see them in the normal debug output.

    Before the page is rendered, APEX load relevant metadata in the wwv_flow package global variables. For example, fill us the tables g_items, the g_buttons and the g_plugs with the definitions of element, button and region, respectively. We do not charge the definitions of components that are excluded by a compilation option. After loading these data, we must build relationships between records, for example, we calculate index of the item in the g_plugs region and store it with the definition of the element. If the region is excluded by a compiler option, but the underlying element is not, the computation of the element cannot find the related region folder in g_plugs. You get messages from debugging for this kind of inconsistencies.

    Kind regards

    Christian

  • Call via the FDM script batch file

    Hi all

    Here is the FDM script written to call the command via the Script FDM in import file, test the operation of the script by creating a vbscript file (* .vbs) to call the batch file and worked like charm. Please see the excerpt from the sciprt

    SubMonth = "Mar".

    SubYear = "FY15.

    ARG = trim (SubYear) & "" & trim (SubMonth)

    Set objWshShell = CreateObject ("Wscript.Shell")

    strCmd = "E:\hyperionfiles\batch\CalcActNew.bat" & Arg

    Line 53 objWshShell.Run 'strCmd', 0, True

    The error returned is

    Error.JPG

    Thank you

    Hi, no double quotes are needed to join strCmd it's a variable

    objWshShell.Run strCmd, 0, True

  • BASH command via the console script

    All,

    I had to run a a series of BASH commands via the Script Console to a subset of servers. Is there a script for this that I can take a look? Or direct me to the controls, I might need.

    You need to encapsulate in a script on the remote host to do.

    actSvc = server["ActionService"]params = [:]params.put("COMMAND_LINE","/home/foglight/testBashScript.sh")params.put("HostName","centosvm1")actSvc.invoke("RemoteCommandAction",params)
    

    This will run the script shell on the host remote centosvm1

    the bash script contains the statement echo inside.

    -rwxr-xr-x 1 foglight dba 99 Jan 17, 12:09 testBashScript.sh

    [foglight@centosvm1 ~] $ testBashScript.sh more

    #! / bin/bash

    echo 'Test Action of Bash Script remote command execution' > /tmp/ForumOutput.txt

    [foglight@centosvm1 ~] $

    -rw - r - 1 foglight dba 56 Jan 17, 12:12 ForumOutput.txt

    [foglight@centosvm1 ~] $ /tmp/ForumOutput.txt more

    Run the test of the Action of the remote Script Bash command

    [foglight@centosvm1 ~] $

    I have tried a few iterations to try to echo the commands directly in a command param file but did not

    Hope this helps

  • External authentication via the PHP script failed

    I'm not a PHP genius - in fact I'm not a backend coder so I'm kinda struggeling with the sample scripts - I still hope for a sample of CF....

    I'm trying to run and connect to the CAA via the command line (Terminal). I'm not sure what I'm doing wrong - this is what I'm passing:
    PHP f /Applications/MAMP/htdocs/afcs.php args - debug - host = my_pass, http://connectnow.acrobat.com, fcguru, my_login

    The username and password I spend are correct. However, I get this response:
    Error: message exception 'AFCSError' with ' < State response 'error' = >
    < error code = "AUTH_FAILED" >
    < msg > failed authorization < / msg >
    < / error >
    < / answer >
    ' in /Applications/MAMP/htdocs/afcs.php:86

    Really struggeling with this. Once again I get this working from the command line, I don't know how to call it from a script instead. I use CF on the backend, no PHP.

    Kind regards

    Stefan

    Thank you, this is very useful. It seems that I can now connect from the Terminal so that's a good start. Also, I did not see external authentication in PHP for example - I must have been blind.
    I'll see how far I get with that. What I'm trying to do is spawn new rooms based on a template on the fly, and I have some doubts, I'll be able to understand this myself.

  • Deployment of the OMB via the TCL script

    I need to deploy all of the mappings in a module in a new target database. I want the configuration settings for
    (1) default operating mode = "DΘfinir base" and for
    (2) default audit level = 'NONE '.
    on all maps.

    It seems that the default repository for these parameters (and I can't find where these default values can be managed) are
    (1) default operating mode = "Line in function from set failover" and
    (2) level of auditing by default = "ERROR DETAILS" on all the mappings.
    While when I deploy via the script all mappings have these settings (which we do not want) as it appears that OMB orders use these repository/user settings. Card via interface OWB deployment allows you to change the settings of configuration as requires it, but it's the long answer.

    These configuration settings can be overridden in the TCL script via OMBDEPLOY or OMBALTER or any other command OMB parameter so all mappings are deployed/configured as
    (1) default operating mode = "DΘfinir base" and for
    (2) level of auditing by default = 'NONE' on all the mappings.

    Thank you
    Dave.

    Hi Dave

    Yes, you can set the code generation and the non-use of the properties of mode from a script...
    OMBALTER MAPPING "$map" DEFINED the VALUES of PROPERTIES (GENERATION_MODE, DEFAULT_OPERATING_MODE) ("SET_BASED", "SET_BASED")

    So that you can loop around all the cards and do these things, there are also a few experts on the Exchange utility, allowing you to block of updates quickly
    http://www.Oracle.com/technology/products/warehouse/htdocs/experts/multi_config.zip

    The model is available from scripts, for example to a PLSQL mapping batch you can query the properties as follows:
    OMBDESCRIBE CLASS_DEFINITION 'BATCH_MAPPING' GET PROPERTY_DEFINITIONS

    See you soon
    David

  • A computer cannot remove bookmarks on the other computer.

    I have two desktop computers set up to sync with each other.
    Both can create new bookmarks. Sync is fast and accurate.
    Computer B can remove bookmarks, and they are deleted on A and b.
    Computer may remove bookmarks, but they are NOT deleted on computer B.

    I want computers to have permission to delete bookmarks on the other.

    Corel thank you for taking the time. I managed to solve the problem by resetting Firefox on A computer.

    Now computers can add or remove bookmarks and the change is reflected on the other.

  • Cannot remove messages from the Inbox

    I'm unable to remove items from the Inbox

    You did not mention what e-mail program you use. These instructions will help you with Outlook Express.

    Spend most of your messages out of the Inbox if you can and move the messages you want to record off deleted items, and sent items. Locate the OE message store and then close OE.

    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.

    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.

    With OE closed, find the Deleted Items.dbx and Sent Items.dbx files and delete them. New files will be created automatically when you open OE.

    Compact all folders as described below.

    To avoid this in the future:

    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the processors and causes a multitude of problems such as time-outs and account setting changes. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • How uninstall AVG antivirus cannot do this via the control panel...

    I tried to uninstall the AVG antivirus. I went to Microsoft security essentials. Many have tried several times to get uninstalled AVG it will not. Through the conntrol Panel and AVG uninstall does not work. Help, please...

    Hello

    Download and run the tool to remove AVG from the link below

    Make sure that download you the correct 32 bit or 64 bit for your system

    Click Start - right click on computer - and then left click Properties - he will tell you he was looking for you have vista 32-bit or 64-bit

    http://www.Avg.com/us-en/download-tools

  • Cannot create indexes on the flow table

    Hello

    I'm new to ODI.

    The problem is that during the execution of an interface, I get the error of the "IKM Oracle Dimension to slow variation"

    The command in step "Create unique index on the flow table:

    creating index < % = odiRef.getTable ("L", "INT_NAME", "A") % > idx

    on < % = odiRef.getTable ("L", "INT_NAME", "A") % > (< % = odiRef.getColList ("", "[column]", ",", "", "SCD_NK") % >)

    < % = odiRef.getUserExit ("FLOW_TABLE_OPTIONS") % >

    generate the following statement which lacks the name of the column between the (_)

    Create index I$ _MYTABLE_idx

    I have $_MYTABLE)

    NOLOGGING

    The result is that the interface fails with the error 936: 42000: java.sql.SQLException: ORA-00936: lack of expression caused by the previous command wrong.

    Please, can you help me?

    Thank you very much

    Angelo

    Hello

    I'm really really sorry! I just realized that you are working on the SCD. Basically, you are looking for all the column mapped as SCD_NK (key to slowly change natural Dimensions) insofar as shown here

    Substitution QAnywhere

    IF you need to read this

    SCD Type 2 - ODIExperts.com

    Let me know.

Maybe you are looking for