RMAN is picking up old pfile

I am in the early stages of recovering a backup onto another host. I've recovered the spfile to pfile from autobackup and have been editing it. I've exited RMAN, but when I start it with:
rman TAGET / NOCATALOG
, it is finding an old copy of my pfile from somewhere, which has an invalid audit_file_dest in it. So RMAN errors out. I can't find the file it is using to start, so I can't fix audit_file_dest. Any idea where it might be ? The pfile I am editing is in $ORACLE_HOME/dbs/initDB.ora, and that has the correct audit_file_dest . Oracle 10.2.0.4, Linux.
Can I force rman to use a specific pfile ?

I just can't get RMAN to start
[oracle@TEST-FP-DB dbs]$ export ORACLE_SID=mtprod1
[oracle@TEST-FP-DB dbs]$ rman target / nocatalog
Recovery Manager: Release 10.2.0.4.0 - Production on Tue Mar 15 10:52:38 2011
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
[oracle@TEST-FP-DB dbs]$ grep audit $ORACLE_HOME/dbs/initmtprod1.ora
*.audit_file_dest='/app/oracle/admin/mtprod1/XXadump'
[oracle@TEST-FP-DB dbs]$ cat /app/oracle/admin/mtprod1/bdump/alert_mtprod1.log
Could not open audit file: /app/oracle/admin/mtprod1/adump'/ora_7056.aud
Retry Iteration No: 1   OS Error: 2
Retry Iteration No: 2   OS Error: 2
Retry Iteration No: 3   OS Error: 2
Retry Iteration No: 4   OS Error: 2
Retry Iteration No: 5   OS Error: 2
Tue Mar 15 10:52:43 2011
OS Audit file could not be created; failing after 5 retries
[oracle@TEST-FP-DB dbs]$ date
Tue Mar 15 10:53:15 WST 2011
[oracle@TEST-FP-DB dbs]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Tue Mar 15 10:55:28 2011
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925You can see my test, I have XXadump in teh current pfile. RMAN is picking up an old mistake in the pfile, where I had a trailing quote only on the audit_file_dest

Similar Messages

  • RMAN job not deleting old archivelogs

    I've setup an rman backup via dbconsole to backup db and archivelogs, for a retention period of 7 days, then delete obsolete. The database is 10GR2, running on windows 2008. For as yet unknown reasons, the cursed dbconsole quit working, and I haven't rebuilt it yet because I can't put this database in quiesce mode without pissing a lot of people off, so am using rman command line to check on backups etc.
    I checked today, no obsolete backups found after running crosscheck database, and no obsolete logs after running crosscheck archivelog all;
    Double checked recovery window and it is indeed 7 days, but there are archivelogs older than 7 days. When I run delete obsolete they dont get deleted, so I run delete archivelog all completed before 'sysdate - 7' and it deletes 314 old logs.
    Why is rman not seeing these old logs? I believe I have the backups and archivelogs set to the same criteria, yet backups are being deleted over 7 days.
    What am I missing here?
    ps. for all the trouble dbconsole gives me, I'm tempted to go with rman scripts in windows scheduled tasks and just forget about it.. </end rant>

    Hi,
    How many old those archvies are?
    did those archives are in your RMAN repository?
    might it may be old when you have not configured retention policy..
    or
    delete those old archive logs once, crosscheck them all and lets see if you face any issues. still.
    Thanks

  • Mail picking up old messages and marking as new

    I hope someone can help - I have this really annoying problem and I have no idea how to stop it from happening.
    Every day my mammal picks up a handful of old emails from a few weeks previous and marks them as new messages. Every time this happens I need to scroll through my inbox to find the offending messages and delete them again. Sometimes they are just junk messages that I have previously deleted and sometimes they are actual emails that I have read and want to keep in my inbox. My email comes from hotmail. this problem started some time ago before I updated to Yosemite and it is still happening even after the update. I've tried looking into mail settings to see if I can find a solution but had no luck. It's driving me nuts!
    KRB

    Try rebuilding the mailbox. This can take awhile if you have a lot of mail.
    Rebuild mailbox
    If that doesn't work, try re-indexing the mailboxes. This can take awhile if you have a lot of mail.
    Reindex messages      Mavericks/Yosemite

  • Lync Phone picking up old Extension

    We have Lync 2013 and are using Lync Polycom phones as well.  Our owner is having an issue where the ext showing up on his phone is from our old none Lync phone system.  If his computer is not connected to the physical phone and it is rebooted
    the phone picks up the correct ext.  Sometime later after connecting his laptop it brings in an old ext.
    If we check under Lync -Options under Phones and then Work Phone (which is grayed out) this is where it shows his incorrect ext.  We have verified in both AD and Lync server under Line URL that the correct extension is there.  
    We have also verified that he does not have a contact of himself in Outlook just in case this was being picked up.  
    Where would this be pulling from?

    I think your problem is most related with you profile.
    You can sign in your account on another computer then connect Lync phone to check if you still have the problem.
    Please also delete the certificate for Lync user and credential in Credential Manager besides you delete the local cached file.
    Lisa Zheng
    TechNet Community Support

  • My phone picks the old apple-id when I am trying to uppdate apps form app-store. What to do?

    I cannot fint out what the problem is.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • KKPAN estimate picks up old subcontracting PO price

    when attempting to run a new cost estimate for a plant the KKPAN cost estimate is populating with the last purchase order price?
    using same resource, cost element, and component as always.
    KKPAN price-total brings in the last PO price seen from ME1M.  it should bring in the condition.
    not sure what's incorrect

    Look into the valuation strategy maintained for the valuation variant associated with the costing variant when you run KKPAN. If the first priority is to take the Price from Purchase InfoRecord, you can control the substrategy of which price from PIR to be used in costing.

  • ELEMENTS  8 WON'T PICK UP OLD DATA

    THE PIX ARE THERE BUT IT CRASHES WHEN IT TRIES TO OBTAIN THEM

    When the disk is in the CD-Rom/DVD Drive try browsing to My Computer. Right click on the Disk icon and select Run or Open.
    If the program still fails to install you could try to download the 30 day free trial version at the following link.
    Before the 30 days is up you can simply input your product serial number that came with your disk.
    http://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop_elements&loc=en_us

  • Why is Pfile not in RMAN - backup

    RMAN backups spfile together with controlfile. Why doesn't it support backing up pfile? Is is possible to configure it as to backup pfile too?
    Thx.
    Aliq.
    Message was edited by:
    user547746

    pfiles are obsolete, and you should stop using them.Incorrect ,obsolete means not usable but one can use it and one using it,you can say its not recommended,on the basis of human readable pfile you created spfile .
    Before spfile , pfile commented parameter mess the DBA when and what for used this parameter ,though DBA used comments by providing date and if it happens to change 20 times then he has to make comments 20 times ,with the invent of spfile you can save yours own pfile with dated version within filename i.e (initORCL15042008.ora) and then create the spfile from this pfile ,now you can maitnin yours pfile history easily as before.You can track when and what was changed.You can revert back to yours current instance as old one by creating spfile from oldpfile.
    To OP
    spfile is for single source of server parameters which is fact, thats why RMAN take spfile backup rather pfile.
    You can also change some dynamic parameter during instance working ,you can change it in the spfile as well within instance memory.
    Khurram

  • Database restore from old rman backup

    Hi Friends,
    My database version is oracle 10.2.0 O/s : Windows
    I have a production database of an outlet. Yesterday night 11pm they have done some wrong transactions and whole stock is showing wrong.
    They have taken a export backup at 9.30 pm and latest archives are there.
    We have a rman backup on April-30,2008. when I am trying to restore from the old rman backup the controlfile I am unable to do it.
    Can any one of you help me out.
    thankyou
    satya

    Hi,
    I have tried installing in a seperate system and restore the rman backup, as I do not have the controlfile I have taken a standby controlfile and started restoring the rman backup as the old rman backup dbid is different with the current dbid and giving me following error:
    ORA-19870: error reading backup piece D:\MPOUTLET\0AJF4BM3_1_1
    ORA-19691: D:\MPOUTLET\0AJF4BM3_1_1 is from different database: id=1976833331, name=JEEVAMP
    ORA-19870: error reading backup piece D:\MPOUTLET\0BJF4BOE_1_1
    ORA-19691: D:\MPOUTLET\0BJF4BOE_1_1 is from different database: id=1976833331, name=JEEVAMP
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of catalog command at 07/13/2008 12:23:23
    RMAN-06209: List of failed objects
    RMAN-06211: ==========================
    RMAN-06212: Object Type Filename/Handle
    RMAN-06213: --------------- ---------------------------------------------------
    RMAN-06214: Backup Piece D:\MPOUTLET\0AJF4BM3_1_1
    RMAN-06214: Backup Piece D:\MPOUTLET\0BJF4BOE_1_1

  • After Delimiting old rate is picking up

    Hi All,
    I am stuck in one issue where Per diem for meal/Time per day and Per diem for accommodation has been delimited from 01.01.2011 with new rate. Old rate date is from 01.01.1997 to 31.12,2010 and new rate is from 01.01.2011 to 31.12.9999.
    Now problem is that when i am preparing Trip in PR05  T-code  for current date (6.01.2011) system pick the old rate whereas it should pick the new rate.
    Why system pickig up the old rate and how to resove this.
    Thanks in Advance
    Best Regards
    Josh

    hi,
    check is there any user exit available and you can activate it with the new logic for the rate picking.

  • RMAN-03002: failure of recover command

    Hi all,
    I am testing a new backup and restore mechanism of a 11.2 system in Linux. A third mirror of the disks from the database server has been split and mounted in a media server. An RMAN backup was taken then, on tape, using HP Data Protector. Then, in the media server again, I mounted all the disk groups and removed all the files from ASM via asmcmd. With everything cleared, I proceeded in doing the following:
    1. Started up nomount using an old PFILE.
    2. Initiated an RMAN session and SET DBID, connected to the target and the catalog. Restore the SPFILE in a PFILE.
    3. Shutdow and started up nomount with PFILE the newly created file (edited it first to comment out CLUSTER_DATABASE parameter, as the media server is not configured for this).
    4. Restored the contorl file. This was done successfully.
    5. Restored the database. This was done successfully.
    6. Mounted the database and attempted to recover it. I received the following error:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 07/12/2013 09:42:24
    RMAN-06094: datafile 1 must be restored
    7. I attempted a recover from SQL*Plus; the error message was a little more helpful:
    SQL> recover database using backup controlfile;
    ORA-00283: recovery session canceled due to errors
    ORA-01110: data file 1: '+BT1_A_SYSTEM/bt1_a/datafile/system.259.813148661'
    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
    ORA-01110: data file 1: '+BT1_A_SYSTEM/bt1_a/datafile/system.259.813148661'
    8. I checked my source database and the file name is as it appears above. But in the restored system, the file has a different name:
    ASMCMD> pwd
    +BT1_A_SYSTEM/BT1_A/DATAFILE
    ASMCMD> ls -l SYSTEM*
    Type      Redund  Striped  Time             Sys  Name
    DATAFILE  UNPROT  COARSE   JUL 11 16:00:00  Y    SYSTEM.257.820514399
    9. OK. I presume that this happened because we are using OMF. But, I was expecting RMAN to specify the full file names and thus restore them with their original names. The problem is now that the control file has the original file names, which cannot be found in the media server, where the restore took place. I am wondering if I should MOUNT the database after the control file restore and before I start the database restore, so RMAN might have the opportunity of renaming the file names in the control file.
    Has anyone encountered this problem? I would appreciate some help.
    Regards,
    Takis.

    That is correct Hemant. I latter realised my mistake.
    When I mounted the database, the control file was opened. Then I repeated the restore. RMAN, this time was able to access the control file and rename dynamically the files, as they were restored and getting their new names.
    So, I think, the correct sequence of events may be:
    1, Check in ASM if the disk groups are mounted (lsdg). If not, mount the disk groups (alter diskgroup <dg_name> mount;).
    2. Startup nomount (if no PFILE available, create a simple one with only db_name in it).
    3. From RMAN, set DBID and then connect to target and catalog.
    4. restore spfile to pfile from autobackup
    5. restore control file(s) from autobackup
    6. alter database mount
    7. restore database
    8. restore archivelog all
    9. recover database
    10. alter database open resetlogs
    In my case, this worked, by enslarge. RMAN stopped when it run out of archived redo logs.
    I then attempted, via SQL*Plus:
    recover database using backup controlfile until cancel
    When prompted, I typed: CANCEL
    That was fine, but then, when I attempted:
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-19809: limit exceeded for recovery files
    ORA-19804: cannot reclaim 525336576 bytes disk space from 2147483648 limit
    So, I needed to increase the parameter db_recovery_file_dest_size which I did (in the pfile; luckily I had available space in the disk group). I shut down and started up (mount). Then:
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-00392: log 24 of thread 2 is being cleared, operation not allowed
    ORA-00312: online log 24 thread 2: '+BT1_A_RECO'
    So:
    SQL> alter database clear unarchived logfile group 24;
    Database altered.
    SQL> alter database open resetlogs;
    Database altered.
    SQL> select * from dual;
    D
    X
    Happy days!
    Regards,
    Takis.

  • RMAN Full Database restore cross platforms

    All
    I have a database 10.2.0.3 running on Solaris 10 OS.
    I have performed a full back up (level 0) of this database using rman utility with auto back up on. I am trying to worl on a scenario where I could restore this backup on another linux machine. so I copied over all the backup pieces into the target linux server. from a local RDBMS installation (10.2.0.3) on the linux machine I am trying to restore the database... but not successful yet..
    when I issue restore spfile or restore control file from +<backup file name>+; the prompt continues to search in some location is responding back saying no back up piece found.. below is the sequece of step I am trying ..
    1 set up env on the linux server
    2 rman target /
    (instance not started but rman allows connection)
    3 set DBID=+<DB ID of the source database running on Solaris>+
    it executes set dbid=
    4 startup nomount
    as the pfile/spfile is not available under $ORACLE_HOME/dbs on linux machine it picks up default pfile however but the instance stars no mount..
    5 restore spfile from '/u01/app/oracle/product/10.2.0/rman_bkp/c-300009955'
    here it is not able to restore any thing.same is the case with control file.
    Any ideas please advice
    Sarat

    Sarat Chandra C wrote:
    Thanks for the referance. I now understand that I may not be able to use transportable database command to transport the entire db. However there is a line in the +"Restrictions on Cross-Platform Transportable Database"+ which says +"The principal restriction on cross-platform transportable database is that the source and destination platform must share the same endian format. For example, while you can transport a database from Microsoft Windows to Linux for x86 (both little-endian), or from HP-UX to AIX (both big-endian), you cannot transport a whole database from HP_UX to Linux for x86 using this feature. You can, however, create a new database on a destination platform manually, and transport needed tablespaces from the source database using cross-platform transportable tablespace as described in "Cross-Platform Tranportable Tablespace: CONVERT DATAFILE or TABLESPACE"."+
    I understand if we are ready to transport every tablespace from Source to Target individually, may then be able to replicate a transportable database. Does the transportable tablespace do not have any restrictions like the transport database has got in respect to Platforms and Endian? Please clarify.
    Also is there a support matrix for thr transportable database and tablespaces which we could refer to ?
    Regards!
    SaratSarat,
    The same restriction that is there for the transport of the whole database lies completely true for the transportable tablespace as well if you are going for the cross platform. Endian must match across the platforms than only you can do this otherwise, as like the database feature, you need to convert the source file to the target endian.
    If you look at the reference doc for the Trasnport Tablespace command,
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta063.htm#RCMRF1919
    This restriction is documented there besides other restrictions
    >
    Restrictions and Usage Notes
    The limitations on creating transportable tablespace sets described in Oracle Database Administrator's Guide apply to transporting tablespaces from backup, with the exception of the requirement to make the tablespaces read-only.
    TRANSPORT TABLESPACE does not perform endian format conversion. If the target platform has a different endian format, then you must use the RMAN CONVERT command to perform the separate step of converting the endian format of the datafiles in the transportable set.
    >
    HTH
    Aman....

  • JSP page is coming back with old data even when DB updated

    Hello,
    I am updating an existing record on a database using an HTML form and the changes update the ACCESS database immediately, but the .jsp page is picking up
    old data.
    But but when i do a manual REFRESH, the correct data comes back fine!
    Thanks very much for any insights!
    Summary of the code:
    1. InputEmployeeInfo.html - enter change data, call update....jsp
    <HEAD> <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/> </HEAD>
    <FORM NAME="updateInfo"
    ACTION="./UpdateEmployeeInfo.jsp" >>>>>2.
    METHOD="POST">
    2. UpdateEmployeeInfo.jsp: - call bean, update database, forward to present..jsp
    <HEAD> <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    </HEAD>
    <% response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0); %>
    <jsp:useBean id="empInfo"
    class="com.ora.jsp.beans.employee23.EmployeeInfoBean" >>>>>3.
    scope="request"/>
    <jsp:setProperty name="empInfo" property="*" />
    <% empInfo.updateDatabase(); %> >>>>>3b.
    <jsp:forward page="PresentChangeOfEmployeeData.jsp" /> >>>>>4.
    </BODY>
    </HTML>
    3. com.ora.jsp.beans.employee23.EmployeeInfoBean - Bean-update DB with change data
    public class EmployeeInfoBean {
    public void updateDatabase(){                                            <----3b.
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    Connection conn =
    DriverManager.getConnection("jdbc:odbc:example");
    String sql = "UPDATE EMPLOYEEINFO SET " +
    "NAME=?, ADDRESS=?, PHONE=? WHERE ID=?";
    PreparedStatement statement = conn.prepareStatement(sql);
    statement.setString(1, name);
    statement.setString(2, address);
    statement.setString(3, phone);
    statement.setInt(4, id);
    statement.executeQuery();
    statement.close();
    conn.close();
    4. PresentChangeOfEmployeeData.jsp - read database and display changes <----4.
    <HEAD> <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    </HEAD>
    <% response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0); %>
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    Connection conn =
    DriverManager.getConnection("jdbc:odbc:example");
    Statement statement = conn.createStatement();
    String sql = "SELECT * FROM EMPLOYEEINFO WHERE ID = " + employeeID;
    ResultSet rs = statement.executeQuery(sql);
    while(rs.next()){
    %>
    <TR><TD ALIGN="right" WIDTH="50%">Name:</TD>
    <TD WIDTH="50%"><%= rs.getString("NAME") %></TD>
    ================================================================================
    Complete code listing:
    1, InputEmployeeInfo.html
    <HTML>
    <HEAD>
    <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <TITLE>Change of Information</TITLE>
    </HEAD>
    <BODY>
    <TABLE WIDTH="100%" BORDER="0" BGCOLOR="navy">
    <TR ALIGN="center">
    <TD><FONT SIZE="7" COLOR="yellow">Employee Information</FONT></TD>
    </TR>
    </TABLE>
    <CENTER>
    <FONT SIZE="5" COLOR="navy">
    Please Enter Your Information<BR>
    Fill in all fields
    </FONT>
    </CENTER>
    <TABLE WIDTH="100%">
    <FORM NAME="updateInfo"
    ACTION="./UpdateEmployeeInfo.jsp" >>>>>>>>>2.
    METHOD="POST">
    <TR><TD WIDTH="40%" ALIGN="right">Current ID: </TD>
    <TD WIDTH="60%"><INPUT TYPE="text" NAME="id"></TD>
    </TR>
    <TR><TD WIDTH="40%" ALIGN="right">New Name: </TD>
    <TD WIDTH="60%"><INPUT TYPE="text" NAME="name" VALUE="Mickey"></TD>
    </TR>
    <TR><TD WIDTH="40%" ALIGN="right">New Address: </TD>
    <TD WIDTH="60%">
    <INPUT TYPE="text" NAME="address" VALUE="St. Louis, MO">
    </TD>
    </TR>
    <TR><TD WIDTH="40%" ALIGN="right">New Phone: </TD>
    <TD WIDTH="60%">
    <INPUT TYPE="text" NAME="phone" VALUE="555-555-1234">
    </TD>
    </TR>
    <TR><TD COLSPAN="2" ALIGN="center">
    <INPUT TYPE="submit" NAME="btnSubmit" VALUE="Update Profile"></TD>
    </TR>
    </TABLE>
    </FORM>
    </BODY>
    </HTML
    2. UpdateEmployeeInfo.jsp:
    <HTML>
    <HEAD>
    <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <TITLE>Updating Employee Information</TITLE>
    </HEAD>
    <BODY>
    <% response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    <jsp:useBean id="empInfo"
    class="com.ora.jsp.beans.employee23.EmployeeInfoBean" >>>>>>>>>>>>>3.
    scope="request"/>
    <jsp:setProperty name="empInfo" property="*" />
    <% empInfo.updateDatabase(); %> >>>>>>>>>>>>>3b.
    <jsp:forward page="PresentChangeOfEmployeeData.jsp" /> >>>>>>>>>>>>>4.
    </BODY>
    </HTML>
    3. com.ora.jsp.beans.employee23.EmployeeInfoBean <-------------3.
    package com.ora.jsp.beans.employee23;
    import java.sql.*;
    public class EmployeeInfoBean {
    private String name, address, phone;
    private int id;
    public void setName(String input){
    name = input;
    public String getName(){
    return name;
    public void setAddress(String input){
    address = input;
    public String getAddress(){
    return address;
    public void setPhone(String input){
    phone = input;
    public String getPhone(){
    return phone;
    public void setId(int input){
    id = input;
    public int getId(){
    return id;
    public void updateDatabase(){                                       <-------3b.
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    Connection conn =
    DriverManager.getConnection("jdbc:odbc:example");
    String sql = "UPDATE EMPLOYEEINFO SET " +
    "NAME=?, ADDRESS=?, PHONE=? WHERE ID=?";
    PreparedStatement statement = conn.prepareStatement(sql);
    statement.setString(1, name);
    statement.setString(2, address);
    statement.setString(3, phone);
    statement.setInt(4, id);
    statement.executeQuery();
    statement.close();
    conn.close();
    catch (Exception e) {}
    4. PresentChangeOfEmployeeData.jsp <---------4.
    <HTML>
    <HEAD>
    <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <% response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    <%@ include file="CompanyBanner.html"%>
    <%@ page import="java.sql.*" %>
    <jsp:useBean id="empInfo"
    class="com.ora.jsp.beans.employee23.EmployeeInfoBean"
    scope="request"/>
    <CENTER>
    <FONT SIZE="5" COLOR="navy">
    Your New Information
    </FONT>
    </CENTER>
    <TABLE WIDTH="100%" BORDER="1">
    <%
    int employeeID = empInfo.getId();
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); <--------4b,
    Connection conn =
    DriverManager.getConnection("jdbc:odbc:example");
    Statement statement = conn.createStatement();
    String sql = "SELECT * FROM EMPLOYEEINFO WHERE ID = " + employeeID;
    ResultSet rs = statement.executeQuery(sql);
    while(rs.next()){
    %>
    <TR><TD ALIGN="right" WIDTH="50%">Name:</TD>
    <TD WIDTH="50%"><%= rs.getString("NAME") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Address:</TD>
    <TD WIDTH="50%"><%= rs.getString("ADDRESS") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Phone Number:</TD>
    <TD WIDTH="50%"><%= rs.getString("PHONE") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Work Status:</TD>
    <TD WIDTH="50%"><%= rs.getString("WORKSTATUS") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Total Sick Days:</TD>
    <TD> <%= rs.getString("TOTALSICKDAYS") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Taken Sick Days: </TD>
    <TD><%= rs.getString("TAKENSICKDAYS") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Total Personal Time(in hours): </TD>
    <TD><%= rs.getString("TOTALPERSONALTIME") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Taken Personal Time(in hours): </TD>
    <TD><%= rs.getString("TAKENPERSONALTIME") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Health Care Plan:</TD>
    <TD WIDTH="50%"><%= rs.getString("HEALTHCAREPLAN") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Dental Plan:</TD>
    <TD WIDTH="50%"><%= rs.getString("DENTALPLAN") %></TD>
    </TR>
    <TR><TD ALIGN="right" WIDTH="50%">Vision Plan:</TD>
    <TD WIDTH="50%"><%= rs.getString("VISIONPLAN") %></TD>
    </TR>
    <% }//end while loop
    } // end try block
    catch (Exception e) {};
    %>
    </TABLE>
    <%@ include file="ch24_SiteNavigator.html" %>
    </BODY>
    </HTML>

    <%
    String dept_name=request.getParameter("D1");
    String itmp,itmcd,sn;
    %>
    <%
    Connection con;
    PreparedStatement ps;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:acc");
    Statement stmt=con.createStatement();
    ResultSet rs=stmt.executeQuery("select * from item_details where Item_Name='"+dept_name+"'
    %>
    <td> Product name</td>
    <td>Product description</td>
    <td><Product code</td>
    <td>Product price</td></tr>
    <form method=post action="mycreate.jsp">
    <%
    while(rs.next())
    %><tr>
    <%=rs.getString(1)%></td>
    <%=rs.getString(4)%></td>
    <td><font color="#ffffff" size="3" face="arial unicode
    ms">    <%=rs.getString(3)%></td>
    <% String temp=rs.getString(3);%>
    <%=temp%>
    <td>
    <%=rs.getString(5)%></td>
    <td><input type=submit value="Add to cart"></td></tr>
    <form method=post action="mycreate.jsp">
    <%
    con.close();
    %>
    </tr>
    </table></tr></table></tr></table>
    </form>
    </form>
    I want the value of rs.getString(3) in a variable

  • Itunes is picking up an email address from 5 years ago.  How do I change that

    I'm trying to sync my itouch with my new Mac Book.  It is picking up the user name of an email address I had 5 or 6 years ago.  When I don't remember the password it emails it to my old email address which I don't have anymore.  I can connect to my PC just fine, but the Mac is picking up old info from somehwere.  I can't find the personal info on my iphone, itouch or in itunes anywhere.

    What new iOS?
    Why did you choose to update without first confirming that a current backup exists?
    Nothing can be done if a more current backup does not exists.

  • FM not picking correct entry

    Hi experts,
    Can anyone please explain what the below FM performs:
    ==================================
    FUNCTION Z.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(CHRT_ACCTS) TYPE  /BI0/OICHRT_ACCTS
    *"     REFERENCE(ACCOUNT) TYPE  /BI0/OIACCOUNT
    *"     REFERENCE(CO_AREA) TYPE  /BI0/OICO_AREA
    *"     REFERENCE(ZPC) TYPE  /BIC/OIZPC
    *"     REFERENCE(KEY_MUST_BE_FOUND) TYPE  BOOLEAN DEFAULT 'X'
    *"     REFERENCE(MSGTY) TYPE  SYMSGTY DEFAULT 'I'
    *"     REFERENCE(GET_FIRST_ENTRY) TYPE  BOOLEAN DEFAULT 'X'
    *"     REFERENCE(DATETO) TYPE  RSDATETO
    *"     REFERENCE(DATEFROM) TYPE  RSDATEFROM OPTIONAL
    *"     REFERENCE(RECNO) TYPE  SYTABIX OPTIONAL
    *"  TABLES
    *"      ZZ STRUCTURE  /BIC/AZZ00
    *"      MONITOR STRUCTURE  RSMONITOR OPTIONAL
    *"      MONITOR_RECNO STRUCTURE  RSMONITORS OPTIONAL
      CLEAR ZZ.
      ZZ-chrt_accts   = chrt_accts.
      ZZ-account      = account.
      ZZ-co_area      = co_area.
      ZZ-/bic/zpc = zpc.
      ZZ-datefrom     = datefrom.
      ZZ-dateto       = dateto.
      REFRESH ZZ.
      PERFORM z1000_read_ZZ TABLES ZZ
                                 USING  get_first_entry.
    return values found in table or raise exception
      IF  ZZ[] IS INITIAL
      AND key_must_be_found = 'X'.
        PERFORM z1000_set_return_message
                          TABLES monitor
                          USING msgty 'YFI_MIR' '013'
                          'ZZ'    chrt_accts
                            account co_area.
        PERFORM z9999_return_message_recno
                          TABLES monitor_recno
                          USING msgty 'YFI_MIR' '013'
                          'ZZ    chrt_accts
                            account co_area
                            recno.
      ENDIF.
    ENDFUNCTION.
    =========================================
    In our case there are 2 records in the table ZZ, of which the FM should pick the latest record but it is picking the old record.
    Can anyone please check where the error is and any correction I have to make inorder to rectify the error.
    I suppose we need to change in the following line
    PERFORM z1000_read_ZZ TABLES ZZ
                                 USING  get_first_entry.
    Regards,
    Bhadri M.

    You can sort the ZZ table records based on your logic by which you want to have the latest record.

Maybe you are looking for