Comments on this style of scripting.

Hi,
This is my first rman shell script, still learning the ropes. Just looking for any commentary on the pro's cons of how I'm doing this. You'll notice instead of saving a job in RMAN with "create script" I've elected to leave the script in the backup file my self.. comments? ps: I'm not concerned about sharing these passwords, they are my dummy ones that are specifically never to be used in production...
Tasks remaining:
- removing passwords from the file [Or maybe not, if this script is chmod 700 it should be fine right?]
- adding more options regarding archive logs, cross checking, expirys and those good things
- I plan on 2 versions of this script. One for Sundays to do full backups, one for every other day to incremntals + archive logs.
#!/bin/ksh
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u00/app/oracle/product/11.2.0/dbhome_1/
export PATH=$PATH:${ORACLE_HOME}/bin
# Notes
# - page 282 of beginners book
# - create a recovery catalog VS. using control file.
# - show all is; handy. use it.
rman <<EOF
connect catalog rcat/rcat@orcl;
connect target sys/xoc65kej;
configure controlfile autobackup on;
configure retention policy to recovery window of 60 days;
run {
allocate channel c1 type disk;
backup
incremental level 0
format "/u00/app/oracle/flash_recovery_area/ORCL/backupset/b_t%t_s%s_p%p"
database plus archivelog;
exit;
EOF

I put the rman parameters in there more of a way of documenting them, but i guess Show all does the same. Perhaps I'll leave them there, but comment them out.
For backups, I just backup tomy flash recovery area, this is okay right?
I guess I could send my backups to a different spot, so that they don't fill up my flash recovery and cause my db to stop accepting connections just because of a large backup :)
Jeff.

Similar Messages

  • I want to change the name of paragraphs styles. Is this possible by script.

    I want to change the name of paragraphs styles. Is this possible by script.
    Thank you

    Hi Hasvi,
    May the below coding helps for your question:
    var myDocument = app.activeDocument
    var myPStyles = myDocument.paragraphStyles.everyItem().getElements()
    for(i=2; i<myPStyles.length; i++)
    myPStyles[i].name = "A_".concat(myPStyles[i].name);   //Please change as per your requirement
    //myPStyles[i].name = "BBBBBB_".concat(myPStyles[i].name);
    Please use the below URL for more details.
    http://forums.adobe.com/message/4909340#4909340
    If my answers helps you, please provide "Helpful" or "Correct Answer" for me.
    Thanks
    Siraj

  • Show CSS comments in CSS Style list?

    Hi,
    I've been using Dreamweaver for a numbef of years, but one small feature is forcing me to move away to newer CSS editors. "I need the CSS Style list to show comments from my style sheet". Is this possible?
    Put simply, some of my CSS stylesheets are huge, and I organise them by having comments to separate out the various types of selectors.
    In order for me to navigate my styles, it would help me immensely if the CSS Style list also included comments, so I could quickly see which section was which.
    Is this something which I've missed?
    Thanks,
    Chris.l

    Hello,
    I believe I've had a similar problem over the last day or so (wasted 3 hours).
    I create a "standard" page with all my basic stuff in it.
    Then create two sections with comments like this:
    <!--------------------- Start variable <style> definitions------------------------------>
    <!---------------------Endvariable <style> definitions-------------------------------->
    <!--------------------- Start variable code------------------------------>
    <!---------------------Endvariable code-------------------------------->
    So this way, I can just go quickly to that section of the <header> or <body> and copy and paste code.
    (I'm not at the level of templates yet)
    After three hours of trying to get a table to work, and comparing it to other stuff I've written
    I said to myself "I wonder if comments are allowed in the <style> section".
    The comments were deleted and everything worked fine.
    Based on the above posts, I'm guessing that is a known feature?
    Is it correct that comments can be put in the <head> section, but not in the <head><style> section?
    Again, I thank you in advance.

  • Change any paragraph style by script

    Hi !!!
    Is it possible change a selected paragraph with any paragraph style by script?
    Example:
    My paragraph style is:
    Font: Garamond, size 7pt, color: black, align justfy (or any selected paragraph style)
    Script to set the selected paragraph with paragraph style describe above to:
    Font: Humanist, sise 8pt, color: black, align justfy
    Drop caps: number of lines: 3, one or more caracteres: 2

    I got it.
    But there is a trouble.
    How can I change into this script the first caracter dropcaps to fill tint 30% Black?
    var myPara = app.selection[0].paragraphs[0];
    var myChar = myPara.characters[0];
    myPara.dropCapCharacters = 1;
    myPara.dropCapLines = 2;
    myPara.dropcapDetail = 1;
    myPara.firstLineIndent = 0;

  • Close_Form('XXE_F501_SCRIPTING_START'); this is a command in IESCLPKG.PLL WHEN I AM USING THIS COMMAND MY SCRIPTING WINDOW IS GETTING CLOSED BUT THEN ONE ERROR IS COMMING ,KINDLY GIVE ME IDEA TO DEBUG THAT ERROR

    Close_Form('XXE_F501_SCRIPTING_START'); this is a command in IESCLPKG.PLL WHEN I AM USING THIS COMMAND MY SCRIPTING WINDOW IS GETTING CLOSED BUT THEN ONE ERROR IS COMMING ,KINDLY GIVE ME IDEA TO DEBUG THAT ERROR
      if (param_value = 'CLOSE_SCRIPTING_WINDOW') then
              --go_block('VIEW_IB');     
             -- SET_WINDOW_PROPERTY('SCRIPTING_WINDOW', WINDOW_STATE, MINIMIZE);
              --Set_Window_Property('SCRIPTING_WINDOW', VISIBLE, PROPERTY_OFF); 
              --hide_window('SCRIPTING_WINDOW');
               -- GO_BLOCK('CTRL');
               fnd_message.set_string('1');--nimish
               fnd_message.show;--nimish
               --Close_Form('XXE_F501_SCRIPTING_START');  -- Commented for Nova
               fnd_message.set_string('2');--nimish
               fnd_message.show;--nimish
                Scripting_Util.EndScript;
            end if;
    THIS IS THE PLL CODE KINDLY GIVE ME A CLEAR SOLUTION.

    First: you should get a new keyboard. Seems your shift-key is stuck.
    Second: A header of a post is a header and not for a summary of your question
    Third: This is the forum for the tool SQL Developer. Please mark this question as answered and post again in Forms
    Forth: When you expect an answer, the least would be to include the errormessage and your forms version.
    Regards
    Marcus

  • How to map para style by script

    Hi
    My indesign file has already some Group style, when I try to flow the XML file in Indesign that time same style of paragraph are not mapped with automatically. FYI
    Here 'TXT' style is already defined in 'Chapters' Group style (see Part A). After flowing again 'TXT' (see Part B) is coming in without mapping.
    Now I want to map the 'Part B' style with 'Part A' is this possible by script?

    Hi
    I have used this code but its showing errors
    _mappingStyle("TXT", "Chapters", "Chapter_Title") 
    _mappingStyle("TXT", "Chapter_Title") 
    function _mappingStyle(findStyle, changeGroup, changeStyle) 
        app.findGrepPreferences = app.changeGrepPreferences = null;   
        app.findGrepPreferences.appliedParagraphStyle = findStyle;   
        app.changeGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item(changeGroup).paragraphStyles.item(changeStyl e);    
        app.activeDocument.changeGrep();     
        app.findGrepPreferences = app.changeGrepPreferences = null;   
    by hasvi

  • [WebView] external HTML loaded, but without styles and scripts...?

    Hello again :)
    I am using WebView to load an external HTML document for layouting and styling my application. Thereby I generated an executable .jar to use this as a sstand alone application. Here it snaps.
    When I load the HTML, its loaded without styles and scripts, mentioned in the <head> part of the doc. Scripts, pics and styles are referenced relatively. That works indeed: laoding the doc in Chrome results in a fully functional website, but doing so with the .jar does not.
    This is how I load the page:
    URL markupURL = null;          
    markupURL = getClass().getResource("/mockup.html");
    browserEngine.load(markupURL.toExternalForm());
    getChildren().add(browser);Thats how the styles are linked in the HTML:
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="css/metrostyle.css">So consider the following folder structure:
    - commport
    # mochup.html
    # comm.jar
    - css
    # bootstrap.css
    # metrostyle.css
    /css
    /commport
    I repeat: this structure works in a browser. Why not in the jar?
    thanks :)
    Edited by: W4tson on 22.01.2013 16:59
    Edited by: W4tson on 22.01.2013 17:02

    Unfortunately you need to form your xml a little differently.
    <data>
    <title>HelloWorld</title>
    <content>Here
    is some &lt;i&gt;html&lt;/i&gt; text I want to assign to a text area.</content>
    On the server I use a java utility to replace the html less than (<) and greater than(>) and other characters with the amper html equivelants.
    However I am sure that there must be a regular expression syntax somewhere out there that will do this in Flex.  

  • How Can I Create Something In This Style?

    HI guys, I am currently working on graphics for a mobile game I am making. I have some skill in vector, mostly through Inkscape, but I am trying to use Illustrator more. The thing is despite what program I use I can't figure out how to create something in the style I desire. I would like it to look something like this...
    I can create the vector objects, like the saws,door, and chest pretty well, It is just the background and foreground in which I am lost. I notice they have a texture to them, with various colors, and almost a hand drawn look. Can this be accomplished in Illustrator, or will I need to use Photoshop? If so, how can I go about getting something similar to this. Are there any tutorials for work in this style, because I haven't been able to find any? Any information would be great. Even if their are any vector tutorials in this cartoon style, that would be nice too,since I can always improve. Thanks in advance!

    There are many ways you can achieve this effect you just need to learn.
    Here are some useful links for you to teach yourself some trick and effects:
    Tutorials - Adobe Illustrator - Digital Arts (lots of useful tutorials for adding textures & effects!)
    How to Create a Cartoon House in Illustrator - Illustrator Tutorials - Vectorboom
    Hope these help you achieve what you want.

  • XML Comment in Indesign using Apple script.

    Hi all,
    How to find the selected XML element is commented in indesign and get XML comment value in thru apple script. Any Ideas?
    -Jacintha

    You can have as many comments as you want so they require you to state the index of the comment in your reference.
    Assuming you have an object reference for the XML element, you would replace "associated XML element of selection" with that.
    tell application "Adobe InDesign CS3"   
        set myComments to {}
        if every XML comment of associated XML element of selection is not {} then
            set end of myComments to value of every XML comment of associated XML element of selection
        end if
        return myComments
    end tell
    if you know there's only going to be one comment then,
    tell application "Adobe InDesign CS3"
        if every XML comment of associated XML element of selection is not {} then
            set  myComment to value of XML comment 1 of associated XML element of selection
        end if
        return myComment
    end tell
    ~Mike

  • This styles file is bad or corrupted- Elements 3.0

    Ok so, I use photoshop elements 3.0, and the other day something weird happened and now it refuses to work. A few days ago it was fine and working well, but suddenly something pops up saying "This styles file is bad or corrupted" and it just suddenly popped up. It did this before so I tried to install it again [after removing it] and it gave me the same problem so I had to make an entirely new account, and then FINALLY got it to work on the different account. [It's refusing to work on the new account]
    Quite annoying...
    Any chance there's some way to fix this?

    You didn't say which OS you have.  When you create one, be sure it is an administrative account not a standard account as Elements need read/write privileges.
    Windows Vista and Windows 7:
    http://www.howtogeek.com/howto/5261/beginner-geek-add-a-new-user-account-in-windows-7/
    Windows XP:
    http://www.ehow.com/how_2078860_create-new-user-account-windows.html
    Not sure if all macs are familiar with macs but here's a link to one:
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/8235.html

  • Please comment if this is a BUG in MII 12.2 or Normal?

    Hi,
    MII Version in Use:- 12.2.2 Build(235)
    I am trying to use "TransactionPath" function from Link editor to obtain the path for current transaction. Now when I execute this transaction from workbench, everything works fine as expected and desired.
    The problem comes when I run this transaction using Runner service.
    I mapped the result of TransactionPath function to an output variable and then checked its value using runner service, and the output was a blank tag(for my output variable). The bigger problem comes when I try to implement some string functionality on the output of TransactionPath function. At this the transaction fails becaue the links that hold string operation fails(and thats because TransactionPath is returning null value).
    Also, Just to proof check that my transaction, runner service URL and mappings etc are correct, I changed the TransactionPath function to TransactionId function and then I started getting result in my output variable tag in output xml. Thus with every refresh that I did , the transaction ID increased by 1 value.
    Please comment if this a known issue or bug or there is something that I am missing or this is a expected result for some reason !!
    Best Regards
    Piyush Govil

    Hi Piyush,
    I also checked that the transaction path is not coming in the output xml but from the workbench with a tracer it is working fine.
    I also verified that all other things are coming as they should but not the transaction path.
    Regards,
    Anuvrat

  • I need the XML elements appear in different paragraphs ...  Could do this with a script?

    I need the XML elements appear in different paragraphs ...
    Could do this with a script?
    Thanks...

    You can use this / Puedes usar esto
    insertTextAsContent("\n",XMLElementPosition.beforeElement);                  
    //  or             
    insertTextAsContent("\r", XMLElementPosition.afterElement);
    Necesitaria mas información,

  • [JS] How to break link to paragraph style from script?

    I don't found the command break link to paragraph style from script.
    I want "unapply" the style from the text, but leave the formatting intact.
    Can help me?

    In the interface it's a separate command ("Break link to style"), but it seems in a script you have to use
    Paragraph.applyParagraphStyle (using:ParagraphStyle[, clearingOverrides:bool=true])
    You cannot use "null" or something similar for "ParagraphStyle", so I guess the idea is to use paragraph style #0 in your document (which is always "[No Paragraph Style]"). Be sure to set "clearing Overrides" to false, as it defaults to true.
    The following single line works on your current paragraph:
    app.activeDocument.selection[0].paragraphs[0].applyParagraphStyle (app.activeDocument.paragraphStyles[0], false);

  • Why don't access this applet from script?

    This code uses Java Plug-in 1.4..
    in my browser, this html code causes Script error - no such method func1()
    <html>
    <head>
    <script language=javascript>
         function fnc1() {
              alert(document.app.app1.func1());
    </script>
    </head>
    <body onLoad ="javascript:fnc1();">
    <form name=app>
    <OBJECT
         id="app1"
         classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
         width="0" height="0" align="right"
         codebase="http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn">
         <PARAM NAME="code" VALUE="TestJava2Applet.class">
         <PARAM NAME="archive" value="Test1.jar">
         <PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.4">
         <PARAM NAME="scriptable" VALUE="true">
         <PARAM NAME="mayscript" VALUE="true">
         No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
    </OBJECT>
    </form>
    </body>
    </html>

    Hi
    I'm not sure your syntax is correct, but if it is, I think the problem comes from the fact your javascript calls an applet function before this applet has been loaded and then your function is not found.
    try this :
    <html>
    <head>
    <script language=javascript>
    function fnc1() {
    alert(document.app1.func1());
    </script>
    </head>
    <body>
    <OBJECT
    id="app1"
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="0" height="0" align="right"
    codebase="http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn">
    <PARAM NAME="code" VALUE="TestJava2Applet.class">
    <PARAM NAME="archive" value="Test1.jar">
    <PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.4">
    <PARAM NAME="scriptable" VALUE="true">
    <PARAM NAME="mayscript" VALUE="true">
    No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
    </OBJECT>
    <center>
    <form>
    <input type="button" onclick="fnc1();">
    </form>
    </center>
    </body>
    </html>
    Wait for the applet loading and then click the button

  • Comment on this code please

    I would like your comments on this code. Doesn't it have a few oppertunities? I know it's jsp, but question is not directed toward the jsp, just the logic/syntax/etc. How about the == for starters?
    <%
              String z_Desc = (((String)hshipTrackSummaryDocList.get("Z_DESC")) == null) ? "" : (String)hshipTrackSummaryDocList.get("Z_DESC");
              if (z_Desc  == "" ) {
         %>
         <%
              }else {
         %>
                      <%=(((String)hshipTrackSummaryDocList.get("Z_DESC")) == null) ? "" : (String)hshipTrackSummaryDocList.get("Z_DESC")%></font>
         <%
         %>

    Hi mlovern! This code has several opportunities for "improvement". I noticed that the get("Z_DESC") method is called on hshipTrackSummaryDocList object several times. Each time, it returns the very same value. Hence, in the interests of efficiency, it's a better idea to call it once, save the return value and then use the latter.
    Also, I'm not too clear about exactly what you intended to do in the else clause. As it stands, your else clause will cause the JSP to fail.
    Be very careful while using the "==" operator while comparing strings. That causes object comparison, not object content comparison. The latter is the required test most of the time. Also, while comparing the contents of the strings, it's better to call the equals() method on the empty string or a constant string. So, if I needed to compare a test value against an empty string or a constant, here's how.
    if ( "".equals( testString ) )
       // do something
    else if ( SOME_CONSTANT.equals( testString ) )
       // do something
    }In the above code, even if testString was null, a runtime exception will not be generated. However, if the equals() method was called on testString and it happened to be null, you'd be looking at an exception.
    Here's how I would have written the code you supplied.
    String zDescValue = (String) hshipTrackSummaryDocList.get( "Z_DESC" );
    if ( zDescValue == null ) zDescValue = "";
    if ( "".equals( zDescValue ) )
       // do something useful
    else
      // do something else
    }I've also come across similar situations. In order not to repeat the same code everywhere, I've wound up writing a couple of utility methods to assign "" to a string if it's null. Here are those methods.
    public static String processStringValue( String inputString, String defaultValue )
       return ( inputString == null ? defaultValue : inputString );
    public static String processStringValue( String inputString )
       return processStringValue( inputString, "" );
    }Finally, you may want to be careful about the code fragments you post. From your post and profile, I can guess where you work. Your employer may or may not care if parts of their code start showing up on the Internet. It's better to create a general piece of code that approximates what you want to convey. However, it's better to be safe than sorry.
    Hope this helps!
    Cheers!

Maybe you are looking for