Extract the lines between two dates

Dear experts
I am new bee to scripting...
Pl. help me getting the lines between two strings.
I am getting the oracle sql output as below. and would like to get the time from system date compare with the date in sql output file and extract the lines.

if system time is 2012-07-01 19:15:00 get that time and refer with time available in sql output file "2012-07-01 19:15:01" & "2012-07-01 19:30:01" and extract the lines between these two times "2012-07-01 19:15:01" & "2012-07-01 19:30:01"
how can i achieve this pl. help .. thanks in advance.

Sample SQL file and will be appended every 15 minutes

SQL> SQL> SQL> SQL>
RECOVER_TIME
-------------------
2012-07-01 19:15:01
SQL> ORA-00279: change 38528825790 generated at 07/01/2012 11:57:30 needed for
thread 1
ORA-00289: suggestion : /oracle/XXX/oraarch/XXXarch1_AAA_XXXXXXXX.dbf
ORA-00280: change 38528825790 for thread 1 is in sequence #AAA


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00308: cannot open archived log
'/oracle/XXX/oraarch/XXXarch1_AAA_XXXXXXXX.dbf'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3


ORA-00308: cannot open archived log
'/oracle/XXX/oraarch/XXXarch1_AAA_XXXXXXXX.dbf'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3


SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
mesg: 0803-003 Cannot find the terminal.
[YOU HAVE NEW MAIL]

SQL*Plus: Release 11.2.0.2.0 Production on Sun Jul 1 22:30:01 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> Connected.
SQL> SQL> SQL> SQL>
RECOVER_TIME
-------------------
2012-07-01 19:30:01
SQL> ORA-00279: change 38528825790 generated at 07/01/2012 11:57:30 needed for
thread 1
ORA-00289: suggestion : /oracle/XXX/oraarch/XXXarch1_AAA_XXXXXXXX.dbf
ORA-00280: change 38528825790 for thread 1 is in sequence #AAA

I need out put to be displayed as below:

SQL> ORA-00279: change 38528825790 generated at 07/01/2012 11:57:30 needed for
thread 1
ORA-00289: suggestion : /oracle/XXX/oraarch/XXXarch1_AAA_XXXXXXXX.dbf
ORA-00280: change 38528825790 for thread 1 is in sequence #AAA


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00308: cannot open archived log
'/oracle/XXX/oraarch/XXXarch1_AAA_XXXXXXXX.dbf'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3


ORA-00308: cannot open archived log
'/oracle/XXX/oraarch/XXXarch1_AAA_XXXXXXXX.dbf'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3


SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
mesg: 0803-003 Cannot find the terminal.
[YOU HAVE NEW MAIL]

SQL*Plus: Release 11.2.0.2.0 Production on Sun Jul 1 22:30:01 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> Connected.
SQL> SQL> SQL> SQL>
RECOVER_TIME
-------------------
strt='2012-07-01 19:15:01'
end='2012-07-01 19:30:01'
awk '/'"$strt"'/{p=1;next} /'"$end"'/{p=0}p' inputfile