How to improve the custom rule by checking the existence of the role with INSERT permission?

Hello

following a custom rule to check the existence of some columns of audit - how can I improve this rule only to run for tables where there is a role with privileges to INSERT?

Günter cordially

function checkAudit (table) {}

inserted_by = false;

inserted_at = false;

ruleMessage ="";

tNom = table.getName ();

If (tname.indexOf ('_DWH_') == - 1).

{

columns = table.getElements ();

l = columns.length;

for (var c = 0; c < l; c ++)

{

CNAME = columns [c] .getName ();

If (cname == "INSERTED_AT") {inserted_at = true}

If (cname == "INSERTED_BY") {inserted_by = true}

}

If (! inserted_at) ruleMessage = ruleMessage + not 'INSERTED_AT ';

If (! inserted_by) ruleMessage = ruleMessage + not 'INSERTED_BY ';

}

If (ruleMessage! = "")

Returns false;

on the other

Returns true;

}

checkAudit (table);

Hi Gunter,

the function to check if the column of table a insert privilege for role is less.

It is possible insert are defined in table instead of the column - that does not check the function below.

Philippe

function hasColumnWithInsertForRole(table){
    sd = table.getRelationalModel().getStorageDesign();
    tp = sd.getStorageObject(table.getObjectID());
    if(tp!=null){
        roles = sd.getRoleSet().toArray();
        for(var i=0;i-1){
                return true;
            }
        }
    }
    return false;
}
hasColumnWithInsertForRole(table);

Tags: Database

Similar Questions

  • Satellite A300-1PH - how to improve the battery life

    I want to get an extended battery...
    How to improve the battery life?
    I have the Satellite A300-1PH.

    Hello

    You want to extend the battery work in order to use the laptop longer with the battery power?

    Well, in order to extend the battery work, you should check the Vista power settings.
    Here, you can assign some settings like brightness etc. who would save the energy of the battery of the screen.

    For more details, see this document how:
    + How to manage Windows Vista power management features? +
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=41

    If you want to know wow to get the most out of the battery, consult this FAQ from Toshiba:
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=20

    See you soon

  • How to improve the resolution of the image with the help of filters

    How to improve the resolution of the image with the help of filters?

    resolution of the image, please check the links below. They should give you a clear idea about the resizing and resampling of images.

    http://helpx.Adobe.com/Photoshop/KB/Advanced-cropping-resizing-resampling-Photoshop.html#m ain_Resizing_and_resampling_images

    Understanding vs Resample resize | Learn Photoshop CS6 | Adobe TV

    See you soon!

    ~ David

  • How to improve the rendering time on MacBook Air

    Hi all

    Processor: Intel Core i7-4650U @ 1.70 GHz, 2.30 GHz
    Installed memory (RAM live): 8.00 GB
    System type: 64-bit, x 64 processor operating system
    Operating system: 8.1 Enterprise, 64-bit Windows (boot to the Windows partition with bootcamp, work is not as a virtual machine)

    Any ideas how to improve the rendering performance of a YouTube video that I created. I realize that the rendering is not ideal on a MacBook Air, however, there are free of RAM and CPU capacity according to the directives of the screenshot:

    Adobe Media Encoder v2.png

    For example, I put that he should leave 1.5 GB of RAM for other programs, but there are still 3 GB free.

    (FYI at 01:24 popped it up to 100% of the CPU)

    Any help much appreciated.

    Kind regards

    Ben

    This isn't a very powerful machine.  It is probably not much to do.

  • How to improve the performance of the import

    I'm converting a database of its current WE8ISO88591 character set AL32UTF8
    I use NLS_LENGTH_SEMANTICS to TANK so I don't have to increase the length of the column.

    I followed the instructions in the Oracle:
    144808.1
    313175.1

    Except import that takes too long.

    I took a full database export WE8ISO8859p1 and now its importation in AL32UTF8.

    It is always difficult to prove slow source; but I think it has to do something with NLS_LENGTH_SEMANTICS. On the same
    Server; If the new database was in WE8ISO8859P1, a 5 million row table import took 2 hours; but in Al32UTF8 with NLS_LENGTH_SEMANTICS it takes 1 day!

    No idea how to improve the performance of the import.

    DOUBLE WIRE!

    Please, don't post duplicate discussions.

    Mark this thread ANSWER and continue to use your original thread where you are already helped.

    You have NOT given the info that has been ask in your other thread.
    Re: NLS_LENGTH_SEMANTICS = CHAR import is too slow

  • I created a site of Muse for a customer who wishes to host with Business Catalyst. How to publish the site with their account instead of using one of my free sites?

    I created a site of Muse for a customer who wishes to host with Business Catalyst. How to publish the site with their account instead of using one of my free sites? This is so I can keep my ones that are free for personal projects but also so they can pay for their own accommodation. I'm happy to put everything to them but don't know what to do.

    Hello

    You can use their IDs of BC and use them, which to publish the site will be under their account.

    Please change the login of BC's Edit > preferences > Publish > switch accounts, for Mac, there Adobe Muse > preferences

    Thank you

    Sanjit

  • How to have the sidebar with thumbnails by default in the application preview? Whenever I open a PDF file, there is no sidebar.

    How to have the sidebar with thumbnails by default in the application preview?

    I'm on OSX El Capitan 10.11.3 on iMac, and whenever I open a PDF file, there is no sidebar. I have to every time click on the Sidebar icon, then select the thumbnails. I would like to be on by default, but cannot find the option or how to edit the plist file...

    If the thumbnails is checked in the menu 'View' preview, it should always open a PDF file with the open sidebar. Unless of course, it's a single page PDF.

  • all my data is all save on the local disk c, how to share the data with the other drive, local drive d.

    all my data records on the local disk c, how to share the data with the other drive, local drive d.

    Hi Jasonbichard,

    1. what type of drive is D? Is - this another partition on the same disk?

    2 Windows operating system you are using?

    You can change the location of the disk to save the data in the d: instead of C: and check if it helps.

    a. navigate to the location (username) C:\Users\.
    b. right click on the folder that you want to change the location, and then select Properties.
    c. click on the location tab and change the location to D: drive.

    d. click on apply and Ok.

  • How to play the song with .wma extension

    How to play the song with .wma extension

    If it does not DRM, use VLC. If so, no Mac OS X software can play or convert.

    (142864)

  • How to fix the error with the code: 0xe7210001 failed to load powrprof, object: cls

    Hello

    Dose anyone know how to fix the error with the code: 0xe7210001, message: unable to load powrprof, object: CLSD-no-it is found;
    OR: Fingerprintsoftware OR error: replicas THotkey.exe message window and the computer freezes

    Maleware scanned and virus, also in safe mode, found no infection, reinstalled driver fingerprint, but nothing has changed.

    grateful for the help!

    Hello

    > message: unable to load powrprof, object: CLSD-no-it is found;
    In my view, this would mean that there is a problem with Toshiba Power Saver
    What laptop Toshiba, you have exactly?

    Maybe reinstall Power Saver could help. You can find it on the official website of Toshiba.

  • How to concatenate the string with a digital command?

    Hello

    How to concatenate the string with a digital command?

    Thank you.

    I think I forgot to add the semicolon, what you can do is, drag the CONCATENATE function and add semicolon.

  • How to open the labview with function of Labview program to stop smoking inside?

    Hi any idea how to open the labview with the Labview function program to stop smoking inside?

    I forgot to add and define the condition of the type for this program.

    If the program is an application, she closed immediately.

    If it is still the work of labview, it will go directly to editing without closing the program.

    I so need to retrieve, open it and make some changes.

    Clement

    Place the VI in a project and open it from there, then it should not autorun. App.kind application property allows you to decide whether to close or not.

    /Y

  • How to configure the bluetooth with Kyocera android phone connection to share photos, music & video files

    Original title: Windows 8 Configuration bluetooth with Kyocera android phone?

    Configuration of bluetooth of Windows 8 with Kyocera android phone?  I got a laptop with bluetooth Tech. How can I set up a connection and share photos, music & video files?

    Hey GQ - Jon'Jon,.

    Make sure that Bluetooth is enabled on the computer as well as your Kyocera android phone.

    Make sure that the phone is paired with your computer.

    For information about how to configure the Bluetooth with Kyocera android phone connection to share photos, music & video files, it would be better if get you in touch with Kyocera phone support for assistance. Please see the support link:

    http://www.Kyocera-Wireless.com/support/phone/

    Please feel free to respond if you face problems with Windows in the future.

  • Hi how to access the tutorial - with the Eagle?

    HI - how to access the tutorial - with the Eagle?

    It's here: create a video | Adobe first Pro CC tutorials

    There is also a newer version here: How to edit videos with Premiere Pro | Adobe first Pro CC tutorials

  • How to solve the problem with the wacom tablet and the polygonal lasso tool. It does not work with a pen.

    How to solve the problem with the wacom tablet and the polygonal lasso tool. It does not work with a pen. I have install windows 10 and fresh, new drivers for wacom bamboo, could he makes problems or there is a problem of photoshop?

    It should do.  You use one of the buttons of pen maybe?  Just touching wheels with the pen with no buttons or modifier keys.  Press ENTER to close the selection.

    Personally I never use the lasso, Polygonal, but rather just the Lasso tool by using the ALT (Opt) to operate the Polygonal tool.  I also use the mouse instead of the Tablet for the selection of cutting edge.  It is a little too uncertain where the point will go when hovering the stylus above the image.

Maybe you are looking for

  • Can not activate Win 8 after removing all of the Satellite P850

    I did everything remove and reinstall Windows 8.As in the factory setting. But I can't activate Windows. The product key does not work. The Windows 8 K OME on my Toshiba Satellite P850. Thank you. Cheers mate.

  • Equium A60 will not start

    Hi, I am despartely needing help with my A60 equium that won't start. When you turn the button lights up, fan and starting, but then in a few seconds the cutting power. I tried different sources of energy, also just by using ac power and battery just

  • Compatibility X 3000

    Hello I own a HP X 3000 mouse and I would like to purchase a HP K2500 keyboard. My question is where can I use the keyboard and mouse on the same receiver. Thank you. Kind regards Mihail Cristian Popescu

  • How to download themes?

    I have a windows xp computer, and it comes with some themes and colors. I want to download more, but is there something I need to download or run to do this? And how do I do step by step? Also, I've tried, but it says that is not a valid topic, so wh

  • My laptop is running very slowly

    My laptop for 2 years. It is running extremely slow. The fan makes too much noise and it blows hot air.