Script to export Security file using maxl script

can anyone provide me the Script to export Security file using maxl script.It should create a log file and a batch file should also be there to schedule the Maxl script.Please help me with this

Hi,
You can use something like
[b]login admin password on localhost;
[b]spool on to 'c:\temp\log.txt';
[b]export security_file to data_file C:\temp\sec_file.txt;
[b]spool off;
[b]logout;
Then you can have a batch file that just calls the maxl script
essmsh name_of_maxl_script.mxl
The batch script can then be scheduled.
Cheers
John
http://john-goodwin.blogspot.com/

Similar Messages

  • How to get ORA errors in alertlog file using shell script.

    Hi,
    Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script.
    Thanks

    Hi,
    You can define the alert log as an external table, and extract messages with SQL, very cool:
    http://www.dba-oracle.com/t_oracle_alert_log_sql_external_tables.htm
    If you want to write a shell script to scan the alert log, see here:
    http://www.rampant-books.com/book_2007_1_shell_scripting.htm
    #!/bin/ksh
    # log monitoring script
    # report all errors (and specific warnings) in the alert log
    # which have occurred since the date
    # and time in last_alerttime_$ORACLE_SID.txt
    # parameters:
    # 1) ORACLE_SID
    # 2) optional alert exclusion file [default = alert_logmon.excl]
    # exclude file format:
    # error_number error_number
    # error_number ...
    # i.e. a string of numbers with the ORA- and any leading zeroes that appear
    # e.g. (NB the examples are NOT normally excluded)
    # ORA-07552 ORA-08006 ORA-12819
    # ORA-01555 ORA-07553
    BASEDIR=$(dirname $0)
    if [ $# -lt 1 ]; then
    echo "usage: $(basename) ORACLE_SID [exclude file]"
    exit -1
    fi
    export ORACLE_SID=$1
    if [ ! -z "$2" ]; then
    EXCLFILE=$2
    else
    EXCLFILE=$BASEDIR/alert_logmon.excl
    fi
    LASTALERT=$BASEDIR/last_alerttime_$ORACLE_SID.txt
    if [ ! -f $EXCLFILE ]; then
    echo "alert exclusion ($EXCLFILE) file not found!"
    exit -1
    fi
    # establish alert file location
    export ORAENV_ASK=NO
    export PATH=$PATH:/usr/local/bin
    . oraenv
    DPATH=`sqlplus -s "/ as sysdba" <<!EOF
    set pages 0
    set lines 160
    set verify off
    set feedback off
    select replace(value,'?','$ORACLE_HOME')
    from v\\\$parameter
    where name = 'background_dump_dest';
    !EOF
    `
    if [ ! -d "$DPATH" ]; then
    echo "Script Error - bdump path found as $DPATH"
    exit -1
    fi
    ALOG=${DPATH}/alert_${ORACLE_SID}.log
    # now create awk file
    cat > $BASEDIR/awkfile.awk<<!EOF
    BEGIN {
    # first get excluded error list
    excldata="";
    while (getline < "$EXCLFILE" > 0)
    { excldata=excldata " " \$0; }
    print excldata
    # get time of last error
    if (getline < "$LASTALERT" < 1)
    { olddate = "00000000 00:00:00" }
    else
    { olddate=\$0; }
    errct = 0; errfound = 0;
    { if ( \$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
    { if (dtconv(\$3, \$2, \$5, \$4) <= olddate)
    { # get next record from file
    next; # get next record from file
    # here we are now processing errors
    OLDLINE=\$0; # store date, possibly of error, or else to be discarded
    while (getline > 0)
    { if (\$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
    { if (errfound > 0)
    { printf ("%s<BR>",OLDLINE); }
    OLDLINE = \$0; # no error, clear and start again
    errfound = 0;
    # save the date for next run
    olddate = dtconv(\$3, \$2, \$5, \$4);
    continue;
    OLDLINE = sprintf("%s<BR>%s",OLDLINE,\$0);
    if ( \$0 ~ /ORA-/ || /[Ff]uzzy/ )
    { # extract the error
    errloc=index(\$0,"ORA-")
    if (errloc > 0)
    { oraerr=substr(\$0,errloc);
    if (index(oraerr,":") < 1)
    { oraloc2=index(oraerr," ") }
    else
    { oraloc2=index(oraerr,":") }
    oraloc2=oraloc2-1;
    oraerr=substr(oraerr,1,oraloc2);
    if (index(excldata,oraerr) < 1)
    { errfound = errfound +1; }
    else # treat fuzzy as errors
    { errfound = errfound +1; }
    END {
    if (errfound > 0)
    { printf ("%s<BR>",OLDLINE); }
    print olddate > "$LASTALERT";
    function dtconv (dd, mon, yyyy, tim, sortdate) {
    mth=index("JanFebMarAprMayJunJulAugSepOctNovDec",mon);
    if (mth < 1)
    { return "00000000 00:00:00" };
    # now get month number - make to complete multiple of three and divide
    mth=(mth+2)/3;
    sortdate=sprintf("%04d%02d%02d %s",yyyy,mth,dd,tim);
    return sortdate;
    !EOF
    ERRMESS=$(nawk -f $BASEDIR/awkfile.awk $ALOG)
    ERRCT=$(echo $ERRMESS|awk 'BEGIN {RS="<BR>"} END {print NR}')
    rm $LASTALERT
    if [ $ERRCT -gt 1 ]; then
    echo "$ERRCT Errors Found \n"
    echo "$ERRMESS"|nawk 'BEGIN {FS="<BR>"}{for (i=1;NF>=i;i++) {print $i}}'
    exit 2
    fi

  • Is it possible to monitor State change of a .CSV file using powershell scripting ?

    Hi All,
    I just would like to know Is it possible to monitor State change of a .CSV file using powershell scripting ? We have SCOM tool which has that capability but there are some drawbacks in that for which we are not able to utilise that. So i would like
    to know is this possible using powershell.
    So if there is any number above 303 in the .CSV file then i need a email alert / notification for the same.
    Gautam.75801

    Hi Jrv,
    Thank you very much. I modified the above and it worked.
    Import-Csv C:\SCOM_Tasks\GCC2010Capacitymanagement\CapacityMgntData.csv | ?{$_.Mailboxes -gt 303} | Export-csv -path C:\SCOM_Tasks\Mbx_Above303.csv;
    Send-MailMessage -Attachments "C:\SCOM_Tasks\Mbx_Above303.csv" -To “[email protected]" -From “abc@xyz" -SMTPServer [email protected] -Subject “Mailboxex are above 303 in Exchange databases” -Body “Mailboxex are above 303 in Exchange databases" 
    Mailboxex - is the line which i want to monitor if the values there are above 303. And it will extract the lines with all above 303 to another CSV file and 2nd is a mail script to email me the same with the attachment of the 2nd extract.
    Gautam.75801

  • Copying substitution varibale using Maxl script

    Hi,
    Ive been trying to copy application using Maxl script in essbase to take backups. Everything gets copied except substitution variables. Could some one help me in sorting out this issue.
    Is there any specific Maxl Command to copy substitution variable alone from one application to another, if so could u please share it with me.
    thanks

    Hi,
    Unfortunately, as John said, there is no command to copy the subvars. One of my colleagues ran into this same issue on one of my projects. He ended up spooling a script with display variable all command to show all your variables and write them to a text file. from there he wrote a batch file to parse the text file for each of the variables, and then updated the subvars in the backup application with these values.
    The thing you want to look out for here is that you want to make sure you properly handle checking for whether the subvar already exists in the backup application. If it does, you just want to run an update of the value. If it doesn't exist, you want to add it first. This is because there is no create or replace variable, so to avoid any errors, you need to be careful with that. I think you may want to look into some of the other alternatives John provided if you are still looking into this issue.
    Thanks,
    Daniel
    http://www.DVEPM.com

  • Move group of pages from one InDesign file to another InDesign File using VB.Script

    Dear team,
    I am trying to move group of InDesign pages from one indesign file to another indesign file using vb.script.
    I have written the code like
    Dim Pages=IndDoc.Pages
    Dim Mytype=TypeName(Pages)
    Pages.Move(InDesign.idLocationOptions.idBefore,IndDoc1.Pages.LastItem)
    but it is giving an error as method Move is not a member of Pages 
    please give mme the solution to move the Multiple pages or a group of page from one Indd to another Indd.

    Hey Peter, if I wan to move several page that part of Auto Flow text, I checked the "delete page after moving" but the content still there, not deleted.
    Is there any way to delete it automatically, just to make sure I have moved that autoflowed page?

  • Read Text file using Java Script

    Hi,
    I am trying to read a text file using Java Script within the webroot of MII as .HTML file. I have provided the path as below but where I am not able to open the file. Any clue to provide the relative path or any changes required on the below path ?
    var FileOpener = new ActiveXObject("Scripting.FileSystemObject");
    var FilePointer = FileOpener.OpenTextFile("E:\\usr\\sap\\MID\\J00\\j2ee\\cluster\\apps\\sap.com\\xapps~xmii~ear\\servlet_jsp\\XMII\\root\\CM\\OCTAL\\TestTV\\Test.txt", 1, true);
    FileContents = FilePointer.ReadAll(); // we can use FilePointer.ReadAll() to read all the lines
    The Error Log shows as :
    Path not found
    Regards,
    Mohamed

    Hi Mohamed,
    I tried above code after importing JQuery Library through script Tag. It worked for me . Pls check.
    Note : You can place Jquery1.xx.xx.js file in the same folder where you saved this IRPT/HTML file.
    <HTML>
    <HEAD>
        <TITLE>Your Title Here</TITLE>
        <SCRIPT type="text/javascript" src="jquery-1.9.1.js"></SCRIPT>
        <script language="javascript">
    function Read()
    $.get( "http://ldcimfb.wdf.sap.corp:50100/XMII/CM/Regression_15.0/CrossTab.txt", function( data ) {
      $(".result").html(data);
      alert(data);
    // The file content is available in this variable "data"
    </script>
    </HEAD>
    <BODY onLoad="Read()">
    </BODY>
    </HTML>

  • MaxL - Export Security File Command

    Hi,
    Ours is a planning application - Classic - 11.1.2.0 version.
    I have a requirement where I need to get all the information regarding security defined on dimensions, data forums etc. The reason we are looking for this is so that we can compare the overlap (if any) of security given to any particular user - who mind end up being in two groups (in shared services) but each group has different access/permissions.
    For instance - There is a user who has access to two data forms and say on one form he needs write access to Actuals and on all the other he should just have read access to Actuals. This user is in two groups and in one group he has been given write access to Actuals but in another group he was given read access to Actuals. So, based on this the "Write" permission will be dominant and he would be getting write on both the places which might not be efficient.
    So, to avoid such situations I need to know the all security overlaps in a readable format. I did go through the Export Security File command but I am not sure if it would give me all the details I need. I did read the tech ref but couldn't get all the information. Will this command help to achieve my requirement? Are there any other better methods?
    Please let me know your ideas. Any help is appreciated.
    ~ Adella
    Edited by: Adella on Sep 15, 2011 10:16 AM
    Edited by: Adella on Sep 15, 2011 10:16 AM

    Thank you John for your prompt response.
    I don't know why I didn't think of this when I was thinking about this issue...I mean I knew of this utility but it didn't struck me for some reason...sorry about that but I think this would help me :)
    I also have another question - I don't know if I should have posted it as another post but please let me ask here.
    Does, the dimension level security applied on Planning data forms also work on reporting?
    We have situations where a user needs to work on data forms as well as work on reports. In data forms he should just be able to see part of customers but when working with reports he should be able to see all customers. So, if I have two groups in Shared services - one group for reports and another one for planning and this user being in both the groups how would it work?
    Will it overlap at some point? Or will it be two different things since for once group we would provision him as a planner for an application and in the reporting group he would be playing some other role? I am a little confused on this as ultimately it is the same user.
    Please let me know.
    ~ Adella

  • I need to export Quicktime files using the PhotoJPEG, MJPEG-A, or DV codec.  Is this possible in Final Cut Pro X?  In the options under export I don't see any of these available.

    I need to export Quicktime files using the PhotoJPEG, MJPEG-A, or DV codec.  Is this possible in Final Cut Pro X?  In the options under export I don't see any of these available.  I'm a newbie to this so any help would be greatly appreciated.

    I'm importing .MOV files from my Canon 5Dmk2 at 1080p.  So should I just export using a different codec and then use Compressor or MPEG Streamclip to convert to an MJPEG-A or PhotoJPEG codec?

  • Automation process in Workspace (using MaxL script)

    Hi All,
    I have a MaxL script to export Level 0 data and to update new data in a database
    It is working fine.
    I have tried to schedule it, and its also working fine.
    But according to my requirement, i have to publish this MaxL script in workspace as a job or as a file so that I can run this MaxL script in workspace only.
    I have tried some way but didn't get success.
    So help me to solve my problem
    Thanks in advance

    We are using workspace and jobs to automate our processes. Here is how we do it:
    In the server that runs workspace, we place the batch or exe that needs to be run. Then we set up a job factory using that same batch file.
    Then on workspace we import this batch file as a generic job with the associated job factory and DONE!
    Next time you execute the job from workspace, that batch file will run from your workspace machine.
    send me an email to [email protected] and I'll give you the documentation that we used to set it up in more details.

  • Batch File and MaxL Script

    I have a MaxL script that exports level0 data from various cubes. I have a batch file to call that script at daily intervals.
    I want to name the output something different each day (preferably NAMEmmdd type format). I realize I can add a rename or move to the batch but wonder if there is a MaxL method that will allow me to export to a different name?
    Current MaxL is simply
    export database APP.DB level0 data to data_file "'$Arborpath\am1119.txt'";
    Ideas or direction to go to learn answer?
    T,
    J

    Hi,
    You can pass in variables into maxl, so you the calling batch file can pass in a variable which holds the filename with the current day...
    For example you have a batch file
    essmsh c:\temp\export.mxl 'C:\temp\output%DATE:~3,2%%DATE:~0,2%.txt'
    If that was run today it would pass in 'C:\temp\output1118.txt
    Now in your maxl you just reference the variable with
    export database sample.basic level0 data to data_file $1;
    the $1 relates to the variable which was passed in, the 1 being the position it was passed in.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Make .dmp file using shell script

    i am new in linux.
    i want to make .dmp file(export form a table) in a particular directory using shell script .
    then form .dmp file i want to convert it in .zip file
    Edited by: 855516 on Jul 18, 2011 5:26 PM

    The following should give you a head start:
    Create the following file i.e. scott_export.sh
    #!/bin/bash
    MAILADR="[email protected]"
    EXPDIR="/home/oracle/datapump"
    EXPDIR4SQL="'$EXPDIR'"
    DUMPFILE="export_`date +%N`.dmp"
    LOGFILE="export_`date +%N`.log"
    ORACLE_SID=test; export ORACLE_SID
    PATH=$PATH:/usr/local/bin; export PATH
    ORAENV_ASK=NO
    . /usr/local/bin/oraenv
    mkdir -p $EXPIDR 2>/dev/null
    sqlplus -s /nolog <<EOF
    connect / as sysdba
    set pages 0 feed off
    create or replace directory datapump as $EXPDIR4SQL;
    grant read, write on directory datapump to scott;
    exit
    EOF
    expdp scott/tiger tables=EMP,DEPT \
          transport_full_check=y \
          directory=datapump dumpfile=$DUMPFILE logfile=$LOGFILE
    gzip $EXPDIR/$DUMPFILE >> $EXPDIR/$LOGFILE
    cat $EXPDIR/$LOGFILE | mailx -s "$LOGFILE" $MAILADR
    # ENDGive execute privileges:
    $ chmod 750 scott_export.sh
    The above script should also work as a cron job.

  • Subtracting Columns from Import File Using Import Script

    The file I am importing to FDM contains two amount columns, 1 Debit, 1 Credit. I want to have the Amount field populate as the Debit minus Credits. I have attempted an import script that is giving me an error in the bolded line:
    Function GBS_Amount(strField, strRecord)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     
    'Date Created:     
    'Purpose:
    'Set variables
    dim strNatural
    dim strCurmnthDR
    dim strCurmnthCR
    dim strCurAmount
    'Store the Natural Account as Column 1 of 11 of a comma delimited file
    strNatural = Trim(DW.Utilities.fParseString(strRecord, 11, 1, ","))
    'Store the Current Month Debit Amount as Column 7 of 11 of a comma delimited file
    strCurmnthDR = Trim(DW.Utilities.fParseString(strRecord, 11, 7, ","))
    'Store the Current Month Credit Amount as Column 8 of 11 of a comma delimited file
    strCurmnthCR = Trim(DW.Utilities.fParseString(strRecord, 11, 8, ","))
    'Calculate the YTD Amount
    strCurAmount = strCurmnthDR - strCurmnthCR
    GBS_Amount = strCurAmount
    End If
    End Function
    What syntax do I need to use to subtract two defined variables?

    Hi Experts,
    I have a similar situation,I am trying to import the Multiple amount columns to be addedd and imported as one amount column.Below is the script I am using for the same,script is getting verified in Script editor but When I am trying to Load the File in import, I am gettig an error as below.but if I try to import without using the script for the amount, inport is getting done.I have attached script to amount column only.
    ERROR
    Code............................................. 9
    Description...................................... Subscript out of range
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 8380
    Scirpt being used
    Function Import_YTD(strField, strRecord)
    'Set variables
    dim strCurmnth1
    dim strCurmnth2
    dim strCurmnth3
    dim strCurmnth4
    dim strCurmnth5
    dim strCurmnth6
    dim strCurmnth7
    dim strCurmnth8
    dim strCurmnth9
    dim strCurmnth10
    dim strCurmnth11
    dim strCurmnth12
    dim strCurAmount
    strCurmnth1 = Trim(DW.Utilities.fParseString(strRecord, 20, 9, ","))
    strCurmnth2 = Trim(DW.Utilities.fParseString(strRecord, 20, 10, ","))
    strCurmnth3 = Trim(DW.Utilities.fParseString(strRecord, 20, 11, ","))
    strCurmnth4 = Trim(DW.Utilities.fParseString(strRecord, 20, 12, ","))
    strCurmnth5 = Trim(DW.Utilities.fParseString(strRecord, 20, 13, ","))
    strCurmnth6 = Trim(DW.Utilities.fParseString(strRecord, 20, 14, ","))
    strCurmnth7 = Trim(DW.Utilities.fParseString(strRecord, 20, 15, ","))
    strCurmnth8 = Trim(DW.Utilities.fParseString(strRecord, 20, 16, ","))
    strCurmnth9 = Trim(DW.Utilities.fParseString(strRecord, 20, 17, ","))
    strCurmnth10 = Trim(DW.Utilities.fParseString(strRecord, 20, 18, ","))
    strCurmnth11 = Trim(DW.Utilities.fParseString(strRecord, 20, 19, ","))
    strCurmnth12 = Trim(DW.Utilities.fParseString(strRecord, 20, 20, ","))
    If strCurmnth1="" Then strCurmnth1="0" End If
    If strCurmnth2="" Then strCurmnth2="0" End If
    If strCurmnth3="" Then strCurmnth3="0" End If
    If strCurmnth4="" Then strCurmnth4="0" End If
    If strCurmnth5="" Then strCurmnth5="0" End If
    If strCurmnth6="" Then strCurmnth6="0" End If
    If strCurmnth7="" Then strCurmnth7="0" End If
    If strCurmnth8="" Then strCurmnth8="0" End If
    If strCurmnth9="" Then strCurmnth9="0" End If
    If strCurmnth10="" Then strCurmnth10="0" End If
    If strCurmnth11="" Then strCurmnth11="0" End If
    If strCurmnth12="" Then strCurmnth12="0" End If
    'Calculate the YTD Amount
    strCurAmount = CDbl(strCurmnth1) + CDbl(strCurmnth2) + CDbl(strCurmnth3) + CDbl(strCurmnth4) + CDbl(strCurmnth5) + CDbl(strCurmnth6) + CDbl(strCurmnth7) + CDbl(strCurmnth8) + CDbl(strCurmnth9) + CDbl(strCurmnth10) + CDbl(strCurmnth11) + CDbl(strCurmnth12)
    Import_YTD =strCurAmount
    End Function

  • How to Compare 2 CSV file and store the result to 3rd csv file using PowerShell script?

    I want to do the below task using powershell script only.
    I have 2 csv files and I want to compare those two files and I want to store the comparision result to 3rd csv file. Please look at the follwingsnap:
    This image is csv file only. 
    Could you please any one help me.
    Thanks in advance.
    By
    A Path finder 
    JoSwa
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Not certain this is what you're after, but this :
    #import the contents of both csv files
    $dbexcel=import-csv c:\dbexcel.csv
    $liveexcel=import-csv C:\liveexcel.csv
    #prepare the output csv and create the headers
    $outputexcel="c:\outputexcel.csv"
    $outputline="Name,Connection Status,Version,DbExcel,LiveExcel"
    $outputline | out-file $outputexcel
    #Loop through each record based on the number of records (assuming equal number in both files)
    for ($i=0; $i -le $dbexcel.Length-1;$i++)
    # Assign the yes / null values to equal the word equivalent
    if ($dbexcel.isavail[$i] -eq "yes") {$dbavail="Available"} else {$dbavail="Unavailable"}
    if ($liveexcel.isavail[$i] -eq "yes") {$liveavail="Available"} else {$liveavail="Unavailable"}
    #create the live of csv content from the two input csv files
    $outputline=$dbexcel.name[$i] + "," + $liveexcel.'connection status'[$i] + "," + $dbexcel.version[$i] + "," + $dbavail + "," + $liveavail
    #output that line to the csv file
    $outputline | out-file $outputexcel -Append
    should do what you're looking for, or give you enough to edit it to your exact need.
    I've assumed that the dbexcel.csv and liveexcel.csv files live in the root of c:\ for this, that they include the header information, and that the outputexcel.csv file will be saved to the same place (including headers).

  • Opening files using a script...

    Every time I use the "open" command in applescript, I get the message "cannot get file." How do I open files with a script?

    Your usage of documents folder in this case is incorrect. They are reserved words, but as part of *Standard Additions'* path to command. The Finder is expecting a file path, so try this instead:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    tell application "Finder"
    open every document file of (path to documents folder) whose name contains searchtext
    --where searchtext is text input from the user
    end tell
    </pre>

  • Open a file using matlab script block

    Hello!
    I want to open a file from a specified directory using matlab script block.
    The input of this block is a string with file's name......but it doesn't work in this way. I have to change the input data or I have to change it  into matlab matlab script?
    Some idea?
    Thanks!
    Attachments:
    example.PNG ‏4 KB

    Ooooppss!
    My computer is crazy....sorry.
    I'm near to solve my problem...
    The problem is that I have a column of strings like this
    str=['labview'
            'labview2'
           'labview3'
            'labview4']
    I use the double command but the byte array to string block only converts me an element, do you know is exist another block to change all the elements.
    I've tried to do with a for loop block....using an index array and changing with i the index element, but it doen'st work.
    You have some idea?

Maybe you are looking for