3 Replies Latest reply: Jan 18, 2013 5:07 PM by Osama_Mustafa RSS

    How to insert values through variables

    user469989
      Hi All,

      I need to refresh my UAT database every alternate day from PROD.
      I have written shell script which will serve for the purpose.
      But I am not able to pass the value [set until time "to_date('2012-11-23 23:59:59','YYYY-MM-DD HH24:MI:SS')"] by using the variables into the rman script.

      Can you please suggest how do I resolve this issue?


      Regards-
      Pokhraj Das
        • 1. Re: How to insert values through variables
          sb92075
          966726 wrote:
          Hi All,

          I need to refresh my UAT database every alternate day from PROD.
          I have written shell script which will serve for the purpose.
          shell scripts are Operating System/shell dependent & you decided not to share your details with us.

          But I am not able to pass the value [set until time "to_date('2012-11-23 23:59:59','YYYY-MM-DD HH24:MI:SS')"] by using the variables into the rman script.
          my car won't go.
          tell me how to make my car go..

          How do I ask a question on the forums?
          SQL and PL/SQL FAQ
          • 2. Re: How to insert values through variables
            user469989
            Sorry...

            Here is the shell script;-
            -----------

            RUN {
            set until time "to_date(&1)";
            allocate auxiliary channel aux1 type disk;
            allocate auxiliary channel aux2 type disk;
            allocate auxiliary channel aux3 type disk;
            allocate auxiliary channel aux4 type disk;
            allocate auxiliary channel aux5 type disk;
            allocate auxiliary channel aux6 type disk;
            allocate auxiliary channel aux7 type disk;
            allocate auxiliary channel aux8 type disk;
            duplicate target database to CRP2 NOFILENAMECHECK;
            }


            Then I am running the script as follows:-

            nohup rman @/u001/clone.rcv '2012-11-23 23:59:59','YYYY-MM-DD HH24:MI:SS' &

            But it is giving error

            Thanks-
            Pokhraj Das
            • 3. Re: How to insert values through variables
              Osama_Mustafa
              you provide us one by one , What is the error ?

              you can use databump also
              http://docs.oracle.com/cd/B19306_01/server.102/b14220/utility.htm#sthref1789