Linux script for PGP encryption

Hello,
We are trying to do PGP encryption by giving the OS command in the File adapter. Can somebody provide me the exact linux script that we should use to do PGP encryption?
Note: We have XI-3.0 on LINUX.
Promise points for helpful answers.
Regards,
Raji.

Hi Rajashree
PGP Encryption is used to support the transmission of sensitive data to / from third party systems via XI.
Adapter modules are developed to encrypt the file using PGP.
We had a similar requirement where we used PGP encryption.The module was developed using Cryptix OpenPGP which is a Java implementation of the OpenPGP standard.When the module is called in the adapter, it uses the PGP key provided by the party that will receive the encrypted message. This module should be called prior to calling the Sap adapter
Logic Flow/Processing:
1.Read the XML payload and message for getting the needed data.
2.Read the key to be used in the encryption and log the key to be used and the beginning of the encryption.
3.Call the PGP encryption and compression method.
4.Log whether encryption has been successful.
5.Set as payload the message content encrypted, and the principal data.
6.If any error occurs, logs an exception in PGP adapter module and the error reason.
7.Return the message.
Go through This links
Is there any FTP API available from SAP?
Send Text file to FTP in binary mode with PGP encryption
http://www.webmethods.com/meta/default/folder/0000007429
Converting IDOC to XML
XI implementation
http://www1.webmethods.com/PDF/webMethods_for_SAP-wp.pdf
Current versions found at http://www.cryptix.org and http://www.bouncycastle.org.
http://www.bouncycastle.org/documentation.html
If you want to use the unix script on windows then you need cygwin. Take the shell executable and cygwin.dll and copy them to another machine and try out.
Else you write an .exe or a batch file where you will give your PGP command to encrypt and decrypt and execute it from the OS level in your adapter. Check my answer in this thread:
Re: PGP Encription
Might be useful.
PGP Encription
Re: PGP Encription
\Re: triggering encryption script with XI
Pls rewards if useful

Similar Messages

  • B2B add on for PGP encryption in SAP PI 7.11

    Hi Folks,
    I see that we can implement PGP encrytption in PI 7.11 SP08, Can anyone please provide me with the B2B add on install link from SAP market place which can enable SFTP adapter and PGP encryption.

    Hi Kalyan
    OSS note 1695521 provides the details of the download location. Below is a snippet of the note.
    You can download the PI secure connectivity add on 1.0 at http://service.sap.com/swdc > Installation and Upgrades > Browse our Download Catalog > SAP NetWeaver and complementary products > PI SFTP PGP ADDON > PI SFTP PGP ADDON 1.0
    You can download SP1,corresponding patches for SP0 and SP1 of PI secure connectivity add on 1.0 at http://service.sap.com/swdc > Support Package and Patches > Browse our Download Catalog > SAP NetWeaver and complementary products > PI SFTP PGP ADDON > PI SFTP PGP ADDON 1.0-->Choose the component Type
    Rgds
    Eng Swee

  • Need hlep for PGP Encryption for delimited file transfer using B2b

    I have a requirement to read the PGP encrypted delimited file from partner and decrypt it to process. Can any body tell me how can I do this in b2b. I really appreciate the help

    Better read it as a binary document and pass it to the back-end for further processing (decryption and processing). If you want to the decryption at B2B layer itself then use the java callout feature -
    http://docs.oracle.com/cd/E23943_01/user.1111/e10229/callouts.htm#CHDEFBDG
    Regards,
    Anuj

  • Is there a linux script for packaging HTML5 extensions

    I am looking for a way to package an HTML5 extension in a linux environment. The available downloads don't seem to include a linux compatible executable.
    http://labs.adobe.com/downloads/extensionbuilder3.html

    You can use the following in a script if you don't mind exposing your
    password:
    java weblogic.Admin t3://myhost:myport SHUTDOWN system <password> <seconds>
    Guy
    In weblogic.developer.interest.environment Gaurav Khanna <[email protected]> wrote:
    Hi,
    Is there a stop script for weblogc 4.5.1 on NT?? There is one for starting
    the server.
    Thanks

  • Policy files expiry for pgp encryption

    HI All
    i am using bouncycastle jars for encrypting data using PGP.
    for this to function we need to install the jce unrestricted security files given at the java downloads
    but when i download and use them then for one weeek they are working fine
    but after one they an exception is raised like the below
    java.security.InvalidAlgorithmParameterException: parameter object not a DHParameterSpec or an ElGamalParameterSpec
    NOw i just copied the 2 jars(local_policy.jar,US_export_policy.jar) in the security directory of JDK to another name and again copied back to same name
    Its working fine
    NOw i am of the assumption that these jars expiry after certain days .Is it true????
    if so then do we have any way to make them permanent?
    how can we make these jars permanent??
    Is there any solution for this?
    Please anybody can help me as soon as possible
    Thanks
    vijay

    Hi,
    I have few questions to ask before i can provide you with the solution for this. We need to know what is the software that you are using for encryption, are you using APIs or using PGP software installed on the server and calling the executables to encrypt the file from the module?
    If you are using standard APIs it would be easier for traceability. There are standard code that is available which you can leverage for this purpose.
    Incase you are using PGP software some points to remember. You need to install the PGP software on the PI / XI server by logging in using SAPSERVICE<SID> username and password. If you install the software using SAPSERVICEADM it would not work. When you install it it creates folders and path for the software for that user. Infact when the server is running and the interfaces are working it would use the sapservice<SID>.
    For my current customer we have created a module to achieve the encryption / decryption of files. We have basically 5 parameters (this is according to the reqmt at our client end).
    Parameter 1: Operation: Values: Encryption / Decryption
    Parameter 2: username: Value: username which you want to pass (name of the vendor or the user code of the vendor).
    Parameter 3: Sign Value: Sign value(Some vendors want their files to be signed).
    Parameter 4: Armor: Value: Same as 4 (Another option commonly used).
    Parameter 5: Log:  Value: Y / N (Used for logging of messages for identifying problems in communication channel monitoring).
    Generate the PGP command depending on the values passed. (You can get the list of PGP commands from the software you are using or from the website (http://www.dsj.net/pgp/pgphelp.html).
    Trap all the error codes from the execution and raise exception so that the adapter errors out too.
    Let me know if you require any help regarding the same.
    Regards,
    Indranil
    Award Points if it was helpful.

  • PGP Encryption support in SOA Suite 11g

    Hi,
    Looking for PGP encryption support in SOA Suite 11g as we have a requirement to encrypt the file using PGP encryption and send over SFTP.
    I already went through some of the forums posts but they are date back to 2007, so just wanted to confirm if there is anything in recent releases of SOA Suite.
    - FTP adapter support or
    - OWSM suppport.
    As far as i know, we have to install some PGP tool and write a script to encrypt/decrypt and call the script from BPEL. this conclusion is based on a stmt given in the OWSM 10g book by sitaraman.
    Please provide your insights on this.
    Thanks
    Siva

    Hi Siva,
    I don't think still there is any support for PGP in Oracle SOA. You may use java for PGP encryption/decryption and transfer externally encoded messages over SFTP.
    Please refer -
    Re: PGP Encryption/Decryption
    PGP Encryption in B2B
    Regards,
    Anuj

  • PGP encryption and moving of a file from one system to another

    Hi All,
    Could you please provide me the necessary information in setting up the below jobs in Redwood CPS.
    a) How can i do pgp encryption to a file in a SAP system?.  Could you please provide me the necessary steps.
    b) How can i do pgp encryption to a file in a non SAP system?.  Could you please provide me the necessary steps.
    b) Can i move a file from one SAP system  to another SAP system(example ECC to BI)?. If so, could you please provide me the necessary steps.
    c) Can i move a file from a SAP system  to a Non- SAP system?.  If so, could you please provide me the necessary steps.
    d) Can i move a file from a Non-SAP system  to another Non- SAP system?.  If so, could you please provide me the necessary steps.
    e)How can i ftp a file  and move it to a different network?. Could you please provide me the necessary steps.
    Thank you in advance.
    Thanks and Regards,
    Ramana

    Hi Ramana,
    a) You have a file in an SAP system that you want to encrypt, I you have the full path to the file, you can create and use an appropriate external command to perform the encryption, unless you know of an ABAP program to do that. Once you know which option you have, you can either schedule SAP_AbapRun to run the ABAP to encrypt the file, or SAP_ExternalCommandRun if you have an external command defined for the process.
    b) On the target system, you install a platform agent (license required) and check which command you have for pgp encryption. On Unix, you would use gpg. Simply create a BASH job definition with a String parameter named File and fill the following source: gpg -e -u `whoami` -r [email protected] <${File} > $File"_encrypted"
    b2) Talk to your SAP Basis team, you could use SAP CTS/STMS for that,  you could integrate that into CPS
    c)I imaging the file is an output of an ABAP program ? Run the ABAP program from within CPS with SAP_AbapRun, then the file will be on the CPS server, you can then copy the file to the target host, again, platform agents required on CPS system. You can use FTP, sFTP, SCP, NFS, CIFS (Windows share) whatever your platform requires.
    d) Platform agents required on source system. Target system must have windows share/NFS/SSHD/FTP or whatever you could use for file transfers
    e)Please see the documentation on jftp.
    Regards,
    HP

  • PGP Encryption/Signing issue

    Hi Experts,
    We are working on a scenario to sign the message while sending to client but the message created doesn't seem to be like signed message.
    The message created is as below
    -----BEGIN PGP MESSAGE-----
    Version: BCPG v1.46
    kA0DAAIBadYy7HCWZSAByzZiJDMzNDliZmUyLTFiZDctMTFlNC04NzZmLTAwMDAw
    MDUwNGNkNlPfhdpTaWduIG1lc3NhZ2WJARwEAAECAAYFAlPfhdoACgkQadYy7HCW
    ZSAP7ggAlLy4/itUM4TrzzAwtDXB3FX2VgI/8kztoWNqyLKAzytOudu/KDbfqTNx
    PMZQXjEsn62MXWSV39vWW2lJ+OKJXnlZ/tEYqGa3Bn1rBIK8wsqfQR02S28XrpAh
    csL6vXCAm8trCxIrxy2aZR2ibmioSVowMVkrVTj/hckiRsW5pconIZjiPqlynwJX
    ayp7fkqmJ9ZYOqR4/ygqNOuSN5XTudFvRuvAqHSw23CMQzz4u2PZcODSd1WOsmOJ
    3SDgt4H1SxPx/zZ1d08V1iPd+kRf0bsBijG1tLeP+DbeAEPSOOVzmtLpnlEXNhLn
    arAe1rqDvTmexoXmDvo1xaYZhIzpvA==
    =6Ssh
    -----END PGP MESSAGE-----
    But as far as I know the signed message looks likes the one below.
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1
    Example of message signing
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (MingW32)
    iD8DBQFFxqRFCMEe9B/8oqERAqA2AJ91Tx4RziVzY4eR4Ms4MFsKAMqOoQCgg7y6
    e5AJIRuLUIUikjNWQIW63QE=
    =aAhr
    -----END PGP SIGNATURE-----
    We have maintained the module parameter as per the help guide to only sign the message. We do not need encryption.
    pgp
    applyCompression
    None
    pgp
    applyEncryption
    false
    pgp
    applySignature
    true
    pgp
    asciiArmored
    true
    pgp
    ownPrivateKey
    testPrivate_key.gpg
    pgp
    partnerPublicKey
    testPublic_Key.asc
    pgp
    pwdOwnPrivateKey
    pgp
    signingAlgo
    SHA1
    Not sure if some configuration is missing or the signed, encrypted and signed & encrypted messages look same if created using PGPEncryptionModule.
    Appreciate any help on this.
    Regards,
    Pankaj

    Hi Siva,
    I don't think still there is any support for PGP in Oracle SOA. You may use java for PGP encryption/decryption and transfer externally encoded messages over SFTP.
    Please refer -
    Re: PGP Encryption/Decryption
    PGP Encryption in B2B
    Regards,
    Anuj

  • PGP Encryption Scenario for a Proxy to File Scenario.

    I have a scenario where an outbound proxy from R/3 system is extracting some hr related info type data and sending it to XI system. The XI system is required to convert the data into a flat file format and encrypt the data using PGP.
    <b>R/3 -
    Proxy -
    > XI System -
    File Encrypted----
    > External System.</b>
    Need some inputs from experts how to set up the scenario. In the file adapter we can trigger scripts at the O/S level to encrypt the file.
    What I would like to know what the configurations that are required to get the scenario working namely,
    1. Where do we need to install the PGP software is it on the FTP server or XI server ?
    2. How will the scripts be executed by the Receiver File adapter ?

    Hi Indranil
    Here is some info on PGP/XI
    <<<<1. Where do we need to install the PGP software is it on the FTP server or XI server ?
    <i>
    XI server</i>
    Also go thru the following excerpt
    XI dont support PGP encryption and decryption. I have done some interfaces using PGP encryption at OS level and then using XI. Install the software in XI and write the OS command for encryption and decryption at OS level. Call this command in File adapter after or before message processing.
    PGP Encryption:
    We get the normal text file from R3. Then we have written two XI interfaces here. My first interface will pick from R3 and encrypts the file and drops it in another location of R3. In this interface I have given OS command before message processing. This will pick the file and do the encryption.
    My second interface will pick the encrypted file from R3 and do a simple FTP to the Bank.
    This is exactly opposite for decrypting the file from Bank.
    <i>Thanks 2 Satish Reddy</i>
    Regards
    krishna
    <i>Note:Reward points if helpful</i>

  • Manual Standby on Standard Edition 10g for Linux (Scripts)

    Hello,
    I would like to know if someone has the SCRIPTS for a manual configuration of standby on standard Edition 10g for Linux Red Hat 3.0.
    Or some documentation on how can I implement it.
    Thank you very much
    Best Regards
    Gissel

    This link is for 9i but I think it can be helpful for you:
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:725414295789388455::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,216212.1,1,1,1,helvetica#anchor3
    Best Regards
    Krystian Zieja / mob

  • Startup Scripts for OBIEE 11g on Linux

    Hi, I originally spent many hours trying to find a startup/shutdown script for OBIEE on linux, in the end I compiled a new one based on notes in the install manual and other posts on the subject until I got it working consistantly
    Please add comments or improvements :)
    Note: you need to create the boot.properties file (in /security) for each server, and provide the username/password so WebLogic won't prompt for it when starting automatically (otherwise it doesn't start :p) ....refer to the install manual or [weblogic boot.properties|http://onlineappsdba.com/index.php/2010/08/21/weblogic-startup-prompting-from-username-password-bootproperties/]
    #!/bin/bash
    # /etc/init.d/obiee
    # Run-level Startup script for OBIEE
    # set required paths
    export ORACLE_BASE=/opt/oracle
    export ORACLE_HOME=/opt/oracle/product/11.1.0/db_1
    export ORACLE_OWNR=oracle
    export ORACLE_FMW=/opt/oracle/product/fmw
    export PATH=$PATH:$ORACLE_FMW/bin
    case "$1" in
    start)
    echo -e "Starting Weblogic Server...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/user_projects/domains/bifoundation_domain/bin/startWebLogic.sh > /dev/null 2>&1 &"
    sleep 30
    echo -e "Starting Node Manager..."
    su $ORACLE_OWNR -c "$ORACLE_FMW/wlserver_10.3/server/bin/startNodeManager.sh > /dev/null 2>&1 &"
    sleep 30
    echo -e "Starting Managed Server: bi_server1..."
    su $ORACLE_OWNR -c "$ORACLE_FMW/user_projects/domains/bifoundation_domain/bin/startManagedWebLogic.sh bi_server1 [url for admin console] > /dev/null 2>&1 &"
    sleep 30
    echo -e "Starting Components...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/instances/instance1/bin/opmnctl startall > /dev/null 2>&1 &"
    sleep 30
    stop)
    echo -e "Stopping Components...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/instances/instance1/bin/opmnctl stopall > /dev/null 2>&1 &"
    sleep 30
    echo -e "Stopping Managed Server: bi_server1..."
    su $ORACLE_OWNR -c "$ORACLE_FMW/user_projects/domains/bifoundation_domain/bin/stopManagedWebLogic.sh bi_server1 [url for admin console] [weblogic user] [weblogic pass] > /dev/null 2>&1 &"
    sleep 30
    echo -e "Stopping Weblogic Server...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/user_projects/domains/bifoundation_domain/bin/stopWebLogic.sh > /dev/null 2>&1 &"
    sleep 15
    status)
    echo -e "Component Status...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/instances/instance1/bin/opmnctl status"
    restart)
    $0 stop
    $0 start
    echo "Usage: `basename $0` start|stop|restart|status"
    exit 1
    esac
    exit 0
    Hopefully this helps others in the same situation
    Cheers

    HI,
    Is this script for Enterprise Install on a single computer? For Simple install I think there is no concept of nodemanager and managedserver.
    --Joe                                                                                                                                                                                                                                                                                                                           

  • Startup/Shutdown script for OBIEE 11g on Linux

    Hi all,
    as a follow-up to [url http://forums.oracle.com/forums/thread.jspa?messageID=4546010]an earlier thread by some fine gentleman, I have improved the original startup/shutdown script for Linux a bit, making sure that all processes are handled correctly. The script has been tested and works fine on CentOS 5.5 with Oracle BI 11.1.1.3.0 in a clustered configuration. Instructions:
    Manual start/stop:
    > service obiee start
    > service obiee stop
    > service obiee status
    Automatic start/stop during boot sequence:
    > chkconfig --add obiee
    > chkconfig obiee on
    Note that in order for the procedure to go through smoothly, you need to provide the admin credentials (username/password, defaulting to weblogic/weblogic) in three different places:
    1. In configuration file <FMW_HOME>/user_projects/domains/<domain name>/servers/AdminServer/security/boot.properties for the administration server;
    2. In script <FMW_HOME>/user_projects/domains/<domain name>/bin/startManagedWebLogic.sh (variables WLS_USER and WLS_PW) for the managed server;
    3. In the startup script itself (variables BIEE_USER and BIEE_PASSWD) for shutting down the managed server.
    Complete logs are available in /var/log/obiee-start (-stop).log files.
    Please comment as necessary,
    Chris
    #!/bin/bash
    # File:    /etc/init.d/obiee
    # Purpose: Start and stop Oracle Business Intelligence 11g components.
    # chkconfig: 2345 99 10
    # description: Manage OBIEE service.
    # These values must be adapted to your environment.
    ORACLE_OWNR=oracle                  # Local Unix user running OBIEE
    ORACLE_FMW=/home/oracle/biee        # Deployment root directory
    BIEE_USER=<username>                # BIEE administrator name
    BIEE_PASSWD=<password>              # BIEE administrator password              
    BIEE_DOMAIN=<domain name>           # Domain name
    BIEE_INSTANCE=instance1             # Instance name
    BIEE_SERVER=bi_server1              # Server name
    BIEE_MANAGER_URL=<hostname>:7001    # Admin server URL (hostname:port)   
    # These should require no change.
    WL_PATH=$ORACLE_FMW/wlserver_10.3/server/bin
    BIEE_PATH=$ORACLE_FMW/user_projects/domains/$BIEE_DOMAIN/bin
    ORACLE_INSTANCE=$ORACLE_FMW/instances/$BIEE_INSTANCE
    export ORACLE_INSTANCE
    START_LOG=/var/log/obiee-start.log
    STOP_LOG=/var/log/obiee-stop.log
    SUBSYS=obiee
    start() {
        echo "********************************************************************************"
        echo "Starting Admin Server on $(date)"
        echo "********************************************************************************"
        su $ORACLE_OWNR -c "$BIEE_PATH/startWebLogic.sh" &
        wait_for "Server started in RUNNING mode"
        echo "********************************************************************************"
        echo "Starting Node Manager on $(date)"
        echo "********************************************************************************"
        su $ORACLE_OWNR -c "$WL_PATH/startNodeManager.sh" &
        wait_for "socket listener started on port"
        echo "********************************************************************************"
        echo "Starting Managed Server $BIEE_SERVER on $(date)"
        echo "********************************************************************************"
        su $ORACLE_OWNR -c "$BIEE_PATH/startManagedWebLogic.sh $BIEE_SERVER http://$BIEE_MANAGER_URL" &
        wait_for "Server started in RUNNING mode"
        echo "********************************************************************************"
        echo "Starting BI components on $(date)"
        echo "********************************************************************************"
        su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl startall"
        echo "********************************************************************************"
        echo "OBIEE start sequence completed on $(date)"
        echo "********************************************************************************"
    stop() {
        echo "********************************************************************************"
        echo "Stopping BI components on $(date)"
        echo "********************************************************************************"
        su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl stopall"
        echo "********************************************************************************"
        echo "Stopping Managed Server $BIEE_SERVER on $(date)"
        echo "********************************************************************************"
        su $ORACLE_OWNR -c "$BIEE_PATH/stopManagedWebLogic.sh $BIEE_SERVER t3://$BIEE_MANAGER_URL $BIEE_USER $BIEE_PASSWD"
        echo "********************************************************************************"
        echo "Stopping Node Manager on $(date)"
        echo "********************************************************************************"
        pkill -TERM -u $ORACLE_OWNR -f "weblogic\\.NodeManager"
        echo "********************************************************************************"
        echo "Stopping Admin Server on $(date)"
        echo "********************************************************************************"
        su $ORACLE_OWNR -c "$BIEE_PATH/stopWebLogic.sh"
        echo "********************************************************************************"
        echo "OBIEE stop sequence completed on $(date)"
        echo "********************************************************************************"
    wait_for() {
        res=0
        while [[ ! $res -gt 0 ]]
        do
            res=$(tail -5 "$START_LOG" | fgrep -c "$1")
            sleep 5
        done
    case "$1" in
        start)
            echo "********************************************************************************"
            echo "Starting Oracle Business Intelligence on $(date)"
            echo "Logs are sent to $START_LOG"
            echo "********************************************************************************"
            start &> $START_LOG &
            touch /var/lock/subsys/$SUBSYS
        stop)
            echo "********************************************************************************"
            echo "Stopping Oracle Business Intelligence on $(date)"
            echo "Logs are sent to $STOP_LOG"
            echo "********************************************************************************"
            stop &> $STOP_LOG
            rm -f /var/lock/subsys/$SUBSYS
        status)
            echo "********************************************************************************"
            echo "Oracle BIEE components status...."
            echo "********************************************************************************"
            su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl status"
        restart)
            $0 stop
            $0 start
            echo "Usage: $(basename $0) start|stop|restart|status"
            exit 1
    esac
    exit 0

    You can use WLST to start/stop BI Services and it works on both Linux and Windows.
    Following link has the sample -
    http://download.oracle.com/docs/cd/E21764_01/bi.1111/e10541/admin_api.htm#CDEFAHDD

  • Shutdown script for linux

    Hi,
    I'm looking for a shutdown script for linux to put it in crontab and another for startup. Do you have any ?
    Thanks.

    OK, you can cron following commands (assume that all Oracle related env variables are set. We are setting ORACLE_SID just to ensure that we will be working with the right instance):
    59 7 * * *     su - oracle -c "export ORACLE_SID=ORCL; echo 'startup' | sqlplus -s '/ as sysdba' >>/dev/null" 2>&1
    31 16 * * *      su - oracle -c "export ORACLE_SID=ORCL; echo 'shutdown immediate' | sqlplus -s '/ as sysdba' >>/dev/null" 2>&1

  • I need a script power shell : bypass bootguard PGP encryption

    HI All
    i need your help plz !about getting a script power shell used to bypass bootguard with PGP encryption.
    a have a script .bat and it's tested well
    Thks

    I don't think we can understand what you are asking.
    ¯\_(ツ)_/¯

  • A script for oracle10g cold backup on linux

    Hi,
    I have a urgent need to do a cold backup using o/s command. Can anyone please send me a script for this.
    Thanks in advance
    PK

    I ended up writing the script
    define 3 = &backup_directory
    define 4 = &instance_name
    define 5 = &user_dump_directory
    Set Heading Off
    Set Verify Off
    Set FeedBack Off
    Set LineSize 132
    Set PageSize 1000
    set termout off
    Spool cold_back.sql
    select 'connect /as sysdba' from dual;
    Select 'Startup Force' || CHR(10) ||
    'Shutdown Normal' From Dual;
    select '! mkdir '||'&&3'||'/'||to_char(sysdate,'yyyyddmm') from dual
    /* Data Files */
    Select '!cp ' || File_Name || ' &&3'||'/'||to_char(sysdate,'yyyyddmm') || CHR(10) ||'!gzip ' || '&&3' ||'/'||to_char(sysdate,'yyyyddmm')|| '/' || SubStr(File_Name, InStr(File_Name, '/', -1)+1) From Sys.DBA_Data_Files
    /* Redo Log Files */
    Select '!cp ' || Member || ' &&3'||'/'||to_char(sysdate,'yyyyddmm') || CHR(10) || '!gzip ' || '&&3'||'/'||to_char(sysdate,'yyyyddmm') || '/' || SubStr(Member, InStr(Member, '/', -1)+1) From V$LogFile
    /* Control Files */
    Select '!cp ' || name || ' &&3'||'/'||to_char(sysdate,'yyyyddmm') From V$controlfile
    /* Init and Config Files */
    Select '!cp $ORACLE_HOME/dbs/init&&4' || '.ora &&3'||'/'||to_char(sysdate,'yyyyddmm') From Dual
    alter session set tracefile_identifier=coldbackup
    alter database backup controlfile to trace
    select '!mv '||'&&5/*COLDBACKUP*' ||' &&3'||'/'||to_char(sysdate,'yyyyddmm') FROM dual
    Select 'Startup' From Dual;
    Select 'Exit' from dual;
    set termout on
    PROMPT " Run the output cold_back.sql script [sqlplus -s '/as sysdba' @cold_back.sql ]"
    Spool Off
    -----------------------

Maybe you are looking for

  • Help please problem with nokia n85

    hi guys after updating the nokia n85 to v30.019 the speaker icon of the music folder disspeard in the menu and even the icon of utilities folder disspeard how can i restore the icons i've tried the hard reset and it didn't work ?! waiting for your he

  • Incorrect Outlook Anywhere Settings

    Hi We are using Exchange 2013 and everything seems to be working ok.  However, if I look at any of our Outlook clients (2007 & 2010) there seems to be incorrect information in the Exchange Proxy Settings under the advanced account settings. For some

  • RE : need assistance for the BAPI between Web methods and SAP

    *Hi All,* *I need help regarding the integaration between webmethods and SAP by using BAPI_PROJ_MAINTAIN.* *Details:* *From webmethods side they are maintaining 2 fields called Region and Sub region with parent and child hirearchy* *From SAP side we

  • Call unix script within plsql block

    Hi all, can i call a unix script within a plsql block for example my unix script name is - Diff_dataload_process.sh declare begin select * from ......; Diff_dataload_process.sh exception end; please help me. Thanks, Krupa

  • Turning off iPhoto as default?

    I am using iView for uploading from my camera, organizing etc...and would like to turn iPhoto off as the default program so that it doesn't start up when I plug in my camera. How is this done?? Thanks.