Create the Script of comparison

Hey, I'm not really good in scripts, maybe can help real quick guys.

I like to compare numbers in a table in two databases (in the opposite direction of GoldenGate).

If the number of the source of this column is higher (+ 5) that the database of destination I want to send a trap snmp to my control.

How would you do that? Creating a public database link on the site of the source, a query of the same table and compare the values?

Select the id of the table_a;  for example (99 results)

Select the id of table_a@publink; for example (98 results)

How to compare?

Chris

Your original question, this should be the SQL:

Select the id of the table_a;  for example (99 results)

Select the id of table_a@publink; for example (98 results)

Select (select id from table_a) - (select id table_a@publink) twice;

This should return 1.

Just give a try.

Harry

Tags: Database

Similar Questions

  • How to create the script to compile procedure files in oracle - urgent deadline...

    How to create the script to compile procedure files in oracle.    about to go live and have much .prc pkg in a directory usr/tmp/ar... Po... human resources etc. need to create a script to compile all the files in the folder, then do not open all necessary .prc suggestions on how to do it.   Thank you Tom.

    (1) an urgent need, ASAP,... are words that do not in a forum of volunteer. We are here to help if you need it now, for free, open a SR.

    (2) oracle procedures are not files.

    (3) I think you are trying to run operating system packages, no Oracle procedure. right?

  • Create the Script to add a file in an Action name


    I have a picture, and I have a practical action that records, it cultures, he saves, cultures it differently and recorded once more. Currently, I have two options for these stops - I can save each crop in a separate folder and batch rename, or I have the break from the action he saves so I can customize the file name. What I would do is create a script (or, if there is an easier way), add this file name if it will save all simply in the same folder that I have to do it manually.

    Basically, I start with the name of the file: 'TEST '.

    for the first part, it I save as 'TEST '.

    for the second record, I want to save it as "TEST_P1".

    for the third record, I want to save it as "TEST_P2".

    I am brand new to scripting, and is my programming experience with Java and medium in my past, everything feels a little familiar. If someone could help me with this, I would really appreciate it!

    Another option is to use the Image Processor Pro script. You must create several actions to different cultures, you want to make to the original document size not a crop of harvest of a crop until the final harvest.  Don't have any records in these actions. Then just use meny file > Automate > Image Processor Pro.  Implement its dialog box to save the file names you want where you want to save them create.  You can also save that in action. The image pro script processor is a Photoshop plug-in.  In the dialog box, it will record the setting you used in the action stage.    Alternatively, you can save the configuration dialog for later use in the IPP dialog before running the process put in place.

    You can store as many files as you need with IPP and run your actions simple cultures for each size of harvest. IPP opens you simply file a copy to each of your operations and after the action is performed to save the modified copy of doctment under the name of file you set up. You can configure as many tabs as you want you can even have you resized using IPP option re-size crops.   If the script is easy to use his 10 + lines of script Photoshop...

  • Create the script from another script using GUEST

    Oracle 11

    Instead of having to make a link to a different database, I want to create 2 scripts that are run from a shell script and run separately. Run Script1 in Database1 would create 2 Script using PROMPT to create the second script while entering a date of base1 to base2. I've almost got it but the problem is... Script2 using COPY FROM and I need to put a "-" at the end of each line that the GUEST takes as a literal instead of as part of the output.

    SCRIPT1:
    set pagesize 0
    set trimspool on
    set linesize 2000
    set echo off
    set verify off
    set feedback off
    set sqlblanklines on
    
    spool /home/michelle/sql_scripts/sl_dtc_copy2.sql
    
    PROMPT whenever sqlerror exit sql.sqlcode rollback
    PROMPT SET ARRAYSIZE 5000
    PROMPT SET COPYCOMMIT 20
    PROMPT set linesize 4000
    PROMPT 
    PROMPT COPY FROM {username}/{pswd}@{DB2}  TO {username}/{pswd}@{DB2}
    PROMPT CREATE SL_DTC_TMP USING SELECT DISTINCT 
    PROMPT col1, col2, col3
    PROMPT FROM dual
    PROMPT WHERE veh_data_elements_cd = 'ODO_READ'
    PROMPT and       dh.data_collected_timstm >=  
    select trunc(sysdate)-7 from dual; 
    PROMPT and       substr(vdh.vin,10,1) in ('A','B','C','D') 
    PROMPT /
    
    PROMPT spool off
    PROMPT exit
    
    spool off
    exit
    SCRIPT2 NOW:
    whenever sqlerror exit sql.sqlcode rollback
    SET ARRAYSIZE 5000
    SET COPYCOMMIT 20
    set linesize 4000
    
    COPY FROM {username}/{pswd}@{DB2}  TO {username}/{pswd}@{DB2}
    CREATE SL_DTC_TMP USING SELECT DISTINCT
    col1, col2, col3
    FROM dual
    WHERE veh_data_elements_cd = 'ODO_READ'
    and       dh.data_collected_timstm >=
    12-AUG-11
    and       substr(vdh.vin,10,1) in ('A','B','C','D')
    /
    spool off
    exit
    SCRIPT2 HOW IT SHOULD BE:
    -A [SPACE] AND a [-] at the end of each line
    -THE DATE MUST HAVE THE APOSTROPHES AND PREFERABLY AT THE END OF THE PREVIOUS LINE
    whenever sqlerror exit sql.sqlcode rollback
    SET ARRAYSIZE 5000
    SET COPYCOMMIT 20
    set linesize 4000
    
    COPY FROM {username}/{pswd}@{DB2}  TO {username}/{pswd}@{DB2} -
    CREATE SL_DTC_TMP USING SELECT DISTINCT -
    col1, col2, col3 -
    FROM dual -
    WHERE veh_data_elements_cd = 'ODO_READ' -
    and       dh.data_collected_timstm >= '12-AUG-11' -
    and       substr(vdh.vin,10,1) in ('A','B','C','D')
    /
    spool off
    exit
    Thank you

    Oops, sorry, I forgot to change the line.
    Must be double quotes to delimit the orignial:

    SELECT 'WHERE veh_data_elements_cd = ''ODO_READ'' -' from dual
    

    Kind regards
    Sylvie

  • Create the Script to fill the SimpleDisplayName attribute Active Directory Exchange

    Hello

    I want to implement the use of SimpleDisplyNames in my Exchange 2010 environment. After my research, I can see that, if the SimpleDisplayName attribute is enabled and left empty it just goes to show the SMTP address for the external recipients. so to say that I need a way to fill all current users SimpleDisplayName attributes with their Displayname and I'll manually change a few users who have to be modified.

    My question is, can someone help me with something of a powershell script that can run through all AD and make the change for me? I want them all have their display name (first and last) in the LEAGUE.

    Thanks in advance

    Greetings,

    That answer. Microsoft.com Community Forum is very focused on consumers.  Your question might get a better response from the IT professionals on the Microsoft TechNet site, at http://forums.technet.Microsoft.com of if you would care to after the same survey here.  You can file it under the section Active Directory or Windows IT Pro.

  • How the script create\edit\save\load file?

    I can't find a tool or a command to create the script file in the powercli environment.

    How to create or load the script file?

    It is the simplest form simply the PowerCLI prompt and a text editor such as notepad for example.

    Once you have your script in a .ps1 file, you can call/run the script from the prompt PowerCLI.

    PS C:\Scripts >./myscript.ps1

    You will have to ensure that the performance of PowerShell policy is set correctly to be able to run scripts.

    The is easier to develop and run scripts using a graphical interface that allows you to edit and run the script in the same graphical interface.

    With PowerShell comes the ISE, which became pretty good in PS v3.

    And there are other GUIs as more than Idera PowerShell and PowerGui.

    One to use is a matter of personal preference

  • Create alarm "hardware monitoring" by the script?

    Hello:

    I wonder how I can create the hardware by script monitoring alarm?

    For example, I want to write a script that will create the alarm similar to the default alarm "State of other objects of host hardware.

    Follow large docs LucD Web site (http://www.lucd.info/2009/11/27/alarm-expressions-part-2-event-alarms/), I wrote the following code:

    $alarm. Name = "status of other objects of host hardware.

    $alarm. Description = "monitor other objects of host hardware."

    $alarm. Enabled = $TRUE

    $expr1 = new-Object VMware.Vim.EventAlarmExpression

    $expr1. EventType = "com.vmware.vc.cim.CIMGroupHealthStateChanged."

    $expr1. ObjectType = "HostSystem.

    $expr1. Status = 'green '.

    $expr2 = new-Object VMware.Vim.EventAlarmExpression

    $expr2. EventType = "EnteringMaintenanceModeEvent."

    $expr2. ObjectType = "HostSystem.

    $expr2. Status = "yellow".

    $expr3 = new-Object VMware.Vim.EventAlarmExpression

    $expr3. EventType = "EnteringMaintenanceModeEvent."

    $expr3. ObjectType = "HostSystem.

    $expr3. Status = "red".

    $alarm.expression = new-Object VMware.Vim.OrAlarmExpression

    $alarm.expression.expression += $expr1

    $alarm.expression.expression += $expr2

    $alarm.expression.expression += $expr3

    $alarmMgr.CreateAlarm($entity.) MoRef, $alarm)

    But now I have problem to add arguments, operator, and value to all three different events (Advanced) Condition?

    Also, I know that I have to restart VC after creating this alarm, but it is fine with me (the same 'problem' I had added when storage network/monitoring of alarms by script).

    I would really appreciate the help.

    Thank you very much!

    Okay, I think I got it.

    You must use the property of comparisons to set conditions.

    Try this

    $entity = (Get-VMHost ).Extensiondata
    $alarm = New-Object VMware.Vim.AlarmSpec
    $alarmMgr = Get-View AlarmManager
    
    $alarm.Name = "Status of other host hardware objects"
    
    $alarm.Description = "monitor other host hardware objects"
    $alarm.Enabled = $TRUE
    
    $expr1 = New-Object VMware.Vim.EventAlarmExpression
    $expr1.EventType = "EventEx"
    $expr1.EventTypeId = "com.vmware.vc.cim.CIMGroupHealthStateChanged"
    $expr1.ObjectType = "HostSystem"
    $expr1.Status = "green"
    
    $condition11 = New-Object VMware.Vim.EventAlarmExpressionComparison
    $condition11.attributeName = "group"
    $condition11.operator = "equals"
    $condition11.value = "Other"
    
    $condition12 = New-Object VMware.Vim.EventAlarmExpressionComparison
    $condition12.attributeName = "newState"
    $condition12.operator = "equals"
    $condition12.value = "green"
    
    $expr1.Comparisons += $condition11
    $expr1.Comparisons += $condition12
    
    $expr2 = New-Object VMware.Vim.EventAlarmExpression
    $expr2.EventType = "EventEx"
    $expr2.EventTypeId = "com.vmware.vc.cim.CIMGroupHealthStateChanged"
    $expr2.ObjectType = "HostSystem"
    $expr2.Status = "yellow"
    
    $expr2.Comparisons += $condition11
    $condition22 = New-Object VMware.Vim.EventAlarmExpressionComparison
    $condition22.attributeName = "newState"
    $condition22.operator = "equals"
    $condition22.value = "yellow"
    $expr2.Comparisons += $condition22
    
    $expr3 = New-Object VMware.Vim.EventAlarmExpression
    $expr3.EventType = "EventEx"
    $expr3.EventTypeId = "com.vmware.vc.cim.CIMGroupHealthStateChanged"
    $expr3.ObjectType = "HostSystem"
    $expr3.Status = "red"
    
    $expr3.Comparisons += $condition11
    $condition32 = New-Object VMware.Vim.EventAlarmExpressionComparison
    $condition32.attributeName = "newState"
    $condition32.operator = "equals"
    $condition32.value = "red"
    $expr3.Comparisons += $condition32
    
    $alarm.expression = New-Object VMware.Vim.OrAlarmExpression
    $alarm.expression.expression += $expr1
    $alarm.expression.expression += $expr2
    $alarm.expression.expression += $expr3
    
    $action = New-Object VMware.Vim.AlarmAction
    
    $action = New-Object VMware.Vim.AlarmTriggeringAction
    $action.action = New-Object VMware.Vim.SendEmailAction
    $action.action.toList = "[email protected];"
    $action.action.ccList = ""
    $action.action.subject = ""
    $action.action.body = ""
    $action.green2yellow = $false
    $action.yellow2red = $false
    $action.red2yellow = $false
    $action.yellow2green = $false
    
    $spec = New-Object VMware.Vim.AlarmTriggeringActionTransitionSpec
    $spec.startState = "yellow"
    $spec.finalState = "red"
    $spec.repeats = $false
    
    $action.transitionSpecs = $spec
    
    $alarm.action = New-Object VMware.Vim.GroupAlarmAction
    $alarm.action.action += $action
    
    $setting = New-Object VMware.Vim.AlarmSetting
    $setting.toleranceRange = 0
    $setting.reportingFrequency = 0 
    
    $alarm.setting = $setting
    
    $alarmMgr.CreateAlarm($entity.MoRef, $alarm)
    

    Note that I reused the $condition11 into three expressions since it does not change.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Create a script to list all the .bat and .cmd files with the dir command &

    Hello

    Im trying to create a script that will list all the .bat and .cmd files in a specific folder and add the data to a new file (file.txt) - example below:

    dir c:\>desktop\file.txt/OD
    dir d:\>>desktop\file.txt
    dir f:\jobs\*.bat>>desktop\file.txt/OD

    IM able to search the F drive and the list of all the .bat files using a generic parameter, but ideally id like to search for .bat and .cmd files, but whenever I have it try does not work. Any ideas?

    I tried the following:

    dir c:\>desktop\file.txt/OD
    dir d:\>>desktop\file.txt
    dir f:\jobs\*.bat,*.cmd>>desktop\file.txt/OD

    Any help is appreciated, the reason for which I need to check all the .bat and .cmd files is to ensure that the scripts on a cluster are all data, so need them all listed in a doc if possible

    Thank you

    Hello

    Thank you for visiting the Microsoft answers community site. Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for guys official script Forum. Please ask your question in the official Scripting Guys Forum.

    http://social.technet.Microsoft.com/forums/en-us/iTCG/threads

  • WLST Script to create the domain weblogic for IOM and OAM

    Hello

    I intend to set up PS3 IOM - OAM in the new environment. We intend to perform the installation in silent mode. Does anyone have example WLST to create the domain weblogic for IOM or OAM?

    Thank you

    Here is an example of OUD. I post this one since it's the simplest and shortest, but it is the same for OAM and IOM except that the script is much longer because they ask a lot more questions. You will need to export the variables used or replace them with the appropriate values for your system.

    wait-<>

    the value of timeout 600

    spawn ${OUD_BASE}/${WLS_NAME}/common/bin/config.sh mode = console

    # Create a WebLogic domain

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    # Choose the components of the Weblogic Platform

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    # | ___Oracle directory Services Manager - 11.1.2.3.0 [Oracle_OUD1] [3]

    wait {}

    {"Enter number exactly as it appears in the media *" {send "3\n"}}

    wait {}

    {"Enter number exactly as it appears in the media *" {send "n"}}

    # Change the domain information

    wait {}

    "" Enter the value of * "{send" ${OUD_DOMAIN_NAME} \n "}}"

    wait {}

    {"Enter the number of the option to select GOLD *" {send "n\n"}}

    # Select the target area for this domain directory

    wait {}

    {'Enter' new target location GOLD * {send "${OUD_BASE} / user_projects/domains\n"}}

    wait {}

    {'Enter' new target location GOLD * {send "n\n"}}

    # Configure password and username administrator

    wait {}

    {"Enter the number of the option to select GOLD *" {send "2\n"}}

    wait {}

    "" Enter new * "{send" ${WLS_PASS} \n "}}"

    wait {}

    {"Enter the number of the option to select GOLD *" {send "3\n"}}

    wait {}

    "" Enter new * "{send" ${WLS_PASS} \n "}}"

    wait {}

    {"Enter the number of the option to select GOLD *" {send "n\n"}}

    # Configuration mode field-> 1 | Development mode

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    # Java SDK selection

    wait {}

    {"Enter the index number to select GOLD *" {send "2\n"}}

    wait {}

    {'Enter' new JVM Directory GOLD * {send "${JAVA_HOME} \n"}}

    wait {}

    {'Enter' new JVM Directory GOLD * {send "n\n"}}

    # Select Optional Configuration

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    wait {}

    {"Enter the index number to select GOLD *" {send "n"}}

    # Configure the Administration Server

    # Change "Listen port.

    wait {}

    {"Enter the number of the option to select GOLD *" {send "3\n"}}

    wait {}

    "" Enter the value of * "{send" ${ODSM_PORT} \n "}}"

    # Change 'SSL enabled.

    wait {}

    {"Enter the number of the option to select GOLD *" {send "4\n"}}

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    # Change 'SSL listening Port.

    wait {}

    {"Enter the number of the option to select GOLD *" {send "4\n"}}

    wait {}

    "" Enter the value of * "{send" ${ODSM_SPORT} \n "}}"

    # Then

    wait {}

    {"Enter the number of the option to select GOLD *" {send "n\n"}}

    # wait for install

    wait {}

    {"Successfully created * field *" {send "\n"}}

    EXPRESSIONS OF FOLKLORE

  • The script that creates the default tabs in the margin of the document.

    I need a script that creates marks (1 cm margins: top, left, right, down and two others in the Center, a vertical and a horizontal) independent of the document size. Would look like this: whenever I create a new document, execute an action which rodadoria the script to create a document with the enclosed area, similar to the figure below: thank you!

    http://zip.NET/brsW9j

    #target photoshop;
    if(documents.length) main();
    
    function main(){
    var strtRulerUnits = app.preferences.rulerUnits;
    var strtTypeUnits = app.preferences.typeUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    app.preferences.typeUnits = TypeUnits.PIXELS;
    var cm = activeDocument.resolution/2.54;
    var W =activeDocument.width;
    var H =activeDocument.height;
    guideLine(cm,"Vrtc");
    guideLine(cm,"Hrzn");
    guideLine(W-cm,"Vrtc");
    guideLine(H-cm,"Hrzn");
    guideLine(W/2,"Vrtc");
    guideLine(H/2,"Hrzn");
    app.preferences.rulerUnits = strtRulerUnits;
    app.preferences.typeUnits = strtTypeUnits;
    }
    function guideLine(position, type){
        var desc27 = new ActionDescriptor();
            var desc28 = new ActionDescriptor();
            desc28.putUnitDouble( app.charIDToTypeID('Pstn'), app.charIDToTypeID('#Pxl'), position );
            desc28.putEnumerated( app.charIDToTypeID('Ornt'), app.charIDToTypeID('Ornt'), app.charIDToTypeID(type) );
        desc27.putObject( app.charIDToTypeID('Nw  '), app.charIDToTypeID('Gd  '), desc28 );
        executeAction( app.charIDToTypeID('Mk  '), desc27, DialogModes.NO );
    };
    
  • create the clip sequence in the extended script

    I want to create new sequence of a clip using script.how I access beginning of sequence and endpoint in the script

    Moved to First Pro SDK

  • Create a gradient of the script.

    Create a gradient by scripts, the command stops and color.

    Do not understand in the document of reference Photoshop cs6 javaScript, how and where to access the gradient.

    Please help me, I can't do day after day...

    The principle of the script consists of scanning in black and white and the texture of the color of the pixel, registration of the colours in the painting.

    So in order to decompose the matrix of color from 0 to 255 black and white texture.

    Until you get the texture gradient.

    0 where blacks where 255 white. each color will be assigned a user ID and it will move to the color in the color gradient texture.

    Sorry for my English.

    Thank you!

    For a large a gradient with script, you must use scriptlistener. Then modify the variables in this code to match what you want. I use this method to create gradients on the forms which are sampled from a reference image.

  • Can someone help me create a script to repeat to simply open the dialog box to create a link?

    Can someone help me create a script to repeat to simply open the dialog box to create a link?

    the "Connect" command uses the same dialog box as the command to "Place", except for the option "Replace" verified... so, use Ctrl + Shift + P to bring up the place dialog box, select your new image and select the checkbox "replace".

    If check 'Replace' with the mouse slow you down, after you have selected your image, the tab key 'press' 3 times to change the focus, and then press the SPACEBAR to check it out, then ok to place.

  • How to create a script for the calculation of the VO2max using text on a pdf form field values.

    I'm trying to create a script that calculates the VO2max based on user input in several text fields.

    My form is set up so that the user can enter values in the 4 fields of text:

    1 weight = weight in kilograms

    2. age = age in years

    3 time = time to walk 1 mile in decimal

    4. the heart rate (HR) = heart rate recovery immediately after you have finished walking 1 mile

    The VO2max equation that I use is:

    VO2max = 132.853 - (0.1692 * weight)-(0.3877 * Age) + (6,315) - (3.2649 * time)-(0.1565 * HR)

    After the user enters values in 4 text fields, I want the text of VO2max field automatically calculate the above equation and display the result to the user so that the user doesn't have to get all those numbers into a calculator.

    Any suggestions on how to write the script?

    Assuming that your domain names are what you entered in the formula, you can use the simplified field notation:

    132.853 - (0.1692 * weight)-(0.3877 * Age) + (6,315) - (3.2649 * time)-(0.1565 * HR)

    If you want the value to display only after al the data fields are complete you need to use a JavaScript calculation:

    function GetField (cName) {}
    oField var = this.getField (cName);
    if(oField == null) app.alert ("field of error for access to the" cName + "\nPlease verify the name of the field.", 1, 0 ");
    return oField;
    }

    var weight = GetField ("Weight");
    var Age is GetField ("Age");.
    var time = GetField ("Time");
    var h = GetField ("HR");

    Event.Value = "";
    If (Weight.value! = 0 & Age.value! = 0 & Time.value! = 0 & HR.value! = 0) {}
    Event.Value = 132.853 - (0.1692 * Weight.value)-(0.3877 * Age.value) + (6,315) - (3.2649 * Time.value)-(0.1565 * HR.value);
    }

  • Create a script of automatic action for the 3d rotation effect

    Is it possible to create a script action that automatically applyes rotation with specific settings 3d effect?

    An example would be when I press F2 it rotates the object instantly with my specific parameters without having to rely on anything else.

    Ok.

    you draw a shape, you want. Go to effect > 3D > Rotate and apply the desired settings.

    When your object is selected, go to the graphic Styles palette (window > graphic styles) and create the new graphic style (be it in the palette menu) or the small button. Call something memorable.

    Draw a new object, once again what you want. Open the actions palette (window > Actions). Create new action. Give it a name and assign it to a function key, and then click OK (the action will begin recording).

    Select your new object, then select your new graphic Style in the graphic styles palette. It should apply your 3D settings to the new object.

    Click on the button stop at the bottom of the Actions palette.

    create the new object, select it and press your chosen key. Enjoy.

Maybe you are looking for

  • Why is there a small icon app on my watch face fitness today.

    Why is a little guy of app icon fitness on my watch?

  • Windows Setup does not load driver Marvell D20

    Hello Installation: D20, the Marvell controller are attached: 2xHDDs RAID1 and an Intel SSD in a RAID configuration. The machine was initially installed with Windows 8.1 (on RAID1 disks), most later improved to W10. After a recent, (unknown to me), W

  • for loop in formula node does not

    Hello I; m trying to use for loop in the node of the formula, but it is does not work. I want the output (y1) product value in certain range (a and d, and of course one is smaller than d). I ' do not use primitive labview since a and d are keep chang

  • SP3 and IE8 update problems

    Hi, hope someone can help me.  I run a Pentium 4 with Windows XP Media Center Edition machine.  I did the update to IE8 and then install SP3 thing that other people have had problems with.  I had bad too, so I uninstalled IE8 but I got in trouble, ot

  • emails sent to the Outbox

    Every time I send and send it goes to my Outbox.  I deleted all my messages in the Outbox and rebooted but still this problem.